org.jclouds.blobstore.domain.internal
Class BlobBuilderImpl

java.lang.Object
  extended by org.jclouds.blobstore.domain.internal.BlobBuilderImpl
All Implemented Interfaces:
BlobBuilder

public class BlobBuilderImpl
extends Object
implements BlobBuilder

Author:
Adrian Cole

Nested Class Summary
 class BlobBuilderImpl.PayloadBlobBuilderImpl
           
 
Nested classes/interfaces inherited from interface org.jclouds.blobstore.domain.BlobBuilder
BlobBuilder.PayloadBlobBuilder
 
Constructor Summary
BlobBuilderImpl(Crypto crypto)
           
 
Method Summary
 Blob build()
          This makes a blob from the currently configured parameters.
 BlobBuilder.PayloadBlobBuilder forSigning()
          If you are creating a blob only for signing, use this.
 BlobBuilder name(String name)
           
 BlobBuilder.PayloadBlobBuilder payload(byte[] data)
          
 BlobBuilder.PayloadBlobBuilder payload(File data)
          
 BlobBuilder.PayloadBlobBuilder payload(InputStream data)
          
 BlobBuilder.PayloadBlobBuilder payload(Payload payload)
           
 BlobBuilder.PayloadBlobBuilder payload(String data)
          
 BlobBuilder type(StorageType type)
           
 BlobBuilder userMetadata(Map<String,String> userMetadata)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlobBuilderImpl

@Inject
public BlobBuilderImpl(Crypto crypto)
Method Detail

name

public BlobBuilder name(String name)
Specified by:
name in interface BlobBuilder
Parameters:
name - The name of the Blob. Typically refers to an http path.

type

public BlobBuilder type(StorageType type)
Specified by:
type in interface BlobBuilder
Parameters:
type - overrides default type of StorageType.BLOB

userMetadata

public BlobBuilder userMetadata(Map<String,String> userMetadata)
Specified by:
userMetadata in interface BlobBuilder
Parameters:
userMetadata - User defined metadata associated with this Blob.

payload

public BlobBuilder.PayloadBlobBuilder payload(Payload payload)
Specified by:
payload in interface BlobBuilder
Parameters:
payload - payload you wish to construct the Blob with.

payload

public BlobBuilder.PayloadBlobBuilder payload(InputStream data)

Specified by:
payload in interface BlobBuilder
Parameters:
data - payload you wish to construct the Blob with.

payload

public BlobBuilder.PayloadBlobBuilder payload(byte[] data)

Specified by:
payload in interface BlobBuilder
Parameters:
data - payload you wish to construct the Blob with.

payload

public BlobBuilder.PayloadBlobBuilder payload(String data)

Specified by:
payload in interface BlobBuilder
Parameters:
data - payload you wish to construct the Blob with.

payload

public BlobBuilder.PayloadBlobBuilder payload(File data)

Specified by:
payload in interface BlobBuilder
Parameters:
data - payload you wish to construct the Blob with.

build

public Blob build()
Description copied from interface: BlobBuilder
This makes a blob from the currently configured parameters.

Specified by:
build in interface BlobBuilder
Returns:
a new blob from the current parameters

forSigning

public BlobBuilder.PayloadBlobBuilder forSigning()
Description copied from interface: BlobBuilder
If you are creating a blob only for signing, use this. BlobRequestSigner

Specified by:
forSigning in interface BlobBuilder


Copyright © 2009-2011 jclouds. All Rights Reserved.