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 ContentStoreProvider
namespace
- the namespace for the contentid
- the id of the contentid
exists within the namespace
AttivioException
public 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 ContentStoreProvider
namespace
- the namespace for the contentid
- the id of the contentin
- stream containing the content.AttivioException
public void delete(String namespace, String id) throws AttivioException
id
from the namespace
. The content need not be present.delete
in interface ContentStoreProvider
namespace
- the namespace for the contentid
- the id of the contentAttivioException
public void deleteAll(String namespace) throws AttivioException
deleteAll
in interface ContentStoreProvider
namespace
- the namespace to deleteAttivioException
public long getTotalRecords(String namespace) throws AttivioException
getTotalRecords
in interface ContentStoreProvider
namespace
- the namespace to queryAttivioException
public InputStream get(String namespace, String id) throws AttivioException
get
in interface ContentStoreProvider
namespace
- the namespace for the contentid
- the id of the contentnull
if it does not existAttivioException
public long getSize(String namespace, String id) throws AttivioException
getSize
in interface ContentStoreProvider
namespace
- the namespace for the contentid
- the id of the contentContentStoreProvider.get(String, String)
should provide.AttivioException
public long getLastModified(String namespace, String id) throws AttivioException
getLastModified
in interface ContentStoreProvider
namespace
- the namespace for the contentid
- the id of the contentContentStoreProvider.add(String, String, InputStream)
for the content.AttivioException
public String externalize(String storeName, String id) throws AttivioException
externalize
in interface ContentStoreProvider
storeName
- namespace for the contentid
- id for the contentAttivioException
public List<String> getNamespaces() throws AttivioException
getNamespaces
in interface ContentStoreProvider
AttivioException
public long getDiskUtilization() throws AttivioException
getDiskUtilization
in interface ContentStoreProvider
AttivioException
Copyright © 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.