@Component public class RestJobServiceImpl extends Object implements RestJobService
Constructor and Description |
---|
RestJobServiceImpl(BuildExecutionManager buildExecutionManager,
com.atlassian.sal.api.message.I18nResolver i18nResolver,
JobConversionFunction jobConversionFunction,
JobService jobService,
RestArtifactService restArtifactService) |
Modifier and Type | Method and Description |
---|---|
RestJob |
addJob(PlanKey planKey,
long stageId,
RestJob restJob,
Expansion expansion,
javax.ws.rs.core.UriInfo uriInfo)
Create a new job
|
void |
deleteJob(PlanKey jobKey,
Optional<ConfirmationToken> confirmationToken,
javax.ws.rs.core.UriInfo uriInfo)
Remove a job.
|
Token |
getDeleteConfirmationToken(PlanKey jobKey,
javax.ws.rs.core.UriInfo uriInfo)
Generate the delete confirmation token to be used for the given job key.
|
RestWarnings |
getJobDeletionWarnings(PlanKey jobKey,
Expansion expansion,
javax.ws.rs.core.UriInfo uriInfo)
Get warnings related to job deletion.
|
RestWarnings |
getJobMoveWarnings(PlanKey jobKey,
long targetStageId,
Expansion expansion,
javax.ws.rs.core.UriInfo uriInfo)
Get warnings related to job move.
|
RestJob |
updateJob(PlanKey jobKey,
RestJob restJob,
Optional<ConfirmationToken> confirmationToken,
Expansion expansion,
javax.ws.rs.core.UriInfo uriInfo)
Updates the details of a specific job.
|
@Autowired public RestJobServiceImpl(BuildExecutionManager buildExecutionManager, com.atlassian.sal.api.message.I18nResolver i18nResolver, JobConversionFunction jobConversionFunction, JobService jobService, RestArtifactService restArtifactService)
@NotNull public RestJob addJob(@NotNull PlanKey planKey, long stageId, @Nullable RestJob restJob, @NotNull Expansion expansion, @NotNull javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException
RestJobService
addJob
in interface RestJobService
planKey
- of plan job is instageId
- of stage job is inrestJob
- Rest Jobexpansion
- the expansion.uriInfo
- URI info from the requestWebValidationException
@NotNull public RestJob updateJob(@NotNull PlanKey jobKey, @Nullable RestJob restJob, @NotNull Optional<ConfirmationToken> confirmationToken, @NotNull Expansion expansion, @NotNull javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException
RestJobService
updateJob
in interface RestJobService
jobKey
- of job.restJob
- job details.confirmationToken
- The token to match before performing the updateexpansion
- the expansion.uriInfo
- URI info from the requestWebValidationException
public void deleteJob(@NotNull PlanKey jobKey, @NotNull Optional<ConfirmationToken> confirmationToken, @NotNull javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException
RestJobService
deleteJob
in interface RestJobService
jobKey
- of jobconfirmationToken
- The token to match before performing the deleteuriInfo
- URI info from the requestWebValidationException
@NotNull public RestWarnings getJobDeletionWarnings(@NotNull PlanKey jobKey, @NotNull Expansion expansion, @NotNull javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException
RestJobService
getJobDeletionWarnings
in interface RestJobService
jobKey
- of jobexpansion
- the expansion.uriInfo
- URI info from the requestWebValidationException
@NotNull public Token getDeleteConfirmationToken(@NotNull PlanKey jobKey, @NotNull javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException
RestJobService
getDeleteConfirmationToken
in interface RestJobService
jobKey
- job key to generate the token for.uriInfo
- URI info from the requestWebValidationException
- if the job key is invalid.@NotNull public RestWarnings getJobMoveWarnings(@NotNull PlanKey jobKey, long targetStageId, @NotNull Expansion expansion, @NotNull javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException
RestJobService
getJobMoveWarnings
in interface RestJobService
jobKey
- of job.targetStageId
- id of the stage the job is moving to.expansion
- the expansion.uriInfo
- URI info from the requestWebValidationException
Copyright © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.