|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.plan.stage.StageServiceImpl
public class StageServiceImpl
Constructor Summary | |
---|---|
StageServiceImpl(AuditLogService auditLogService,
BambooPermissionManager bambooPermissionManager,
CachedPlanManager cachedPlanManager,
ChainBranchManager chainBranchManager,
DeletionService deletionService,
PlanManager planManager,
com.atlassian.struts.TextProvider textProvider,
ValidationService validationService,
BuildExecutionManager buildExecutionManager,
ScopedExclusionService scopedExclusionService,
ArtifactSubscriptionManager artifactSubscriptionManager)
|
Method Summary | |
---|---|
ImmutableChainStage |
addStage(PlanKey planKey,
String stageName,
String stageDescription,
boolean isManual)
Adds a new stage to the specified plan. |
void |
deleteStage(PlanKey planKey,
long stageId,
BambooClosures.Throwing1<ImmutableChainStage,WebValidationException>... runBefore)
Deletes the given stage and any jobs under the stage. |
ImmutableChainStage |
getStage(PlanKey planKey,
long stageId)
Get an individual stage from a plan |
List<ImmutableChainStage> |
getStagesForPlan(PlanKey planKey)
Get all stages in a plan, in order |
ImmutableChainStage |
updateStage(PlanKey planKey,
long stageId,
String name,
String description,
boolean manual,
Integer index,
BambooClosures.Throwing1<ImmutableChainStage,WebValidationException>... runBefore)
Update the details of a stage. |
ErrorCollection |
validateStageForAdd(PlanKey planKey,
String stageName,
String stageDescription,
boolean isManual)
Validates a new stage for the specified plan. |
ErrorCollection |
validateStageForUpdate(PlanKey planKey,
long stageId,
String name,
String description,
boolean manual)
Validates editing of a stage. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StageServiceImpl(AuditLogService auditLogService, BambooPermissionManager bambooPermissionManager, CachedPlanManager cachedPlanManager, ChainBranchManager chainBranchManager, DeletionService deletionService, PlanManager planManager, com.atlassian.struts.TextProvider textProvider, ValidationService validationService, BuildExecutionManager buildExecutionManager, ScopedExclusionService scopedExclusionService, ArtifactSubscriptionManager artifactSubscriptionManager)
Method Detail |
---|
@NotNull public List<ImmutableChainStage> getStagesForPlan(@NotNull PlanKey planKey) throws WebValidationException
StageService
getStagesForPlan
in interface StageService
planKey
- of plan
WebValidationException
@NotNull public ImmutableChainStage getStage(@NotNull PlanKey planKey, long stageId) throws WebValidationException
StageService
getStage
in interface StageService
planKey
- the plan the stage belongs tostageId
- the id of the stage
WebValidationException
@NotNull public ErrorCollection validateStageForAdd(@NotNull PlanKey planKey, @Nullable String stageName, @Nullable String stageDescription, boolean isManual) throws WebValidationException
StageService
validateStageForAdd
in interface StageService
planKey
- of plan to add stage tostageName
- of stagestageDescription
- of stageisManual
- true if this stage is a manual stage
WebValidationException
- if plan does not exist or it is not of the correct type@NotNull public ImmutableChainStage addStage(@NotNull PlanKey planKey, @NotNull String stageName, @Nullable String stageDescription, boolean isManual) throws WebValidationException
StageService
addStage
in interface StageService
planKey
- of plan to add stage tostageName
- of stagestageDescription
- of stageisManual
- true if this stage is a manual stage
WebValidationException
- if plan does not exist or it is not of the correct type, or if validation fails@NotNull public ErrorCollection validateStageForUpdate(@NotNull PlanKey planKey, long stageId, @Nullable String name, @Nullable String description, boolean manual) throws WebValidationException
StageService
validateStageForUpdate
in interface StageService
planKey
- of plan stage belongs tostageId
- if of the stage being editedname
- new name of stagedescription
- new description of stagemanual
- new value for id stage is manual or not
WebValidationException
@NotNull public ImmutableChainStage updateStage(@NotNull PlanKey planKey, long stageId, @NotNull String name, @NotNull String description, boolean manual, @Nullable Integer index, @NotNull BambooClosures.Throwing1<ImmutableChainStage,WebValidationException>... runBefore) throws WebValidationException
StageService
updateStage
in interface StageService
planKey
- key of the plan the stage belongs tostageId
- if of the stage being updatedname
- the name of the stagedescription
- the description of the stagemanual
- indicates if the stage runs automatically or needs manual interventionindex
- position of the stage in the plan structure
ImmutableChainStage
representing the updated stage
WebValidationException
- if invalidpublic void deleteStage(@NotNull PlanKey planKey, long stageId, @NotNull BambooClosures.Throwing1<ImmutableChainStage,WebValidationException>... runBefore) throws WebValidationException
StageService
deleteStage
in interface StageService
planKey
- key for the plan the stage belongs to.stageId
- id if of the stage being deleted.runBefore
- code to execute after security and validation has passed but before the deletion occurs.
WebValidationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |