public class MockContentStoreProvider extends Object implements ContentStoreProvider
| Modifier and Type | Class and Description |
|---|---|
protected class |
MockContentStoreProvider.MemoryContentPointer
memory content pointer.
|
| Modifier and Type | Field and Description |
|---|---|
protected static Map<String,MockContentStoreProvider.MemoryContentPointer> |
map
Map of id to stream.
|
DEFAULT_NAMESPACE, description| Constructor and Description |
|---|
MockContentStoreProvider() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(String namespace,
String id,
InputStream in)
Content will be copied from the InputStream and stored within the
namespace under the id. |
boolean |
contains(String namespace,
String id) |
void |
delete(String namespace,
String id)
Deletes
id from the namespace. |
void |
deleteAll(String namespace)
Deletes all content from the store within the namespace
|
String |
externalize(String storeName,
String id)
Returns an externally accessible URI for the content suitable for HTTP GET.
|
InputStream |
get(String namespace,
String id)
Returns an InputStream to access the content.
|
long |
getDiskUtilization() |
long |
getLastModified(String namespace,
String id) |
List<String> |
getNamespaces() |
long |
getSize(String namespace,
String id) |
long |
getTotalRecords(String namespace) |
protected static final Map<String,MockContentStoreProvider.MemoryContentPointer> map
public boolean contains(String namespace, String id) throws AttivioException
contains in interface ContentStoreProvidernamespace - the namespace for the contentid - the id of the contentid exists within the namespaceAttivioExceptionpublic void add(String namespace, String id, InputStream in) throws AttivioException
namespace under the id. If the content
currently exists, it will be replaced. The stream is not closed.add in interface ContentStoreProvidernamespace - the namespace for the contentid - the id of the contentin - stream containing the content.AttivioExceptionpublic void delete(String namespace, String id) throws AttivioException
id from the namespace. The content need not be present.delete in interface ContentStoreProvidernamespace - the namespace for the contentid - the id of the contentAttivioExceptionpublic void deleteAll(String namespace) throws AttivioException
deleteAll in interface ContentStoreProvidernamespace - the namespace to deleteAttivioExceptionpublic long getTotalRecords(String namespace) throws AttivioException
getTotalRecords in interface ContentStoreProvidernamespace - the namespace to queryAttivioExceptionpublic InputStream get(String namespace, String id) throws AttivioException
get in interface ContentStoreProvidernamespace - the namespace for the contentid - the id of the contentnull if it does not existAttivioExceptionpublic long getSize(String namespace, String id) throws AttivioException
getSize in interface ContentStoreProvidernamespace - the namespace for the contentid - the id of the contentContentStoreProvider.get(String, String) should provide.AttivioExceptionpublic long getLastModified(String namespace, String id) throws AttivioException
getLastModified in interface ContentStoreProvidernamespace - the namespace for the contentid - the id of the contentContentStoreProvider.add(String, String, InputStream) for the content.AttivioExceptionpublic String externalize(String storeName, String id) throws AttivioException
externalize in interface ContentStoreProviderstoreName - namespace for the contentid - id for the contentAttivioExceptionpublic List<String> getNamespaces() throws AttivioException
getNamespaces in interface ContentStoreProviderAttivioExceptionpublic long getDiskUtilization()
throws AttivioException
getDiskUtilization in interface ContentStoreProviderAttivioExceptionCopyright © 2018 Attivio, Inc. All Rights Reserved.
PATENT NOTICE: Attivio, Inc. Software Related Patents. With respect to the Attivio software product(s) being used, the following patents apply: Querying Joined Data Within A Search Engine Index: United States Patent No.(s): 8,073,840. Ordered Processing of Groups of Messages: U.S. Patent No.(s) 8,495,656. Signal processing approach to sentiment analysis for entities in documents: U.S. Patent No.(s) 8,725,494. Other U.S. and International Patents Pending.