Class OutputManagerImpl
java.lang.Object
uk.ac.manchester.spinnaker.nmpi.jobmanager.OutputManagerImpl
- All Implemented Interfaces:
OutputManager
Service for managing Job output files.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.ResponsegetResultFile(int id, String filename, boolean download) Gets a results file.jakarta.ws.rs.core.ResponsegetResultFile(String projectId, int id, String filename, boolean download) Gets a results file.jakarta.ws.rs.core.ResponseuploadResultsToHPCServer(String projectId, int id, String serverUrl, String storageId, String filePath, String userId, String token) Upload a file to the HPC store.
-
Constructor Details
-
OutputManagerImpl
Instantiate the output manager.- Parameters:
baseServerUrl- The base URL of the overall service, used when generating internal URLs.
-
-
Method Details
-
getResultFile
public jakarta.ws.rs.core.Response getResultFile(String projectId, int id, String filename, boolean download) Description copied from interface:OutputManagerGets a results file.- Specified by:
getResultFilein interfaceOutputManager- 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
Description copied from interface:OutputManagerGets a results file.- Specified by:
getResultFilein interfaceOutputManager- 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
public jakarta.ws.rs.core.Response uploadResultsToHPCServer(String projectId, int id, String serverUrl, String storageId, String filePath, String userId, String token) Description copied from interface:OutputManagerUpload a file to the HPC store.- Specified by:
uploadResultsToHPCServerin interfaceOutputManager- 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.
-