org.duracloud.durastore.util
Class StorageProviderFactory

java.lang.Object
  extended by org.duracloud.durastore.util.ProviderFactoryBase
      extended by org.duracloud.durastore.util.StorageProviderFactory

public class StorageProviderFactory
extends ProviderFactoryBase

Provides access to StorageProvider implementations

Author:
Bill Branan

Constructor Summary
StorageProviderFactory()
           
 
Method Summary
static java.lang.String getPrimaryStorageProviderAccountId()
          Retrieves the id for the primary storage provider account
 StatelessStorageProvider getStatelessProvider()
           
static StorageProvider getStorageProvider()
          Retrieves the primary storage provider for a given customer.
static StorageProvider getStorageProvider(java.lang.String storageAccountId)
          Retrieves a particular storage provider based on the storage account ID.
static java.util.Iterator<java.lang.String> getStorageProviderAccountIds()
          Retrieves the ids for all available storage provider accounts
static StorageProviderType getStorageProviderType(java.lang.String storageAccountId)
          Returns the type of the storage provider with the given account ID.
static void setStatelessProvider(StatelessStorageProvider statelessProvider)
           
 
Methods inherited from class org.duracloud.durastore.util.ProviderFactoryBase
getAccountManager, initialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StorageProviderFactory

public StorageProviderFactory()
Method Detail

getStorageProviderAccountIds

public static java.util.Iterator<java.lang.String> getStorageProviderAccountIds()
                                                                         throws StorageException
Retrieves the ids for all available storage provider accounts

Returns:
Throws:
StorageException

getPrimaryStorageProviderAccountId

public static java.lang.String getPrimaryStorageProviderAccountId()
                                                           throws StorageException
Retrieves the id for the primary storage provider account

Returns:
Throws:
StorageException

getStorageProvider

public static StorageProvider getStorageProvider()
                                          throws StorageException
Retrieves the primary storage provider for a given customer.

Returns:
Throws:
StorageException

getStorageProvider

public static StorageProvider getStorageProvider(java.lang.String storageAccountId)
                                          throws StorageException
Retrieves a particular storage provider based on the storage account ID. If a storage account cannot be retrieved, the primary storage provider account is used.

Parameters:
storageAccountId - - the ID of the storage provider account
Returns:
Throws:
StorageException

getStorageProviderType

public static StorageProviderType getStorageProviderType(java.lang.String storageAccountId)
                                                  throws StorageException
Returns the type of the storage provider with the given account ID. If no storage provider is available with that ID, the UNKNOWN type is returned.

Parameters:
storageAccountId -
Returns:
Throws:
StorageException

getStatelessProvider

public StatelessStorageProvider getStatelessProvider()

setStatelessProvider

public static void setStatelessProvider(StatelessStorageProvider statelessProvider)


Copyright © 2009-2010 DuraSpace. All Rights Reserved.