public class ContentStoreManagerImpl extends Object implements ContentStoreManager, org.duracloud.common.model.Securable
Constructor and Description |
---|
ContentStoreManagerImpl(String host,
String port)
Constructor for ContentStoreManagerImpl.
|
ContentStoreManagerImpl(String host,
String port,
String context)
Constructor for ContentStoreManagerImpl.
|
Modifier and Type | Method and Description |
---|---|
protected String |
getBaseURL() |
ContentStore |
getContentStore(String storeID)
Gets a specific content store based on ID.
|
ContentStore |
getContentStore(String storeID,
int maxRetries)
Gets a specific content store based on ID.
|
Map<String,ContentStore> |
getContentStores()
Gets all available content stores.
|
Map<String,ContentStore> |
getContentStores(int maxRetries)
Gets all available content stores.
|
ContentStore |
getPrimaryContentStore()
Gets the primary content store.
|
ContentStore |
getPrimaryContentStore(int maxRetries)
Gets the primary content store.
|
ContentStore |
getPrimaryContentStoreAsAnonymous()
Provides access to the primary content store without requiring login().
|
ContentStore |
getPrimaryContentStoreAsAnonymous(int maxRetries)
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) |
protected ContentStore |
newContentStoreImpl(org.duracloud.storage.domain.StorageAccount acct,
int maxRetries) |
void |
reinitialize(String host,
String port,
String context)
reconfigure
|
protected void |
setRestHelper(org.duracloud.common.web.RestHttpHelper restHelper) |
public ContentStoreManagerImpl(String host, String port)
Constructor for ContentStoreManagerImpl.
public ContentStoreManagerImpl(String host, String port, String context)
Constructor for ContentStoreManagerImpl.
host
- the host name on which DuraStore can be accessedport
- the port on which DuraStore can be accessedcontext
- the application context by which DuraStore can be accessedpublic void reinitialize(String host, String port, String context) throws ContentStoreException
ContentStoreManager
reconfigure
reinitialize
in interface ContentStoreManager
host
- of durastoreport
- of durastorecontext
- of durastoreContentStoreException
public Map<String,ContentStore> getContentStores() throws ContentStoreException
getContentStores
in interface ContentStoreManager
ContentStoreException
- if the content store list cannot be retrievedpublic Map<String,ContentStore> getContentStores(int maxRetries) throws ContentStoreException
getContentStores
in interface ContentStoreManager
maxRetries
- number of retries to perform if a content store call failsContentStoreException
- if the content store list cannot be retrievedpublic ContentStore getContentStore(String storeID) throws ContentStoreException
getContentStore
in interface ContentStoreManager
storeID
- the ID of a particular content storeContentStoreException
- if the content store cannot be retrievedpublic ContentStore getContentStore(String storeID, int maxRetries) throws ContentStoreException
getContentStore
in interface ContentStoreManager
storeID
- the ID of a particular content storemaxRetries
- number of retries to perform if a content store call failsContentStoreException
- if the content store cannot be retrievedpublic ContentStore getPrimaryContentStore() throws ContentStoreException
getPrimaryContentStore
in interface ContentStoreManager
ContentStoreException
public ContentStore getPrimaryContentStore(int maxRetries) throws ContentStoreException
getPrimaryContentStore
in interface ContentStoreManager
maxRetries
- number of retries to perform if a content store call failsContentStoreException
public ContentStore getPrimaryContentStoreAsAnonymous() throws ContentStoreException
getPrimaryContentStoreAsAnonymous
in interface ContentStoreManager
ContentStoreException
public ContentStore getPrimaryContentStoreAsAnonymous(int maxRetries) throws ContentStoreException
getPrimaryContentStoreAsAnonymous
in interface ContentStoreManager
maxRetries
- number of retries to perform if a content store call failsContentStoreException
public void login(org.duracloud.common.model.Credential appCred)
login
in interface org.duracloud.common.model.Securable
public void logout()
logout
in interface org.duracloud.common.model.Securable
protected ContentStore newContentStoreImpl(org.duracloud.storage.domain.StorageAccount acct)
protected ContentStore newContentStoreImpl(org.duracloud.storage.domain.StorageAccount acct, int maxRetries)
protected String getBaseURL()
protected org.duracloud.common.web.RestHttpHelper getRestHelper()
protected void setRestHelper(org.duracloud.common.web.RestHttpHelper restHelper)
Copyright © 2009–2014 DuraSpace. All rights reserved.