org.jclouds.openstack.swift.v1.domain
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:
ObjectApi
SwiftObject
protected SwiftObject(String name,
URI uri,
String etag,
Date lastModified,
com.google.common.collect.Multimap<String,String> headers,
Map<String,String> metadata,
org.jclouds.io.Payload payload)
getName
public String getName()
- Returns:
- The name of this object.
getUri
public URI getUri()
- Returns:
- The
URI for this object.
getEtag
public String getEtag()
- Deprecated. Please use
getETag() as this method will be removed in jclouds 1.8.
- 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 GetObjectMetadata or
GetObject commands.
getPayload
public org.jclouds.io.Payload getPayload()
NOTE
The object will only have a Payload.getInput() when retrieved via the
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.Objects.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()
Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.