Package com.atlassian.bamboo.build
Interface BuildNumberGeneratorService
-
- All Known Implementing Classes:
BuildNumberGeneratorServiceImpl
public interface BuildNumberGeneratorServiceService that generates unique build numbers for build plans.- Author:
- anatoli
-
-
Method Summary
All Methods Instance Methods Abstract 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.
-
-
-
Method Detail
-
generateBuildNumber
int generateBuildNumber(@NotNull @NotNull PlanIdentifier planIdentifier)Returns a unique(consecutive) build number for a plan with the given key.- Parameters:
planIdentifier-- Returns:
-
initBuildNumbers
@Internal void initBuildNumbers(@NotNull @NotNull PlanIdentifier planIdentifier)Initialise build numbers for a plan.
-
setBuildNumber
boolean setBuildNumber(@NotNull @NotNull PlanIdentifier planIdentifier, int newBuildNumber)Sets new build number for a plan with the given key.newBuildNumbermust be greater than the current one.- 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
int getNextBuildNumber(@NotNull @NotNull PlanIdentifier planIdentifier)Returns next build number for a plan with the given key without bumping it.- Parameters:
planIdentifier-- Returns:
-
-