Class AtmosAPIFacade


  • public final class AtmosAPIFacade
    extends Object
    • Method Detail

      • getInstance

        public static AtmosAPIFacade getInstance​(com.emc.atmos.api.AtmosApi client)
        Return a singleton instance of this class
        Parameters:
        client - the AtmosClient performing atmos low level operations
        Returns:
        the singleton instance of this class
      • put

        public AtmosResult put​(String localPath,
                               String remotePath)
                        throws AtmosException
        Put or upload a new file or an entire directory to atmos
        Parameters:
        localPath - the file path or the dir path on the local filesystem
        remotePath - the remote path destination on atmos the file already existing with the same name will be overridden.
        Returns:
        a AtmosResult object reporting for each remote path the result of the operation.
        Throws:
        AtmosException
      • del

        public AtmosResult del​(String remotePath)
                        throws AtmosException
        Delete every files and subdirectories inside the remote directory. In case the remotePath is a file, delete the file.
        Parameters:
        remotePath - the remote location to delete
        Returns:
        a AtmosResult object with the result of the delete operation.
        Throws:
        AtmosException
      • move

        public AtmosResult move​(String remotePath,
                                String newRemotePath)
                         throws AtmosException
        Rename a remote path with the new path location.
        Parameters:
        remotePath - the existing remote path to be renamed
        newRemotePath - the new remote path substituting the old one
        Returns:
        a AtmosResult object with the result of the move operation.
        Throws:
        AtmosException
      • get

        public AtmosResult get​(String remotePath)
                        throws AtmosException
        Get the content of every file inside the remote path.
        Parameters:
        remotePath - the remote path where to download from
        Returns:
        a AtmosResult object with the content (ByteArrayOutputStream) of every files inside the remote path.
        Throws:
        AtmosException