org.apache.camel.component.jclouds
Class JcloudsBlobStoreHelper

java.lang.Object
  extended by org.apache.camel.component.jclouds.JcloudsBlobStoreHelper

public final class JcloudsBlobStoreHelper
extends Object


Method Summary
static void ensureContainerExists(org.jclouds.blobstore.BlobStore blobStore, String container, String locationId)
          Checks if container exists and creates one if not.
static org.jclouds.domain.Location getLocationById(org.jclouds.blobstore.BlobStore blobStore, String locationId)
          Returns the Location that matches the locationId.
static void mkDirs(org.jclouds.blobstore.BlobStore blobStore, String container, String blobName)
          Creates all directories that are part of the blobName.
static InputStream readBlob(org.jclouds.blobstore.BlobStore blobStore, String container, String blobName)
          Reads from a BlobStore.
static void writeBlob(org.jclouds.blobstore.BlobStore blobStore, String container, String blobName, org.jclouds.io.Payload payload)
          Writes Payload to the the BlobStore.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

mkDirs

public static void mkDirs(org.jclouds.blobstore.BlobStore blobStore,
                          String container,
                          String blobName)
Creates all directories that are part of the blobName.


ensureContainerExists

public static void ensureContainerExists(org.jclouds.blobstore.BlobStore blobStore,
                                         String container,
                                         String locationId)
Checks if container exists and creates one if not.

Parameters:
blobStore - The BlobStore to use.
container - The container name to check against.
locationId - The locationId to create the container if not found.

getLocationById

public static org.jclouds.domain.Location getLocationById(org.jclouds.blobstore.BlobStore blobStore,
                                                          String locationId)
Returns the Location that matches the locationId.


writeBlob

public static void writeBlob(org.jclouds.blobstore.BlobStore blobStore,
                             String container,
                             String blobName,
                             org.jclouds.io.Payload payload)
Writes Payload to the the BlobStore.


readBlob

public static InputStream readBlob(org.jclouds.blobstore.BlobStore blobStore,
                                   String container,
                                   String blobName)
Reads from a BlobStore. It returns an Object.



Apache Camel