Class SecuredProject
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.projects.ProjectImpl
-
- jetbrains.buildServer.serverSide.impl.auth.SecuredProject
-
- All Implemented Interfaces:
Comparable<BuildProject>,BuildProject,Loggable,CleanupSettings,CleanupSettingsInit,ParameterSupport,ProjectEx,SecureDataStorage,SecureTokensProducer,InheritableUserParametersHolder,InheritableUserParametersHolderEx,InternalParameters,ParametersSupport,ReadOnlyUserParameters,SPersistentEntity,SProject,UserParametersHolder
public class SecuredProject extends ProjectImpl
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jetbrains.buildServer.serverSide.impl.projects.ProjectImpl
ProjectImpl.Cached<T>
-
-
Field Summary
-
Fields inherited from class jetbrains.buildServer.serverSide.impl.projects.ProjectImpl
AUTOMATIC_ARCHIVE_COMMENT, AUTOMATIC_DEARCHIVE_COMMENT, AUTOMATIC_PAUSE_COMMENT, AUTOMATIC_UNPAUSE_COMMENT, PROJECT_CREDENTIALS_STORAGE_PROP_NAME, TEAMCITY_SETTINGS_READ_ONLY_PARAM, TEAMCITY_SETTINGS_RUN_BUTTON_CAPTION_PARAM, TEAMCITY_VIRTUAL_PROJECT_PARAM, VERSIONED_SETTINGS_STORAGE_KEY
-
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
-
-
Constructor Summary
Constructors Constructor Description SecuredProject(EntityId<String> id, String parentInternalId, String name, ProjectDataModel model, ProjectContext projectContext, boolean emptyUuid)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCleanupPolicy(HistoryRetentionPolicy policy)Sets cleanup policy for this build configurationSProjectFeatureDescriptoraddFeature(String id, String type, Map<String,String> params)Adds new project feature with provided ID if auto-generated ID is not desirableSProjectFeatureDescriptoraddFeature(String type, Map<String,String> params)Adds new project feature.voidaddFeature(SProjectFeatureDescriptor feature)Adds project feature.voidaddParameter(Parameter param)Adds parameter.SBuildTypecopyBuildType(SBuildType originalBuildType, String extId, String name, CopyOptions copyOptions)Creates a copy of the given build configuration.BuildTypeTemplatecopyBuildTypeTemplate(BuildTypeTemplate original, String extId, String name)Creates new template by copying settings from the original one.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 maxBuilds, BuildTypeDescriptor.CheckoutType checkoutType)Creates a new build configurationBuildTypeExcreateBuildType(String extId, String name, Consumer<BuildTypeEx> init)SBuildTypecreateBuildType(SBuildType originalBuildType, String newConfigurationName, boolean copyVcsRoots, boolean changeScopeOfLocalVcsRoots)SBuildTypecreateBuildType(SBuildType originalBuildType, String name, CopyOptions copyOptions)Creates new build configuration on the base of the specified original build configuration.BuildTypeExcreateBuildTypeFromTemplate(BuildTypeTemplate template, String extId, String name)Creates build configuration on the base of specified template.BuildTypeExcreateBuildTypeFromTemplate(BuildTypeTemplate template, String extId, String name, Consumer<BuildTypeEx> init)SBuildTypecreateBuildTypeFromTemplate(BuildTypeTemplate template, String name, CopyOptions copyOptions)Creates build configuration on the base of specified template.BuildTypeTemplateExcreateBuildTypeTemplate(String name)Creates new build configuration template.BuildTypeTemplateExcreateBuildTypeTemplate(String extId, String name)Creates new build configuration template with given external identifier an name.BuildTypeTemplatecreateBuildTypeTemplate(BuildTypeTemplate original, String name, CopyOptions copyOptions)Creates new template by copying settings from the original one.BuildTypeTemplatecreateBuildTypeTemplate(SBuildType originalBuildType, String name, CopyOptions copyOptions)Extracts a template from the specified build type.ProjectExcreateProjectNoAudit(String externalId, String projectName)SVcsRootExcreateVcsRoot(String vcsName, String externalId, String name)Creates new VCS root in this projectSVcsRootExcreateVcsRoot(String vcsName, String name, Map<String,String> params)Creates new VCS root in this projectBuildTypeTemplateextractBuildTypeTemplate(SBuildType originalBuildType, String extId, String name)Extracts a template from the specified build type.SBuildTypefindBuildTypeByName(String name)Searches for a build configuration with specified name among own build configurations of this project (not in subprojects).List<BuildTypeTemplate>getAvailableTemplates()List<SBuildType>getBuildTypes()Returns all build configurations registered in this project and all its subprojects (not only direct subprojects, but all).List<BuildTypeTemplate>getBuildTypeTemplates()Returns all build configuration templates registered in this project and all its subprojects (not only direct).StringgetOrCreateToken(String secret, String contextDescription)For a specified secret (password, API key, etc) creates a token which can be used in project settings instead.List<SProject>getOwnProjects()Returns only own sub projects of this project.List<SProject>getProjects()Returns all sub projects of this project transitively.List<VcsRootInstance>getVcsRootInstances()List<SVcsRoot>getVcsRoots()Returns all VCS roots associated with this project and all its subprojects transitively.voidmoveToProject(ConfigAction cause, SProject target)Moves this project to the target project.voidmoveToProject(SProject target)Moves this project to the target project.voidremoveBuildTypes()Unregisters all build types and templates.voidremoveCleanupPolicies()Remove all own cleanup policies for the objectSProjectFeatureDescriptorremoveFeature(String featureId)Removes project feature with specified id.voidremoveParameter(String paramName)Removes parameter.voidsetArchived(boolean archived, User user)Sets project's and sub project's archived flags, pauses build configurations.voidsetCleanupOption(String option, Boolean value)Sets value for a cleanup optionvoidsetDefaultTemplate(BuildTypeTemplate template)voidsetDescription(String description)Sets this project descriptionvoidsetEditable(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(String newId)Sets the external project id.voidsetExternalId(ConfigAction cause, String newId)Sets the external project id.voidsetName(String name)Renames projectvoidsetOwnBuildTypesOrder(List<String> internalIds)voidsetOwnProjectsOrder(List<String> internalIds)booleanupdateFeature(String featureId, String newType, Map<String,String> newParams)Updates type and parameters of project feature with specified id.-
Methods inherited from class jetbrains.buildServer.serverSide.impl.projects.ProjectImpl
addBuildTypeTemplate, addDefaultTemplateListener, attachedToModel, attachEnforcedSettings, belongsTo, buildTypeCreated, checkCyclicDependencies, checkCyclicDependency, clearDefaultTemplateIdCacheForSelfAndChildren, clearProjectPathCache, compareTo, containsBuildType, copyBuildType, copyTemplate, createBuildType, createConfigAction, createDummyVcsRoot, createProject, createProjectNoAudit, createVirtualProject, describe, dispose, equals, findBuildTypeByExternalId, findBuildTypeById, findBuildTypeIdentityByName, findBuildTypeTemplateByExternalId, findBuildTypeTemplateById, findBuildTypeTemplateByName, findFeatureById, findPluginSettings, findProjectByName, findVcsRootByName, getAgentPools, getArchivingTime, getArchivingUser, getArtifactDirectories, getArtifactsDirectory, getAvailableFeatures, getAvailableFeaturesOfType, getAvailableVcsRoots, getCleanupOptions, getCleanupPolicies, getCommitters, getConfigDirectory, getConfigId, getConfigurationFile, getConfigurationFile, getCredentialsStorage, getCredentialsStorageType, getCustomDataStorage, getDefaultTemplate, getDefaultTemplateId, getDescription, getEditableSettingsNote, getEffectiveGenerator, getEnforcedSettings, getExtendedFullName, getExtendedName, getExternalId, getFullName, getId, getInheritedCleanupOptions, getInheritedCleanupPolicies, getInheritedParametersCollection, getLastConfigModificationAction, getMulticaster, getName, getNextAvailableFeatureId, getOrganizationProject, getOwnAndParentsNonInheritedParameter, getOwnAndParentsNonInheritedParameters, getOwnBuildTypes, getOwnBuildTypesOrder, getOwnBuildTypeTemplates, getOwnCleanupOptions, getOwnCleanupPolicies, getOwnCleanupSettingsSupport, getOwnDefaultTemplate, getOwnDefaultTemplateExternalId, getOwnDefaultTemplateId, getOwnEnforcedSettings, getOwnFeatures, getOwnFeaturesOfType, getOwnNonInheritedParameter, getOwnParameter, getOwnParameters, getOwnParametersCollection, getOwnParametersWithoutInheritedSpec, getOwnProjectsOrder, getOwnSerializableParameters, getOwnVcsRoots, getParameter, getParameters, getParametersCollection, getParametersProvider, getParametersSupport, getParameterValue, getParent, getParentProject, getParentProjectExternalId, getParentProjectId, getPluginDataDirectory, getPluginSettingsFile, getPotentiallyResponsibleUsers, getProjectDataModel, getProjectId, getProjectPath, getReadOnlyReason, getSecureValue, getSettingsRootSpec, getStatus, getStatus, getTokenContext, getTokensWithoutSecret, getUsedVcsRoots, getValueResolver, getVersion, getVersionedSettingsVcsRoot, getVirtualBuildTypes, hasBuildTypes, hashCode, hasSettingsWithSecureValues, hasVersionedSettings, init, initArchivedStatus, isArchived, isDefaultBranchExcluded, isEmptyUuid, isExtIdChangeSupported, isInModel, isMoveEntitiesSupported, isMoveSupported, isProjectCreateSupported, isProjectDeleteSupported, isReadOnly, isRootProject, isVirtual, markPersisted, persist, persist, remove, removeBuildType, removeBuildTypeTemplate, removeDefaultTemplateListener, replaceInValues, resetCachedReadOnlyReason, resortBuildTypes, saveSettingsBranchSpec, scheduleFileDelete, scheduleFileSave, schedulePersisting, schedulePersisting, scheduleProjectConfigurationReload, scheduleRemove, sendExtIdChangedEvents, setExternalId, storeBuildType, toString, unregister, updateParentInternally, validateNewExtId
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.serverSide.InternalParameters
getBooleanInternalParameter, getBooleanInternalParameterOrTrue, getInternalParameterValue
-
-
-
-
Constructor Detail
-
SecuredProject
public SecuredProject(@NotNull EntityId<String> id, @Nullable String parentInternalId, @NotNull String name, @NotNull ProjectDataModel model, @NotNull ProjectContext projectContext, boolean emptyUuid)
-
-
Method Detail
-
getOwnProjects
@NotNull public List<SProject> getOwnProjects()
Description copied from interface:SProjectReturns only own sub projects of this project.- Specified by:
getOwnProjectsin interfaceBuildProject- Specified by:
getOwnProjectsin interfaceSProject- Overrides:
getOwnProjectsin classProjectImpl- Returns:
- list of projects sorted by name
-
getProjects
@NotNull public List<SProject> getProjects()
Description copied from interface:SProjectReturns all sub projects of this project transitively.- Specified by:
getProjectsin interfaceBuildProject- Specified by:
getProjectsin interfaceSProject- Overrides:
getProjectsin classProjectImpl- Returns:
- list of projects sorted by name
-
createBuildType
@NotNull public BuildTypeEx createBuildType(@NotNull String name) throws DuplicateBuildTypeNameException, MaxNumberOfBuildTypesReachedException
Description copied from interface:SProjectCreates new build configuration with given name- Specified by:
createBuildTypein interfaceProjectEx- Specified by:
createBuildTypein interfaceSProject- Overrides:
createBuildTypein classProjectImpl- 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 public BuildTypeEx createBuildType(@NotNull String name, @NotNull String runnerType, int maxBuilds, BuildTypeDescriptor.CheckoutType checkoutType)
Description copied from interface:SProjectCreates a new build configuration- Specified by:
createBuildTypein interfaceProjectEx- Specified by:
createBuildTypein interfaceSProject- Overrides:
createBuildTypein classProjectImpl- Parameters:
name- name of the build configurationrunnerType- type of the runnermaxBuilds- maximum number of buildscheckoutType- type of the checkout- Returns:
- newly created build configuration
- See Also:
SProject.createBuildType(String, String)
-
createBuildTypeTemplate
@NotNull public BuildTypeTemplateEx createBuildTypeTemplate(@NotNull String name)
Description copied from interface:SProjectCreates new build configuration template.- Specified by:
createBuildTypeTemplatein interfaceProjectEx- Specified by:
createBuildTypeTemplatein interfaceSProject- Overrides:
createBuildTypeTemplatein classProjectImpl- Parameters:
name- name of the template- Returns:
- newly created template
- See Also:
SProject.createBuildTypeTemplate(String, String)
-
createBuildType
@NotNull public SBuildType createBuildType(SBuildType originalBuildType, String newConfigurationName, boolean copyVcsRoots, boolean changeScopeOfLocalVcsRoots) throws MaxNumberOfBuildTypesReachedException
- Specified by:
createBuildTypein interfaceSProject- Overrides:
createBuildTypein classProjectImpl- Throws:
MaxNumberOfBuildTypesReachedException
-
createBuildTypeTemplate
@NotNull public BuildTypeTemplate createBuildTypeTemplate(@NotNull BuildTypeTemplate original, @NotNull String name, @NotNull CopyOptions copyOptions)
Description copied from interface:SProjectCreates new template by copying settings from the original one.- Specified by:
createBuildTypeTemplatein interfaceSProject- Overrides:
createBuildTypeTemplatein classProjectImpl- Parameters:
original- original templatename- new template namecopyOptions- options to control copy operation- Returns:
- new template
- See Also:
SProject.copyBuildTypeTemplate(BuildTypeTemplate, String, String)
-
createBuildTypeTemplate
@NotNull public 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 interfaceProjectEx- Specified by:
createBuildTypeTemplatein interfaceSProject- Overrides:
createBuildTypeTemplatein classProjectImpl- 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.
-
copyBuildTypeTemplate
@NotNull public BuildTypeTemplate copyBuildTypeTemplate(@NotNull BuildTypeTemplate original, @NotNull String extId, @NotNull String name)
Description copied from interface:SProjectCreates new template by copying settings from the original one.- Specified by:
copyBuildTypeTemplatein interfaceSProject- Overrides:
copyBuildTypeTemplatein classProjectImpl- Parameters:
original- original templateextId- new external identifier.name- new template name- Returns:
- new template
-
extractBuildTypeTemplate
@NotNull public BuildTypeTemplate extractBuildTypeTemplate(@NotNull SBuildType originalBuildType, @NotNull String extId, @NotNull String name) throws DuplicateExternalIdException
Description copied from interface:SProjectExtracts a template from the specified build type.- Specified by:
extractBuildTypeTemplatein interfaceSProject- Overrides:
extractBuildTypeTemplatein classProjectImpl- Parameters:
originalBuildType- original template.extId- new template external identifier.name- new template name.- Returns:
- new template.
- Throws:
DuplicateExternalIdException- when the given external identifier belongs to another template.
-
copyBuildType
@NotNull public SBuildType copyBuildType(@NotNull SBuildType originalBuildType, @NotNull String extId, @NotNull String name, @NotNull CopyOptions copyOptions) throws MaxNumberOfBuildTypesReachedException, DuplicateExternalIdException
Description copied from interface:SProjectCreates a copy of the given build configuration.- Specified by:
copyBuildTypein interfaceSProject- Overrides:
copyBuildTypein classProjectImpl- Parameters:
originalBuildType- build configuration to copyname- name to use for new configuration. If there exists configuration with same name in the target project then " (1)", " (2)", ... suffix will be added to the specified name.copyOptions- additional options- Returns:
- build configuration copy
- Throws:
MaxNumberOfBuildTypesReachedException- if maximum number of build configurations is reachedDuplicateExternalIdException
-
createBuildType
@NotNull public BuildTypeEx createBuildType(@NotNull String extId, @NotNull String name) throws DuplicateBuildTypeNameException, MaxNumberOfBuildTypesReachedException
Description copied from interface:ProjectExCreates new build configuration with given external identifier and name.- Specified by:
createBuildTypein interfaceProjectEx- Specified by:
createBuildTypein interfaceSProject- Overrides:
createBuildTypein classProjectImpl- 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.
-
createBuildType
@NotNull public BuildTypeEx createBuildType(@NotNull String extId, @NotNull String name, @Nullable Consumer<BuildTypeEx> init) throws DuplicateExternalIdException, DuplicateBuildTypeNameException, MaxNumberOfBuildTypesReachedException
- Specified by:
createBuildTypein interfaceProjectEx- Overrides:
createBuildTypein classProjectImpl- Throws:
DuplicateExternalIdExceptionDuplicateBuildTypeNameExceptionMaxNumberOfBuildTypesReachedException
-
addParameter
public void addParameter(@NotNull Parameter param)Description copied from interface:UserParametersHolderAdds parameter.- Specified by:
addParameterin interfaceUserParametersHolder- Overrides:
addParameterin classProjectImpl- Parameters:
param- build or config parameter, the type is determined by parameter prefix
-
removeParameter
public void removeParameter(@NotNull String paramName)Description copied from interface:UserParametersHolderRemoves parameter.- Specified by:
removeParameterin interfaceUserParametersHolder- Overrides:
removeParameterin classProjectImpl- Parameters:
paramName- build or config parameter name, the type is determined by parameter prefix
-
createBuildTypeTemplate
@NotNull public BuildTypeTemplate createBuildTypeTemplate(@NotNull SBuildType originalBuildType, @NotNull String name, @NotNull CopyOptions copyOptions)
Description copied from interface:SProjectExtracts a template from the specified build type.- Specified by:
createBuildTypeTemplatein interfaceSProject- Overrides:
createBuildTypeTemplatein classProjectImpl- Parameters:
originalBuildType- original templatename- new template namecopyOptions- options to control copy operation- Returns:
- new template
- See Also:
SProject.extractBuildTypeTemplate(SBuildType, String, String)
-
createBuildType
@NotNull public SBuildType createBuildType(@NotNull SBuildType originalBuildType, @NotNull String name, @NotNull CopyOptions copyOptions) throws MaxNumberOfBuildTypesReachedException
Description copied from interface:SProjectCreates new build configuration on the base of the specified original build configuration.- Specified by:
createBuildTypein interfaceSProject- Overrides:
createBuildTypein classProjectImpl- Parameters:
originalBuildType- build configuration to copyname- name to use for new configuration. If there exists configuration with same name in the target project then " (1)", " (2)", ... suffix will be added to the specified name.copyOptions- additional options- Returns:
- build configuration copy
- Throws:
MaxNumberOfBuildTypesReachedException- if maximum number of build configurations is reached- See Also:
SProject.copyBuildType(SBuildType, String, String, CopyOptions)
-
createBuildTypeFromTemplate
@NotNull public BuildTypeEx createBuildTypeFromTemplate(@NotNull BuildTypeTemplate template, @NotNull String extId, @NotNull String name) throws MaxNumberOfBuildTypesReachedException, DuplicateExternalIdException, InvalidVcsRootScopeException
Description copied from interface:SProjectCreates build configuration on the base of specified template.- Specified by:
createBuildTypeFromTemplatein interfaceSProject- Overrides:
createBuildTypeFromTemplatein classProjectImpl- Parameters:
template- build configuration template.extId- external identifier for the new build configuration.name- name for the new build configuration.- Returns:
- new build configuration.
- Throws:
MaxNumberOfBuildTypesReachedException- if maximum number of build configurations is reached.DuplicateExternalIdException- if the given external identifier belongs to another build type (possible in another project).InvalidVcsRootScopeException- if a VCS root cannot be attached to build configuration.
-
createBuildTypeFromTemplate
@NotNull public BuildTypeEx createBuildTypeFromTemplate(@NotNull BuildTypeTemplate template, @NotNull String extId, @NotNull String name, @Nullable Consumer<BuildTypeEx> init) throws MaxNumberOfBuildTypesReachedException, InvalidVcsRootScopeException, DuplicateExternalIdException
- Specified by:
createBuildTypeFromTemplatein interfaceProjectEx- Overrides:
createBuildTypeFromTemplatein classProjectImpl- Throws:
MaxNumberOfBuildTypesReachedExceptionInvalidVcsRootScopeExceptionDuplicateExternalIdException
-
createBuildTypeFromTemplate
@NotNull public SBuildType createBuildTypeFromTemplate(@NotNull BuildTypeTemplate template, @NotNull String name, @NotNull CopyOptions copyOptions) throws MaxNumberOfBuildTypesReachedException
Description copied from interface:SProjectCreates build configuration on the base of specified template.- Specified by:
createBuildTypeFromTemplatein interfaceSProject- Overrides:
createBuildTypeFromTemplatein classProjectImpl- Parameters:
template- build configuration templatename- name to use for build configuration. If there exists configuration with same name in the target project then " (1)", " (2)", ... suffix will be added to the specified name.copyOptions- options to control copy operation- Returns:
- new build configuration
- Throws:
MaxNumberOfBuildTypesReachedException- if maximum number of build configurations is reached- See Also:
SProject.createBuildTypeFromTemplate(BuildTypeTemplate, String, String)
-
findBuildTypeByName
@Nullable public SBuildType findBuildTypeByName(@NotNull String name)
Description copied from interface:SProjectSearches for a build configuration with specified name among own build configurations of this project (not in subprojects).- Specified by:
findBuildTypeByNamein interfaceSProject- Overrides:
findBuildTypeByNamein classProjectImpl- Parameters:
name- name of the build configuration to look for.- Returns:
- found build configuration or null.
- See Also:
SProject.findBuildTypeByExternalId(String),SProject.findBuildTypeById(String)
-
removeBuildTypes
public void removeBuildTypes()
Description copied from class:ProjectImplUnregisters all build types and templates.- Specified by:
removeBuildTypesin interfaceSProject- Overrides:
removeBuildTypesin classProjectImpl
-
setName
public void setName(@NotNull String name)Description copied from interface:SProjectRenames project- Specified by:
setNamein interfaceSProject- Overrides:
setNamein classProjectImpl- Parameters:
name- new project name
-
setDescription
public void setDescription(@Nullable String description)Description copied from interface:SProjectSets this project description- Specified by:
setDescriptionin interfaceSProject- Overrides:
setDescriptionin classProjectImpl- Parameters:
description- new project description
-
setDefaultTemplate
public void setDefaultTemplate(@Nullable BuildTypeTemplate template)- Specified by:
setDefaultTemplatein interfaceProjectEx- Overrides:
setDefaultTemplatein classProjectImpl
-
getVcsRoots
@NotNull public List<SVcsRoot> getVcsRoots()
Description copied from interface:SProjectReturns all VCS roots associated with this project and all its subprojects transitively.- Specified by:
getVcsRootsin interfaceBuildProject- Specified by:
getVcsRootsin interfaceSProject- Overrides:
getVcsRootsin classProjectImpl- Returns:
- list of vcs roots
-
getVcsRootInstances
@NotNull public List<VcsRootInstance> getVcsRootInstances()
- Specified by:
getVcsRootInstancesin interfaceSProject- Overrides:
getVcsRootInstancesin classProjectImpl- Returns:
- all VCS root instances used in the project and subprojects.
-
setArchived
public void setArchived(boolean archived, @Nullable User user)Description copied from interface:SProjectSets project's and sub project's archived flags, pauses build configurations. Persists configuration changes on disk.- Specified by:
setArchivedin interfaceSProject- Overrides:
setArchivedin classProjectImpl- Parameters:
archived- is the project archiveduser- the user the performs the action
-
getAvailableTemplates
@NotNull public List<BuildTypeTemplate> getAvailableTemplates()
- Specified by:
getAvailableTemplatesin interfaceSProject- Overrides:
getAvailableTemplatesin classProjectImpl- Returns:
- list of templates available in this project, i.e. all templates of this project and all templates from parents.
-
setExternalId
public void setExternalId(@NotNull String newId) throws InvalidIdentifierException, DuplicateExternalIdExceptionDescription copied from interface:SProjectSets the external project id.All such project identifiers must be unique case insensitively.
This method performs persisting. You don't need to call persist when this method done.
- Specified by:
setExternalIdin interfaceSProject- Overrides:
setExternalIdin classProjectImpl- Parameters:
newId- the new external project identifier.- Throws:
InvalidIdentifierExceptionDuplicateExternalIdException
-
setExternalId
public void setExternalId(@NotNull ConfigAction cause, @NotNull String newId) throws InvalidIdentifierException, DuplicateExternalIdExceptionDescription copied from interface:SProjectSets the external project id.All such project identifiers must be unique case insensitively.
This method performs persisting and changes the disk structure immediately. You don't need to call persist when this method done.
- Specified by:
setExternalIdin interfaceSProject- Overrides:
setExternalIdin classProjectImplnewId- the new external project identifier.- Throws:
InvalidIdentifierExceptionDuplicateExternalIdException
-
moveToProject
public void moveToProject(@NotNull SProject target) throws CyclicDependencyExceptionDescription copied from interface:SProjectMoves this project to the target project.- Specified by:
moveToProjectin interfaceSProject- Overrides:
moveToProjectin classProjectImpl- Parameters:
target- new parent project for this project- Throws:
CyclicDependencyException
-
moveToProject
public void moveToProject(@NotNull ConfigAction cause, @NotNull SProject target) throws CyclicDependencyException, InvalidVcsRootScopeExceptionDescription copied from interface:SProjectMoves this project to the target project.- Specified by:
moveToProjectin interfaceSProject- Overrides:
moveToProjectin classProjectImpl- Parameters:
cause- config action caused the changetarget- new parent project for this project- Throws:
CyclicDependencyExceptionInvalidVcsRootScopeException
-
copyVcsRoot
@NotNull public 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 interfaceProjectEx- Specified by:
copyVcsRootin interfaceSProject- Overrides:
copyVcsRootin classProjectImpl- 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 public SVcsRootEx createVcsRoot(@NotNull String vcsName, @Nullable String name, @NotNull Map<String,String> params)
Description copied from interface:SProjectCreates new VCS root in this project- Specified by:
createVcsRootin interfaceProjectEx- Specified by:
createVcsRootin interfaceSProject- Overrides:
createVcsRootin classProjectImpl- 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
-
createVcsRoot
@NotNull public SVcsRootEx createVcsRoot(@NotNull String vcsName, @NotNull String externalId, @NotNull String name) throws InvalidIdentifierException, DuplicateExternalIdException, DuplicateVcsRootNameException
Description copied from interface:SProjectCreates new VCS root in this project- Specified by:
createVcsRootin interfaceSProject- Overrides:
createVcsRootin classProjectImpl- Parameters:
vcsName- name of VCS pluginexternalId- VCS root external idname- VCS root name- Returns:
- newly created VCS root
- Throws:
DuplicateExternalIdException- if external IDDuplicateVcsRootNameException- if provided VCS root name duplicates name of existing VCS rootInvalidIdentifierException
-
getBuildTypes
@NotNull public List<SBuildType> getBuildTypes()
Description copied from interface:SProjectReturns all build configurations registered in this project and all its subprojects (not only direct subprojects, but all).- Specified by:
getBuildTypesin interfaceBuildProject- Specified by:
getBuildTypesin interfaceSProject- Overrides:
getBuildTypesin classProjectImpl- Returns:
- list of build configurations sorted by name
-
createProjectNoAudit
@NotNull public ProjectEx createProjectNoAudit(@NotNull String externalId, @NotNull String projectName)
- Specified by:
createProjectNoAuditin interfaceProjectEx- Overrides:
createProjectNoAuditin classProjectImpl
-
getBuildTypeTemplates
@NotNull public List<BuildTypeTemplate> getBuildTypeTemplates()
Description copied from interface:SProjectReturns all build configuration templates registered in this project and all its subprojects (not only direct).- Specified by:
getBuildTypeTemplatesin interfaceSProject- Overrides:
getBuildTypeTemplatesin classProjectImpl- Returns:
- list of build configuration templates sorted by name
-
addCleanupPolicy
public void addCleanupPolicy(@NotNull HistoryRetentionPolicy policy)Description copied from interface:CleanupSettingsInitSets cleanup policy for this build configuration- Specified by:
addCleanupPolicyin interfaceCleanupSettingsInit- Overrides:
addCleanupPolicyin classProjectImpl- Parameters:
policy- policy to set
-
removeCleanupPolicies
public void removeCleanupPolicies()
Description copied from interface:CleanupSettingsInitRemove all own cleanup policies for the object- Specified by:
removeCleanupPoliciesin interfaceCleanupSettingsInit- Overrides:
removeCleanupPoliciesin classProjectImpl
-
setCleanupOption
public void setCleanupOption(@NotNull String option, @Nullable Boolean value)Description copied from interface:CleanupSettingsInitSets value for a cleanup option- Specified by:
setCleanupOptionin interfaceCleanupSettingsInit- Overrides:
setCleanupOptionin classProjectImpl- Parameters:
option- cleanup option (seeCleanupSettingsconstants)value- value to set option to, ornullto remove the option
-
setEditable
public void setEditable(boolean editable)
Description copied from interface:ProjectExEnables 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.- Specified by:
setEditablein interfaceProjectEx- Overrides:
setEditablein classProjectImpl- Parameters:
editable- true to enable editing and false to disable
-
addFeature
@NotNull public SProjectFeatureDescriptor addFeature(@NotNull String type, @NotNull Map<String,String> params)
Description copied from interface:SProjectAdds new project feature.- Specified by:
addFeaturein interfaceSProject- Overrides:
addFeaturein classProjectImpl- Parameters:
type- type of the featureparams- feature parameters- Returns:
- newly created object representing this project feature
-
addFeature
@NotNull public SProjectFeatureDescriptor addFeature(@NotNull String id, @NotNull String type, @NotNull Map<String,String> params)
Description copied from interface:SProjectAdds new project feature with provided ID if auto-generated ID is not desirable- Specified by:
addFeaturein interfaceSProject- Overrides:
addFeaturein classProjectImpl- Parameters:
id- id of the featuretype- type of the featureparams- feature parameters- Returns:
- newly created object representing this project feature
-
addFeature
public void addFeature(@NotNull SProjectFeatureDescriptor feature)Description copied from interface:SProjectAdds project feature. If the project feature doesn't belong to this project - a copy will be created.- Specified by:
addFeaturein interfaceSProject- Overrides:
addFeaturein classProjectImpl- Parameters:
feature- project feature to add
-
removeFeature
@Nullable public SProjectFeatureDescriptor removeFeature(@NotNull String featureId)
Description copied from interface:SProjectRemoves project feature with specified id.- Specified by:
removeFeaturein interfaceSProject- Overrides:
removeFeaturein classProjectImpl- Parameters:
featureId- feature id- Returns:
- removed feature or null if there was no feature with such id
-
updateFeature
public boolean updateFeature(@NotNull String featureId, @NotNull String newType, @NotNull Map<String,String> newParams)Description copied from interface:SProjectUpdates type and parameters of project feature with specified id.- Specified by:
updateFeaturein interfaceSProject- Overrides:
updateFeaturein classProjectImpl- Parameters:
featureId- feature idnewType- new feature typenewParams- new feature parameters- Returns:
- true if feature with specified id was found and updated
-
setOwnProjectsOrder
public void setOwnProjectsOrder(List<String> internalIds)
- Specified by:
setOwnProjectsOrderin interfaceProjectEx- Overrides:
setOwnProjectsOrderin classProjectImpl- Parameters:
internalIds- Empty list will remove custom ordering
-
setOwnBuildTypesOrder
public void setOwnBuildTypesOrder(List<String> internalIds)
- Specified by:
setOwnBuildTypesOrderin interfaceProjectEx- Overrides:
setOwnBuildTypesOrderin classProjectImpl- Parameters:
internalIds- Empty list will remove custom ordering
-
getOrCreateToken
@NotNull public String getOrCreateToken(@NotNull String secret, @NotNull String contextDescription)
Description copied from interface:SecureTokensProducerFor a specified secret (password, API key, etc) creates a token which can be used in project settings instead. Token and secret are persisted in the internal storage, next time when this method is called for the same secret, the same token is returned.- Specified by:
getOrCreateTokenin interfaceSecureTokensProducer- Overrides:
getOrCreateTokenin classProjectImpl- Parameters:
secret- some secure valuecontextDescription- human friendly description of context in which secret is accessed; this context is later used in health report, when secret cannot be restored by provided token- Returns:
- token to use instead of secret
-
setEnforcedSettings
public void setEnforcedSettings(@Nullable ProjectEnforcedSettings enforcedSettings)Description copied from interface:ProjectExAttach 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).
- Specified by:
setEnforcedSettingsin interfaceProjectEx- Overrides:
setEnforcedSettingsin classProjectImpl
-
-