Interface UnicoreFileClient
@Path("/storages") public interface UnicoreFileClient
An interface to the UNICORE storage REST API.
-
Method Summary
Modifier and Type Method Description static UnicoreFileClient
createClient(String url)
Get a client for the API.void
upload(String authHeader, String id, String filePath, InputStream input)
Upload a file.
-
Method Details
-
upload
@PUT @Path("{id}/files/{filePath}") @Consumes("application/octet-stream") void upload(@HeaderParam("Authorization") String authHeader, @PathParam("id") String id, @PathParam("filePath") String filePath, InputStream input) throws WebApplicationExceptionUpload a file.- Parameters:
authHeader
- The authorization header to authenticate with.id
- The id of the storage on the server.filePath
- The path at which to store the file (directories are automatically created).input
- The input stream containing the file to upload.- Throws:
WebApplicationException
- If anything goes wrong.
-
createClient
Get a client for the API.- Parameters:
url
- The URL to connect to.- Returns:
- A proxy of the API.
-