Class BranchCleanup
- java.lang.Object
-
- com.atlassian.bamboo.specs.api.builders.EntityPropertiesBuilder<BranchCleanupProperties>
-
- com.atlassian.bamboo.specs.api.builders.plan.branches.BranchCleanup
-
public class BranchCleanup extends EntityPropertiesBuilder<BranchCleanupProperties>
Represent configuration of branch cleanup.
-
-
Field Summary
Fields Modifier and Type Field Description static java.time.DurationDEFAULT_INACTIVE_BRANCH_EXPIRYstatic intDEFAULT_INACTIVE_BRANCH_EXPIRY_IN_DAYSDeprecated.useDEFAULT_INACTIVE_BRANCH_EXPIRYinstead.static java.time.DurationDEFAULT_REMOVED_BRANCH_EXPIRYstatic intDEFAULT_REMOVED_BRANCH_EXPRIRY_IN_DAYSDeprecated.useDEFAULT_REMOVED_BRANCH_EXPIRYinstead.
-
Constructor Summary
Constructors Constructor Description BranchCleanup()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected BranchCleanupPropertiesbuild()BranchCleanupwhenInactiveInRepository(boolean removeWhenInactiveInRepository)Enables/disables plan branch removing when branch is inactive (no commits) in repository.BranchCleanupwhenInactiveInRepositoryAfterDays(int whenInactiveInRepositoryAfterDays)Defines the time after which the branch should be removed in case of inactivity.BranchCleanupwhenRemovedFromRepository(boolean removeRemovedFromRepository)Enables/disables plan branch removing when branch deleted in repository.BranchCleanupwhenRemovedFromRepositoryAfterDays(int whenRemovedFromRepositoryAfterDays)Defines the time after which the branch should be removed.
-
-
-
Field Detail
-
DEFAULT_REMOVED_BRANCH_EXPIRY
public static final java.time.Duration DEFAULT_REMOVED_BRANCH_EXPIRY
-
DEFAULT_INACTIVE_BRANCH_EXPIRY
public static final java.time.Duration DEFAULT_INACTIVE_BRANCH_EXPIRY
-
DEFAULT_REMOVED_BRANCH_EXPRIRY_IN_DAYS
@Deprecated public static final int DEFAULT_REMOVED_BRANCH_EXPRIRY_IN_DAYS
Deprecated.useDEFAULT_REMOVED_BRANCH_EXPIRYinstead.Removed branch expiry in days.
-
DEFAULT_INACTIVE_BRANCH_EXPIRY_IN_DAYS
@Deprecated public static final int DEFAULT_INACTIVE_BRANCH_EXPIRY_IN_DAYS
Deprecated.useDEFAULT_INACTIVE_BRANCH_EXPIRYinstead.Inactive branch expiry in days.
-
-
Method Detail
-
whenRemovedFromRepository
public BranchCleanup whenRemovedFromRepository(boolean removeRemovedFromRepository) throws PropertiesValidationException
Enables/disables plan branch removing when branch deleted in repository. Disabled by default.- Throws:
PropertiesValidationException
-
whenInactiveInRepository
public BranchCleanup whenInactiveInRepository(boolean removeWhenInactiveInRepository) throws PropertiesValidationException
Enables/disables plan branch removing when branch is inactive (no commits) in repository. Disabled by default.- Throws:
PropertiesValidationException
-
whenRemovedFromRepositoryAfterDays
public BranchCleanup whenRemovedFromRepositoryAfterDays(int whenRemovedFromRepositoryAfterDays) throws PropertiesValidationException
Defines the time after which the branch should be removed. Default isDEFAULT_REMOVED_BRANCH_EXPIRY.- Throws:
PropertiesValidationException
-
whenInactiveInRepositoryAfterDays
public BranchCleanup whenInactiveInRepositoryAfterDays(int whenInactiveInRepositoryAfterDays) throws PropertiesValidationException
Defines the time after which the branch should be removed in case of inactivity. Default isDEFAULT_INACTIVE_BRANCH_EXPIRY.- Throws:
PropertiesValidationException
-
build
protected BranchCleanupProperties build() throws PropertiesValidationException
- Specified by:
buildin classEntityPropertiesBuilder<BranchCleanupProperties>- Throws:
PropertiesValidationException
-
-