Package org.duracloud.client
Class ContentStoreManagerImpl
java.lang.Object
org.duracloud.client.ContentStoreManagerImpl
- All Implemented Interfaces:
ContentStoreManager,Securable
- Direct Known Subclasses:
CachingContentStoreManagerImpl
Provides facilities for connecting to a set of content stores
- Author:
- Bill Branan
-
Constructor Summary
ConstructorsConstructorDescriptionContentStoreManagerImpl(String host, String port) Constructor for ContentStoreManagerImpl.ContentStoreManagerImpl(String host, String port, String context) ContentStoreManagerImpl(String host, String port, String context, int socketTimeoutMs) Constructor for ContentStoreManagerImpl. -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetContentStore(String storeID) Gets a specific content store based on ID.getContentStore(String storeID, int maxRetries) Gets a specific content store based on ID.Gets all available content stores.getContentStores(int maxRetries) Gets all available content stores.Gets the primary content store.getPrimaryContentStore(int maxRetries) Gets the primary content store.Provides access to the primary content store without requiring login().getPrimaryContentStoreAsAnonymous(int maxRetries) Provides access to the primary content store without requiring login().protected RestHttpHelperprotected booleanisWritable(StorageAccount acct) voidlogin(Credential appCred) voidlogout()protected ContentStoreprotected ContentStorenewContentStoreImpl(StorageAccount acct, int maxRetries) voidreinitialize(String host, String port, String context) reconfigureprotected voidsetRestHelper(RestHttpHelper restHelper)
-
Constructor Details
-
ContentStoreManagerImpl
Constructor for ContentStoreManagerImpl.
-
ContentStoreManagerImpl
-
ContentStoreManagerImpl
Constructor for ContentStoreManagerImpl.
- Parameters:
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 accessedsocketTimeoutMs- The socket timeout in milliseconds. A value less than zero indicates no timeout.
-
-
Method Details
-
reinitialize
Description copied from interface:ContentStoreManagerreconfigure
- Specified by:
reinitializein interfaceContentStoreManager- Parameters:
host- of durastoreport- of durastorecontext- of durastore- Throws:
ContentStoreException
-
getContentStores
Gets all available content stores. Each content store uses the default number of retries (3) on call failure.- Specified by:
getContentStoresin interfaceContentStoreManager- Returns:
- a map of content stores to content store IDs
- Throws:
ContentStoreException- if the content store list cannot be retrieved
-
getContentStores
Gets all available content stores.- Specified by:
getContentStoresin interfaceContentStoreManager- Parameters:
maxRetries- number of retries to perform if a content store call fails- Returns:
- a map of content stores to content store IDs
- Throws:
ContentStoreException- if the content store list cannot be retrieved
-
getContentStore
Gets a specific content store based on ID. Content store uses the default number of retries (3) on call failure.- Specified by:
getContentStorein interfaceContentStoreManager- Parameters:
storeID- the ID of a particular content store- Returns:
- the ContentStore mapped to storeID
- Throws:
ContentStoreException- if the content store cannot be retrieved
-
getContentStore
Gets a specific content store based on ID.- Specified by:
getContentStorein interfaceContentStoreManager- Parameters:
storeID- the ID of a particular content storemaxRetries- number of retries to perform if a content store call fails- Returns:
- the ContentStore mapped to storeID
- Throws:
ContentStoreException- if the content store cannot be retrieved
-
getPrimaryContentStore
Gets the primary content store. Content store uses the default number of retries (3) on call failure.- Specified by:
getPrimaryContentStorein interfaceContentStoreManager- Returns:
- the primary ContentStore
- Throws:
ContentStoreException
-
getPrimaryContentStore
Gets the primary content store.- Specified by:
getPrimaryContentStorein interfaceContentStoreManager- Parameters:
maxRetries- number of retries to perform if a content store call fails- Returns:
- the primary ContentStore
- Throws:
ContentStoreException
-
getPrimaryContentStoreAsAnonymous
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. Content store uses the default number of retries (3) on call failure.- Specified by:
getPrimaryContentStoreAsAnonymousin interfaceContentStoreManager- Returns:
- the primary ContentStore
- Throws:
ContentStoreException
-
getPrimaryContentStoreAsAnonymous
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.- Specified by:
getPrimaryContentStoreAsAnonymousin interfaceContentStoreManager- Parameters:
maxRetries- number of retries to perform if a content store call fails- Returns:
- the primary ContentStore
- Throws:
ContentStoreException
-
login
-
logout
public void logout() -
newContentStoreImpl
-
isWritable
-
newContentStoreImpl
-
getBaseURL
-
getRestHelper
-
setRestHelper
-