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 void
addCleanupPolicy(HistoryRetentionPolicy policy)
Sets cleanup policy for this build configurationMap<String,Boolean>
getCleanupOptions()
List<HistoryRetentionPolicy>
getCleanupPolicies()
Returns cleanup policies sorted withCleanupLevel
natural 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()
void
removeCleanupPolicies()
Remove all own cleanup policies for the objectvoid
setCleanupOption(String option, Boolean value)
Sets value for a cleanup option
-
-
-
Method Detail
-
getCleanupPolicies
@NotNull public List<HistoryRetentionPolicy> getCleanupPolicies()
Returns cleanup policies sorted withCleanupLevel
natural 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:
getCleanupPolicies
in interfaceCleanupSettings
- Returns:
- combined cleanup policies, including those inherited from default or parent object
-
getOwnCleanupPolicies
@NotNull public Collection<HistoryRetentionPolicy> getOwnCleanupPolicies()
- Specified by:
getOwnCleanupPolicies
in interfaceCleanupSettings
- Returns:
- cleanup policies, specific for this object only
-
getInheritedCleanupPolicies
@NotNull public Collection<HistoryRetentionPolicy> getInheritedCleanupPolicies()
- Specified by:
getInheritedCleanupPolicies
in interfaceCleanupSettings
-
getInheritedCleanupOptions
@NotNull public Map<String,Boolean> getInheritedCleanupOptions()
- Specified by:
getInheritedCleanupOptions
in interfaceCleanupSettings
-
addCleanupPolicy
public void addCleanupPolicy(@NotNull HistoryRetentionPolicy policy)
Description copied from interface:CleanupSettingsInit
Sets cleanup policy for this build configuration- Specified by:
addCleanupPolicy
in interfaceCleanupSettingsInit
- Parameters:
policy
- policy to set
-
removeCleanupPolicies
public void removeCleanupPolicies()
Description copied from interface:CleanupSettingsInit
Remove all own cleanup policies for the object- Specified by:
removeCleanupPolicies
in interfaceCleanupSettingsInit
-
setCleanupOption
public void setCleanupOption(@NotNull String option, @Nullable Boolean value)
Description copied from interface:CleanupSettingsInit
Sets value for a cleanup option- Specified by:
setCleanupOption
in interfaceCleanupSettingsInit
- Parameters:
option
- cleanup option (seeCleanupSettings
constants)value
- value to set option to, ornull
to remove the option
-
getCleanupOptions
@NotNull public Map<String,Boolean> getCleanupOptions()
- Specified by:
getCleanupOptions
in interfaceCleanupSettings
- Returns:
- map of all cleanup options
-
getOwnCleanupOptions
@NotNull public Map<String,Boolean> getOwnCleanupOptions()
- Specified by:
getOwnCleanupOptions
in interfaceCleanupSettings
- Returns:
- map of own cleanup options only
-
getParentSettings
@NotNull protected abstract List<CleanupSettings> getParentSettings()
-
-