Package jetbrains.buildServer.serverSide
Interface BuildTypeTemplate
-
- All Superinterfaces:
BuildTypeIdentity
,BuildTypeOptions
,BuildTypeSettings
,java.lang.Comparable<BuildTypeTemplate>
,CompatibleAgents
,DependencySettings
,Dependent
,InheritableUserParametersHolder
,OptionSupport
,ParametersSupport
,ReadOnlyUserParameters
,SPersistentEntity
,UserParametersHolder
,VcsLabelingSettings
public interface BuildTypeTemplate extends BuildTypeIdentity, BuildTypeSettings, CompatibleAgents, java.lang.Comparable<BuildTypeTemplate>, ParametersSupport, Dependent
Build configuration template. Contains settings of build configuration.- Since:
- 5.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jetbrains.buildServer.serverSide.BuildTypeOptions
BuildTypeOptions.BuildConfigurationType
-
Nested classes/interfaces inherited from interface jetbrains.buildServer.serverSide.vcs.VcsLabelingSettings
VcsLabelingSettings.LabelingType
-
-
Field Summary
-
Fields inherited from interface jetbrains.buildServer.serverSide.BuildTypeOptions
BT_ALLOW_EXTERNAL_STATUS, BT_ALLOW_PERSONAL_BUILD_TRIGGERING, BT_ARTIFACT_PUBLISH_CONDITION, BT_ARTIFACT_RULES, BT_BRANCH_FILTER, BT_BUILD_CONFIGURATION_TYPE, BT_BUILD_DEFAULT_BRANCH, BT_BUILD_NUMBER_PATTERN, BT_CHECKOUT_DIR, BT_CHECKOUT_MODE, BT_CLEAN_BUILD, BT_EXCLUDE_DEFAULT_BRANCH_CHANGES, BT_EXECUTION_TIMEOUT, BT_FAIL_IF_TESTS_FAIL, BT_FAIL_ON_ANY_ERROR_MESSAGE, BT_FAIL_ON_EXIT_CODE, BT_FAIL_ON_OOME_OR_CRASH, BT_GENERATED_SETTINGS_CHECKSUM, BT_HANGING_BUILDS_DETECTION_ENABLED, BT_MAX_RUNNING_BUILDS, BT_MAX_RUNNING_BUILDS_PER_BRANCH, BT_SHOW_DEPS_CHANGES, BT_SUPPORT_TEST_RETRY, DEFAULT_BUILD_NUMBER_PATTERN, DEFAULT_MAX_RUNNING_BUILDS_PER_BRANCH, DEFAULT_VCS_LABELING_BRANCH_FILTER, VCS_LABELING_BRANCH_FILTER
-
Fields inherited from interface jetbrains.buildServer.serverSide.vcs.VcsLabelingSettings
DEFAULT_LABEL_PATTERN
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
applyRunnersOrder(java.lang.String[] ids)
Changes order of build runners in this template and in all of the inherited build configurations.boolean
belongsTo(SProject project)
Returns true if the specified project or some of its subprojects (not only direct) contains this build configuration template.java.util.Collection<SBuildType>
getAllUsages()
Same as #getUsages() but also returns configurations that use this template as default templatejava.lang.String
getDescription()
java.lang.String
getId()
Returns the internal identifier (that is used inside the database).int
getNumberOfUsages()
Returns total number of this template usages (without permissions filtering) in build configurationsint
getNumberOfUsagesAsDefaultTemplate()
Returns total number of projects (without permissions filtering) using this template as a default templateSProject
getParentProject()
Deprecated.usegetProject()
java.lang.String
getParentProjectId()
Deprecated.usegetProjectId()
SProject
getProject()
Returns project to which this template belongsjava.lang.String
getProjectId()
Returns internal id of the project to which this template belongsjava.util.Collection<SBuildType>
getUsages()
Returns collection of build configurations attached to this template.java.util.Collection<SProject>
getUsagesAsDefaultTemplate()
Returns collection of projects where this template is used as a default template.boolean
isAccessibleFrom(SProject project)
Returns true if this template is accessible from specified project, i.e.void
moveToProject(ConfigAction cause, SProject target)
Moves this template to the specified project.void
moveToProject(SProject target)
Moves this template to the specified project.void
persist()
Persist this template settings, should be called after settings modifications to preserve template state.void
setDescription(java.lang.String description)
Sets template description-
Methods inherited from interface jetbrains.buildServer.serverSide.BuildTypeIdentity
getConfigurationFile, getExternalId, getFullName, getInternalId, getName, setExternalId, setExternalId, setName
-
Methods inherited from interface jetbrains.buildServer.serverSide.BuildTypeSettings
addArtifactDependency, addBuildFeature, addBuildFeature, addBuildParameter, addBuildRunner, addBuildRunner, addBuildRunner, addBuildTrigger, addBuildTrigger, addConfigParameter, addRequirement, addVcsRoot, containsOwnVcsRoot, containsVcsRoot, findBuildFeatureById, findBuildRunnerById, findBuildRunnerByType, findRunnerParameter, findTriggerById, getArtifactDependencies, getArtifactPaths, getBuildFeatureRequirements, getBuildFeatures, getBuildFeaturesOfType, getBuildNumberPattern, getBuildParameter, getBuildParameters, getBuildParametersCollection, getBuildRunners, getBuildTriggersCollection, getCheckoutDirectory, getCheckoutRules, getCheckoutType, getConfigParameters, getConfigParametersCollection, getImplicitRequirements, getReadOnlyReason, getRequirements, getRunnerConditions, getRunnersOrder, getRunnerTypes, getRunTypeRequirements, getTemplate, getTemplateId, getTemplateIds, getTemplates, getTypedOption, getUndefinedParameters, getVcsRootEntries, getVcsRoots, isCompositeBuildType, isDeployment, isEnabled, isReadOnly, isTemplateAccessible, isTemplateBased, persist, removeAllBuildRunners, removeArtifactDependency, removeBuildFeature, removeBuildParameter, removeBuildRunner, removeBuildTrigger, removeConfigParameter, removeRequirement, removeRequirement, removeVcsRoot, replaceInValues, replaceInValues, resetRunnersOrder, setArtifactDependencies, setArtifactPaths, setBuildNumberPattern, setCheckoutDirectory, setCheckoutRules, setCheckoutType, setEnabled, textValueMatches, updateBuildFeature, updateBuildRunner, updateBuildTrigger, updateBuildTrigger
-
Methods inherited from interface jetbrains.buildServer.serverSide.CompatibleAgents
getAgentCompatibility, getCompatibilityMap, getCompatibleAgents
-
Methods inherited from interface jetbrains.buildServer.serverSide.dependency.DependencySettings
addDependency, getDependencies, removeDependency
-
Methods inherited from interface jetbrains.buildServer.serverSide.dependency.Dependent
getChildDependencies, intersectsWith
-
Methods inherited from interface jetbrains.buildServer.serverSide.InheritableUserParametersHolder
getInheritedParametersCollection, getOwnParameter, getOwnParameters, getOwnParametersCollection, getOwnParametersWithoutInheritedSpec, getParameters, getParametersCollection
-
Methods inherited from interface jetbrains.buildServer.util.OptionSupport
getChangedOptions, getDeclaredOption, getOption, getOptionDefaultValue, getOptions, getOwnOptions, setOption
-
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.SPersistentEntity
createConfigAction, getConfigId, getConfigurationFile, getParent, getReadOnlyReason, getVersion, isReadOnly, isVirtual, markPersisted, persist, remove, schedulePersisting, schedulePersisting, scheduleRemove
-
Methods inherited from interface jetbrains.buildServer.serverSide.UserParametersHolder
addParameter, removeParameter
-
Methods inherited from interface jetbrains.buildServer.serverSide.vcs.VcsLabelingSettings
getLabelingRoots, getLabelingType, getLabelPattern
-
-
-
-
Method Detail
-
getId
@NotNull java.lang.String getId()
Returns the internal identifier (that is used inside the database).- Returns:
- the internal identifier.
- See Also:
BuildTypeIdentity.getExternalId()
-
getDescription
@NotNull java.lang.String getDescription()
- Returns:
- template description
- Since:
- 2018.1
-
setDescription
void setDescription(@NotNull java.lang.String description) throws ReadOnlyEntityException
Sets template description- Parameters:
description
- template description- Throws:
ReadOnlyEntityException
- Since:
- 2018.1
-
persist
void persist()
Persist this template settings, should be called after settings modifications to preserve template state.- Specified by:
persist
in interfaceBuildTypeSettings
- Specified by:
persist
in interfaceSPersistentEntity
-
getUsages
java.util.Collection<SBuildType> getUsages()
Returns collection of build configurations attached to this template. This does not include the build configurations that use this template because it is defined as default template in the respective projects- Returns:
- see above.
-
getAllUsages
java.util.Collection<SBuildType> getAllUsages()
Same as #getUsages() but also returns configurations that use this template as default template- Returns:
- see above
- Since:
- 2020.2
-
getUsagesAsDefaultTemplate
java.util.Collection<SProject> getUsagesAsDefaultTemplate()
Returns collection of projects where this template is used as a default template. This does not include projects that use it as a default template because it is set up as such in one of the higher level projects in their paths- Returns:
- see above
- Since:
- 2017.2
-
getNumberOfUsages
int getNumberOfUsages()
Returns total number of this template usages (without permissions filtering) in build configurations- Returns:
- see above
-
getNumberOfUsagesAsDefaultTemplate
int getNumberOfUsagesAsDefaultTemplate()
Returns total number of projects (without permissions filtering) using this template as a default template- Returns:
- see above
- Since:
- 2017.2
-
getParentProject
@NotNull @Deprecated SProject getParentProject()
Deprecated.usegetProject()
Returns project to which this template belongs- Returns:
- see above
-
getParentProjectId
@NotNull @Deprecated java.lang.String getParentProjectId()
Deprecated.usegetProjectId()
Returns id of the project to which this template belongs- Returns:
- see above
- Since:
- 6.5
-
getProject
@NotNull SProject getProject()
Returns project to which this template belongs- Specified by:
getProject
in interfaceBuildTypeIdentity
- Specified by:
getProject
in interfaceBuildTypeSettings
- Returns:
- see above
-
getProjectId
@NotNull java.lang.String getProjectId()
Returns internal id of the project to which this template belongs- Returns:
- see above
- Since:
- 6.5
-
moveToProject
void moveToProject(@NotNull SProject target) throws InvalidVcsRootScopeException, TemplateBecomesInaccessibleException, ReadOnlyEntityException
Moves this template to the specified project. Note that if there are local VCS roots attached to this template, they will be shared. If sharing is impossible due to lack of access rights, AccessDeniedException will be thrown.- Parameters:
target
- target project- Throws:
InvalidVcsRootScopeException
- if VCS roots used by this template will not be accessible in the target projectTemplateBecomesInaccessibleException
- if template is used by configurations and won't be available for them if it is moved to target projectReadOnlyEntityException
- if target project is read only
-
moveToProject
void moveToProject(@NotNull ConfigAction cause, @NotNull SProject target) throws InvalidVcsRootScopeException, TemplateBecomesInaccessibleException, ReadOnlyEntityException
Moves this template to the specified project. Note that if there are local VCS roots attached to this template, they will be shared. If sharing is impossible due to lack of access rights, AccessDeniedException will be thrown.- Parameters:
cause
- config action caused the changetarget
- target project- Throws:
InvalidVcsRootScopeException
- if VCS roots used by this template will not be accessible in the target projectTemplateBecomesInaccessibleException
- if template is used by configurations and won't be available for them if it is moved to target projectReadOnlyEntityException
- if target project is read only- Since:
- 9.0
-
applyRunnersOrder
void applyRunnersOrder(@NotNull java.lang.String[] ids) throws ReadOnlyEntityException
Changes order of build runners in this template and in all of the inherited build configurations. Note that after that persist operation invoked on the template will also persist inherited build configurations.- Specified by:
applyRunnersOrder
in interfaceBuildTypeSettings
- Parameters:
ids
- runner identifiers- Throws:
ReadOnlyEntityException
-
belongsTo
boolean belongsTo(@NotNull SProject project)
Returns true if the specified project or some of its subprojects (not only direct) contains this build configuration template.- Specified by:
belongsTo
in interfaceBuildTypeIdentity
- Parameters:
project
- project- Returns:
- see above
- Since:
- 8.0
-
isAccessibleFrom
boolean isAccessibleFrom(@NotNull SProject project)
Returns true if this template is accessible from specified project, i.e. it belongs to this project or to some of its parents- Parameters:
project
- project to check- Returns:
- see above
- Since:
- 8.0
-
-