com.atlassian.bamboo.build.creation
Interface BuildPlanCreationService

All Known Implementing Classes:
BuildPlanCreationServiceImpl

public interface BuildPlanCreationService

A stateless, non-transactional service that provides common services for plan creation and validation


Nested Class Summary
static class BuildPlanCreationService.EnablePlan
          Enums for whether a build, once created, will be enabled or disabled
 
Method Summary
 void addNewRequirementForBuilder(BuildConfiguration buildConfiguration, java.lang.String selectedLabel, Builder selectedBuilder, RequirementSet requirementSet)
          Adds the default requirements from the selected builder & label
 void addNotificationRule(Build build, NotificationRule newRule)
          Add a notification to the build's noticatin set.
 void cloneBuildPlan(BuildCreationBean buildCreationBean, java.lang.String planKeyToClone, java.lang.String planOwnerUsername)
          Clones the passe plan into the BuildCreationBean
 BuildConfiguration newBuildConfigurationWithDefaults()
          Instantiates a new BuildConfiguration, running through the Repository and Builder to generate the defaults
 BuildConfiguration newBuildConfigurationWithNoDefaults()
          Instantiates a new BuildConfiguration
 Build newBuildPlan()
          Returns a new autowired build plan
 void persistPlanToDatabase(BuildCreationBean buildCreationBean)
          Takes a BuildCreationBean and persists a plan.
 void persistPlanToDatabase(BuildCreationBean buildCreationBean, BuildPlanCreationService.EnablePlan enablePlan)
          Takes a BuildCreationBean and persists a plan, optionall disabling the plan on creation
 void removeRequirementsForBuilder(BuildConfiguration buildConfiguration, java.lang.String builderLabel, Builder builder, RequirementSet requirementSet)
          Removes the default requirements from the selected builder & label
 void setBuilder(BuildCreationBean buildCreationBean, Builder builder, java.lang.String label)
          Sets the Builder in the BuildCreationBean.getBuildBeingCreated()
 void setBuildStrategy(BuildCreationBean buildCreationBean, BuildStrategy buildStrategy)
          Sets the BuildStrategy in BuildCreationBean.getBuildBeingCreated()
 void setRepository(BuildCreationBean buildCreationBean, Repository repository)
          Sets the Repository in BuildCreationBean.getBuildBeingCreated()
 void setWebRepositoryViewer(BuildCreationBean buildCreationBean, WebRepositoryViewer webRepositoryViewer)
          Sets the WebRepositoryViewer in BuildCreationBean.getBuildBeingCreated()
 void validateNewBuildForExistingProject(com.opensymphony.xwork.ValidationAware validationAware, java.lang.String existingProjectKey, java.lang.String buildKey, java.lang.String buildName)
          Validate that name new plan is unique within the project
 void validateNewPlanDetails(com.opensymphony.xwork.ValidationAware validationAware, java.lang.String buildKey, java.lang.String buildName)
          Ensure that the build key & name are valid
 void validateNewProjectDetails(com.opensymphony.xwork.ValidationAware validationAware, java.lang.String projectName, java.lang.String projectKey)
          Validate that the new project details are valid
 void validatePlanKey(com.opensymphony.xwork.ValidationAware validationAware, java.lang.String planKeyField, java.lang.String planKey)
          Ensure that the plan key is valid
 void validatePlanName(com.opensymphony.xwork.ValidationAware validationAware, java.lang.String planNameField, java.lang.String planName)
          Ensure that the plan name is valid
 void validatePlanToCloneExists(com.opensymphony.xwork.ValidationAware validationAware, java.lang.String buildKeyToClone)
          Validate that the plan t clone exists
 

Method Detail

validatePlanKey

void validatePlanKey(@NotNull
                     com.opensymphony.xwork.ValidationAware validationAware,
                     @NotNull
                     java.lang.String planKeyField,
                     @Nullable
                     java.lang.String planKey)
Ensure that the plan key is valid

Parameters:
validationAware - Action to be fed with possible validation errors
planKeyField - Name of the UI field for plan key
planKey - Plan key

validatePlanName

void validatePlanName(@NotNull
                      com.opensymphony.xwork.ValidationAware validationAware,
                      @NotNull
                      java.lang.String planNameField,
                      @Nullable
                      java.lang.String planName)
Ensure that the plan name is valid

Parameters:
validationAware - Action to be fed with possible validation errors
planNameField - Name of the UI field for plan name
planName - Plan name

validatePlanToCloneExists

void validatePlanToCloneExists(@NotNull
                               com.opensymphony.xwork.ValidationAware validationAware,
                               @Nullable
                               java.lang.String buildKeyToClone)
Validate that the plan t clone exists

Parameters:
validationAware -
buildKeyToClone -

validateNewPlanDetails

void validateNewPlanDetails(@NotNull
                            com.opensymphony.xwork.ValidationAware validationAware,
                            @Nullable
                            java.lang.String buildKey,
                            @Nullable
                            java.lang.String buildName)
Ensure that the build key & name are valid

Parameters:
validationAware -
buildKey -
buildName -

