Class CleanupSettingsSupport
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.cleanup.CleanupSettingsSupport
-
- All Implemented Interfaces:
CleanupSettings,CleanupSettingsInit
public abstract class CleanupSettingsSupport extends Object implements CleanupSettingsInit
- See Also:
for keep rules management
-
-
Field Summary
-
Fields inherited from interface jetbrains.buildServer.serverSide.CleanupSettings
CLEANUP_PREVENT_DEPENDENCIES_ARTIFACTS_FROM_CLEANUP, DISABLE_CLEANUP_POLICIES
-
-
Constructor Summary
Constructors Constructor Description CleanupSettingsSupport()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddCleanupPolicy(HistoryRetentionPolicy policy)Sets cleanup policy for this build configurationMap<String,Boolean>getCleanupOptions()List<HistoryRetentionPolicy>getCleanupPolicies()Returns cleanup policies sorted withCleanupLevelnatural order (from "Everything" to "Artifacts" - maximum 3 elements).Map<String,Boolean>getInheritedCleanupOptions()Collection<HistoryRetentionPolicy>getInheritedCleanupPolicies()Map<String,Boolean>getOwnCleanupOptions()Collection<HistoryRetentionPolicy>getOwnCleanupPolicies()protected abstract List<CleanupSettings>getParentSettings()voidremoveCleanupPolicies()Remove all own cleanup policies for the objectvoidsetCleanupOption(String option, Boolean value)Sets value for a cleanup option
-
-
-
Method Detail
-
getCleanupPolicies
@NotNull public List<HistoryRetentionPolicy> getCleanupPolicies()
Returns cleanup policies sorted withCleanupLevelnatural order (from "Everything" to "Artifacts" - maximum 3 elements). The higher priority have own cleanup settings, then project combined settings (with inheritance), then templates combined settings in backward order and finally default template combined settings.- Specified by:
getCleanupPoliciesin interfaceCleanupSettings- Returns:
- combined cleanup policies, including those inherited from default or parent object
-
getOwnCleanupPolicies
@NotNull public Collection<HistoryRetentionPolicy> getOwnCleanupPolicies()
- Specified by:
getOwnCleanupPoliciesin interfaceCleanupSettings- Returns:
- cleanup policies, specific for this object only
-
getInheritedCleanupPolicies
@NotNull public Collection<HistoryRetentionPolicy> getInheritedCleanupPolicies()
- Specified by:
getInheritedCleanupPoliciesin interfaceCleanupSettings
-
getInheritedCleanupOptions
@NotNull public Map<String,Boolean> getInheritedCleanupOptions()
- Specified by:
getInheritedCleanupOptionsin interfaceCleanupSettings
-
addCleanupPolicy
public void addCleanupPolicy(@NotNull HistoryRetentionPolicy policy)Description copied from interface:CleanupSettingsInitSets cleanup policy for this build configuration- Specified by:
addCleanupPolicyin interfaceCleanupSettingsInit- 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
-
setCleanupOption
public void setCleanupOption(@NotNull String option, @Nullable Boolean value)Description copied from interface:CleanupSettingsInitSets value for a cleanup option- Specified by:
setCleanupOptionin interfaceCleanupSettingsInit- Parameters:
option- cleanup option (seeCleanupSettingsconstants)value- value to set option to, ornullto remove the option
-
getCleanupOptions
@NotNull public Map<String,Boolean> getCleanupOptions()
- Specified by:
getCleanupOptionsin interfaceCleanupSettings- Returns:
- map of all cleanup options
-
getOwnCleanupOptions
@NotNull public Map<String,Boolean> getOwnCleanupOptions()
- Specified by:
getOwnCleanupOptionsin interfaceCleanupSettings- Returns:
- map of own cleanup options only
-
getParentSettings
@NotNull protected abstract List<CleanupSettings> getParentSettings()
-
-