@ExperimentalApi public class StageConfigResource extends Object
Modifier and Type | Field and Description |
---|---|
static RestStage |
ADD_STAGE
Used for REST documentation generation.
|
static RestPageModel<RestStage> |
ALL_STAGES |
static RestStage |
STAGE |
static RestWarnings |
STAGE_WARNINGS
Used for REST documentation generation.
|
Constructor and Description |
---|
StageConfigResource(RestStageService restStageService,
StageService stageService,
StageConversionFunction stageConversionFunction,
InputParser inputParser,
PaginationService paginationService) |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
addStageToPlan(String planKeyString,
javax.ws.rs.core.UriInfo uriInfo,
RestStage restStage)
Adds a stage to a build plan.
|
RestPageModel<RestStage> |
getAllStagesForPlan(String planKeyString,
Expansion expansion,
PageRequest pageRequest,
javax.ws.rs.core.UriInfo uriInfo)
Retrieves all the stages that make up a build plan.
|
RestWarnings |
getDeletionWarnings(String planKeyString,
long stageId,
Expansion expansion,
javax.ws.rs.core.UriInfo uriInfo)
Retrieves the warnings in relation to deleting a stage.
|
RestWarnings |
getMoveWarnings(String planKeyString,
long stageId,
int index,
Expansion expansion,
javax.ws.rs.core.UriInfo uriInfo)
Retrieves the warnings associated to trying to move a stage.
|
RestStage |
getStage(String planKeyString,
long stageId,
Expansion expansion,
javax.ws.rs.core.UriInfo uriInfo)
Retrieves the details of a specific stage of a build plan.
|
javax.ws.rs.core.Response |
removeStage(String planKeyString,
long stageId,
ConfirmationToken confirmationToken,
javax.ws.rs.core.UriInfo uriInfo)
Deletes a specific stage of a build plan.
|
RestStage |
updateStage(String planKeyString,
long stageId,
ConfirmationToken confirmationToken,
Expansion expansion,
javax.ws.rs.core.UriInfo uriInfo,
RestStage restStage)
Updates a stage partially, not overriding any field that it's not specified.
|
public static final RestWarnings STAGE_WARNINGS
public static final RestStage ADD_STAGE
public static final RestStage STAGE
public static final RestPageModel<RestStage> ALL_STAGES
public StageConfigResource(RestStageService restStageService, StageService stageService, StageConversionFunction stageConversionFunction, InputParser inputParser, PaginationService paginationService)
public RestPageModel<RestStage> getAllStagesForPlan(String planKeyString, @Context Expansion expansion, @Context PageRequest pageRequest, @Context javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException
planKeyString
- the key of the build planexpansion
- represents an expansion tree of additional information we want to retrievepageRequest
- represents the params that define which page the request is afterRestStage
a paginated representation of the stages of a build planWebValidationException
public javax.ws.rs.core.Response addStageToPlan(String planKeyString, @Context javax.ws.rs.core.UriInfo uriInfo, RestStage restStage) throws WebValidationException
planKeyString
- the key of the build planrestStage
- represents the stage to add to the build planuriInfo
- provides access to application and request URI informationResponse
a response pointing to the location of the added stageWebValidationException
- if there's validation errors, which maps into a 400 Bad Requestpublic RestStage getStage(String planKeyString, long stageId, @Context Expansion expansion, @Context javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException
planKeyString
- the key of the planstageId
- unique identifier of the stage which details are going to be retrievedexpansion
- represents an expansion tree of additional information we want to retrieveRestStage
WebValidationException
public RestWarnings getMoveWarnings(String planKeyString, long stageId, int index, @Context Expansion expansion, @Context javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException
planKeyString
- the key for the plan the stage belongs tostageId
- the stage id of the stage to be movedexpansion
- represents an expansion tree of additional information we want to retrieveRestWarnings
containing warnings if stage cannot be movedWebValidationException
public RestStage updateStage(String planKeyString, long stageId, @Context @Nullable ConfirmationToken confirmationToken, @Context Expansion expansion, @Context javax.ws.rs.core.UriInfo uriInfo, RestStage restStage) throws WebValidationException
planKeyString
- the key of the plan the stage belongs tostageId
- the stage id of the stage to be updatedconfirmationToken
- token to validate that the stage being updated has not been modified in the meantime,
in which case the operation would be rejected. To get this validation token see
getMoveWarnings(String, long, int, Expansion, UriInfo)
. This token in optional, if not
specified it won't be checked and the operation will be forced.expansion
- represents an expansion tree of additional information we want to retrieverestStage
- representation of the stage to updateRestStage
updated stageWebValidationException
- if there's validation errors, which maps into a 400 Bad Requestpublic RestWarnings getDeletionWarnings(String planKeyString, long stageId, @Context Expansion expansion, @Context javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException
planKeyString
- the key for the planstageId
- the stage idexpansion
- represents an expansion tree of additional information we want to retrieveRestWarnings
containing warnings if stage cannot be removedWebValidationException
public javax.ws.rs.core.Response removeStage(String planKeyString, long stageId, @Context @Nullable ConfirmationToken confirmationToken, @Context javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException
planKeyString
- the key for the planstageId
- unique identifier of the stage to the deletedconfirmationToken
- token to validate that the stage being deleted has not been modified in the meantime,
in which case the operation would be rejected. To get this validation token see
getDeletionWarnings(String, long, Expansion, UriInfo)
. This token in optional, if not
specified it won't be checked and the operation will be forced.Response
an empty responseWebValidationException
Copyright © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.