validateNewBuildForExistingProject

void validateNewBuildForExistingProject(@NotNull
                                        com.opensymphony.xwork.ValidationAware validationAware,
                                        @Nullable
                                        java.lang.String existingProjectKey,
                                        @Nullable
                                        java.lang.String buildKey,
                                        @Nullable
                                        java.lang.String buildName)
Validate that name new plan is unique within the project

Parameters:
validationAware -
existingProjectKey -
buildKey -
buildName -

validateNewProjectDetails

void validateNewProjectDetails(@NotNull
                               com.opensymphony.xwork.ValidationAware validationAware,
                               @Nullable
                               java.lang.String projectName,
                               @Nullable
                               java.lang.String projectKey)
Validate that the new project details are valid

Parameters:
validationAware -
projectName -
projectKey -

newBuildPlan

@NotNull
Build newBuildPlan()
Returns a new autowired build plan

Returns:

newBuildConfigurationWithDefaults

@NotNull
BuildConfiguration newBuildConfigurationWithDefaults()
Instantiates a new BuildConfiguration, running through the Repository and Builder to generate the defaults

Returns:

newBuildConfigurationWithNoDefaults

@NotNull
BuildConfiguration newBuildConfigurationWithNoDefaults()
Instantiates a new BuildConfiguration

Returns:

cloneBuildPlan

void cloneBuildPlan(@NotNull
                    BuildCreationBean buildCreationBean,
                    @NotNull
                    java.lang.String planKeyToClone,
                    @NotNull
                    java.lang.String planOwnerUsername)
                    throws PlanCreationException
Clones the passe plan into the BuildCreationBean

Parameters:
buildCreationBean -
planKeyToClone -
planOwnerUsername -
Throws:
PlanCreationException

persistPlanToDatabase

void persistPlanToDatabase(@NotNull
                           BuildCreationBean buildCreationBean,
                           @NotNull
                           BuildPlanCreationService.EnablePlan enablePlan)
                           throws PlanCreationDeniedException
Takes a BuildCreationBean and persists a plan, optionall disabling the plan on creation

Parameters:
buildCreationBean -
enablePlan -
Throws:
PlanCreationDeniedException

persistPlanToDatabase

void persistPlanToDatabase(@NotNull
                           BuildCreationBean buildCreationBean)
                           throws PlanCreationDeniedException
Takes a BuildCreationBean and persists a plan.

Parameters:
buildCreationBean -
Throws:
PlanCreationDeniedException

addNewRequirementForBuilder

void addNewRequirementForBuilder(@NotNull
                                 BuildConfiguration buildConfiguration,
                                 @NotNull
                                 java.lang.String selectedLabel,
                                 @NotNull
                                 Builder selectedBuilder,
                                 @NotNull
                                 RequirementSet requirementSet)
Adds the default requirements from the selected builder & label

Parameters:
buildConfiguration -
selectedLabel -
selectedBuilder -
requirementSet -

removeRequirementsForBuilder

void removeRequirementsForBuilder(@NotNull
                                  BuildConfiguration buildConfiguration,
                                  @NotNull
                                  java.lang.String builderLabel,
                                  @NotNull
                                  Builder builder,
                                  @NotNull
                                  RequirementSet requirementSet)
Removes the default requirements from the selected builder & label

Parameters:
buildConfiguration -
builderLabel -
builder -
requirementSet -

setBuilder

void setBuilder(@NotNull
                BuildCreationBean buildCreationBean,
                @NotNull
                Builder builder,
                java.lang.String label)
                throws PlanCreationException
Sets the Builder in the BuildCreationBean.getBuildBeingCreated()

Parameters:
buildCreationBean -
builder -
label -
Throws:
PlanCreationException

setRepository

void setRepository(@NotNull
                   BuildCreationBean buildCreationBean,
                   @NotNull
                   Repository repository)
                   throws PlanCreationException
Sets the Repository in BuildCreationBean.getBuildBeingCreated()

Parameters:
buildCreationBean -
repository -
Throws:
PlanCreationException

setWebRepositoryViewer

void setWebRepositoryViewer(@NotNull
                            BuildCreationBean buildCreationBean,
                            @NotNull
                            WebRepositoryViewer webRepositoryViewer)
                            throws PlanCreationException
Sets the WebRepositoryViewer in BuildCreationBean.getBuildBeingCreated()

Parameters:
buildCreationBean -
webRepositoryViewer -
Throws:
PlanCreationException

addNotificationRule

void addNotificationRule(@NotNull
                         Build build,
                         @NotNull
                         NotificationRule newRule)
Add a notification to the build's noticatin set. You can add multiple times

Parameters:
build -
newRule -

setBuildStrategy

void setBuildStrategy(@NotNull
                      BuildCreationBean buildCreationBean,
                      @NotNull
                      BuildStrategy buildStrategy)
Sets the BuildStrategy in BuildCreationBean.getBuildBeingCreated()

Parameters:
buildCreationBean -
buildStrategy -


Copyright © 2010 Atlassian. All Rights Reserved.