com.amazonaws.services.s3.model
Class VersionListing

java.lang.Object
  extended by com.amazonaws.services.s3.model.VersionListing

public class VersionListing
extends Object

Contains the results of listing the versions in an Amazon S3 bucket, including a list of S3VersionSummary objects describing each version, information describing if this is a complete or partial listing, and the original request parameters.

See Also:
AmazonS3.listVersions(String, String), AmazonS3.listVersions(ListVersionsRequest), AmazonS3.listNextBatchOfVersions(VersionListing)

Constructor Summary
VersionListing()
           
 
Method Summary
 String getBucketName()
          Returns the name of the Amazon S3 bucket containing the versions listed in this S3VersionListing.
 List<String> getCommonPrefixes()
          Returns the common prefixes included in this version listing.
 String getDelimiter()
          Returns the delimiter parameter originally used to request this version listing, or null if none was specified.
 String getKeyMarker()
          The key marker parameter originally used to request this version listing, or null if no key marker was specified.
 int getMaxKeys()
          Returns the maxKeys parameter originally used to request this version listing, or the default maxKeys value provided by Amazon S3 if the requester didn't specify a value.
 String getNextKeyMarker()
          For truncated version listings (see isTruncated()) returns the key marker to use in the next listVersions request in order to see the next page of results.
 String getNextVersionIdMarker()
          For truncated version listings (see isTruncated()) returns the version ID marker to use in the next listVersions request in order to see the next page of results.
 String getPrefix()
          The prefix parameter originally used to request this version listing, or null if no prefix was specified.
 String getVersionIdMarker()
          The version ID marker parameter originally used to request this version listing, or null if no version ID marker was specified.
 List<S3VersionSummary> getVersionSummaries()
          Returns the list of version summaries describing the versions stored in the associated S3 bucket.
 boolean isTruncated()
          Returns true if this version listing is not complete and indicates that the caller needs to make additional calls to Amazon S3 to get more results.
 void setBucketName(String bucketName)
          Not intended for direct use by callers.
 void setCommonPrefixes(List<String> commonPrefixes)
          Not intended for direct use by callers.
 void setDelimiter(String delimiter)
          Not intended for direct use by callers.
 void setKeyMarker(String keyMarker)
          Not intended for direct use by callers.
 void setMaxKeys(int maxKeys)
          Not intended for direct use by callers.
 void setNextKeyMarker(String marker)
          Not intended for direct use by callers.
 void setNextVersionIdMarker(String marker)
          Not intended for direct use by callers.
 void setPrefix(String prefix)
          Not intended for direct use by callers.
 void setTruncated(boolean isTruncated)
          Not intended for direct use by callers.
 void setVersionIdMarker(String versionIdMarker)
          Not intended for direct use by callers.
 void setVersionSummaries(List<S3VersionSummary> versionSummaries)
          Not intended for direct use by callers.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VersionListing

public VersionListing()
Method Detail

getVersionSummaries

public List<S3VersionSummary> getVersionSummaries()
Returns the list of version summaries describing the versions stored in the associated S3 bucket. Callers should remember that listings for large buckets can be truncated for performance reasons, so callers might need to make additional calls to AmazonS3.listVersions(ListVersionsRequest) to get additional results. Callers should always check the isTruncated() method to determine if a listing is truncated or not.

Returns:
A list of the version summaries describing the versions stored in the associated S3 bucket.

setVersionSummaries

public void setVersionSummaries(List<S3VersionSummary> versionSummaries)
Not intended for direct use by callers. Sets the list of version summaries describing the versions stored in the associated S3 bucket.

Parameters:
versionSummaries - The version summaries describing the versions stored in the associated S3 bucket.

getCommonPrefixes

public List<String> getCommonPrefixes()
Returns the common prefixes included in this version listing. Common prefixes are only present if a delimiter was specified in the original request.

Each common prefix represents a set of keys in the S3 bucket that have been condensed and omitted from the version summary results. This allows applications to organize and browse their keys hierarchically, much like how a file system organizes files into directories.

For example, consider a bucket that contains the keys:

If you call listVersions with prefix="foo/" and delimiter="/" on this bucket, the returned S3VersionListing will contain one entry in the common prefixes list ("foo/bar/") and none of the keys beginning with that common prefix will be included in the version summaries list.

Returns:
The list of common prefixes included in this version listing, which might be an empty list if no common prefixes were found.

setCommonPrefixes

public void setCommonPrefixes(List<String> commonPrefixes)
Not intended for direct use by callers. Sets the common prefixes for this version listing, representing the key prefixes that were rolled up because of the request's delimiter parameter.

Parameters:
commonPrefixes - The common prefixes for this version listing.

getBucketName

public String getBucketName()
Returns the name of the Amazon S3 bucket containing the versions listed in this S3VersionListing.

Returns:
The name of the Amazon S3 bucket containing the versions listed in this S3VersionListing.

setBucketName

public void setBucketName(String bucketName)
Not intended for direct use by callers. Sets the name of the Amazon S3 bucket containing the versions listed in this S3VersionListing.

Parameters:
bucketName - The name of the Amazon S3 bucket containing the versions listed in this S3VersionListing.

