public class S3VersionSummary
extends java.lang.Object
S3Object
,
S3ObjectSummary
Constructor and Description |
---|
S3VersionSummary() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getBucketName()
Gets the name of the Amazon S3 bucket in which this version is stored.
|
java.lang.String |
getETag()
Gets the hex encoded 128-bit MD5 hash of this version's contents as
computed by Amazon S3.
|
java.lang.String |
getKey()
Gets the key under which this version is stored in Amazon S3.
|
java.util.Date |
getLastModified()
Gets the date according to Amazon S3 at which this version was last
modified.
|
Owner |
getOwner()
Gets the owner of this version.
|
long |
getSize()
Gets the size of this version in bytes.
|
java.lang.String |
getStorageClass()
Gets the storage class used by Amazon S3 for this version.
|
java.lang.String |
getVersionId()
Gets the version ID which uniquely identifies this version of an object.
|
boolean |
isDeleteMarker()
Returns whether or not this version represents a delete marker.
|
boolean |
isLatest()
Returns whether or not this version is the latest version for the
associated object.
|
void |
setBucketName(java.lang.String bucketName)
Sets the name of the Amazon S3 bucket in which this version is stored.
|
void |
setETag(java.lang.String eTag)
Sets the hex encoded 128-bit MD5 hash of this version's contents as
computed by Amazon S3.
|
void |
setIsDeleteMarker(boolean isDeleteMarker)
Intended for internal use only in the Amazon S3 client code.
|
void |
setIsLatest(boolean isLatest)
For internal use only.
|
void |
setKey(java.lang.String key)
Sets the key under which this version is stored in Amazon S3.
|
void |
setLastModified(java.util.Date lastModified)
Sets the date according to Amazon S3 at which this version was last
modified.
|
void |
setOwner(Owner owner)
For internal use only.
|
void |
setSize(long size)
Sets the size of this version in bytes.
|
void |
setStorageClass(java.lang.String storageClass)
Sets the storage class used by Amazon S3 for this version.
|
void |
setVersionId(java.lang.String id)
Sets the version ID which uniquely identifies this version of an object.
|
public java.lang.String getBucketName()
setBucketName(String)
public void setBucketName(java.lang.String bucketName)
bucketName
- The name of the Amazon S3 bucket in which this version
is stored.getBucketName()
public java.lang.String getKey()
setKey(String)
public void setKey(java.lang.String key)
key
- The key under which this version is stored in Amazon S3.getKey()
public java.lang.String getVersionId()
Objects created before versioning was enabled or when versioning is
suspended will be given the default/null version ID (see
Constants.NULL_VERSION_ID
). Note that the
Constants.NULL_VERSION_ID
is a valid version ID and is not the
same as not having a version ID.
setVersionId(String)
public void setVersionId(java.lang.String id)
id
- The version ID which uniquely identifies this version of an
object.getVersionId()
public boolean isLatest()
true
if this version is the latest version
for the associated object; returns the value false
if otherwise.public void setIsLatest(boolean isLatest)
isLatest
- True if this version represents the latest version for
the associated object in S3.public java.util.Date getLastModified()
setLastModified(Date)
public void setLastModified(java.util.Date lastModified)
lastModified
- The date according to Amazon S3 at which this version
was last modified.getLastModified()
public Owner getOwner()
null
if the
requester doesn't have Permission.ReadAcp
permission for this
version or owns the bucket in which it resides.null
if the
requester doesn't have permission to see object ownership for
this version.setOwner(Owner)
public void setOwner(Owner owner)
owner
- The owner of this version.getOwner()
public boolean isDeleteMarker()
Delete markers are special types of versions that have no data associated with them. When deleting a versioned object in Amazon S3 without specifying an explicit version ID, a new delete marker is created as the latest version of that object to mark that the object was deleted. This occurs even though the previous versions still exist in Amazon S3.
Delete markers have no data associated with them and therefore have no associated ACL, size or storage class. Only requesters with read access to a bucket can learn of their existence by listing the versions in a bucket.
true
if this version represents a delete
marker. Returns the value false
if otherwise.public void setIsDeleteMarker(boolean isDeleteMarker)
isDeleteMarker
property to record if this is a
delete marker or not.isDeleteMarker
- Specify
true if this version summary represents a delete marker,
otherwise false if it is a regular version summary.
public java.lang.String getETag()
setETag(String)
public void setETag(java.lang.String eTag)
eTag
- The hex encoded 128-bit MD5 hash of this version's contents
as computed by Amazon S3.getETag()
public java.lang.String getStorageClass()
setStorageClass(String)
public void setStorageClass(java.lang.String storageClass)
storageClass
- The storage class used by Amazon S3 for this version.getStorageClass()
public long getSize()
setSize(long)
public void setSize(long size)
size
- The size of this version in bytes.getSize()
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.