public class MockContentStoreClient extends Object implements ContentStoreClient
reset() be called after each test.| Modifier and Type | Class and Description |
|---|---|
protected class |
MockContentStoreClient.MemoryContentPointer
memory content pointer.
|
| Modifier and Type | Field and Description |
|---|---|
protected static Map<String,MockContentStoreClient.MemoryContentPointer> |
map
Map of id to stream.
|
DEFAULT_NAMESPACE, GET_EXTERNAL_URI, OK_STORE_RESPONSE| Constructor and Description |
|---|
MockContentStoreClient() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(String id)
True if the content store has a stream for this id.
|
void |
delete(String id)
Delete a record by id from the content store.
|
void |
deleteAll()
Delete all content in the content store.
|
protected static void |
ensureWebServer() |
long |
getTotalRecords()
Get the total number of records in the content store.
|
static void |
reset()
Resets the content store client, clearing the map of content and stopping the webServer.
|
ContentPointer |
retrieve(String id)
Retrieve a ContentPointer in the ContentStore.
|
void |
setNamespace(String namespace)
Sets the namespace all ids will be stored in.
|
ContentPointer |
store(String id,
InputStreamBuilder input)
Store a ContentPointer in the ContentStore.
|
protected static final Map<String,MockContentStoreClient.MemoryContentPointer> map
public static void reset()
public ContentPointer retrieve(String id) throws AttivioException
Retrieve a ContentPointer in the ContentStore.
retrieve in interface ContentStoreClientid is not in the store.AttivioExceptionpublic ContentPointer store(String id, InputStreamBuilder input) throws AttivioException
store in interface ContentStoreClientAttivioExceptionpublic void delete(String id) throws AttivioException
delete in interface ContentStoreClientAttivioExceptionpublic void deleteAll()
throws AttivioException
deleteAll in interface ContentStoreClientAttivioExceptionpublic long getTotalRecords()
getTotalRecords in interface ContentStoreClientpublic boolean contains(String id)
contains in interface ContentStoreClientpublic void setNamespace(String namespace)
setNamespace in interface ContentStoreClientCopyright © 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.