|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.build.creation.PlanCreationTemplate com.atlassian.bamboo.build.creation.JobCreationService
public class JobCreationService
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.atlassian.bamboo.build.creation.PlanCreationService |
---|
PlanCreationService.EnablePlan |
Field Summary | |
---|---|
static java.lang.String |
BUILD_DESCRIPTION
|
static java.lang.String |
BUILD_KEY
|
static java.lang.String |
BUILD_NAME
|
static java.lang.String |
CLONE_JOB
|
static java.lang.String |
EXISTING_STAGE
|
static java.lang.String |
JOB_KEY_TO_CLONE
|
static java.lang.String |
MASTER_JOB_KEY
|
static java.lang.String |
NEW_STAGE_MARKER
|
static java.lang.String |
STAGE_DESCRIPTION
|
static java.lang.String |
STAGE_MANUAL
|
static java.lang.String |
STAGE_NAME
|
static java.lang.String |
SUB_BUILD_KEY
|
Constructor Summary | |
---|---|
JobCreationService(PlanManager planManager,
ProjectManager projectManager,
BambooAclUpdateHelper aclUpdateHelper,
BambooAuthenticationContext authenticationContext,
BambooLicenseManager bambooLicenseManager,
HibernateMutableAclService aclService,
PlanScheduler planScheduler,
RepositoryConfigHelper repositoryConfigHelper,
BuildStrategyConfigHelper buildStrategyConfigHelper,
WebRepositoryConfigHelper webRepositoryConfigHelper,
com.atlassian.event.api.EventPublisher eventPublisher,
PlanValidationService planValidationService,
AuditLogService auditLogService,
BuildDefinitionConverter buildDefinitionConverter,
ArtifactDefinitionManager artifactDefinitionManager,
ArtifactSubscriptionManager artifactSubscriptionManager,
VariableDefinitionManager variableDefinitionManager,
RepositoryDefinitionManager repositoryDefinitionManager,
TaskConfigurationService taskConfigurationService,
ChainBranchManager chainBranchManager,
NotificationManager notificationManager,
BranchCommitInformationManager branchCommitInformationManager,
VcsBranchManager vcsBranchManager)
|
Method Summary | |
---|---|
void |
cleanBuildConfiguration(BuildConfiguration buildConfiguration,
Plan plan)
Clean build configuration for saving. |
boolean |
cloneBuildable(PlanCreationBean planCreationBean,
ActionParametersMap params,
Job jobToClone,
Job job)
|
java.util.List<PlanKey> |
createJobAndBranches(BuildConfiguration buildConfiguration,
ActionParametersMap actionParametersMap,
PlanCreationService.EnablePlan enabled)
|
java.lang.String |
createPlan(BuildConfiguration buildConfiguration,
ActionParametersMap actionParametersMap,
PlanCreationService.EnablePlan enabled)
Deprecated. since 4.0 use @{link #createJobAndBranches} |
java.lang.String |
createSingleJob(BuildConfiguration buildConfiguration,
ActionParametersMap actionParametersMap,
PlanCreationService.EnablePlan enabled)
|
BuildConfiguration |
getBuildConfigurationWithDefaults()
|
java.util.List<PlanConfigHelper> |
getComponentsOnPage()
|
protected org.acegisecurity.acls.MutableAcl |
getDefaultPermissionsForPlan()
Generate the permissions to be stored against the plan on creation |
Job |
getNewInstance()
|
protected boolean |
performCloneIfRequired(PlanCreationBean planCreationBean,
ActionParametersMap params)
Using the action parameters determine if cloning is required and if so, perform the clone. |
protected void |
performPostCreateAction(Plan plan)
Perform plan specific actions that need to be run immediately after plan creation. |
protected void |
prepareBuildConfiguration(BuildConfiguration buildConfiguration,
Plan plan,
PlanCreationBean planCreationBean)
Prepare build configuration for saving. |
protected void |
preparePlanDetails(Plan plan,
ActionParametersMap params)
Prepare the plan object for saving. |
void |
saveAndUpdateParents(Plan plan)
Perform any necessary database operations required before saving the plan. |
void |
setFullPlanKey(Plan plan)
Set the full key for this plan |
void |
triggerCreationCompleteEvents(PlanKey planKey)
Trigger the appropriate events after the plan has been saved successfully Calling this method is responsibility of class using this template. |
void |
validatePlan(com.opensymphony.xwork.ValidationAware validationAware,
BuildConfiguration buildConfiguration,
ActionParametersMap params)
Validates plan details and build configuration details for initial plan creation. |
Methods inherited from class com.atlassian.bamboo.build.creation.PlanCreationTemplate |
---|
cleanBuildConfiguration, clonePlanPermissionsToSession, logBuildConfiguration, savePlan |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String NEW_STAGE_MARKER
public static final java.lang.String STAGE_NAME
public static final java.lang.String STAGE_DESCRIPTION
public static final java.lang.String STAGE_MANUAL
public static final java.lang.String EXISTING_STAGE
public static final java.lang.String BUILD_KEY
public static final java.lang.String MASTER_JOB_KEY
public static final java.lang.String SUB_BUILD_KEY
public static final java.lang.String BUILD_NAME
public static final java.lang.String BUILD_DESCRIPTION
public static final java.lang.String CLONE_JOB
public static final java.lang.String JOB_KEY_TO_CLONE
Constructor Detail |
---|
public JobCreationService(PlanManager planManager, ProjectManager projectManager, BambooAclUpdateHelper aclUpdateHelper, BambooAuthenticationContext authenticationContext, BambooLicenseManager bambooLicenseManager, HibernateMutableAclService aclService, PlanScheduler planScheduler, RepositoryConfigHelper repositoryConfigHelper, BuildStrategyConfigHelper buildStrategyConfigHelper, WebRepositoryConfigHelper webRepositoryConfigHelper, com.atlassian.event.api.EventPublisher eventPublisher, PlanValidationService planValidationService, AuditLogService auditLogService, BuildDefinitionConverter buildDefinitionConverter, ArtifactDefinitionManager artifactDefinitionManager, ArtifactSubscriptionManager artifactSubscriptionManager, VariableDefinitionManager variableDefinitionManager, RepositoryDefinitionManager repositoryDefinitionManager, TaskConfigurationService taskConfigurationService, ChainBranchManager chainBranchManager, NotificationManager notificationManager, BranchCommitInformationManager branchCommitInformationManager, VcsBranchManager vcsBranchManager)
Method Detail |
---|
public void validatePlan(com.opensymphony.xwork.ValidationAware validationAware, BuildConfiguration buildConfiguration, ActionParametersMap params)
PlanCreationService
validationAware
- - object to add errors to (usually an action class)buildConfiguration
- - build configuration to validateparams
- - parameter map containing any plan details not in the build configuration.public Job getNewInstance()
protected org.acegisecurity.acls.MutableAcl getDefaultPermissionsForPlan()
PlanCreationTemplate
getDefaultPermissionsForPlan
in class PlanCreationTemplate
public BuildConfiguration getBuildConfigurationWithDefaults()
protected void preparePlanDetails(@NotNull Plan plan, @NotNull ActionParametersMap params)
PlanCreationTemplate
preparePlanDetails
in class PlanCreationTemplate
plan
- to add properties toparams
- containing any properties provided from the UI.protected boolean performCloneIfRequired(@NotNull PlanCreationBean planCreationBean, @NotNull ActionParametersMap params)
PlanCreationTemplate
performCloneIfRequired
in class PlanCreationTemplate
planCreationBean
- containing the plan and acls (currently does not contain buildConfiguration)params
- containing any properties provided from the UI
public boolean cloneBuildable(@NotNull PlanCreationBean planCreationBean, @NotNull ActionParametersMap params, Job jobToClone, Job job)
protected void prepareBuildConfiguration(@NotNull BuildConfiguration buildConfiguration, @NotNull Plan plan, @NotNull PlanCreationBean planCreationBean)
PlanCreationTemplate
prepareBuildConfiguration
in class PlanCreationTemplate
buildConfiguration
- the current build configuration.plan
- the current plan (will already have details populated)public void cleanBuildConfiguration(@NotNull BuildConfiguration buildConfiguration, @NotNull Plan plan)
PlanCreationTemplate
cleanBuildConfiguration
in class PlanCreationTemplate
buildConfiguration
- the current build configuration.plan
- the current plan (will already have details populated)public void setFullPlanKey(@NotNull Plan plan)
PlanCreationTemplate
setFullPlanKey
in class PlanCreationTemplate
plan
- - complete plan to be savedpublic void saveAndUpdateParents(@NotNull Plan plan)
PlanCreationTemplate
saveAndUpdateParents
in class PlanCreationTemplate
plan
- - complete plan (except for full key) to be savedprotected void performPostCreateAction(@NotNull Plan plan)
PlanCreationTemplate
performPostCreateAction
in class PlanCreationTemplate
plan
- created planpublic void triggerCreationCompleteEvents(PlanKey planKey)
PlanCreationTemplate
triggerCreationCompleteEvents
in interface PlanCreationService
triggerCreationCompleteEvents
in class PlanCreationTemplate
public java.util.List<PlanConfigHelper> getComponentsOnPage()
public java.lang.String createSingleJob(@NotNull BuildConfiguration buildConfiguration, @NotNull ActionParametersMap actionParametersMap, @NotNull PlanCreationService.EnablePlan enabled) throws PlanCreationDeniedException, PlanCreationException
PlanCreationDeniedException
PlanCreationException
@Deprecated public java.lang.String createPlan(@NotNull BuildConfiguration buildConfiguration, @NotNull ActionParametersMap actionParametersMap, @NotNull PlanCreationService.EnablePlan enabled) throws PlanCreationDeniedException, PlanCreationException
createPlan
in interface PlanCreationService
createPlan
in class PlanCreationTemplate
buildConfiguration
- of the plan to createactionParametersMap
- containing any other required params NOT in the buildConfigurationenabled
- whether the plan should start enabled or disabled
PlanCreationDeniedException
- if plan creation fails because you already have too many plans.
PlanCreationException
- if plan creation fails for any other reasonpublic java.util.List<PlanKey> createJobAndBranches(@NotNull BuildConfiguration buildConfiguration, @NotNull ActionParametersMap actionParametersMap, @NotNull PlanCreationService.EnablePlan enabled) throws PlanCreationDeniedException, PlanCreationException
PlanCreationDeniedException
PlanCreationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |