org.jets3t.service.model
Class StorageBucket

java.lang.Object
  extended by org.jets3t.service.model.BaseStorageItem
      extended by org.jets3t.service.model.StorageBucket
Direct Known Subclasses:
GSBucket, S3Bucket

public class StorageBucket
extends BaseStorageItem

A generic storage bucket.


Field Summary
 
Fields inherited from class org.jets3t.service.model.BaseStorageItem
METADATA_HEADER_CONTENT_DISPOSITION, METADATA_HEADER_CONTENT_ENCODING, METADATA_HEADER_CONTENT_LANGUAGE, METADATA_HEADER_CONTENT_LENGTH, METADATA_HEADER_CONTENT_MD5, METADATA_HEADER_CONTENT_TYPE, METADATA_HEADER_CREATION_DATE, METADATA_HEADER_DATE, METADATA_HEADER_ETAG, METADATA_HEADER_LAST_MODIFIED_DATE
 
Constructor Summary
StorageBucket()
          Create a bucket without any name or location specified
StorageBucket(java.lang.String name)
          Create a bucket with a name.
StorageBucket(java.lang.String name, java.lang.String location)
           
 
Method Summary
 AccessControlList getAcl()
           
 java.util.Date getCreationDate()
           
 java.lang.String getLocation()
           
 boolean isLocationKnown()
           
 void setAcl(AccessControlList acl)
          Sets the bucket's Access Control List - this should only be used internally by JetS3t methods that retrieve information directly from a storage service.
 void setCreationDate(java.util.Date creationDate)
          Sets the bucket's creation date - this should only be used internally by JetS3t methods that retrieve information directly from a service.
 void setLocation(java.lang.String location)
          Set's the bucket's location.
 java.lang.String toString()
           
 
Methods inherited from class org.jets3t.service.model.BaseStorageItem
addAllMetadata, addMetadata, addMetadata, addMetadata, addMetadata, containsMetadata, getMetadata, getMetadataMap, getName, getOwner, isMatchingMetadataName, removeMetadata, replaceAllMetadata, setName, setOwner
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StorageBucket

public StorageBucket()
Create a bucket without any name or location specified


StorageBucket

public StorageBucket(java.lang.String name)
Create a bucket with a name.


StorageBucket

public StorageBucket(java.lang.String name,
                     java.lang.String location)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getCreationDate

public java.util.Date getCreationDate()
Returns:
the bucket's creation date, or null if it is unknown.

setCreationDate

public void setCreationDate(java.util.Date creationDate)
Sets the bucket's creation date - this should only be used internally by JetS3t methods that retrieve information directly from a service.

Parameters:
creationDate -

getAcl

public AccessControlList getAcl()
Returns:
the bucket's Access Control List, or null if it is unknown.

setAcl

public void setAcl(AccessControlList acl)
Sets the bucket's Access Control List - this should only be used internally by JetS3t methods that retrieve information directly from a storage service.

Parameters:
acl -

setLocation

public void setLocation(java.lang.String location)
Set's the bucket's location. This method should only be used internally by JetS3t methods that retrieve information directly from S3.

Parameters:
location - A string representing the location. Legal values include S3Bucket.LOCATION_US, S3Bucket.LOCATION_EUROPE, GSBucket.LOCATION_US etc.

isLocationKnown

public boolean isLocationKnown()
Returns:
true if this object knows the bucket's location, false otherwise.

getLocation

public java.lang.String getLocation()
Returns:
the bucket's location represented as a string. "EU" denotes a bucket located in Europe, while null denotes a bucket located in the US.