Interface ProjectEx
-
- All Superinterfaces:
BuildProject,CleanupSettings,CleanupSettingsInit,Comparable<BuildProject>,InheritableUserParametersHolder,InheritableUserParametersHolderEx,InternalParameters,Loggable,ParametersSupport,ParameterSupport,ReadOnlyUserParameters,SecureDataStorage,SecureTokensProducer,SPersistentEntity,SProject,UserParametersHolder
- All Known Implementing Classes:
ProjectImpl,SecuredProject
public interface ProjectEx extends SProject, CleanupSettingsInit, InheritableUserParametersHolderEx, SecureDataStorage, ParameterSupport
-
-
Field Summary
-
Fields inherited from interface jetbrains.buildServer.BuildProject
ROOT_PROJECT_ID
-
Fields inherited from interface jetbrains.buildServer.serverSide.CleanupSettings
CLEANUP_PREVENT_DEPENDENCIES_ARTIFACTS_FROM_CLEANUP, DISABLE_CLEANUP_POLICIES
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidaddBuildTypeTemplate(BuildTypeTemplateEx template)Stores build type template in the project, should be used when templates are loaded from configuration files.voidaddDefaultTemplateListener()voidattachedToModel(ProjectDataModel model)voidattachEnforcedSettings(BuildTypeTemplate typeTemplateEx)voidcheckCyclicDependencies(SBuildType buildType)Checks if a build type added or moved to the given project creates a cyclic snapshot dependency due to some dependencies defined in the project's effective default templatevoidcheckCyclicDependency(Collection<SBuildType> buildType, Dependency dependency)Checks if a snapshot dependency creates a cycle if added to the provided build type.SBuildTypecopyBuildType(SBuildType originalBuildType, String newExtId, String newName, CopyOptions copyOptions, BuildTypeCopyMap copiedObjects)BuildTypeTemplateExcopyTemplate(BuildTypeTemplateEx origTemplate, String extId, String name, CopyOptions options)SVcsRootExcopyVcsRoot(SVcsRoot originalRoot, String externalId)Creates a copy of original VCS root in this project.BuildTypeExcreateBuildType(String name)Creates new build configuration with given nameBuildTypeExcreateBuildType(String extId, String name)Creates new build configuration with given external identifier and name.BuildTypeExcreateBuildType(String name, String runnerType, int maximumNumberOfBuilds, BuildTypeDescriptor.CheckoutType checkoutType)Creates a new build configurationBuildTypeExcreateBuildType(String extId, String name, Consumer<BuildTypeEx> init)BuildTypeExcreateBuildType(EntityId<String> entityId, boolean emptyUuid, String name, Consumer<BuildTypeEx> init)BuildTypeExcreateBuildTypeFromTemplate(BuildTypeTemplate template, String extId, String name, Consumer<BuildTypeEx> init)BuildTypeTemplateExcreateBuildTypeTemplate(String name)Creates new build configuration template.BuildTypeTemplateExcreateBuildTypeTemplate(String extId, String name)Creates new build configuration template with given external identifier an name.ConfigActionExcreateConfigAction(SUser user, String description)Creates a config action instance associated with this entity and having the specified description.ProjectExcreateProject(String externalId, String projectName)Creates new sub project in this projectProjectExcreateProjectNoAudit(String externalId, String projectName)ProjectExcreateProjectNoAudit(String externalId, String projectName, boolean archived)SVcsRootExcreateVcsRoot(String vcsName, String name, Map<String,String> params)Creates new VCS root in this projectProjectExcreateVirtualProject(String externalId, String projectName)voiddispose()Must be called when this project object is removed from the model.FilefindPluginSettings(String pluginName, String fileName)Search for a plugin settings file for given project.ProjectExfindProjectByName(String projectName)Returns own sub project with specified name (case insensitive) or null if there is no such project.List<File>getArtifactDirectories()List<SUser>getCommitters(int periodInSeconds)Returns committers to this project for the specified period (in seconds).CredentialsStoragegetCredentialsStorage()StringgetCredentialsStorageType()StringgetEditableSettingsNote()Returns admin area header note text to be shown if this project is editable or null if no note should be shownProjectSettingsGeneratorgetEffectiveGenerator()Same asVersionedSettingsManager.getEffectiveGenerator(SProject), but returns null if generator is not found instead of throwing an errorEnforcedSettingsgetEnforcedSettings()EntityId<String>getId()Returns the project id.AuditLogActiongetLastConfigModificationAction()StringgetNextAvailableFeatureId(String type, Map<String,String> params)Returns a generated ID that will be used by the next feature added to this projectList<SBuildType>getOwnBuildTypesOrder()Unlike SProject.getOwnBuildTypes() could return partial list of Build Types (if custom ordering is partial)CleanupSettingsSupportgetOwnCleanupSettingsSupport()StringgetOwnDefaultTemplateExternalId()ProjectEnforcedSettingsgetOwnEnforcedSettings()List<SProject>getOwnProjectsOrder()Unlike SProject.getOwnProjects() could return partial list of Projects (if custom ordering is partial)SerializableParametersCollectiongetOwnSerializableParameters()default ContainerWithInherited<String,Parameter>getParametersSupport()ProjectExgetParentProject()Returns the parent of this project.static Stream<SProject>getParents(SProject project)Returns ordered parents of the project, starting from the _RootProjectDataModelgetProjectDataModel()Pair<VcsRootInstance,BranchSpec>getSettingsRootSpec()Returns last used versioned settings VCS root and its branch spec or null if this information is not found project's custom data storageStringgetTokenContext(String token)Map<String,String>getTokensWithoutSecret()SVcsRootgetVersionedSettingsVcsRoot()List<SBuildType>getVirtualBuildTypes()booleanhasSettingsWithSecureValues()booleanhasVersionedSettings()Returns true if this project stores its settings in VCS, false otherwisevoidinitArchivedStatus(boolean archived)Initializes project's archived flag.booleanisDefaultBranchExcluded()Returns true if all project's own buildTypes exclude the default branch.booleanisEmptyUuid()booleanisExtIdChangeSupported()Returns true if extId can be changed in this project and all its entitiesbooleanisMoveEntitiesSupported()Returns true if project settings format supports move of entities in projects hierarchybooleanisMoveSupported()Returns true if project settings format supports move of the project with all its entities in projects hierarchybooleanisProjectCreateSupported()Returns true if format supports new project creationbooleanisProjectDeleteSupported()Returns true if project settings format supports delete of the projectvoidremoveDefaultTemplateListener()booleanreplaceInValues(Pattern regexp, String replacement)Processes project settings and replaces all values matched by regexp to specified replacement string.voidresortBuildTypes()Resorts build configurations containedbooleansaveSettingsBranchSpec(VcsRootInstance root, BranchSpec spec)Updates versioned settings root and branch spec last used for changes collecting.PersistTaskscheduleFileDelete(ConfigAction cause, String pathInProjectDir)PersistTaskscheduleFileSave(ConfigAction cause, String pathInProjectDir, byte[] fileContent)voidscheduleProjectConfigurationReload()Schedules background task to reload project configuration from disk.voidsendExtIdChangedEvents(ConfigAction cause, String oldExternalId, String newExternalId)voidsetDefaultTemplate(BuildTypeTemplate template)voidsetEditable(boolean editable)Enables or disables editing of the project in web UI, see alsoSPersistentEntity.isReadOnly().voidsetEnforcedSettings(ProjectEnforcedSettings enforcedSettings)Attach enforced settings profile to this project.voidsetExternalId(ConfigAction cause, String newId, boolean sendEvents)voidsetOwnBuildTypesOrder(List<String> internalIds)voidsetOwnProjectsOrder(List<String> internalIds)voidunregister()Tries to unregister this project from the model.voidvalidateNewExtId(String extId)Validates the given extId in this project-
Methods inherited from interface jetbrains.buildServer.BuildProject
getDescription, getExternalId, getFullName, getName, getParentProjectExternalId, getParentProjectId, getProjectId, getStatus, isRootProject
-
Methods inherited from interface jetbrains.buildServer.serverSide.CleanupSettings
getCleanupOptions, getCleanupPolicies, getInheritedCleanupOptions, getInheritedCleanupPolicies, getOwnCleanupOptions, getOwnCleanupPolicies
-
Methods inherited from interface jetbrains.buildServer.serverSide.CleanupSettingsInit
addCleanupPolicy, removeCleanupPolicies, setCleanupOption
-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface jetbrains.buildServer.serverSide.InheritableUserParametersHolder
getInheritedParametersCollection, getOwnParameter, getOwnParameters, getOwnParametersCollection, getOwnParametersWithoutInheritedSpec, getParameters, getParametersCollection
-
Methods inherited from interface jetbrains.buildServer.serverSide.InheritableUserParametersHolderEx
getOwnAndParentsNonInheritedParameter, getOwnAndParentsNonInheritedParameters, getOwnNonInheritedParameter
-
Methods inherited from interface jetbrains.buildServer.serverSide.InternalParameters
getBooleanInternalParameter, getBooleanInternalParameterOrTrue, getInternalParameterValue
-
Methods inherited from interface jetbrains.buildServer.serverSide.ParametersSupport
getParametersProvider, getValueResolver
-
Methods inherited from interface jetbrains.buildServer.serverSide.ReadOnlyUserParameters
getParameter, getParameterValue
-
Methods inherited from interface jetbrains.buildServer.serverSide.impl.SecureDataStorage
getSecureValue
-
Methods inherited from interface jetbrains.buildServer.serverSide.impl.SecureTokensProducer
getOrCreateToken
-
Methods inherited from interface jetbrains.buildServer.serverSide.SPersistentEntity
getConfigId, getConfigurationFile, getExternalId, getName, getParent, getReadOnlyReason, getVersion, isReadOnly, markPersisted, persist, remove, schedulePersisting, schedulePersisting, scheduleRemove
-
Methods inherited from interface jetbrains.buildServer.serverSide.SProject
addFeature, addFeature, addFeature, belongsTo, containsBuildType, copyBuildType, copyBuildTypeTemplate, createBuildType, createBuildType, createBuildTypeFromTemplate, createBuildTypeFromTemplate, createBuildTypeTemplate, createBuildTypeTemplate, createDummyVcsRoot, createVcsRoot, extractBuildTypeTemplate, findBuildTypeByExternalId, findBuildTypeById, findBuildTypeByName, findBuildTypeIdentityByName, findBuildTypeTemplateByExternalId, findBuildTypeTemplateById, findBuildTypeTemplateByName, findFeatureById, findVcsRootByName, getAgentPools, getArchivingTime, getArchivingUser, getArtifactsDirectory, getAvailableFeatures, getAvailableFeaturesOfType, getAvailableTemplates, getAvailableVcsRoots, getBuildTypes, getBuildTypeTemplates, getConfigDirectory, getConfigurationFile, getCustomDataStorage, getDefaultTemplate, getDefaultTemplateId, getExtendedFullName, getExtendedName, getOwnBuildTypes, getOwnBuildTypeTemplates, getOwnDefaultTemplate, getOwnDefaultTemplateId, getOwnFeatures, getOwnFeaturesOfType, getOwnProjects, getOwnVcsRoots, getPluginDataDirectory, getPluginSettingsFile, getPotentiallyResponsibleUsers, getProjectPath, getProjects, getStatus, getUsedVcsRoots, getVcsRootInstances, getVcsRoots, hasBuildTypes, isArchived, isInModel, isVirtual, moveToProject, moveToProject, persist, removeBuildType, removeBuildTypes, removeBuildTypeTemplate, removeFeature, setArchived, setDescription, setExternalId, setExternalId, setName, updateFeature
-
Methods inherited from interface jetbrains.buildServer.serverSide.UserParametersHolder
addParameter, removeParameter
-
-
-
-
Method Detail
-
getId
@NotNull EntityId<String> getId()
Returns the project id.- Returns:
- project id structure.
- Since:
- 8.0
-
createBuildType
@NotNull BuildTypeEx createBuildType(@NotNull String extId, @NotNull String name) throws DuplicateExternalIdException, DuplicateBuildTypeNameException, MaxNumberOfBuildTypesReachedException
Creates new build configuration with given external identifier and name.- Specified by:
createBuildTypein interfaceSProject- Parameters:
extId- external identifier for the new build configuration (must be unique in all build configuration scope, case insensitively).name- name of the build configuration (must be unique in the project scope).- Returns:
- newly created build configuration.
- Throws:
DuplicateBuildTypeNameException- if build configuration with such name already exists in this project.MaxNumberOfBuildTypesReachedException- if maximum number of build configurations is reached.DuplicateExternalIdException- when he given external id already belongs to another build template or build type.- Since:
- 8.0
-
createBuildType
@NotNull BuildTypeEx createBuildType(@NotNull String extId, @NotNull String name, @Nullable Consumer<BuildTypeEx> init) throws DuplicateExternalIdException, DuplicateBuildTypeNameException, MaxNumberOfBuildTypesReachedException
-
createBuildType
@NotNull BuildTypeEx createBuildType(@NotNull EntityId<String> entityId, boolean emptyUuid, @NotNull String name, @Nullable Consumer<BuildTypeEx> init) throws DuplicateExternalIdException, DuplicateBuildTypeNameException, MaxNumberOfBuildTypesReachedException
-
createBuildTypeFromTemplate
@NotNull BuildTypeEx createBuildTypeFromTemplate(@NotNull BuildTypeTemplate template, @NotNull String extId, @NotNull String name, @Nullable Consumer<BuildTypeEx> init) throws MaxNumberOfBuildTypesReachedException, InvalidVcsRootScopeException, DuplicateExternalIdException
-
createBuildType
@NotNull BuildTypeEx createBuildType(@NotNull String name) throws DuplicateBuildTypeNameException, MaxNumberOfBuildTypesReachedException
Description copied from interface:SProjectCreates new build configuration with given name- Specified by:
createBuildTypein interfaceSProject- Parameters:
name- name of the build configuration- Returns:
- newly created build configuration
- Throws:
DuplicateBuildTypeNameException- if build configuration with such name already exists in this projectMaxNumberOfBuildTypesReachedException- if maximum number of build configurations is reached- See Also:
SProject.createBuildType(String, String)
-
createBuildType
@NotNull BuildTypeEx createBuildType(@NotNull String name, @NotNull String runnerType, int maximumNumberOfBuilds, BuildTypeDescriptor.CheckoutType checkoutType) throws DuplicateExternalIdException, DuplicateBuildTypeNameException, MaxNumberOfBuildTypesReachedException
Description copied from interface:SProjectCreates a new build configuration- Specified by:
createBuildTypein interfaceSProject- Parameters:
name- name of the build configurationrunnerType- type of the runnermaximumNumberOfBuilds- maximum number of buildscheckoutType- type of the checkout- Returns:
- newly created build configuration
- Throws:
DuplicateBuildTypeNameException- if build configuration with such name already exists in this projectMaxNumberOfBuildTypesReachedException- if maximum number of build configurations is reachedDuplicateExternalIdException- See Also:
SProject.createBuildType(String, String)
-
resortBuildTypes
void resortBuildTypes()
Resorts build configurations contained
-
createBuildTypeTemplate
@NotNull BuildTypeTemplateEx createBuildTypeTemplate(@NotNull String name) throws DuplicateTemplateNameException
Description copied from interface:SProjectCreates new build configuration template.- Specified by:
createBuildTypeTemplatein interfaceSProject- Parameters:
name- name of the template- Returns:
- newly created template
- Throws:
DuplicateTemplateNameException- thrown if template with such name already exists- See Also:
SProject.createBuildTypeTemplate(String, String)
-
createBuildTypeTemplate
@NotNull BuildTypeTemplateEx createBuildTypeTemplate(@NotNull String extId, @NotNull String name) throws DuplicateTemplateNameException, DuplicateExternalIdException
Description copied from interface:SProjectCreates new build configuration template with given external identifier an name.- Specified by:
createBuildTypeTemplatein interfaceSProject- Parameters:
extId- external id (must be unique thru all projects, case insensitively).name- name for the new template.- Returns:
- newly created template.
- Throws:
DuplicateTemplateNameException- thrown if template with such name already exists.DuplicateExternalIdException- if this external identifier belongs to another template.
-
addBuildTypeTemplate
void addBuildTypeTemplate(@NotNull BuildTypeTemplateEx template) throws DuplicateTemplateNameExceptionStores build type template in the project, should be used when templates are loaded from configuration files.- Parameters:
template- template- Throws:
DuplicateTemplateNameException- if template with same name already exists in the project
-
setDefaultTemplate
void setDefaultTemplate(@Nullable BuildTypeTemplate template)
-
getOwnDefaultTemplateExternalId
String getOwnDefaultTemplateExternalId()
-
attachedToModel
void attachedToModel(ProjectDataModel model)
-
getProjectDataModel
@NotNull ProjectDataModel getProjectDataModel()
-
getParentProject
@Nullable ProjectEx getParentProject()
Description copied from interface:SProjectReturns the parent of this project.Every project, except root, has a parent.
Note that sometimes during initialization the child project may already exist while the parent project does not exist yet. In this case for some time null could be returned for non-root projects.
- Specified by:
getParentProjectin interfaceBuildProject- Specified by:
getParentProjectin interfaceSProject- Returns:
- the parent project, or null if this is a root.
- See Also:
BuildProject.getParentProjectId(),BuildProject.getParentProjectExternalId()
-
getCommitters
@NotNull List<SUser> getCommitters(int periodInSeconds)
Returns committers to this project for the specified period (in seconds).- Parameters:
periodInSeconds- period in seconds- Returns:
- all users who committed to this project for the specified period, sorted by their names
-
getLastConfigModificationAction
@Nullable AuditLogAction getLastConfigModificationAction()
-
setExternalId
void setExternalId(@NotNull ConfigAction cause, @NotNull String newId, boolean sendEvents) throws InvalidIdentifierException, DuplicateExternalIdException, ObsoleteEntityException, ReadOnlyEntityException
-
sendExtIdChangedEvents
void sendExtIdChangedEvents(@NotNull ConfigAction cause, @NotNull String oldExternalId, @NotNull String newExternalId)
-
copyVcsRoot
@NotNull SVcsRootEx copyVcsRoot(@NotNull SVcsRoot originalRoot, @Nullable String externalId)
Description copied from interface:SProjectCreates a copy of original VCS root in this project.- Specified by:
copyVcsRootin interfaceSProject- Parameters:
originalRoot- original VCS root.externalId- external id for the copy; if null the the external id will be generated automatically.- Returns:
- VCS root copy
-
createVcsRoot
@NotNull SVcsRootEx createVcsRoot(@NotNull String vcsName, @Nullable String name, @NotNull Map<String,String> params) throws UnknownVcsException
Description copied from interface:SProjectCreates new VCS root in this project- Specified by:
createVcsRootin interfaceSProject- Parameters:
vcsName- name of VCS pluginname- name of VCS root, if null or empty new name will be generated automaticallyparams- VCS root parameters- Returns:
- newly created VCS root
- Throws:
UnknownVcsException- if VCS plugin with specified name does not exist
-
addDefaultTemplateListener
void addDefaultTemplateListener()
-
removeDefaultTemplateListener
void removeDefaultTemplateListener()
-
getOwnCleanupSettingsSupport
@NotNull CleanupSettingsSupport getOwnCleanupSettingsSupport()
-
getOwnSerializableParameters
@NotNull SerializableParametersCollection getOwnSerializableParameters()
-
replaceInValues
boolean replaceInValues(@NotNull Pattern regexp, @NotNull String replacement)Processes project settings and replaces all values matched by regexp to specified replacement string. Currently works for parameters only.- Parameters:
regexp-replacement-- Returns:
-
dispose
void dispose()
Must be called when this project object is removed from the model.
-
unregister
void unregister() throws ProjectRemoveFailedExceptionTries to unregister this project from the model. Will firstly detach default&enforced templates then under synchronized block on ProjectManager instance will check that this project doesn't contain any subprojects and will remove this project from the model. If project has subprojects then ProjectRemoveFailedException will be thrown and default&enforced templates will be restored. Synchronization is needed to ensure no subprojects will be added during remove procedure.- Throws:
ProjectRemoveFailedException- if this project has subprojects.
-
findProjectByName
@Nullable ProjectEx findProjectByName(@NotNull String projectName)
Description copied from interface:SProjectReturns own sub project with specified name (case insensitive) or null if there is no such project.- Specified by:
findProjectByNamein interfaceSProject- Parameters:
projectName- name of the project to look for- Returns:
- a project or null if such a sub project does not exist
-
createProject
@NotNull ProjectEx createProject(@NotNull String externalId, @NotNull String projectName)
Description copied from interface:SProjectCreates new sub project in this project- Specified by:
createProjectin interfaceSProject- Parameters:
externalId- new sub project idprojectName- new sub project name- Returns:
- newly created sub project
-
createVirtualProject
ProjectEx createVirtualProject(@NotNull String externalId, @NotNull String projectName)
-
createProjectNoAudit
@NotNull ProjectEx createProjectNoAudit(@NotNull String externalId, @NotNull String projectName)
-
createProjectNoAudit
@NotNull ProjectEx createProjectNoAudit(@NotNull String externalId, @NotNull String projectName, boolean archived)
-
copyTemplate
@NotNull BuildTypeTemplateEx copyTemplate(@NotNull BuildTypeTemplateEx origTemplate, @NotNull String extId, @NotNull String name, @NotNull CopyOptions options)
-
setOwnProjectsOrder
void setOwnProjectsOrder(List<String> internalIds)
- Parameters:
internalIds- Empty list will remove custom ordering
-
setOwnBuildTypesOrder
void setOwnBuildTypesOrder(List<String> internalIds)
- Parameters:
internalIds- Empty list will remove custom ordering
-
getOwnProjectsOrder
@NotNull List<SProject> getOwnProjectsOrder()
Unlike SProject.getOwnProjects() could return partial list of Projects (if custom ordering is partial)- Returns:
- List of Project ordered
-
getOwnBuildTypesOrder
@NotNull List<SBuildType> getOwnBuildTypesOrder()
Unlike SProject.getOwnBuildTypes() could return partial list of Build Types (if custom ordering is partial)- Returns:
- List of Build Types ordered
-
getArtifactDirectories
@NotNull List<File> getArtifactDirectories()
- Returns:
- list of directories where artifacts of builds of this project are stored. List always has at least one element. The first directory in the list is a directory where new builds store their artifacts.
- Since:
- 9.1
-
setEditable
void setEditable(boolean editable)
Enables or disables editing of the project in web UI, see alsoSPersistentEntity.isReadOnly(). Editing is enabled or disabled for the project itself and all nested entities unless it is overridden in the nested entity.SProject.persist()method must be called afterwards.- Parameters:
editable- true to enable editing and false to disable
-
getParents
@NotNull static Stream<SProject> getParents(@NotNull SProject project)
Returns ordered parents of the project, starting from the _Root
-
getOwnEnforcedSettings
@Nullable ProjectEnforcedSettings getOwnEnforcedSettings()
- Returns:
- enforced settings profile attached to this project. Should not be used for validation - use
getEnforcedSettings()instead - Since:
- 10.0
-
getEnforcedSettings
@NotNull EnforcedSettings getEnforcedSettings()
- Returns:
- enforced settings affecting on this project - its own and all its parent`s (if any). Should not be used to update enforces settings - use
getOwnEnforcedSettings()instead - Since:
- 10.0
-
setEnforcedSettings
void setEnforcedSettings(@Nullable ProjectEnforcedSettings enforcedSettings)Attach enforced settings profile to this project. Neither configurations nor templates nor subproject would be reloaded at this moment, however new enforced settings will be applied immediately (will be read at first access).
- Parameters:
enforcedSettings-- Since:
- 10.0
-
attachEnforcedSettings
void attachEnforcedSettings(@NotNull BuildTypeTemplate typeTemplateEx)
-
getEditableSettingsNote
@Nullable String getEditableSettingsNote()
Returns admin area header note text to be shown if this project is editable or null if no note should be shown- Since:
- 2017.2
-
hasVersionedSettings
boolean hasVersionedSettings()
Returns true if this project stores its settings in VCS, false otherwise- Returns:
- see above
-
isDefaultBranchExcluded
boolean isDefaultBranchExcluded()
Returns true if all project's own buildTypes exclude the default branch. Returns false if project doesn't have own buildTypes.- Returns:
- see above
- Since:
- 2017.1
-
saveSettingsBranchSpec
boolean saveSettingsBranchSpec(@NotNull VcsRootInstance root, @NotNull BranchSpec spec)Updates versioned settings root and branch spec last used for changes collecting. Returns true if either VCS root or branch spec was changed comparing to their previous values- Parameters:
root- settings root instancespec- branch spec used for changes collecting- Returns:
- see above
-
getSettingsRootSpec
@Nullable Pair<VcsRootInstance,BranchSpec> getSettingsRootSpec()
Returns last used versioned settings VCS root and its branch spec or null if this information is not found project's custom data storage- Returns:
- see above
-
getTokensWithoutSecret
@NotNull Map<String,String> getTokensWithoutSecret()
- Returns:
- map of tokens which were accessed at some point, but no secrets were found for them; key in returned map is token, and value is human friendly description of the context in which token was used.
- Since:
- 2017.1
-
getCredentialsStorageType
@Nullable String getCredentialsStorageType()
- Returns:
- name of currently used credentials storage, or null if project does not use any storage
- Since:
- 2017.1
-
getCredentialsStorage
@Nullable CredentialsStorage getCredentialsStorage()
- Returns:
- currently used credentials storage, or null of project does not use any storage
- Since:
- 2019.2.2
-
getTokenContext
@Nullable String getTokenContext(@NotNull String token)
- Returns:
- context in which it was requested first. Used for displaying it to user so they could better work with it
- Since:
- 2019.2
-
getVersionedSettingsVcsRoot
@Nullable SVcsRoot getVersionedSettingsVcsRoot()
- Since:
- 2017.1
-
getEffectiveGenerator
@Nullable ProjectSettingsGenerator getEffectiveGenerator()
Same asVersionedSettingsManager.getEffectiveGenerator(SProject), but returns null if generator is not found instead of throwing an error- Since:
- 2017.2
-
hasSettingsWithSecureValues
boolean hasSettingsWithSecureValues()
- Returns:
- true if this project or its sub projects have secure values (passwords) in their settings:
- parameters of password type
- VCS roots with not empty passwords
- any other settings with not empty passwords
- Since:
- 2017.1
-
isExtIdChangeSupported
boolean isExtIdChangeSupported()
Returns true if extId can be changed in this project and all its entities- Returns:
- see above
-
isMoveEntitiesSupported
boolean isMoveEntitiesSupported()
Returns true if project settings format supports move of entities in projects hierarchy- Returns:
- see above
- Since:
- 2019.1.2
-
isMoveSupported
boolean isMoveSupported()
Returns true if project settings format supports move of the project with all its entities in projects hierarchy- Returns:
- see above
-
isProjectCreateSupported
boolean isProjectCreateSupported()
Returns true if format supports new project creation- Returns:
- see above
-
isProjectDeleteSupported
boolean isProjectDeleteSupported()
Returns true if project settings format supports delete of the project- Returns:
- see above
-
checkCyclicDependency
void checkCyclicDependency(@NotNull Collection<SBuildType> buildType, @NotNull Dependency dependency)Checks if a snapshot dependency creates a cycle if added to the provided build type.- Parameters:
buildType- see abovedependency- see above
-
checkCyclicDependencies
void checkCyclicDependencies(@NotNull SBuildType buildType)Checks if a build type added or moved to the given project creates a cyclic snapshot dependency due to some dependencies defined in the project's effective default template- Parameters:
buildType-
-
isEmptyUuid
boolean isEmptyUuid()
- Returns:
- true if this project has an empty uuid in its config on disk
-
initArchivedStatus
void initArchivedStatus(boolean archived)
Initializes project's archived flag. Should be used only when creating a project.- Parameters:
archived- archived flag
-
getParametersSupport
@NotNull default ContainerWithInherited<String,Parameter> getParametersSupport()
- Specified by:
getParametersSupportin interfaceParameterSupport
-
validateNewExtId
void validateNewExtId(@NotNull String extId) throws InvalidIdentifierExceptionValidates the given extId in this project- Parameters:
extId- id to validate- Throws:
InvalidIdentifierException- if the specified extId is invalid
-
getNextAvailableFeatureId
String getNextAvailableFeatureId(@NotNull String type, @NotNull Map<String,String> params)
Returns a generated ID that will be used by the next feature added to this project- Parameters:
type- - type of the featureparams- - optional parameters used for generating IDs for specific types of features- Returns:
- next available ID
- Since:
- 2022.10
-
scheduleProjectConfigurationReload
void scheduleProjectConfigurationReload()
Schedules background task to reload project configuration from disk.
-
findPluginSettings
File findPluginSettings(@NotNull String pluginName, @NotNull String fileName)
Search for a plugin settings file for given project. The method is looking for the file in plugin data directory for given plugin name and its parents, starting from the specified project- Parameters:
pluginName- the name of the pluginfileName- settings file name to search- Returns:
- settings file if found,
nullotherwise - Since:
- 2019.2
-
copyBuildType
@NotNull SBuildType copyBuildType(@NotNull SBuildType originalBuildType, @NotNull String newExtId, @NotNull String newName, @NotNull CopyOptions copyOptions, @NotNull BuildTypeCopyMap copiedObjects) throws MaxNumberOfBuildTypesReachedException, InvalidVcsRootScopeException, DuplicateExternalIdException
-
scheduleFileSave
@NotNull PersistTask scheduleFileSave(@NotNull ConfigAction cause, @NotNull String pathInProjectDir, @NotNull byte[] fileContent)
-
scheduleFileDelete
@NotNull PersistTask scheduleFileDelete(@NotNull ConfigAction cause, @NotNull String pathInProjectDir)
-
createConfigAction
@NotNull ConfigActionEx createConfigAction(@Nullable SUser user, @NotNull String description)
Description copied from interface:SPersistentEntityCreates a config action instance associated with this entity and having the specified description. The config action object can be used inSPersistentEntity.schedulePersisting(ConfigAction)orSPersistentEntity.scheduleRemove(ConfigAction)methods to describe the performed action.- Specified by:
createConfigActionin interfaceSPersistentEntity- Parameters:
user- user who performs operation, or null if operation is performed by the systemdescription- description to set to the config action object- Returns:
- new config action
-
getVirtualBuildTypes
@NotNull List<SBuildType> getVirtualBuildTypes()
-
-