Class CloudStorage

  • All Implemented Interfaces:
    Storage

    public class CloudStorage
    extends Object
    implements Storage
    S3 storage implementation used when validating objects
    • Constructor Detail

      • CloudStorage

        public CloudStorage​(CloudClient client)
    • Method Detail

      • listDirectory

        public List<Listing> listDirectory​(String directoryPath,
                                           boolean recursive)
        Description copied from interface: Storage
        Return a list of all of the files an directories contained in the specified directory. An empty list is returned if the directory does not exist or has no children. If recursion is specified, then only leaf nodes are returned.
        Specified by:
        listDirectory in interface Storage
        Parameters:
        directoryPath - the path to the directory to list
        recursive - if children should be recursively listed
        Returns:
        list of children
      • fileExists

        public boolean fileExists​(String filePath)
        Description copied from interface: Storage
        Indicates if the file exists
        Specified by:
        fileExists in interface Storage
        Parameters:
        filePath - path to the file
        Returns:
        true if it exists
      • readFile

        public InputStream readFile​(String filePath)
        Description copied from interface: Storage
        Streams the content of the specified file
        Specified by:
        readFile in interface Storage
        Parameters:
        filePath - path to the file
        Returns:
        input stream of file content