Class SwiftObjectImpl
- java.lang.Object
-
- org.openstack4j.openstack.storage.object.domain.SwiftObjectImpl
-
- All Implemented Interfaces:
Serializable,ModelEntity,SwiftObject
public class SwiftObjectImpl extends Object implements SwiftObject
Represents an Object which is a File or Directory within a Container- Author:
- Jeremy Unruh
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSwiftObjectImpl.Builderstatic classSwiftObjectImpl.SwiftObjects
-
Constructor Summary
Constructors Constructor Description SwiftObjectImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SwiftObjectImpl.Builderbuilder()DLPayloaddownload()Retrieves the Payload for the data backing the current objectDLPayloaddownload(DownloadOptions options)Retrieves the Payload for the data backing the current objectStringgetContainerName()StringgetDirectoryName()The name of the directoryStringgetETag()The MD5 checksum value of the object content.DategetLastModified()The date and time when the object was last modified.Map<String,String>getMetadata()Gets the object metadata (this is a lazy fetch)StringgetMimeType()The content type of the objectStringgetName()The name of the objectlonggetSizeInBytes()The total number of bytes that are stored in Object Storage for the accountbooleanisDirectory()Determines if this object is a pseudo directoryvoidsetContainerName(String containerName)StringtoString()
-
-
-
Method Detail
-
builder
public static SwiftObjectImpl.Builder builder()
-
getETag
public String getETag()
Description copied from interface:SwiftObjectThe MD5 checksum value of the object content.- Specified by:
getETagin interfaceSwiftObject- Returns:
- the MD5 checksum
-
getLastModified
public Date getLastModified()
Description copied from interface:SwiftObjectThe date and time when the object was last modified.- Specified by:
getLastModifiedin interfaceSwiftObject- Returns:
- the last modified date
-
getSizeInBytes
public long getSizeInBytes()
Description copied from interface:SwiftObjectThe total number of bytes that are stored in Object Storage for the account- Specified by:
getSizeInBytesin interfaceSwiftObject- Returns:
- total number of bytes
-
getName
public String getName()
Description copied from interface:SwiftObjectThe name of the object- Specified by:
getNamein interfaceSwiftObject- Returns:
- the name of the object
-
getDirectoryName
public String getDirectoryName()
Description copied from interface:SwiftObjectThe name of the directory- Specified by:
getDirectoryNamein interfaceSwiftObject- Returns:
- the name of the directory
-
getMimeType
public String getMimeType()
Description copied from interface:SwiftObjectThe content type of the object- Specified by:
getMimeTypein interfaceSwiftObject- Returns:
- the content type
-
isDirectory
public boolean isDirectory()
Description copied from interface:SwiftObjectDetermines if this object is a pseudo directory- Specified by:
isDirectoryin interfaceSwiftObject- Returns:
- true if this is a directory
-
getContainerName
public String getContainerName()
- Specified by:
getContainerNamein interfaceSwiftObject- Returns:
- the container name this object belongs to
-
setContainerName
public void setContainerName(String containerName)
-
getMetadata
public Map<String,String> getMetadata()
Description copied from interface:SwiftObjectGets the object metadata (this is a lazy fetch)- Specified by:
getMetadatain interfaceSwiftObject- Returns:
- the metadata for this object
-
download
public DLPayload download()
Description copied from interface:SwiftObjectRetrieves the Payload for the data backing the current object- Specified by:
downloadin interfaceSwiftObject- Returns:
- the download payload
-
download
public DLPayload download(DownloadOptions options)
Description copied from interface:SwiftObjectRetrieves the Payload for the data backing the current object- Specified by:
downloadin interfaceSwiftObject- Parameters:
options- the download options- Returns:
- the download payload
-
-