@Path(value="/workspace/v1") public class WorkspaceResource extends ApplicationStatusResource
STATUS_URL, TENANTS_URL| Constructor and Description |
|---|
WorkspaceResource(StorageConfiguration configuration)
Constructor used to configure a workspace
|
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
compress(String containerName,
CompressInformation compressInformation)
zip a specific folder into a other directory
|
javax.ws.rs.core.Response |
computeObjectDigest(String containerName,
String objectName,
String algo)
checks if a object exists in an container or compute object Digest
|
javax.ws.rs.core.Response |
countObjects(String containerName)
Count the number of binary files in the container
|
javax.ws.rs.core.Response |
createContainer(String containerName)
creates a container into the workspace
|
javax.ws.rs.core.Response |
createFolder(String containerName,
String folderName)
creates a folder into a container
|
javax.ws.rs.core.Response |
deleteContainer(String containerName,
boolean recursive)
deletes a container in the workspace
|
javax.ws.rs.core.Response |
deleteFolder(String containerName,
String folderName)
deletes a folder in a container
|
javax.ws.rs.core.Response |
deleteObject(String containerName,
String objectName)
Deletes an objects in a container *
|
javax.ws.rs.core.Response |
getContainerInformation(String containerName)
Get container information like capacity
|
javax.ws.rs.core.Response |
getObject(String containerName,
String objectName)
gets an objects from a container in the workspace
|
javax.ws.rs.core.Response |
getObjectInformation(String containerName,
String objectName)
gets an objects from a container in the workspace
|
javax.ws.rs.core.Response |
getUriDigitalObjectListByFolder(String containerName,
String folderName)
gets the list of object from folder
|
javax.ws.rs.core.Response |
isExistingContainer(String containerName)
checks if a container exists in the workspace
|
javax.ws.rs.core.Response |
isExistingFolder(String containerName,
String folderName)
checks if a folder exists in a container
|
javax.ws.rs.core.Response |
putObject(InputStream stream,
String containerName,
String objectName)
puts an object into a container
|
javax.ws.rs.core.Response |
uncompressObject(InputStream stream,
String containerName,
String folderName,
String archiveType)
uncompress a sip into the workspace
|
getServerTenants, statuspublic WorkspaceResource(StorageConfiguration configuration)
configuration - the storage config@Path(value="/containers/{containerName}")
@POST
@Produces(value="application/json")
public javax.ws.rs.core.Response createContainer(@PathParam(value="containerName")
String containerName)
containerName - as path param@Path(value="/containers/{containerName}")
@DELETE
@Produces(value="application/json")
public javax.ws.rs.core.Response deleteContainer(@PathParam(value="containerName")
String containerName,
@HeaderParam(value="X-Recursive")
boolean recursive)
containerName - path param of container namerecursive - true if the container should be deleted recursively@Path(value="/containers/{containerName}")
@HEAD
@Produces(value="application/json")
public javax.ws.rs.core.Response isExistingContainer(@PathParam(value="containerName")
String containerName)
containerName - path param for container name@Path(value="/containers/{containerName}/count")
@GET
@Produces(value="application/json")
public javax.ws.rs.core.Response countObjects(@PathParam(value="containerName")
String containerName)
containerName - path param for container name@Path(value="/container/{containerName}")
@GET
@Produces(value="application/json")
public javax.ws.rs.core.Response getContainerInformation(@PathParam(value="containerName")
String containerName)
containerName - the container name@Path(value="/containers/{containerName}/folders/{folderName:.*}")
@POST
@Produces(value="application/json")
public javax.ws.rs.core.Response createFolder(@PathParam(value="containerName")
String containerName,
@PathParam(value="folderName")
String folderName)
containerName - path param of container namefolderName - path param of folder@Path(value="/containers/{containerName}/folders/{folderName:.*}")
@DELETE
@Produces(value="application/json")
public javax.ws.rs.core.Response deleteFolder(@PathParam(value="containerName")
String containerName,
@PathParam(value="folderName")
String folderName)
containerName - path param for container namefolderName - path param for folder name@Path(value="/containers/{containerName}/folders/{folderName:.*}")
@HEAD
@Produces(value="application/json")
public javax.ws.rs.core.Response isExistingFolder(@PathParam(value="containerName")
String containerName,
@PathParam(value="folderName")
String folderName)
containerName - path param for container namefolderName - path param for folder name@Path(value="/containers/{containerName}/folders/{folderName:.*}")
@PUT
@Consumes(value={"application/zip","application/x-gzip","application/x-tar","application/x-bzip2"})
@Produces(value="application/json")
public javax.ws.rs.core.Response uncompressObject(InputStream stream,
@PathParam(value="containerName")
String containerName,
@PathParam(value="folderName")
String folderName,
@HeaderParam(value="Content-Type")
String archiveType)
stream - data input streamcontainerName - name of containerfolderName - name of folderarchiveType - the type of archive@Path(value="/containers/{containerName}")
@POST
@Consumes(value="application/json")
public javax.ws.rs.core.Response compress(@PathParam(value="containerName")
String containerName,
CompressInformation compressInformation)
containerName - @Path(value="/containers/{containerName}/folders/{folderName:.*}")
@GET
@Produces(value="application/json")
public javax.ws.rs.core.Response getUriDigitalObjectListByFolder(@PathParam(value="containerName")
String containerName,
@PathParam(value="folderName")
String folderName)
containerName - name of containerfolderName - name of folder@Path(value="/containers/{containerName}/objects/{objectName:.*}")
@POST
@Consumes(value="application/octet-stream")
@Produces(value="application/json")
public javax.ws.rs.core.Response putObject(InputStream stream,
@PathParam(value="containerName")
String containerName,
@PathParam(value="objectName")
String objectName)
stream - data input streamobjectName - name of data objectcontainerName - name of container@Path(value="/containers/{containerName}/objects/{objectName:.*}")
@DELETE
@Produces(value="application/json")
public javax.ws.rs.core.Response deleteObject(@PathParam(value="containerName")
String containerName,
@PathParam(value="objectName")
String objectName)
containerName - container nameobjectName - object name@Path(value="/containers/{containerName}/objects/{objectName:.*}")
@GET
@Produces(value="application/octet-stream")
public javax.ws.rs.core.Response getObject(@PathParam(value="containerName")
String containerName,
@PathParam(value="objectName")
String objectName)
containerName - name of containerobjectName - name of objectIOException - when there is an error of get object@Path(value="/containers/{containerName}/objects/{objectName:.*}")
@GET
@Produces(value="application/json")
public javax.ws.rs.core.Response getObjectInformation(@PathParam(value="containerName")
String containerName,
@PathParam(value="objectName")
String objectName)
throws IOException
containerName - name of containerobjectName - name of objectIOException - when there is an error of get object@Path(value="/containers/{containerName}/objects/{objectName:.*}")
@HEAD
@Produces(value="application/json")
public javax.ws.rs.core.Response computeObjectDigest(@PathParam(value="containerName")
String containerName,
@PathParam(value="objectName")
String objectName,
@HeaderParam(value="X-digest-algorithm")
String algo)
containerName - name of containerobjectName - name of objectalgo - path parameter of algoCopyright © 2018 Vitam. All rights reserved.