Class WorkspaceFileSystem

    • Constructor Summary

      Constructors 
      Constructor Description
      WorkspaceFileSystem​(StorageConfiguration configuration)
      Default constructor Define the root of workspace with the storagePath property from configuration
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.io.File checkWorkspaceContainerSanity​(java.lang.String container)  
      java.io.File checkWorkspaceDirSanity​(java.lang.String container, java.lang.String directory)  
      void checkWorkspaceFileSanity​(java.lang.String containerName, java.lang.String relativeObjectName)  
      void compress​(java.lang.String containerName, java.util.List<java.lang.String> folderNames, java.lang.String zipName, java.lang.String outputContainer)  
      java.lang.String computeObjectDigest​(java.lang.String containerName, java.lang.String objectName, DigestType algo)
      compute Object Digest using a defined algorithm
      void createContainer​(java.lang.String containerName)
      Creates a container
      void createFolder​(java.lang.String containerName, java.lang.String folderName)
      Creates a folder (or a directory) marker depending on the service
      void deleteContainer​(java.lang.String containerName, boolean recursive)
      Deletes everything inside a container recursively.
      void deleteFolder​(java.lang.String containerName, java.lang.String folderName)
      Deletes a folder (or a directory) marker depending on the service
      void deleteObject​(java.lang.String containerName, java.lang.String objectName)
      Deletes a object representing the data at location containerName/objectName
      ContainerInformation getContainerInformation​(java.lang.String containerName)
      Get container information like capacity
      java.util.Map<java.lang.String,​FileParams> getFilesWithParamsFromFolder​(java.lang.String containerName, java.lang.String folderName)
      This method get all files in folder and return a map with the uri as a key and the value is a FileParams that contains whatever it needs.
      java.util.List<java.net.URI> getListUriDigitalObjectFromFolder​(java.lang.String containerName, java.lang.String folderName)
      Retrieves recursively the uri list of object inside a folder rootFolder/subfolder/
      javax.ws.rs.core.Response getObject​(java.lang.String containerName, java.lang.String objectName, java.lang.Long chunkOffset, java.lang.Long maxChunkSize)
      Retrieves an object representing the data at location containerName/objectName
      com.fasterxml.jackson.databind.JsonNode getObjectInformation​(java.lang.String containerName, java.lang.String objectName)
      Retrieves information about an object at location containerName/objectName
      int getWorkspaceFreeSpace()  
      boolean isExistingContainer​(java.lang.String containerName)
      Determines if a container exists
      boolean isExistingFolder​(java.lang.String containerName, java.lang.String folderName)
      Determines if a folder (or a directory) exists
      boolean isExistingObject​(java.lang.String containerName, java.lang.String objectName)
      Determines if an object exists
      void purgeContainer​(java.lang.String containerName)
      Deletes the contents of a container at its root path without deleting the container
      void purgeOldFilesInContainer​(java.lang.String containerName, TimeToLive timeToLive)  
      void putAtomicObject​(java.lang.String containerName, java.lang.String objectName, java.io.InputStream stream, long size)  
      void putObject​(java.lang.String containerName, java.lang.String objectName, java.io.InputStream stream)
      Adds an object representing the data at location containerName/objectName
      void uncompressObject​(java.lang.String containerName, java.lang.String folderName, java.lang.String archiveMimeType, java.io.InputStream inputStreamObject)
      create container: will be identified by GUID and extract objects and push it on the container
      • Methods inherited from class java.lang.Object

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