Package com.attivio.sdk.client
Interface DocumentStoreApi
-
- All Known Implementing Classes:
MockDocumentStore
public interface DocumentStoreApiClient to the AIE document store (currently available only within an AIE node process).DocumentStoreClients may be used within components by creating a private DocumentStoreClient field and setting the Spring @Autowired annotation on it.
$Revision$
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCONTENT_STORE_NAMESPACE_PREFIXthe prefix for the content store namespace used when storing content pointers.static java.util.List<java.lang.String>DEFAULT_FILTER_FIELDS
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddelete(java.lang.String namespace, java.lang.String docId)Deletes the document from the specified collectionjava.lang.Iterable<IngestDocument>filteredRetrieve(java.lang.String namespace, java.util.Map<java.lang.String,java.lang.String> filters)Finds and returns the documents matching the provided equality filters.IngestDocumentretrieve(java.lang.String namespace, java.lang.String docId)voidstore(java.lang.String namespace, IngestDocument doc, java.util.List<java.lang.String> filterFields, boolean storeContentPointers)Stores the document innamespace, creating indexes which allow equality filtering on the list of fields provided.IngestDocumentstoreAndUpdate(java.lang.String namespace, IngestDocument doc, java.util.List<java.lang.String> filterFields, boolean storeContentPointers)Stores the document innamespace, creating indexes which allow equality filtering on the list of fields provided.
-
-
-
Field Detail
-
CONTENT_STORE_NAMESPACE_PREFIX
static final java.lang.String CONTENT_STORE_NAMESPACE_PREFIX
the prefix for the content store namespace used when storing content pointers. if a document is stored in namespace 'collection1', then stored content pointers will be placed in the content store under namespaceCONTENT_STORE_NAMESPACE_PREFIX+".collection1".- See Also:
- Constant Field Values
-
DEFAULT_FILTER_FIELDS
static final java.util.List<java.lang.String> DEFAULT_FILTER_FIELDS
-
-
Method Detail
-
delete
void delete(java.lang.String namespace, java.lang.String docId) throws AttivioExceptionDeletes the document from the specified collection- Parameters:
namespace-docId-- Throws:
AttivioException
-
retrieve
IngestDocument retrieve(java.lang.String namespace, java.lang.String docId) throws AttivioException
- Parameters:
namespace-docId-- Returns:
- the store document or null if it does not exist in the collection
- Throws:
AttivioException
-
store
void store(java.lang.String namespace, IngestDocument doc, java.util.List<java.lang.String> filterFields, boolean storeContentPointers) throws AttivioExceptionStores the document innamespace, creating indexes which allow equality filtering on the list of fields provided. Only the first value any multi-valued fields is available for filtering. The document may be temporarily altered during invocation. If the document mode is set to PARTIAL, the document will first be retrieved, updated with any fields fromdoc, then stored. If the document mode is set to ADD, any existing version of the document will be replaced.The input document is always unmodified upon return.
- Parameters:
namespace-doc-filterFields-storeContentPointers- if false, content associated with content pointers will not be stored and upon retrieval the content may no longer be present.- Throws:
AttivioExceptionjava.lang.IllegalArgumentException- for document modes other than PARTIAL and ADD
-
storeAndUpdate
IngestDocument storeAndUpdate(java.lang.String namespace, IngestDocument doc, java.util.List<java.lang.String> filterFields, boolean storeContentPointers) throws AttivioException
Stores the document innamespace, creating indexes which allow equality filtering on the list of fields provided. Only the first value any multi-valued fields is available for filtering. The document may be temporarily altered during invocation. If the document mode is set to PARTIAL, the document will first be retrieved, updated with any fields fromdoc, then stored. It will then be modified and returned (to support remote API calls). The returned document will always have its document mode set to ADD if it had been PARTIAL, regardless of whether or not it had ever been stored.If the document mode is set to ADD, any existing version of the document will be replaced and the returned document will be the original document.
- Parameters:
namespace-doc-filterFields-storeContentPointers- if false, content associated with content pointers will not be stored and upon retrieval the content may not be present.- Returns:
- the updated document or original if mode was not PARTIAL
- Throws:
AttivioExceptionjava.lang.IllegalArgumentException- for document modes other than PARTIAL and ADD
-
filteredRetrieve
java.lang.Iterable<IngestDocument> filteredRetrieve(java.lang.String namespace, java.util.Map<java.lang.String,java.lang.String> filters) throws AttivioException
Finds and returns the documents matching the provided equality filters. These filters must have been established during storage of documents in the collection.- Parameters:
namespace-filters-- Returns:
- an iterable over the matching documents
- Throws:
AttivioException
-
-