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 TypeMethodDescriptionint
generateBuildNumber
(@NotNull PlanIdentifier planIdentifier) Returns a unique(consecutive) build number for a plan with the given key.int
getNextBuildNumber
(@NotNull PlanIdentifier planIdentifier) Returns next build number for a plan with the given key without bumping it.void
initBuildNumbers
(@NotNull PlanIdentifier planIdentifier) Initialise build numbers for a plan.boolean
setBuildNumber
(@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.newBuildNumber
must 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
-