Interface RestArtifactService

All Known Implementing Classes:
RestArtifactServiceImpl

public interface RestArtifactService
Service for artifact related REST operations.
Since:
v5.9
  • Method Details

    • 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 RestArtifactSubscriptions if any, otherwise an empty list.
      Throws:
      NotFoundException - if the job doesn't exist
      WebValidationException - 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 moved
      stageId - target stage id
      expansion - indicates what fields should be expanded.
      uriInfo - URI info from the request
      Returns:
      list of RestArtifactSubscriptions that will not work after the move.
      Throws:
      NotFoundException - if the job doesn't exist
      WebValidationException - 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 job
      artifactId - id of the artifact
      pageRequest - pagination information (offset & limit)
      uriInfo - URI info from the request
      Returns:
      paginated list of RestJob that 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 moved
      stageIndex - target stage index
      expansion - indicates what fields should be expanded.
      uriInfo - URI info from the request
      Returns:
      list of RestArtifactSubscriptions that will not work after the move