Class SwiftObject

java.lang.Object
org.jclouds.openstack.swift.v1.domain.SwiftObject
All Implemented Interfaces:
Comparable<SwiftObject>

public class SwiftObject extends Object implements Comparable<SwiftObject>
Represents an object in OpenStack Object Storage.
See Also:
  • invalid reference
    ObjectApi
  • Constructor Details

  • Method Details

    • getName

      public String getName()
      Returns:
      The name of this object.
    • getUri

      public URI getUri()
      Returns:
      The URI for this object.
    • getEtag

      @Deprecated public String getEtag()
      Deprecated.
      Please use getETag() instead. To be removed in jclouds 2.0.
      Returns:
      The ETag of the content of this object.
    • getETag

      public String getETag()
      Returns:
      The ETag of the content of this object.
    • getLastModified

      public Date getLastModified()
      Returns:
      The Date that this object was last modified.
    • getHeaders

      public com.google.common.collect.Multimap<String,String> getHeaders()
      Returns:
      The HTTP headers for this object.
    • getMetadata

      public Map<String,String> getMetadata()

      NOTE

      In current swift implementations, headers keys are lower-cased. This means characters such as turkish will probably not work out well.
      Returns:
      a Map<String, String> containing this object's metadata. The map is empty except in
      invalid reference
      GetObjectMetadata
      or
      invalid reference
      GetObject
      commands.
    • getPayload

      public Payload getPayload()

      NOTE

      The object will only have a Payload.getInput() when retrieved via the
      invalid reference
      GetObject
      command.
      Returns:
      The Payload for this object.
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • string

      protected com.google.common.base.MoreObjects.ToStringHelper string()
    • compareTo

      public int compareTo(SwiftObject that)
      Specified by:
      compareTo in interface Comparable<SwiftObject>
    • builder

      public static SwiftObject.Builder builder()
    • toBuilder

      public SwiftObject.Builder toBuilder()