Class TraceabilityStorageService


  • public class TraceabilityStorageService
    extends java.lang.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 java.lang.String TRACEABILITY_ORIGIN  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Iterator<OfferLog> getLastSavedStorageLogIterator​(java.lang.String strategyId)
      Get the files of the last storage backup since the last traceability (fromDate)
      java.lang.String getLastTraceabilityZip​(java.lang.String strategyId)
      Get the last storage traceability zip fileName
      javax.ws.rs.core.Response getObject​(java.lang.String strategyId, java.lang.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 Detail

      • TRACEABILITY_ORIGIN

        public static final java.lang.String TRACEABILITY_ORIGIN
        See Also:
        Constant Field Values
    • Constructor Detail

      • TraceabilityStorageService

        public TraceabilityStorageService​(StorageDistribution distribution)
    • Method Detail

      • getLastSavedStorageLogIterator

        public java.util.Iterator<OfferLog> getLastSavedStorageLogIterator​(java.lang.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 java.lang.String getLastTraceabilityZip​(java.lang.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 javax.ws.rs.core.Response getObject​(java.lang.String strategyId,
                                                   java.lang.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