Package fr.gouv.vitam.workspace.client

# Class WorkspaceClient

java.lang.Object
fr.gouv.vitam.common.client.DefaultClient
fr.gouv.vitam.workspace.client.WorkspaceClient

All Implemented Interfaces:
  `BasicClient`, `MockOrRestClient`, `VitamAutoCloseable`, `AutoCloseable`

public class WorkspaceClient extends DefaultClient

- ## Field Summary

  ### Fields inherited from interface fr.gouv.vitam.common.client.BasicClient

  `STATUS_URL`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `jakarta.ws.rs.core.Response`
  `bulkGetObjects(String containerName, List<String> objectURIs)`
  `void`
  `bulkMove(String containerName, BulkMoveRequest bulkMoveRequest)`
  Moves multiple objects from source paths to destination paths within the same container
  `void`
  `checkStatus()`
  Check the status from the service
  `void`
  `checkStatus(jakarta.ws.rs.core.MultivaluedHashMap<String,Object> headers)`
  Check the status from the service used to passe "X-SSL-CLIENT-CERT" header that contain a pem certificate
  `void`
  `close()`
  Close the underneath http client
  `void`
  `compress(String containerName, CompressInformation compressInformation)`
  `String`
  `computeObjectDigest(String containerName, String objectName, DigestType algo)`
  `final void`
  `consumeAnyEntityAndClose(jakarta.ws.rs.core.Response response)`
  Helper when an error occurs on client usage side to consume response however
  `void`
  `createContainer(String containerName)`
  `void`
  `createFolder(String containerName, String folderName)`
  `void`
  `deleteContainer(String containerName, boolean deleteRecursive)`
  `void`
  `deleteFolder(String containerName, String folderName)`
  `void`
  `deleteObject(String containerName, String objectName)`
  `jakarta.ws.rs.client.Client`
  `getChunkedClient()`
  `jakarta.ws.rs.client.Client`
  `getClient()`
  `VitamClientFactory<?>`
  `getClientFactory()`
  `RequestResponse<Map<String,FileParams>>`
  `getFilesWithParamsFromFolder(String containerName, String folderName)`
  `com.fasterxml.jackson.databind.JsonNode`
  `getFreespacePercent()`
  `RequestResponse<URI>`
  `getListUriDigitalObjectFromFolder(String containerName, String folderName)`
  `RequestResponse<URI>`
  `getListUriDigitalObjectFromFolder(String containerName, String folderName, int limit)`
  Get list of URI digital object from folder with result set limit
  `jakarta.ws.rs.core.Response`
  `getObject(String containerName, String objectName)`
  `jakarta.ws.rs.core.Response`
  `getObject(String containerName, String objectName, long offset, Long maxChunkSize)`
  `String`
  `getResourcePath()`
  Get the resource path of the server.
  `String`
  `getServiceUrl()`
  Get the service URL
  `boolean`
  `isExistingContainer(String containerName)`
  `boolean`
  `isExistingFolder(String containerName, String folderName)`
  `boolean`
  `isExistingObject(String containerName, String objectName)`
  `jakarta.ws.rs.core.Response`
  `make(VitamRequestBuilder request)`
  `jakarta.ws.rs.core.Response`
  `makeSpecifyingUrl(VitamRequestBuilder request)`
  `void`
  `purgeOldFilesInContainer(String containerName, TimeToLive timeToLive)`
  `void`
  `putAtomicObject(String containerName, String objectName, InputStream stream, long size)`
  `void`
  `putObject(String containerName, String objectName, InputStream stream)`
  `void`
  `putObject(String containerName, String objectName, Object object)`
  `static void`
  `staticConsumeAnyEntityAndClose(jakarta.ws.rs.core.Response response)`
  This method consume everything (in particular InputStream) and close the response.
  `String`
  `toString()`
  `void`
  `uncompressObject(String containerName, String folderName, String archiveType, InputStream inputStreamObject)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Method Details

  - ### getFreespacePercent

    public com.fasterxml.jackson.databind.JsonNode getFreespacePercent() throws VitamClientException
    Throws:
      `VitamClientException`

  - ### createContainer

    public void createContainer(String containerName) throws ContentAddressableStorageServerException
    Throws:
      `ContentAddressableStorageServerException`

  - ### deleteContainer

    public void deleteContainer(String containerName, boolean deleteRecursive) throws ContentAddressableStorageNotFoundException, ContentAddressableStorageServerException
    Throws:
      `ContentAddressableStorageNotFoundException`
      `ContentAddressableStorageServerException`

  - ### isExistingContainer

    public boolean isExistingContainer(String containerName) throws ContentAddressableStorageServerException
    Throws:
      `ContentAddressableStorageServerException`

  - ### createFolder

    public void createFolder(String containerName, String folderName) throws ContentAddressableStorageAlreadyExistException, ContentAddressableStorageServerException
    Throws:
      `ContentAddressableStorageAlreadyExistException`
      `ContentAddressableStorageServerException`

  - ### deleteFolder

    public void deleteFolder(String containerName, String folderName) throws ContentAddressableStorageNotFoundException, ContentAddressableStorageServerException
    Throws:
      `ContentAddressableStorageNotFoundException`
      `ContentAddressableStorageServerException`

  - ### isExistingFolder

    public boolean isExistingFolder(String containerName, String folderName) throws ContentAddressableStorageServerException
    Throws:
      `ContentAddressableStorageServerException`

  - ### putObject

    public void putObject(String containerName, String objectName, InputStream stream) throws ContentAddressableStorageServerException
    Throws:
      `ContentAddressableStorageServerException`

  - ### putObject

    public void putObject(String containerName, String objectName, Object object) throws ContentAddressableStorageServerException
    Throws:
      `ContentAddressableStorageServerException`

  - ### putAtomicObject

    public void putAtomicObject(String containerName, String objectName, InputStream stream, long size) throws ContentAddressableStorageServerException
    Throws:
      `ContentAddressableStorageServerException`

  - ### getObject

    public jakarta.ws.rs.core.Response getObject(String containerName, String objectName) throws ContentAddressableStorageNotFoundException, ContentAddressableStorageServerException
    Throws:
      `ContentAddressableStorageNotFoundException`
      `ContentAddressableStorageServerException`

  - ### getObject

    public jakarta.ws.rs.core.Response getObject(String containerName, String objectName, long offset, Long maxChunkSize) throws ContentAddressableStorageNotFoundException, ContentAddressableStorageServerException
    Throws:
      `ContentAddressableStorageNotFoundException`
      `ContentAddressableStorageServerException`

  - ### bulkGetObjects

    public jakarta.ws.rs.core.Response bulkGetObjects(String containerName, List<String> objectURIs) throws ContentAddressableStorageServerException, ContentAddressableStorageNotFoundException
    Throws:
      `ContentAddressableStorageServerException`
      `ContentAddressableStorageNotFoundException`

  - ### deleteObject

    public void deleteObject(String containerName, String objectName) throws ContentAddressableStorageNotFoundException, ContentAddressableStorageServerException
    Throws:
      `ContentAddressableStorageNotFoundException`
      `ContentAddressableStorageServerException`

  - ### isExistingObject

    public boolean isExistingObject(String containerName, String objectName) throws ContentAddressableStorageServerException
    Throws:
      `ContentAddressableStorageServerException`

  - ### getListUriDigitalObjectFromFolder

    public RequestResponse<URI> getListUriDigitalObjectFromFolder(String containerName, String folderName) throws ContentAddressableStorageServerException
    Throws:
      `ContentAddressableStorageServerException`

  - ### getListUriDigitalObjectFromFolder

    public RequestResponse<URI> getListUriDigitalObjectFromFolder(String containerName, String folderName, int limit) throws ContentAddressableStorageServerException
    Get list of URI digital object from folder with result set limit
    Parameters:
      `containerName` - container name
      `folderName` - folder name
      `limit` - the maximum number of URIs to return in one batch
    Returns:
      RequestResponse containing list of URI
    Throws:
      `ContentAddressableStorageServerException` - if error occurs

  - ### getFilesWithParamsFromFolder

    public RequestResponse<Map<String,FileParams>> getFilesWithParamsFromFolder(String containerName, String folderName) throws ContentAddressableStorageServerException
    Throws:
      `ContentAddressableStorageServerException`

  - ### compress

    public void compress(String containerName, CompressInformation compressInformation) throws ContentAddressableStorageServerException
    Throws:
      `ContentAddressableStorageServerException`

  - ### uncompressObject

    public void uncompressObject(String containerName, String folderName, String archiveType, InputStream inputStreamObject) throws ContentAddressableStorageException
    Throws:
      `ContentAddressableStorageException`

  - ### computeObjectDigest

    public String computeObjectDigest(String containerName, String objectName, DigestType algo) throws ContentAddressableStorageException
    Throws:
      `ContentAddressableStorageException`

  - ### bulkMove

    public void bulkMove(String containerName, BulkMoveRequest bulkMoveRequest) throws ContentAddressableStorageNotFoundException, ContentAddressableStorageServerException
    Moves multiple objects from source paths to destination paths within the same container
    Parameters:
      `containerName` - container where the objects reside
      `bulkMoveRequest` - list of source/destination paths relative to the container
    Throws:
      `ContentAddressableStorageNotFoundException` - Thrown when the container or any source object cannot be located
      `ContentAddressableStorageServerException` - Thrown when move action failed due to some other failure

  - ### purgeOldFilesInContainer

    public void purgeOldFilesInContainer(String containerName, TimeToLive timeToLive) throws ContentAddressableStorageServerException
    Throws:
      `ContentAddressableStorageServerException`

  - ### staticConsumeAnyEntityAndClose

    public static void staticConsumeAnyEntityAndClose(jakarta.ws.rs.core.Response response)
    This method consume everything (in particular InputStream) and close the response.
    Parameters:
      `response` -

  - ### consumeAnyEntityAndClose

    public final void consumeAnyEntityAndClose(jakarta.ws.rs.core.Response response)
    Description copied from interface: `MockOrRestClient`
    Helper when an error occurs on client usage side to consume response however
    Specified by:
      `consumeAnyEntityAndClose` in interface `MockOrRestClient`
    Parameters:
      `response` -

  - ### checkStatus

    public void checkStatus() throws VitamApplicationServerException
    Description copied from interface: `MockOrRestClient`
    Check the status from the service
    Specified by:
      `checkStatus` in interface `MockOrRestClient`
    Throws:
      `VitamApplicationServerException` - if the Server is unavailable

  - ### checkStatus

    public void checkStatus(jakarta.ws.rs.core.MultivaluedHashMap<String,Object> headers) throws VitamApplicationServerException
    Description copied from interface: `MockOrRestClient`
    Check the status from the service used to passe "X-SSL-CLIENT-CERT" header that contain a pem certificate
    Specified by:
      `checkStatus` in interface `MockOrRestClient`
    Parameters:
      `headers` -
    Throws:
      `VitamApplicationServerException` - if the Server is unavailable

  - ### getResourcePath

    public String getResourcePath()
    Description copied from interface: `MockOrRestClient`
    Get the resource path of the server.
    Specified by:
      `getResourcePath` in interface `MockOrRestClient`
    Returns:
      the resource path as string

  - ### getServiceUrl

    public String getServiceUrl()
    Description copied from interface: `MockOrRestClient`
    Get the service URL
    Specified by:
      `getServiceUrl` in interface `MockOrRestClient`
    Returns:
      the service URL

  - ### close

    public void close()
    Description copied from interface: `MockOrRestClient`
    Close the underneath http client
    Specified by:
      `close` in interface `AutoCloseable`
    Specified by:
      `close` in interface `MockOrRestClient`
    Specified by:
      `close` in interface `VitamAutoCloseable`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### makeSpecifyingUrl

    public jakarta.ws.rs.core.Response makeSpecifyingUrl(VitamRequestBuilder request) throws VitamClientInternalException
    Throws:
      `VitamClientInternalException`

  - ### make

    public jakarta.ws.rs.core.Response make(VitamRequestBuilder request) throws VitamClientInternalException
    Throws:
      `VitamClientInternalException`

  - ### getClientFactory

    public VitamClientFactory<?> getClientFactory()

  - ### getClient

    public jakarta.ws.rs.client.Client getClient()

  - ### getChunkedClient

    public jakarta.ws.rs.client.Client getChunkedClient()