@Component public class RestStageServiceImpl extends Object implements RestStageService
Constructor and Description |
---|
RestStageServiceImpl(BuildExecutionManager buildExecutionManager,
com.atlassian.sal.api.message.I18nResolver i18nResolver,
PlanRestService planRestService,
RestArtifactService restArtifactService,
RestJobService restJobService,
StageConversionFunction stageConversionFunction,
StageService stageService) |
Modifier and Type | Method and Description |
---|---|
void |
deleteStage(PlanKey planKey,
long stageId,
io.atlassian.fugue.Option<ConfirmationToken> confirmationToken,
javax.ws.rs.core.UriInfo uriInfo)
Deletes the given stage.
|
RestWarnings |
getStageDeletionWarnings(PlanKey planKey,
long stageId,
Expansion expansion,
javax.ws.rs.core.UriInfo uriInfo)
Get warnings related to stage deletion.
|
RestWarnings |
getStageMoveWarnings(PlanKey planKey,
long stageId,
int index,
Expansion expansion,
javax.ws.rs.core.UriInfo uriInfo)
Returns warnings related to a stage move action.
|
RestStage |
updateStage(PlanKey planKey,
long stageId,
RestStage updatedStage,
io.atlassian.fugue.Option<ConfirmationToken> token,
Expansion expansion,
javax.ws.rs.core.UriInfo uriInfo)
Performs a partial update on a stage, updating just the fields that are specified while the rest will remain the same.
|
@Autowired public RestStageServiceImpl(BuildExecutionManager buildExecutionManager, com.atlassian.sal.api.message.I18nResolver i18nResolver, PlanRestService planRestService, RestArtifactService restArtifactService, RestJobService restJobService, StageConversionFunction stageConversionFunction, StageService stageService)
@NotNull public RestStage updateStage(@NotNull PlanKey planKey, long stageId, @NotNull RestStage updatedStage, @NotNull io.atlassian.fugue.Option<ConfirmationToken> token, @Nullable Expansion expansion, @NotNull javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException
RestStageService
updateStage
in interface RestStageService
planKey
- of the plan the stage belongs tostageId
- id of stage being updatedupdatedStage
- partial representation of a stage, only the specified fields will be updatedtoken
- checks we have a token that applies to the current status of the stage, and not an obsolete versionexpansion
- fields to expand in the stage representation included in the responseuriInfo
- URI info from the requestRestStage
updated versionWebValidationException
- if the stage cannot be updated due to invalid requestpublic void deleteStage(@NotNull PlanKey planKey, long stageId, @NotNull io.atlassian.fugue.Option<ConfirmationToken> confirmationToken, @NotNull javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException
RestStageService
deleteStage
in interface RestStageService
planKey
- of plan stage belongs to.stageId
- id of stage being removed.confirmationToken
- The token to match before performing the deleteuriInfo
- URI info from the requestWebValidationException
@NotNull public RestWarnings getStageDeletionWarnings(@NotNull PlanKey planKey, long stageId, @NotNull Expansion expansion, @NotNull javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException
RestStageService
getStageDeletionWarnings
in interface RestStageService
planKey
- of plan stage is instageId
- of stage to deleteexpansion
- the expansion.uriInfo
- URI info from the requestWebValidationException
@NotNull public RestWarnings getStageMoveWarnings(@NotNull PlanKey planKey, long stageId, int index, @NotNull Expansion expansion, @NotNull javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException
RestStageService
getStageMoveWarnings
in interface RestStageService
planKey
- plan key of the plan the stage is instageId
- identifies the stage to moveindex
- zero-based position the stage will be moved intoexpansion
- the fields to expand in the warnings responseuriInfo
- URI info from the requestRestWarnings
with warnings if any, and a tokenWebValidationException
- if the planKey is not validCopyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.