Interface RestArtifactService
-
- All Known Implementing Classes:
RestArtifactServiceImpl
public interface RestArtifactServiceService for artifact related REST operations.- Since:
- v5.9
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull List<RestArtifactSubscriptions>getAffectedArtifactSubscriptionsByJobMove(@NotNull PlanKey jobKey, long stageId, @NotNull Expansion expansion, @NotNull javax.ws.rs.core.UriInfo uriInfo)Returns all artifact subscriptions that will be broken if we move a given job.@NotNull List<RestArtifactSubscriptions>getAffectedArtifactSubscriptionsByStageMove(@NotNull ImmutableChainStage stage, int stageIndex, @NotNull Expansion expansion, @NotNull javax.ws.rs.core.UriInfo uriInfo)Returns all artifact subscriptions that will be broken if we move a given stage.@NotNull List<RestArtifactSubscriptions>getConsumersOfArtifacts(@NotNull PlanKey jobKey, @NotNull Expansion expansion, @NotNull 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.@NotNull RestPageModel<RestJob>getJobsConsumingArtifact(@NotNull PlanKey jobKey, long artifactId, @NotNull PageRequest pageRequest, @NotNull javax.ws.rs.core.UriInfo uriInfo)Returns a paginated lists of jobs subscribing to a specified artifact.
-
-
-
Method Detail
-
getConsumersOfArtifacts
@NotNull @NotNull List<RestArtifactSubscriptions> getConsumersOfArtifacts(@NotNull @NotNull PlanKey jobKey, @NotNull @NotNull Expansion expansion, @NotNull @NotNull javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException
Returns the full list of artifact subscriptions in the same stage for a job's artifacts, returning one entry for each job.- Parameters:
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 request- Returns:
- list of
RestArtifactSubscriptionsif any, otherwise an empty list. - Throws:
NotFoundException- if the job doesn't existWebValidationException- if the jobKey is invalid.
-
getAffectedArtifactSubscriptionsByJobMove
@NotNull @NotNull List<RestArtifactSubscriptions> getAffectedArtifactSubscriptionsByJobMove(@NotNull @NotNull PlanKey jobKey, long stageId, @NotNull @NotNull Expansion expansion, @NotNull @NotNull javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException
Returns all artifact subscriptions that will be broken if we move a given job. When moving a job, all artifact subscriptions (a consumer or a producer) that will be broken will be returned here.- Parameters:
jobKey- key of the job being movedstageId- target stage idexpansion- indicates what fields should be expanded.uriInfo- URI info from the request- Returns:
- list of
RestArtifactSubscriptionsthat will not work after the move. - Throws:
NotFoundException- if the job doesn't existWebValidationException- if the jobKey is invalid.
-
getJobsConsumingArtifact
@NotNull @NotNull RestPageModel<RestJob> getJobsConsumingArtifact(@NotNull @NotNull PlanKey jobKey, long artifactId, @NotNull @NotNull PageRequest pageRequest, @NotNull @NotNull javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException
Returns a paginated lists of jobs subscribing to a specified artifact.- Parameters:
jobKey- key of the producing jobartifactId- id of the artifactpageRequest- pagination information (offset & limit)uriInfo- URI info from the request- Returns:
- paginated list of
RestJobthat are subscribed to an artifact. - Throws:
WebValidationException- if the jobKey is invalid.
-
getAffectedArtifactSubscriptionsByStageMove
@NotNull @NotNull List<RestArtifactSubscriptions> getAffectedArtifactSubscriptionsByStageMove(@NotNull @NotNull ImmutableChainStage stage, int stageIndex, @NotNull @NotNull Expansion expansion, @NotNull @NotNull javax.ws.rs.core.UriInfo uriInfo)
Returns all artifact subscriptions that will be broken if we move a given stage. When moving a stage, all artifact subscriptions (a consumer or a producer) that will be broken will be returned here.- Parameters:
stage- stage being movedstageIndex- target stage indexexpansion- indicates what fields should be expanded.uriInfo- URI info from the request- Returns:
- list of
RestArtifactSubscriptionsthat will not work after the move
-
-