public interface PlanCreationService
Modifier and Type | Interface and Description |
---|---|
static class |
PlanCreationService.EnablePlan
Enums for whether a plan, once created, will be enabled or disabled
|
Modifier and Type | Field and Description |
---|---|
static String |
EXISTING_PROJECT_KEY |
static String |
NEW_PROJECT_MARKER |
static String |
PROJECT_DESCRIPTION |
static String |
PROJECT_KEY |
static String |
PROJECT_NAME |
Modifier and Type | Method and Description |
---|---|
String |
createPlan(BuildConfiguration buildConfiguration,
ActionParametersMap actionParametersMap,
PlanCreationService.EnablePlan enabled)
Creates a plan from its components and saves it to the database
|
BuildConfiguration |
getBuildConfigurationWithDefaults() |
Plan |
getNewInstance() |
String |
savePlan(PlanCreationBean planCreationBean)
Saves a already created plan to the database
|
void |
triggerCreationCompleteEvents(PlanKey planKey)
Trigger the appropriate events after the plan has been saved successfully
Calling this method is responsibility of class using this service.
|
void |
validatePlan(com.atlassian.struts.ValidationAware validationAware,
BuildConfiguration buildConfiguration,
ActionParametersMap actionParametersMap)
Validates plan details and build configuration details for initial plan creation.
|
static final String EXISTING_PROJECT_KEY
static final String NEW_PROJECT_MARKER
static final String PROJECT_KEY
static final String PROJECT_NAME
static final String PROJECT_DESCRIPTION
Plan getNewInstance()
BuildConfiguration getBuildConfigurationWithDefaults()
void validatePlan(com.atlassian.struts.ValidationAware validationAware, BuildConfiguration buildConfiguration, ActionParametersMap actionParametersMap)
validationAware
- - object to add errors to (usually an action class)buildConfiguration
- - build configuration to validateactionParametersMap
- - parameter map containing any plan details not in the build configuration.void triggerCreationCompleteEvents(PlanKey planKey)
planKey
- String createPlan(@NotNull BuildConfiguration buildConfiguration, @NotNull ActionParametersMap actionParametersMap, @NotNull PlanCreationService.EnablePlan enabled) throws PlanCreationDeniedException, PlanCreationException
buildConfiguration
- of the plan to createactionParametersMap
- containing any other required params NOT in the buildConfigurationenabled
- whether the plan should start enabled or disabledPlanCreationDeniedException
- if plan creation fails because you already have too many plans.PlanCreationException
- if plan creation fails for any other reasonString savePlan(@NotNull PlanCreationBean planCreationBean) throws PlanCreationDeniedException, PlanCreationException
planCreationBean
- containing the required components for savingPlanCreationDeniedException
- if plan creation fails because you already have too many plans.PlanCreationException
- if plan creation fails for any other reasonCopyright © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.