org.duracloud.client
Class ContentStoreManagerImpl

java.lang.Object
  extended by org.duracloud.client.ContentStoreManagerImpl
All Implemented Interfaces:
ContentStoreManager, org.duracloud.common.model.Securable
Direct Known Subclasses:
CachingContentStoreManagerImpl

public class ContentStoreManagerImpl
extends Object
implements ContentStoreManager, org.duracloud.common.model.Securable

Provides facilities for connecting to a set of content stores

Author:
Bill Branan

Constructor Summary
ContentStoreManagerImpl(String host, String port)
          Constructor for ContentStoreManagerImpl.
ContentStoreManagerImpl(String host, String port, String context)
          Constructor for ContentStoreManagerImpl.
 
Method Summary
protected  String getBaseURL()
           
 ContentStore getContentStore(String storeID)
          getContentStore
 Map<String,ContentStore> getContentStores()
          getContentStores
 ContentStore getPrimaryContentStore()
          getPrimaryContentStore
 ContentStore getPrimaryContentStoreAsAnonymous()
          Provides access to the primary content store without requiring login().
protected  org.duracloud.common.web.RestHttpHelper getRestHelper()
           
 void login(org.duracloud.common.model.Credential appCred)
           
 void logout()
           
protected  ContentStore newContentStoreImpl(org.duracloud.storage.domain.StorageAccount acct)
           
 void reinitialize(String host, String port, String context)
          reconfigure
protected  void setRestHelper(org.duracloud.common.web.RestHttpHelper restHelper)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentStoreManagerImpl

public ContentStoreManagerImpl(String host,
                               String port)

Constructor for ContentStoreManagerImpl.

Parameters:
host - a String object.
port - a String object.

ContentStoreManagerImpl

public ContentStoreManagerImpl(String host,
                               String port,
                               String context)

Constructor for ContentStoreManagerImpl.

Parameters:
host - the host name on which DuraStore can be accessed
port - the port on which DuraStore can be accessed
context - the application context by which DuraStore can be accessed
Method Detail

reinitialize

public void reinitialize(String host,
                         String port,
                         String context)
                  throws ContentStoreException
Description copied from interface: ContentStoreManager

reconfigure

Specified by:
reinitialize in interface ContentStoreManager
Parameters:
host - of durastore
port - of durastore
context - of durastore
Throws:
ContentStoreException

getContentStores

public Map<String,ContentStore> getContentStores()
                                          throws ContentStoreException

getContentStores

Specified by:
getContentStores in interface ContentStoreManager
Returns:
a map of content stores to content store IDs
Throws:
ContentStoreException - if the content store list cannot be retrieved

getContentStore

public ContentStore getContentStore(String storeID)
                             throws ContentStoreException

getContentStore

Specified by:
getContentStore in interface ContentStoreManager
Parameters:
storeID - the ID of a particular content store
Returns:
the ContentStore mapped to storeID
Throws:
ContentStoreException - if the content store cannot be retrieved

getPrimaryContentStore

public ContentStore getPrimaryContentStore()
                                    throws ContentStoreException

getPrimaryContentStore

Specified by:
getPrimaryContentStore in interface ContentStoreManager
Returns:
the primary ContentStore
Throws:
ContentStoreException

getPrimaryContentStoreAsAnonymous

public ContentStore getPrimaryContentStoreAsAnonymous()
                                               throws ContentStoreException
Provides access to the primary content store without requiring login(). Only certain ContentStore activities are permitted to anonymous users, primarily getting content from open spaces.

getPrimaryContentStoreAsAnonymous

Specified by:
getPrimaryContentStoreAsAnonymous in interface ContentStoreManager
Returns:
the primary ContentStore
Throws:
ContentStoreException

login

public void login(org.duracloud.common.model.Credential appCred)
Specified by:
login in interface org.duracloud.common.model.Securable

logout

public void logout()
Specified by:
logout in interface org.duracloud.common.model.Securable

newContentStoreImpl

protected ContentStore newContentStoreImpl(org.duracloud.storage.domain.StorageAccount acct)

getBaseURL

protected String getBaseURL()

getRestHelper

protected org.duracloud.common.web.RestHttpHelper getRestHelper()

setRestHelper

protected void setRestHelper(org.duracloud.common.web.RestHttpHelper restHelper)


Copyright © 2009-2012 DuraSpace. All Rights Reserved.