com.atlassian.bamboo.build.strategy
Interface BuildStrategyConfigurationService

All Known Implementing Classes:
BuildStrategyConfigurationServiceImpl

public interface BuildStrategyConfigurationService

Service to perform Build Strategy manipulation actions on Chains.

Since:
4.3

Field Summary
static long NEW_REPOSITORY_INDICATOR
           
 
Method Summary
 void addTriggeringRepository(Chain chain, long repositoryId)
          Updates all repository aware triggers of Chain by adding a new repository.
 BuildStrategy createBuildStrategy(PlanKey planKey, java.lang.String userDescription, java.util.Set<java.lang.Long> triggeringRepositories, org.apache.commons.configuration.HierarchicalConfiguration configuration)
          Creates a BuildStrategy and saves it in Chain configuration.
 void deleteBuildStrategy(PlanKey planKey, long buildStrategyId)
          Delete a given BuildStrategy from Chain configuration.
 BuildStrategy editBuildStrategy(PlanKey planKey, long buildStrategyId, java.lang.String userDescription, java.util.Set<java.lang.Long> triggeringRepositories, org.apache.commons.configuration.HierarchicalConfiguration configuration)
          Update the details of specific build strategy
 void updateRepositoryIdsInTriggers(Chain chain, java.util.Map<java.lang.Long,java.lang.Long> repositoryIdsChanges)
          Updates Chain configurations affected by repository edition.
 void updateRepositoryIdsInTriggers(Chain chain, java.util.Map<java.lang.Long,java.lang.Long> repositoryIdsChanges, boolean withQuartzJobRestart)
          Updates Chain configurations affected by repository edition.
 

Field Detail

NEW_REPOSITORY_INDICATOR

static final long NEW_REPOSITORY_INDICATOR
See Also:
Constant Field Values
Method Detail

createBuildStrategy

BuildStrategy createBuildStrategy(@NotNull
                                  PlanKey planKey,
                                  @NotNull
                                  java.lang.String userDescription,
                                  @NotNull
                                  java.util.Set<java.lang.Long> triggeringRepositories,
                                  @NotNull
                                  org.apache.commons.configuration.HierarchicalConfiguration configuration)
                                  throws java.lang.IllegalArgumentException
Creates a BuildStrategy and saves it in Chain configuration.

Parameters:
planKey - of the plan to add the build strategy to, plan should be Chain
Throws:
java.lang.IllegalArgumentException - if planKey is invalid (e.g. doesn't exist or is not a Chain)

deleteBuildStrategy

void deleteBuildStrategy(@NotNull
                         PlanKey planKey,
                         long buildStrategyId)
                         throws java.lang.IllegalArgumentException,
                                java.lang.IllegalStateException
Delete a given BuildStrategy from Chain configuration.

Parameters:
planKey - for the plan to delete the Build Strategy from.
buildStrategyId - of the Build Strategy to delete.
Throws:
java.lang.IllegalArgumentException - if planKey is invalid (e.g. doesn't exist or is not a Chain),
java.lang.IllegalStateException - if the build strategy list has changed since submitting request, i.e the build strategy isn't there to delete anymore.

editBuildStrategy

BuildStrategy editBuildStrategy(@NotNull
                                PlanKey planKey,
                                long buildStrategyId,
                                @NotNull
                                java.lang.String userDescription,
                                @NotNull
                                java.util.Set<java.lang.Long> triggeringRepositories,
                                @NotNull
                                org.apache.commons.configuration.HierarchicalConfiguration configuration)
                                throws java.lang.IllegalArgumentException,
                                       java.lang.IllegalStateException
Update the details of specific build strategy

Parameters:
planKey - - the plan the build strategy belongs to, must be a chain
buildStrategyId - - the taskDefinition to edit
Returns:
BuildStrategy with updates.
Throws:
java.lang.IllegalArgumentException - if planKey or taskId is invalid.
java.lang.IllegalStateException - if if the build strategy list has changed since submitting request, i.e the build strategy isn't there to edit anymore.

updateRepositoryIdsInTriggers

void updateRepositoryIdsInTriggers(@NotNull
                                   Chain chain,
                                   java.util.Map<java.lang.Long,java.lang.Long> repositoryIdsChanges)
Updates Chain configurations affected by repository edition. If map contains entry for NEW_REPOSITORY_INDICATOR this repository is added to all the triggers.

Parameters:
chain -
repositoryIdsChanges - mapping between old and new repositories ids

updateRepositoryIdsInTriggers

void updateRepositoryIdsInTriggers(@NotNull
                                   Chain chain,
                                   java.util.Map<java.lang.Long,java.lang.Long> repositoryIdsChanges,
                                   boolean withQuartzJobRestart)
Updates Chain configurations affected by repository edition. If map contains entry for NEW_REPOSITORY_INDICATOR this repository is added to all the triggers.

Parameters:
chain -
repositoryIdsChanges - mapping between old and new repositories ids
withQuartzJobRestart - indicates if respective polling jobs should be (re)started

addTriggeringRepository

void addTriggeringRepository(@NotNull
                             Chain chain,
                             long repositoryId)
Updates all repository aware triggers of Chain by adding a new repository.

Parameters:
chain -
repositoryId -


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.