Interface ObjectStorageObjectService

  • All Superinterfaces:
    RestService
    All Known Implementing Classes:
    ObjectStorageObjectServiceImpl

    public interface ObjectStorageObjectService
    extends RestService
    A service responsible for maintaining directory and file objects within containers for an Object Service within OpenStack
    Author:
    Jeremy Unruh
    • Method Detail

      • list

        List<? extends SwiftObject> list​(String containerName)
        Lists all objects for the given container name
        Parameters:
        containerName - the container name
        Returns:
        List of File objects including Directories
      • list

        List<? extends SwiftObject> list​(String containerName,
                                         ObjectListOptions options)
        Lists all objects for the given container name and list options
        Parameters:
        containerName - the container name
        options - additional filter based options
        Returns:
        List of File objects including Directories
      • get

        SwiftObject get​(ObjectLocation location)
        Gets the specified object based on the ObjectLocation location
        Parameters:
        location - the object location
        Returns:
        SwiftObject or null if not found
      • get

        SwiftObject get​(String containerName,
                        String name)
        Gets the specified object based on the containerName and name of the object
        Parameters:
        containerName - the objects container name
        name - the name of the object
        Returns:
        SwiftObject or null if not found
      • put

        String put​(String containerName,
                   String name,
                   Payload<?> payload)
        Adds/Updates a file to the specified container
        Parameters:
        containerName - the container name
        name - the name of the file
        payload - the file payload
        Returns:
        the ETAG checksum
      • put

        String put​(String containerName,
                   String name,
                   Payload<?> payload,
                   ObjectPutOptions options)
        Adds/Updates a file to the specified container
        Parameters:
        containerName - the container name
        name - the name of the file
        payload - the file payload
        options - extended options to associate with this object
        Returns:
        the ETAG checksum
      • download

        DLPayload download​(String containerName,
                           String name)
        Retrieves the Payload for the data backing the given containerName and name
        Parameters:
        containerName - the container name
        name - the object name
        Returns:
        the download payload
      • download

        DLPayload download​(String containerName,
                           String name,
                           DownloadOptions options)
        Retrieves the Payload for the data backing the given containerName and name
        Parameters:
        containerName - the container name
        name - the object name
        options - the download options
        Returns:
        the download payload
      • download

        DLPayload download​(ObjectLocation location,
                           DownloadOptions options)
        Retrieves the Payload for the data backing the given location
        Parameters:
        location - the object location
        options - the download options
        Returns:
        the download payload
      • delete

        ActionResponse delete​(String containerName,
                              String name)
        Deletes an Object from the specified container
        Parameters:
        containerName - the container name
        name - the name of the object (full path if directories are used)
        Returns:
        the action response
      • delete

        ActionResponse delete​(ObjectLocation location)
        Deletes an Object from the specified container
        Parameters:
        location - location containing container name and object name
        Returns:
        the action response
      • delete

        ActionResponse delete​(ObjectLocation location,
                              ObjectDeleteOptions options)
        Deletes an Object from the specified container
        Parameters:
        location - location containing container name and object name
        options - the deleting options
        Returns:
        the action response
      • copy

        String copy​(ObjectLocation source,
                    ObjectLocation dest)
        Copies an object to another object in the object store
        Parameters:
        source - the source container and object name
        dest - the destination container and object name
        Returns:
        the ETAG checksum if successful
      • getMetadata

        Map<String,​String> getMetadata​(ObjectLocation location)
        Gets the metadata for the specified object location
        Parameters:
        location - the object location
        Returns:
        Map of Key to Value metadata
      • updateMetadata

        boolean updateMetadata​(ObjectLocation location,
                               Map<String,​String> metadata)
        Creates or Updates the given metadata for the specified object location
        Parameters:
        location - the location of the object to create/update metadata
        metadata - the metadata
        Returns:
        true if successful