Package fr.gouv.vitam.storage.engine.server.storagetraceability

# Class TraceabilityStorageService

java.lang.Object
fr.gouv.vitam.storage.engine.server.storagetraceability.TraceabilityStorageService

public class TraceabilityStorageService extends Object
Service that allow Storage Traceability to use StorageDistribution in order to get some file and information in Offers

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `TRACEABILITY_ORIGIN`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TraceabilityStorageService(StorageDistribution distribution)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Iterator<OfferLog>`
  `getLastSavedStorageLogIterator(String strategyId)`
  Get the files of the last storage backup since the last traceability (fromDate)
  `String`
  `getLastTraceabilityZip(String strategyId)`
  Get the last storage traceability zip fileName
  `jakarta.ws.rs.core.Response`
  `getObject(String strategyId, String objectId, DataCategory category)`
  Only direct call to @StorageDistribution.getContainerByCategory

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

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

- ## Field Details

  - ### TRACEABILITY_ORIGIN

    public static final String TRACEABILITY_ORIGIN
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### TraceabilityStorageService

    public TraceabilityStorageService(StorageDistribution distribution)

- ## Method Details

  - ### getLastSavedStorageLogIterator

    public Iterator<OfferLog> getLastSavedStorageLogIterator(String strategyId)
    Get the files of the last storage backup since the last traceability (fromDate)
    Parameters:
      `strategyId` - The storage strategy ID
    Returns:
      list of last saved files as iterator

  - ### getLastTraceabilityZip

    public String getLastTraceabilityZip(String strategyId)
    Get the last storage traceability zip fileName
    Parameters:
      `strategyId` - The storage strategy ID
    Returns:
      the zip's fileName of the last storage traceability operation

  - ### getObject

    public jakarta.ws.rs.core.Response getObject(String strategyId, String objectId, DataCategory category) throws StorageException
    Only direct call to @StorageDistribution.getContainerByCategory
    Parameters:
      `strategyId` - strategyID
      `objectId` - file id or name
      `category` - storage category of the file
    Returns:
      the file as stream
    Throws:
      `StorageException` - if some error technical problem while call StorageDistribution