Package fr.gouv.vitam.ihmrecette.appserver

# Class StorageCRUDUtils

java.lang.Object
fr.gouv.vitam.ihmrecette.appserver.StorageCRUDUtils

public class StorageCRUDUtils extends Object
StorageCRUDUtils class this class is a tool for crud operation for storage

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `StorageCRUDUtils(StorageClient storageClient)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `deleteFile(DataCategory dataCategory, String uid, String strategyId, String offerId)`
  deleteFile
  `RequestResponse<StorageStrategy>`
  `getStrategies()`
  get the list of strategies containing the offers
  `void`
  `storeInOffer(DataCategory dataCategory, String uid, String strategyId, String offerId, Long size, InputStream stream)`
  Create file or erase it if exists

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

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

- ## Constructor Details

  - ### StorageCRUDUtils

    public StorageCRUDUtils(StorageClient storageClient)

- ## Method Details

  - ### getStrategies

    public RequestResponse<StorageStrategy> getStrategies() throws StorageServerClientException
    get the list of strategies containing the offers
    Throws:
      `StorageServerClientException`

  - ### deleteFile

    public boolean deleteFile(DataCategory dataCategory, String uid, String strategyId, String offerId) throws StorageServerClientException
    deleteFile
    Parameters:
      `dataCategory` - category
      `uid` - uid of file
      `strategyId` - strategy identifier
      `offerId` - offer identifier
    Throws:
      `StorageServerClientException`

  - ### storeInOffer

    public void storeInOffer(DataCategory dataCategory, String uid, String strategyId, String offerId, Long size, InputStream stream) throws BackupServiceException
    Create file or erase it if exists
    Parameters:
      `dataCategory` - dataCategory
      `uid` - uid
      `strategyId` - strategyID
      `offerId` - offerID
      `stream` - stream
    Throws:
      `BackupServiceException`