Cloud Storage API v1beta2 (revision 2)



com.google.api.services.storage
Class Storage.Objects

java.lang.Object
  extended by com.google.api.services.storage.Storage.Objects
Enclosing class:
Storage

public class Storage.Objects
extends Object

The "objects" collection of methods.


Nested Class Summary
 class Storage.Objects.Compose
           
 class Storage.Objects.Copy
           
 class Storage.Objects.Delete
           
 class Storage.Objects.Get
           
 class Storage.Objects.Insert
           
 class Storage.Objects.List
           
 class Storage.Objects.Patch
           
 class Storage.Objects.Update
           
 class Storage.Objects.WatchAll
           
 
Constructor Summary
Storage.Objects()
           
 
Method Summary
 Storage.Objects.Compose compose(String destinationBucket, String destinationObject, ComposeRequest content)
          Concatenates a list of existing objects into a new object in the same bucket.
 Storage.Objects.Copy copy(String sourceBucket, String sourceObject, String destinationBucket, String destinationObject, StorageObject content)
          Copies an object to a destination in the same location.
 Storage.Objects.Delete delete(String bucket, String storageObject)
          Deletes data blobs and associated metadata.
 Storage.Objects.Get get(String bucket, String storageObject)
          Retrieves objects or their associated metadata.
 Storage.Objects.Insert insert(String bucket, StorageObject content)
          Stores new data blobs and associated metadata.
 Storage.Objects.Insert insert(String bucket, StorageObject content, AbstractInputStreamContent mediaContent)
          Stores new data blobs and associated metadata.
 Storage.Objects.List list(String bucket)
          Retrieves a list of objects matching the criteria.
 Storage.Objects.Patch patch(String bucket, String storageObject, StorageObject content)
          Updates a data blob's associated metadata.
 Storage.Objects.Update update(String bucket, String storageObject, StorageObject content)
          Updates a data blob's associated metadata.
 Storage.Objects.WatchAll watchAll(String bucket, Channel content)
          Watch for changes on all objects in a bucket.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Storage.Objects

public Storage.Objects()
Method Detail

compose

public Storage.Objects.Compose compose(String destinationBucket,
                                       String destinationObject,
                                       ComposeRequest content)
                                throws IOException
Concatenates a list of existing objects into a new object in the same bucket. Create a request for the method "objects.compose". This request holds the parameters needed by the the storage server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.

Parameters:
destinationBucket - Name of the bucket in which to store the new object.
destinationObject - Name of the new object.
content - the ComposeRequest
Returns:
the request
Throws:
IOException

copy

public Storage.Objects.Copy copy(String sourceBucket,
                                 String sourceObject,
                                 String destinationBucket,
                                 String destinationObject,
                                 StorageObject content)
                          throws IOException
Copies an object to a destination in the same location. Optionally overrides metadata. Create a request for the method "objects.copy". This request holds the parameters needed by the the storage server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.

Parameters:
sourceBucket - Name of the bucket in which to find the source object.
sourceObject - Name of the source object.
destinationBucket - Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.
destinationObject - Name of the new object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any.
content - the StorageObject
Returns:
the request
Throws:
IOException

delete

public Storage.Objects.Delete delete(String bucket,
                                     String storageObject)
                              throws IOException
Deletes data blobs and associated metadata. Deletions are permanent if versioning is not enabled for the bucket, or if the generation parameter is used. Create a request for the method "objects.delete". This request holds the parameters needed by the the storage server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.

Parameters:
bucket - Name of the bucket in which the object resides.
storageObject - Name of the object.
Returns:
the request
Throws:
IOException

get

public Storage.Objects.Get get(String bucket,
                               String storageObject)
                        throws IOException
Retrieves objects or their associated metadata. Create a request for the method "objects.get". This request holds the parameters needed by the the storage server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.

Parameters:
bucket - Name of the bucket in which the object resides.
storageObject - Name of the object.
Returns:
the request
Throws:
IOException

insert

public Storage.Objects.Insert insert(String bucket,
                                     StorageObject content)
                              throws IOException
Stores new data blobs and associated metadata. Create a request for the method "objects.insert". This request holds the parameters needed by the the storage server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.

Parameters:
bucket - Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.
content - the StorageObject
Returns:
the request
Throws:
IOException

insert

public Storage.Objects.Insert insert(String bucket,
                                     StorageObject content,
                                     AbstractInputStreamContent mediaContent)
                              throws IOException
Stores new data blobs and associated metadata. Create a request for the method "objects.insert". This request holds the parameters needed by the the storage server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.

This method should be used for uploading media content.

Parameters:
bucket - Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.
content - the StorageObject media metadata or null if none
mediaContent - The media HTTP content or null if none.
Returns:
the request
Throws:
IOException - if the initialization of the request fails

list

public Storage.Objects.List list(String bucket)
                          throws IOException
Retrieves a list of objects matching the criteria. Create a request for the method "objects.list". This request holds the parameters needed by the the storage server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.

Parameters:
bucket - Name of the bucket in which to look for objects.
Returns:
the request
Throws:
IOException

patch

public Storage.Objects.Patch patch(String bucket,
                                   String storageObject,
                                   StorageObject content)
                            throws IOException
Updates a data blob's associated metadata. This method supports patch semantics. Create a request for the method "objects.patch". This request holds the parameters needed by the the storage server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.

Parameters:
bucket - Name of the bucket in which the object resides.
storageObject - Name of the object.
content - the StorageObject
Returns:
the request
Throws:
IOException

update

public Storage.Objects.Update update(String bucket,
                                     String storageObject,
                                     StorageObject content)
                              throws IOException
Updates a data blob's associated metadata. Create a request for the method "objects.update". This request holds the parameters needed by the the storage server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.

Parameters:
bucket - Name of the bucket in which the object resides.
storageObject - Name of the object.
content - the StorageObject
Returns:
the request
Throws:
IOException

watchAll

public Storage.Objects.WatchAll watchAll(String bucket,
                                         Channel content)
                                  throws IOException
Watch for changes on all objects in a bucket. Create a request for the method "objects.watchAll". This request holds the parameters needed by the the storage server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.

Parameters:
bucket - Name of the bucket in which to look for objects.
content - the Channel
Returns:
the request
Throws:
IOException