Package com.atlassian.bamboo.build
Interface BuildNumberGeneratorService
- All Known Implementing Classes:
BuildNumberGeneratorServiceImpl
public interface BuildNumberGeneratorService
Service that generates unique build numbers for build plans.
- Author:
- anatoli
-
Method Summary
Modifier and TypeMethodDescriptionintgenerateBuildNumber(@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 Details
-
generateBuildNumber
Returns a unique(consecutive) build number for a plan with the given key.- Parameters:
planIdentifier- Identifier of a plan- Returns:
- generated unique build number
-
initBuildNumbers
Initialise build numbers for a plan. -
setBuildNumber
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
Returns next build number for a plan with the given key without bumping it.- Parameters:
planIdentifier- Identifier of a plan- Returns:
- next build number
-