public class BuildNumberGeneratorServiceImpl extends Object implements BuildNumberGeneratorService
Constructor and Description |
---|
BuildNumberGeneratorServiceImpl(BuildNumberGeneratorDao buildNumberGeneratorDao,
AuditLogService auditLogService) |
Modifier and Type | Method and Description |
---|---|
int |
generateBuildNumber(PlanIdentifier planIdentifier)
Returns a unique(consecutive) build number for a plan with the given key.
|
int |
getNextBuildNumber(PlanIdentifier planIdentifier)
Returns next build number for a plan with the given key without bumping it.
|
void |
initBuildNumbers(PlanIdentifier planIdentifier)
Initialise build numbers for a plan.
|
boolean |
setBuildNumber(PlanIdentifier planIdentifier,
int newBuildNumber)
Sets new build number for a plan with the given key.
|
public BuildNumberGeneratorServiceImpl(BuildNumberGeneratorDao buildNumberGeneratorDao, AuditLogService auditLogService)
public int generateBuildNumber(@NotNull PlanIdentifier planIdentifier)
BuildNumberGeneratorService
generateBuildNumber
in interface BuildNumberGeneratorService
public void initBuildNumbers(@NotNull PlanIdentifier planIdentifier)
BuildNumberGeneratorService
initBuildNumbers
in interface BuildNumberGeneratorService
public boolean setBuildNumber(@NotNull PlanIdentifier planIdentifier, int newBuildNumber)
BuildNumberGeneratorService
newBuildNumber
must be greater than the current one.setBuildNumber
in interface BuildNumberGeneratorService
planIdentifier
- Identifier of a plannewBuildNumber
- must be greater than actual build numberpublic int getNextBuildNumber(@NotNull PlanIdentifier planIdentifier)
BuildNumberGeneratorService
getNextBuildNumber
in interface BuildNumberGeneratorService
Copyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.