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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
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 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.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
int getNextBuildNumber(@NotNull @NotNull PlanIdentifier planIdentifier)
Returns next build number for a plan with the given key without bumping it.- Parameters:
planIdentifier
-- Returns:
-
-