Interface OutputManager
- All Known Implementing Classes:
OutputManagerImpl
@Path("/output") public interface OutputManager
The REST API for the output manager.
-
Method Summary
Modifier and Type Method Description List<DataItem>
addOutputs(String projectId, int id, File rootFile, Collection<File> outputs)
Adds outputs to be hosted for a given id, returning a matching list of URLs on which the files are hosted.Response
getResultFile(int id, String filename, boolean download)
Gets a results file.Response
getResultFile(String projectId, int id, String filename, boolean download)
Gets a results file.Response
uploadResultsToHPCServer(String projectId, int id, String serverUrl, String storageId, String filePath, String userId, String token)
Upload a file to the HPC store.
-
Method Details
-
addOutputs
List<DataItem> addOutputs(String projectId, int id, File rootFile, Collection<File> outputs) throws IOExceptionAdds 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 projectid
- The id of the jobrootFile
- The root directory containing all the filesoutputs
- 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 IDid
- The job IDserverUrl
- The HPC storage servicestorageId
- The ID for the storage on the HPC servicefilePath
- The path within the storageuserId
- The HPC user IDtoken
- The auth token- Returns:
- Description of whether the upload was successful.
-