Interface BuildNumberGeneratorService

All Known Implementing Classes:
BuildNumberGeneratorServiceImpl

public interface BuildNumberGeneratorService
Service that generates unique build numbers for build plans.
Author:
anatoli
  • Method Details

    • generateBuildNumber

      int generateBuildNumber(@NotNull @NotNull PlanIdentifier planIdentifier)
      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

      @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 plan
      newBuildNumber - 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 - Identifier of a plan
      Returns:
      next build number