Package com.atlassian.bamboo.build
Class BuildNumberGeneratorServiceImpl
- java.lang.Object
-
- com.atlassian.bamboo.build.BuildNumberGeneratorServiceImpl
-
- All Implemented Interfaces:
BuildNumberGeneratorService
public class BuildNumberGeneratorServiceImpl extends Object implements BuildNumberGeneratorService
-
-
Constructor Summary
Constructors Constructor Description BuildNumberGeneratorServiceImpl(BuildNumberGeneratorDao buildNumberGeneratorDao, AuditLogService auditLogService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgenerateBuildNumber(@NotNull PlanIdentifier planIdentifier)Returns a unique(consecutive) build number for a plan with the given key.intgetNextBuildNumber(@NotNull PlanIdentifier planIdentifier)Returns next build number for a plan with the given key without bumping it.voidinitBuildNumbers(@NotNull PlanIdentifier planIdentifier)Initialise build numbers for a plan.booleansetBuildNumber(@NotNull PlanIdentifier planIdentifier, int newBuildNumber)Sets new build number for a plan with the given key.
-
-
-
Constructor Detail
-
BuildNumberGeneratorServiceImpl
public BuildNumberGeneratorServiceImpl(BuildNumberGeneratorDao buildNumberGeneratorDao, AuditLogService auditLogService)
-
-
Method Detail
-
generateBuildNumber
public int generateBuildNumber(@NotNull @NotNull PlanIdentifier planIdentifier)Description copied from interface:BuildNumberGeneratorServiceReturns a unique(consecutive) build number for a plan with the given key.- Specified by:
generateBuildNumberin interfaceBuildNumberGeneratorService- Returns:
-
initBuildNumbers
public void initBuildNumbers(@NotNull @NotNull PlanIdentifier planIdentifier)Description copied from interface:BuildNumberGeneratorServiceInitialise build numbers for a plan.- Specified by:
initBuildNumbersin interfaceBuildNumberGeneratorService
-
setBuildNumber
public boolean setBuildNumber(@NotNull @NotNull PlanIdentifier planIdentifier, int newBuildNumber)Description copied from interface:BuildNumberGeneratorServiceSets new build number for a plan with the given key.newBuildNumbermust be greater than the current one.- Specified by:
setBuildNumberin interfaceBuildNumberGeneratorService- Parameters:
planIdentifier- Identifier of a plannewBuildNumber- must be greater than actual build number- Returns:
- true if newBuildNumber is greater than the old one. Otherwise false.
-
getNextBuildNumber
public int getNextBuildNumber(@NotNull @NotNull PlanIdentifier planIdentifier)Description copied from interface:BuildNumberGeneratorServiceReturns next build number for a plan with the given key without bumping it.- Specified by:
getNextBuildNumberin interfaceBuildNumberGeneratorService- Returns:
-
-