Interface OutputManager

All Known Implementing Classes:
OutputManagerImpl

@Path("/output")
public interface OutputManager
The REST API for the output manager.
  • Method Details

    • addOutputs

      List<DataItem> addOutputs​(String projectId, int id, File rootFile, Collection<File> outputs) throws IOException
      Adds outputs to be hosted for a given id, returning a matching list of URLs on which the files are hosted.
      Parameters:
      projectId - The id of the project
      id - The id of the job
      rootFile - The root directory containing all the files
      outputs - The files to add
      Returns:
      A list of DataItem instances for adding to the job
      Throws:
      IOException - If anything goes wrong.
    • getResultFile

      @GET @Path("{projectId}/{id}/{filename:.*}") @Produces("*") Response getResultFile​(@PathParam("projectId") String projectId, @PathParam("id") int id, @PathParam("filename") String filename, @QueryParam("download") @DefaultValue("true") boolean download)
      Gets a results file.
      Parameters:
      projectId - The id of the project which owns the file.
      id - The id of the job which produced the file.
      filename - The name of the file.
      download - Whether to mark the retrieval as a download to the browser.
      Returns:
      A response containing the file, or a "NOT FOUND" response if the file does not exist.
    • getResultFile

      @GET @Path("{id}/{filename:.*}") @Produces("*") Response getResultFile​(@PathParam("id") int id, @PathParam("filename") String filename, @QueryParam("download") @DefaultValue("true") boolean download)
      Gets a results file.
      Parameters:
      id - The id of the job which produced the file.
      filename - The name of the file.
      download - Whether to mark the retrieval as a download to the browser.
      Returns:
      A response containing the file, or a "NOT FOUND" response if the file does not exist.
    • uploadResultsToHPCServer

      @POST @Produces("text/plain") @Path("{projectId}/{id}/uploadToHPC") Response uploadResultsToHPCServer​(@PathParam("projectId") String projectId, @PathParam("id") int id, @QueryParam("url") String serverUrl, @QueryParam("storageId") String storageId, @QueryParam("filePath") String filePath, @QueryParam("userId") String userId, @QueryParam("token") String token)
      Upload a file to the HPC store.
      Parameters:
      projectId - The project ID
      id - The job ID
      serverUrl - The HPC storage service
      storageId - The ID for the storage on the HPC service
      filePath - The path within the storage
      userId - The HPC user ID
      token - The auth token
      Returns:
      Description of whether the upload was successful.