@Component public class RestArtifactServiceImpl extends Object implements RestArtifactService
Constructor and Description |
---|
RestArtifactServiceImpl(ArtifactDefinitionManager artifactDefinitionManager,
ArtifactSubscriptionManager artifactSubscriptionManager,
com.atlassian.sal.api.message.I18nResolver i18nResolver,
JobConversionFunction jobConversionFunction,
JobService jobService,
PaginationService paginationService,
StageService stageService) |
Modifier and Type | Method and Description |
---|---|
List<RestArtifactSubscriptions> |
getAffectedArtifactSubscriptionsByJobMove(PlanKey jobKey,
long stageId,
Expansion expansion,
javax.ws.rs.core.UriInfo uriInfo)
Returns all artifact subscriptions that will be broken if we move a given job.
|
List<RestArtifactSubscriptions> |
getAffectedArtifactSubscriptionsByStageMove(ImmutableChainStage stage,
int index,
Expansion expansion,
javax.ws.rs.core.UriInfo uriInfo)
Returns all artifact subscriptions that will be broken if we move a given stage.
|
List<RestArtifactSubscriptions> |
getConsumersOfArtifacts(PlanKey jobKey,
Expansion expansion,
javax.ws.rs.core.UriInfo uriInfo)
Returns the full list of artifact subscriptions in the same stage for a job's artifacts, returning one entry for each job.
|
RestPageModel<RestJob> |
getJobsConsumingArtifact(PlanKey jobKey,
long artifactId,
PageRequest pageRequest,
javax.ws.rs.core.UriInfo uriInfo)
Returns a paginated lists of jobs subscribing to a specified artifact.
|
@Autowired public RestArtifactServiceImpl(ArtifactDefinitionManager artifactDefinitionManager, ArtifactSubscriptionManager artifactSubscriptionManager, com.atlassian.sal.api.message.I18nResolver i18nResolver, JobConversionFunction jobConversionFunction, JobService jobService, PaginationService paginationService, StageService stageService)
@NotNull public List<RestArtifactSubscriptions> getConsumersOfArtifacts(@NotNull PlanKey jobKey, @NotNull Expansion expansion, @NotNull javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException
RestArtifactService
getConsumersOfArtifacts
in interface RestArtifactService
jobKey
- key of the job that produces the artifact for which subscriptions are to retrieve.expansion
- indicates what fields should be expanded.uriInfo
- URI info from the requestRestArtifactSubscriptions
if any, otherwise an empty list.WebValidationException
- if the jobKey is invalid.@NotNull public List<RestArtifactSubscriptions> getAffectedArtifactSubscriptionsByJobMove(@NotNull PlanKey jobKey, long stageId, @NotNull Expansion expansion, @NotNull javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException
RestArtifactService
getAffectedArtifactSubscriptionsByJobMove
in interface RestArtifactService
jobKey
- key of the job being movedstageId
- target stage idexpansion
- indicates what fields should be expanded.uriInfo
- URI info from the requestRestArtifactSubscriptions
that
will not work after the move.WebValidationException
- if the jobKey is invalid.@NotNull public RestPageModel<RestJob> getJobsConsumingArtifact(@NotNull PlanKey jobKey, long artifactId, @NotNull PageRequest pageRequest, @NotNull javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException
RestArtifactService
getJobsConsumingArtifact
in interface RestArtifactService
jobKey
- key of the producing jobartifactId
- id of the artifactpageRequest
- pagination information (offset & limit)uriInfo
- URI info from the requestRestJob
that are subscribed to an artifact.WebValidationException
- if the jobKey is invalid.@NotNull public List<RestArtifactSubscriptions> getAffectedArtifactSubscriptionsByStageMove(@NotNull ImmutableChainStage stage, int index, @NotNull Expansion expansion, @NotNull javax.ws.rs.core.UriInfo uriInfo)
RestArtifactService
getAffectedArtifactSubscriptionsByStageMove
in interface RestArtifactService
stage
- stage being movedindex
- target stage indexexpansion
- indicates what fields should be expanded.uriInfo
- URI info from the requestRestArtifactSubscriptions
that will not work after the moveCopyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.