Class XmlProjectSettingsGenerator
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.versionedSettings.XmlProjectSettingsGenerator
-
- All Implemented Interfaces:
ProjectSettingsGenerator
public class XmlProjectSettingsGenerator extends Object implements ProjectSettingsGenerator
-
-
Field Summary
-
Fields inherited from interface jetbrains.buildServer.serverSide.impl.versionedSettings.ProjectSettingsGenerator
ACCEPT_ALL
-
-
Constructor Summary
Constructors Constructor Description XmlProjectSettingsGenerator(VersionedSettingsOptions options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidensureConfigCompatibility(SProject project, List<String> errors, Map<String,Map<String,String>> idsToRename, Map<String,String> options)Checks if this generator can produce settings for the given project.ProjectSettingsGenerationResultgenerate(VersionedSettingsFileSystem fs, RawConfigsBuilder builder, GenOptions options)Set<String>getBuildTypeConfigPaths(SBuildType buildType, ProjectSettingsPaths projectSettingsPaths)Should return paths to configs of the specified buildType from the root directory of the versioned settings VCS root.StringgetFormat()Returns format supported by this generatorSet<String>getProjectConfigPaths(SProject project, ProjectSettingsPaths projectSettingsPaths)Should return paths to configs of the specified project from the root directory of the versioned settings VCS root.ProjectSettingsPathsProvidergetSettingsPathsProvider()Returns provider of the paths that are used to store Versioned Settings for the given format, e.g., logic related to ".teamcity" for the Kotlin / XML formatsSet<String>getTemplateConfigPaths(BuildTypeTemplate template, ProjectSettingsPaths projectSettingsPaths)Should return paths to configs of the specified template from the root directory of the versioned settings VCS root.Set<String>getVcsRootConfigPaths(SVcsRoot root, ProjectSettingsPaths projectSettingsPaths)Should return paths to configs of the specified VCS root from the root directory of the versioned settings VCS root.booleanisCustomFormat()Indicates whether this project settings generator returns values in custom format that requires additional processing (i.e.booleanisGenerateFullProject()Returns true if generator is able to generate full project settings which can be committed to VCSbooleanisMoveEntitiesSupported(SProject project)Returns true if format supports move of entities in projects hierarchybooleanisSupportProjectDirRemove()Whether format supports project dir remove in VCS.booleanisUIEditingEnabled(SProject project)Returns true if UI editing was enabled for the specified defining project, i.e.booleanisUIEditingSupported(SProject project, SProject effectiveProject)Returns true if UI editing is supported in the specified project and the effective projectvoidregister()voidsetRegistry(ProjectSettingsGeneratorRegistry registry)voidsetVersionedSettingsManager(VersionedSettingsManager versionedSettingsManager)voidsetVersionedSettingsRegistry(VersionedSettingsRegistryEx versionedSettingsRegistry)voidwriteProjectConfigs(SProject project, File dstDir, ProjectSettingsGeneratorConfig config)Writes project settings of the given project to the specified dir-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.serverSide.impl.versionedSettings.ProjectSettingsGenerator
generate, generate, generate, generate, getCommitFilePredicate, getDocumentationUrl, getEditableSettingsNote, getFormatDisplayName, getProjectScriptName, getReadOnlyReason, getRootScriptName, getVersions, getZipReadme, isExtIdChangeSupported, isProjectCreateSupported, isProjectDeleteSupported, isProjectMoveSupported, isSupportsRelativeIds, isSupportsRelativeIds, isUseRelativeIds, isVersionedSettingsConfigStoredInVCS, isVersionedSettingsConfigUpdateSupported, isVersionedSettingsRootUpdateSupported, isVisible
-
-
-
-
Constructor Detail
-
XmlProjectSettingsGenerator
public XmlProjectSettingsGenerator(@NotNull VersionedSettingsOptions options)
-
-
Method Detail
-
setVersionedSettingsManager
public void setVersionedSettingsManager(@NotNull VersionedSettingsManager versionedSettingsManager)
-
setRegistry
public void setRegistry(@NotNull ProjectSettingsGeneratorRegistry registry)
-
setVersionedSettingsRegistry
public void setVersionedSettingsRegistry(@NotNull VersionedSettingsRegistryEx versionedSettingsRegistry)
-
register
public void register()
-
isUIEditingEnabled
public boolean isUIEditingEnabled(@NotNull SProject project)Description copied from interface:ProjectSettingsGeneratorReturns true if UI editing was enabled for the specified defining project, i.e. project where versioned settings were enabled- Specified by:
isUIEditingEnabledin interfaceProjectSettingsGenerator- Parameters:
project- project of interest- Returns:
- see above
-
isUIEditingSupported
public boolean isUIEditingSupported(@NotNull SProject project, @NotNull SProject effectiveProject)Description copied from interface:ProjectSettingsGeneratorReturns true if UI editing is supported in the specified project and the effective project- Specified by:
isUIEditingSupportedin interfaceProjectSettingsGenerator- Parameters:
project- project of interesteffectiveProject- effective project where versioned settings are enabled
-
isSupportProjectDirRemove
public boolean isSupportProjectDirRemove()
Description copied from interface:ProjectSettingsGeneratorWhether format supports project dir remove in VCS. If it does, then remove of the project in UI leads to commit which removes the dir with projectExtId from VCS.- Specified by:
isSupportProjectDirRemovein interfaceProjectSettingsGenerator- Returns:
- see above
-
isMoveEntitiesSupported
public boolean isMoveEntitiesSupported(@NotNull SProject project)Description copied from interface:ProjectSettingsGeneratorReturns true if format supports move of entities in projects hierarchy- Specified by:
isMoveEntitiesSupportedin interfaceProjectSettingsGenerator- Returns:
- see above
-
getFormat
@NotNull public String getFormat()
Description copied from interface:ProjectSettingsGeneratorReturns format supported by this generator- Specified by:
getFormatin interfaceProjectSettingsGenerator- Returns:
- see above
-
getBuildTypeConfigPaths
@NotNull public Set<String> getBuildTypeConfigPaths(@NotNull SBuildType buildType, @NotNull ProjectSettingsPaths projectSettingsPaths)
Description copied from interface:ProjectSettingsGeneratorShould return paths to configs of the specified buildType from the root directory of the versioned settings VCS root. Should use '/' as a name separator- Specified by:
getBuildTypeConfigPathsin interfaceProjectSettingsGenerator- Parameters:
buildType- buildType of interestprojectSettingsPaths- custom project settings paths in VCS- Returns:
- see above
-
getTemplateConfigPaths
@NotNull public Set<String> getTemplateConfigPaths(@NotNull BuildTypeTemplate template, @NotNull ProjectSettingsPaths projectSettingsPaths)
Description copied from interface:ProjectSettingsGeneratorShould return paths to configs of the specified template from the root directory of the versioned settings VCS root. Should use '/' as a name separator- Specified by:
getTemplateConfigPathsin interfaceProjectSettingsGenerator- Parameters:
template- template of interestprojectSettingsPaths- custom project settings paths in VCS- Returns:
- see above
-
getVcsRootConfigPaths
@NotNull public Set<String> getVcsRootConfigPaths(@NotNull SVcsRoot root, @NotNull ProjectSettingsPaths projectSettingsPaths)
Description copied from interface:ProjectSettingsGeneratorShould return paths to configs of the specified VCS root from the root directory of the versioned settings VCS root. Should use '/' as a name separator- Specified by:
getVcsRootConfigPathsin interfaceProjectSettingsGenerator- Parameters:
root- VCS root of interestprojectSettingsPaths- custom project settings paths in VCS- Returns:
- see above
-
getProjectConfigPaths
@NotNull public Set<String> getProjectConfigPaths(@NotNull SProject project, @NotNull ProjectSettingsPaths projectSettingsPaths)
Description copied from interface:ProjectSettingsGeneratorShould return paths to configs of the specified project from the root directory of the versioned settings VCS root. Should use '/' as a name separator- Specified by:
getProjectConfigPathsin interfaceProjectSettingsGenerator- Parameters:
project- project of interestprojectSettingsPaths- custom project settings paths in VCS- Returns:
- see above
-
writeProjectConfigs
public void writeProjectConfigs(@NotNull SProject project, @NotNull File dstDir, @NotNull ProjectSettingsGeneratorConfig config)Description copied from interface:ProjectSettingsGeneratorWrites project settings of the given project to the specified dir- Specified by:
writeProjectConfigsin interfaceProjectSettingsGenerator- Parameters:
project- project of interestdstDir- destination dirconfig- options for settings generator
-
generate
@NotNull public ProjectSettingsGenerationResult generate(@NotNull VersionedSettingsFileSystem fs, @NotNull RawConfigsBuilder builder, @NotNull GenOptions options) throws ConfigGenerationException
- Specified by:
generatein interfaceProjectSettingsGenerator- Throws:
ConfigGenerationException
-
isGenerateFullProject
public boolean isGenerateFullProject()
Description copied from interface:ProjectSettingsGeneratorReturns true if generator is able to generate full project settings which can be committed to VCS- Specified by:
isGenerateFullProjectin interfaceProjectSettingsGenerator- Returns:
- see above
-
ensureConfigCompatibility
public void ensureConfigCompatibility(@NotNull SProject project, @NotNull List<String> errors, @NotNull Map<String,Map<String,String>> idsToRename, @NotNull Map<String,String> options)Description copied from interface:ProjectSettingsGeneratorChecks if this generator can produce settings for the given project. Fills theidsToSubstitutemap for entities where extId should be changed. Reports errors viaerrors.Optionscontains generator specific options which can affect how extIds are mapped to the names in produced settings.- Specified by:
ensureConfigCompatibilityin interfaceProjectSettingsGenerator
-
isCustomFormat
public boolean isCustomFormat()
Description copied from interface:ProjectSettingsGeneratorIndicates whether this project settings generator returns values in custom format that requires additional processing (i.e. DSL)- Specified by:
isCustomFormatin interfaceProjectSettingsGenerator- Returns:
- see above
-
getSettingsPathsProvider
@NotNull public ProjectSettingsPathsProvider getSettingsPathsProvider()
Description copied from interface:ProjectSettingsGeneratorReturns provider of the paths that are used to store Versioned Settings for the given format, e.g., logic related to ".teamcity" for the Kotlin / XML formats- Specified by:
getSettingsPathsProviderin interfaceProjectSettingsGenerator- Returns:
- see above
-
-