public interface StorageDistribution extends VitamAutoCloseable
Modifier and Type | Method and Description |
---|---|
boolean |
checkObjectExisting(String strategyId,
String objectId,
List<String> offerIds)
Verify if object exists
|
com.fasterxml.jackson.databind.JsonNode |
createContainer(String strategyId)
Create a container Architects are aware of this.
|
void |
deleteContainer(String strategyId)
Delete a container
|
void |
deleteLogbook(String strategyId,
String logbookId)
Delete a logbook
|
void |
deleteObject(String strategyId,
String objectId,
String digest,
DigestType digestAlgorithm)
Delete an object
|
void |
deleteObjectGroup(String strategyId,
String objectGroupId)
Delete an ObjectGroup
|
void |
deleteUnit(String strategyId,
String unitId)
Delete an unit
|
javax.ws.rs.core.Response |
getContainerByCategory(String strategyId,
String objectId,
DataCategory category)
Get a specific Object binary data as an input stream
|
com.fasterxml.jackson.databind.JsonNode |
getContainerInformations(String strategyId)
Get Storage Information (availability and capacity) for the requested
tenant + strategy
|
com.fasterxml.jackson.databind.JsonNode |
getContainerInformations(String strategyId,
DataCategory type,
String objectId,
List<String> offerIds)
Get a specific Object information
|
com.fasterxml.jackson.databind.JsonNode |
getContainerLogbook(String strategyId,
String logbookId)
Get a specific Logbook as a JsonNode
|
com.fasterxml.jackson.databind.JsonNode |
getContainerLogbooks(String strategyId)
Retrieve a list of logbook ids associated to a given tenant
|
com.fasterxml.jackson.databind.JsonNode |
getContainerObjectGroup(String strategyId,
String objectGroupId)
Get a specific ObjectGroup as a JsonNode
|
com.fasterxml.jackson.databind.JsonNode |
getContainerObjectGroups(String strategyId)
Get Container ObjectGroups Information
|
com.fasterxml.jackson.databind.JsonNode |
getContainerUnit(String strategyId,
String unitId)
Get a specific Unit as a JsonNode
|
com.fasterxml.jackson.databind.JsonNode |
getContainerUnits(String strategyId)
Get Container Units Information
|
RequestResponse<OfferLog> |
getOfferLogs(String strategyId,
DataCategory category,
Long offset,
int limit,
Order order)
Get offer log from referent
|
InputStream |
getStorageContainer(String strategyId)
Get Storage Container full content as an InputStream
|
RequestResponse<com.fasterxml.jackson.databind.JsonNode> |
listContainerObjects(String strategyId,
DataCategory category,
String cursorId)
List container objects
|
com.fasterxml.jackson.databind.JsonNode |
status()
Get the status from the service
|
StoredInfoResult |
storeData(String strategyId,
String objectId,
ObjectDescription createObjectDescription,
DataCategory category,
String requester)
Store data of any type for given tenant on storage offers associated to
given strategy
|
close
StoredInfoResult storeData(String strategyId, String objectId, ObjectDescription createObjectDescription, DataCategory category, String requester) throws StorageAlreadyExistsException, StorageException
strategyId
- id of the strategyobjectId
- the workspace URI of the data to be retrieve (and stored in
offer)createObjectDescription
- object additional informationscategory
- the category of the data to store (unit, object...)requester
- the requester informationStorageNotFoundException
- Thrown if the Container does not existStorageTechnicalException
- Thrown in case of any technical problemStorageObjectAlreadyExistsException
StorageAlreadyExistsException
StorageException
com.fasterxml.jackson.databind.JsonNode getContainerInformations(String strategyId) throws StorageException
strategyId
- id of the strategyStorageNotFoundException
- Thrown if the Container does not existStorageTechnicalException
- Thrown in case of any technical problemStorageException
InputStream getStorageContainer(String strategyId) throws StorageNotFoundException, StorageTechnicalException
strategyId
- id of the strategyStorageNotFoundException
- Thrown if the Storage Container does not existStorageTechnicalException
- Thrown if a technical exception is encounteredcom.fasterxml.jackson.databind.JsonNode createContainer(String strategyId) throws StorageException
strategyId
- id of the strategyStorageException
- Thrown in case the Container already existsvoid deleteContainer(String strategyId) throws StorageTechnicalException, StorageNotFoundException
aware of this.
strategyId
- id of the strategyStorageTechnicalException
- Thrown in case of any technical problemStorageNotFoundException
- Thrown in case the Container does not existRequestResponse<com.fasterxml.jackson.databind.JsonNode> listContainerObjects(String strategyId, DataCategory category, String cursorId) throws StorageException
strategyId
- the strategy id to get offerscategory
- the object type to listcursorId
- the cursorId if existsStorageException
- thrown in case of any technical problemRequestResponse<OfferLog> getOfferLogs(String strategyId, DataCategory category, Long offset, int limit, Order order) throws StorageException
strategyId
- the strategy id to get offerscategory
- the object type to listoffset
- offset of the excluded objectlimit
- the number of result wantedorder
- orderStorageException
- thrown in case of any technical problemjavax.ws.rs.core.Response getContainerByCategory(String strategyId, String objectId, DataCategory category) throws StorageException
strategyId
- id of the strategyobjectId
- id of the objectcategory
- StorageNotFoundException
- Thrown if the Container or the object does not existStorageTechnicalException
- thrown if a technical error happenedStorageException
com.fasterxml.jackson.databind.JsonNode getContainerInformations(String strategyId, DataCategory type, String objectId, List<String> offerIds) throws StorageException
strategyId
- id of the strategytype
- data categoryobjectId
- id of the objectofferIds
- list id of offersStorageException
boolean checkObjectExisting(String strategyId, String objectId, List<String> offerIds) throws StorageException
strategyId
- id of the strategyobjectId
- id of the objectofferIds
- list id of offersStorageException
void deleteObject(String strategyId, String objectId, String digest, DigestType digestAlgorithm) throws StorageException
strategyId
- id of the strategyobjectId
- id of the object to be deleteddigest
- the digest to be compared withdigestAlgorithm
- the digest AlgorithmStorageNotFoundException
- Thrown if the Container or the object does not existStorageTechnicalException
- thrown if a technical error happenedStorageException
com.fasterxml.jackson.databind.JsonNode getContainerLogbooks(String strategyId) throws StorageNotFoundException
strategyId
- id of the strategyStorageNotFoundException
- Thrown if the Container does not existcom.fasterxml.jackson.databind.JsonNode getContainerLogbook(String strategyId, String logbookId) throws StorageNotFoundException
strategyId
- id of the strategylogbookId
- id of the logbookStorageNotFoundException
- Thrown if the Container or the object does not existvoid deleteLogbook(String strategyId, String logbookId) throws UnsupportedOperationException
strategyId
- id of the strategylogbookId
- id of the logbook to be deletedUnsupportedOperationException
- method not implemented yetcom.fasterxml.jackson.databind.JsonNode getContainerUnits(String strategyId) throws UnsupportedOperationException
strategyId
- id of the strategyUnsupportedOperationException
- method not implemented yetcom.fasterxml.jackson.databind.JsonNode getContainerUnit(String strategyId, String unitId) throws UnsupportedOperationException
strategyId
- id of the strategyunitId
- id of the unitUnsupportedOperationException
- method not implemented yetvoid deleteUnit(String strategyId, String unitId) throws UnsupportedOperationException
strategyId
- id of the strategyunitId
- id of the Unit to be deletedUnsupportedOperationException
- method not implemented yetcom.fasterxml.jackson.databind.JsonNode getContainerObjectGroups(String strategyId) throws UnsupportedOperationException
strategyId
- id of the strategyUnsupportedOperationException
- method not implemented yetcom.fasterxml.jackson.databind.JsonNode getContainerObjectGroup(String strategyId, String objectGroupId) throws UnsupportedOperationException
strategyId
- id of the strategyobjectGroupId
- id of the ObjectGroupUnsupportedOperationException
- method not implemented yetvoid deleteObjectGroup(String strategyId, String objectGroupId) throws UnsupportedOperationException
strategyId
- id of the strategyobjectGroupId
- id of the ObjectGroup to be deletedUnsupportedOperationException
- method not implemented yetcom.fasterxml.jackson.databind.JsonNode status() throws UnsupportedOperationException
UnsupportedOperationException
- method not implemented yetCopyright © 2018 Vitam. All rights reserved.