getPrefix

public String getPrefix()
The prefix parameter originally used to request this version listing, or null if no prefix was specified. All object keys included in this version listing start with the specified prefix.

Returns:
The prefix parameter originally used to request this version listing, or null if no prefix was specified.

setPrefix

public void setPrefix(String prefix)
Not intended for direct use by callers. Sets the prefix parameter originally used to request this version listing.

Parameters:
prefix - The prefix parameter originally used to request this version listing.

getKeyMarker

public String getKeyMarker()
The key marker parameter originally used to request this version listing, or null if no key marker was specified. If specified, all object keys included in this version listing will occur lexically (alphabetically) after the specified key marker.

Returns:
The key marker parameter originally used to request this version listing, or null if no key marker was specified.

setKeyMarker

public void setKeyMarker(String keyMarker)
Not intended for direct use by callers. Sets the key marker parameter originally used to request this version listing.

Parameters:
keyMarker - The key marker parameter originally used to request this version listing.

getVersionIdMarker

public String getVersionIdMarker()
The version ID marker parameter originally used to request this version listing, or null if no version ID marker was specified.

Returns:
The version ID marker parameter originally used to request this version listing, or null if no version ID marker was specified.

setVersionIdMarker

public void setVersionIdMarker(String versionIdMarker)
Not intended for direct use by callers. Sets the version ID marker parameter originally used to request this version listing.

Parameters:
versionIdMarker - The version ID marker parameter originally used to request this version listing.

getMaxKeys

public int getMaxKeys()
Returns the maxKeys parameter originally used to request this version listing, or the default maxKeys value provided by Amazon S3 if the requester didn't specify a value. The maxKeys parameter limits the number of versions included in this version listing. A version listing will never contain more versions than indicated by the maxKeys, but can of course contain less.

Returns:
The maxKeys parameter originally used to request this version listing, or the default maxKeys value applied by Amazon S3 if the requester didn't specify a value.

setMaxKeys

public void setMaxKeys(int maxKeys)
Not intended for direct use by callers. Sets the maxKeys parameter originally used to request this object listing, or the default maxKeys applied by Amazon S3 if the requester didn't specify a value.

Parameters:
maxKeys - The maxKeys parameter originally used to request this version listing, or the default maxKeys value applied by Amazon S3 if the requester didn't specify a value.

getDelimiter

public String getDelimiter()
Returns the delimiter parameter originally used to request this version listing, or null if none was specified. The delimiter value allows callers to condense S3 keys into common prefix listings. For example, if a caller specifies a delimiter of "/" (a common used value for delimiter), then any keys that contain a common prefix between the start of the key and the first occurrence of "/" will not be included in the list of object summaries, but instead, the common prefixes list will have one entry for the common prefix.

Returns:
The delimiter parameter originally used to request this version listing, or null if none was specified.

setDelimiter

public void setDelimiter(String delimiter)
Not intended for direct use by callers. Sets the delimiter parameter originally used to request this version listing.

Parameters:
delimiter - The delimiter parameter originally used to request this version listing.

getNextKeyMarker

public String getNextKeyMarker()
For truncated version listings (see isTruncated()) returns the key marker to use in the next listVersions request in order to see the next page of results. If a version listing is not truncated, this method will return null since there is no need for a next key marker. For truncated requests, this value is equal to the greatest (lexicographically) value of the object keys included in this listing.

Returns:
The key marker to use in the next listVersions request in order to see the next page of results if this version listing is truncated, otherwise null if this version listing isn't truncated.

setNextKeyMarker

public void setNextKeyMarker(String marker)
Not intended for direct use by callers. Sets the key marker to use in the next listVersions request in order to see the next page of results for a truncated version listing.

Parameters:
marker - The key marker to use in the next listVersions request in order to see the next page of results for a truncated version listing.

getNextVersionIdMarker

public String getNextVersionIdMarker()
For truncated version listings (see isTruncated()) returns the version ID marker to use in the next listVersions request in order to see the next page of results. If a version listing is not truncated, this method will return null since there is no need for a next version ID marker.

Returns:
The version ID marker to use in the next listVersions request in order to see the next page of results if this version listing is truncated, otherwise null if this version listing isn't truncated.

setNextVersionIdMarker

public void setNextVersionIdMarker(String marker)
Not intended for direct use by callers. Sets the version ID marker to use in the next listVersions request in order to see the next page of results for a truncated version listing.

Parameters:
marker - The version ID marker to use in the next listVersions request in order to see the next page of results for a truncated version listing.

isTruncated

public boolean isTruncated()
Returns true if this version listing is not complete and indicates that the caller needs to make additional calls to Amazon S3 to get more results.

Returns:
True if this version listing is not complete and indicates that the caller needs to make additional calls to Amazon S3 to get additional version summaries.

setTruncated

public void setTruncated(boolean isTruncated)
Not intended for direct use by callers. Sets the truncated property for this version listing, indicating if this is a complete listing or not and whether the caller needs to make additional calls to S3 to get more version summaries.

Parameters:
isTruncated - True if this version listing is not complete and the caller needs to make additional S3 calls to get additional version summaries.


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.