|
||||||||||
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
public abstract class PlanCreationTemplate
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.atlassian.bamboo.build.creation.PlanCreationService |
---|
PlanCreationService.EnablePlan |
Constructor Summary | |
---|---|
protected |
PlanCreationTemplate(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,
NotificationManager notificationManager,
BranchCommitInformationManager branchCommitInformationManager,
VcsBranchManager vcsBranchManager)
|
Method Summary | |
---|---|
static void |
cleanBuildConfiguration(BuildConfiguration buildConfiguration)
Performs general cleanup of the buildConfiguration, cleaning up properties we don't want to save mostly these are properties that get used for UI display. |
protected abstract void |
cleanBuildConfiguration(BuildConfiguration buildConfiguration,
Plan plan)
Clean build configuration for saving. |
protected void |
clonePlanPermissionsToSession(Plan buildToClone,
PlanCreationBean planCreationBean,
java.lang.String planOwner)
|
java.lang.String |
createPlan(BuildConfiguration buildConfiguration,
ActionParametersMap actionParametersMap,
PlanCreationService.EnablePlan enabled)
Creates a plan from its components and saves it to the database |
protected abstract org.acegisecurity.acls.MutableAcl |
getDefaultPermissionsForPlan()
Generate the permissions to be stored against the plan on creation |
protected void |
logBuildConfiguration(BuildConfiguration buildConfiguration)
|
protected abstract boolean |
performCloneIfRequired(PlanCreationBean planCreationBean,
ActionParametersMap params)
Using the action parameters determine if cloning is required and if so, perform the clone. |
protected abstract void |
performPostCreateAction(Plan plan)
Perform plan specific actions that need to be run immediately after plan creation. |
protected abstract void |
prepareBuildConfiguration(BuildConfiguration buildConfiguration,
Plan plan,
PlanCreationBean planCreationBean)
Prepare build configuration for saving. |
protected abstract void |
preparePlanDetails(Plan plan,
ActionParametersMap params)
Prepare the plan object for saving. |
protected abstract void |
saveAndUpdateParents(Plan plan)
Perform any necessary database operations required before saving the plan. |
java.lang.String |
savePlan(PlanCreationBean planCreationBean)
Saves a already created plan to the database |
protected abstract void |
setFullPlanKey(Plan plan)
Set the full key for this plan |
abstract 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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.atlassian.bamboo.build.creation.PlanCreationService |
---|
getBuildConfigurationWithDefaults, getNewInstance, validatePlan |
Field Detail |
---|
protected final PlanManager planManager
protected final BambooAuthenticationContext authenticationContext
protected final ProjectManager projectManager
protected final RepositoryConfigHelper repositoryConfigHelper
protected final BuildStrategyConfigHelper buildStrategyConfigHelper
protected final WebRepositoryConfigHelper webRepositoryConfigHelper
protected final com.atlassian.event.api.EventPublisher eventPublisher
protected final PlanValidationService planValidationService
protected final AuditLogService auditLogService
protected final BuildDefinitionConverter buildDefinitionConverter
protected final BambooAclUpdateHelper aclUpdateHelper
protected final BambooLicenseManager bambooLicenseManager
protected final ArtifactDefinitionManager artifactDefinitionManager
protected final ArtifactSubscriptionManager artifactSubscriptionManager
protected final VariableDefinitionManager variableDefinitionManager
protected final RepositoryDefinitionManager repositoryDefinitionManager
protected final NotificationManager notificationManager
protected final BranchCommitInformationManager branchCommitInformationManager
protected final VcsBranchManager vcsBranchManager
Constructor Detail |
---|
protected PlanCreationTemplate(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, NotificationManager notificationManager, BranchCommitInformationManager branchCommitInformationManager, VcsBranchManager vcsBranchManager)
Method Detail |
---|
protected abstract void preparePlanDetails(@NotNull Plan plan, @NotNull ActionParametersMap params)
plan
- to add properties toparams
- containing any properties provided from the UI.protected abstract boolean performCloneIfRequired(@NotNull PlanCreationBean planCreationBean, @NotNull ActionParametersMap params) throws PlanCreationException, PlanCreationDeniedException
planCreationBean
- containing the plan and acls (currently does not contain buildConfiguration)params
- containing any properties provided from the UI
PlanCreationException
- if cloning is required but fails.
PlanCreationDeniedException
- if cloning required but can't be completed due to licensing restrictions@Nullable protected abstract org.acegisecurity.acls.MutableAcl getDefaultPermissionsForPlan()
protected abstract void prepareBuildConfiguration(@NotNull BuildConfiguration buildConfiguration, @NotNull Plan plan, @NotNull PlanCreationBean planCreationBean)
buildConfiguration
- the current build configuration.plan
- the current plan (will already have details populated)protected abstract void cleanBuildConfiguration(@NotNull BuildConfiguration buildConfiguration, @NotNull Plan plan)
buildConfiguration
- the current build configuration.plan
- the current plan (will already have details populated)protected abstract void saveAndUpdateParents(@NotNull Plan plan)
plan
- - complete plan (except for full key) to be savedprotected abstract void setFullPlanKey(@NotNull Plan plan)
plan
- - complete plan to be savedprotected abstract void performPostCreateAction(@NotNull Plan plan)
plan
- created planpublic abstract void triggerCreationCompleteEvents(PlanKey planKey)
triggerCreationCompleteEvents
in interface PlanCreationService
planKey
- public java.lang.String createPlan(@NotNull BuildConfiguration buildConfiguration, @NotNull ActionParametersMap actionParametersMap, @NotNull PlanCreationService.EnablePlan enabled) throws PlanCreationDeniedException, PlanCreationException
PlanCreationService
createPlan
in interface PlanCreationService
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.lang.String savePlan(PlanCreationBean planCreationBean) throws PlanCreationDeniedException, PlanCreationException
PlanCreationService
savePlan
in interface PlanCreationService
planCreationBean
- containing the required components for saving
PlanCreationDeniedException
- if plan creation fails because you already have too many plans.
PlanCreationException
- if plan creation fails for any other reasonpublic static void cleanBuildConfiguration(BuildConfiguration buildConfiguration)
buildConfiguration
- to cleanprotected void clonePlanPermissionsToSession(Plan buildToClone, PlanCreationBean planCreationBean, java.lang.String planOwner)
protected void logBuildConfiguration(BuildConfiguration buildConfiguration)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |