Package com.attivio.client
Class LazyContentStoreClient
- java.lang.Object
-
- com.attivio.client.LazyContentStoreClient
-
- All Implemented Interfaces:
ContentStoreClient,java.io.Closeable,java.lang.AutoCloseable
public class LazyContentStoreClient extends java.lang.Object implements ContentStoreClient, java.io.Closeable
AContentStoreClientthat does not get created until one of its methods is used.
-
-
Field Summary
-
Fields inherited from interface com.attivio.sdk.client.ContentStoreClient
DEFAULT_NAMESPACE, GET_EXTERNAL_URI, OK_STORE_RESPONSE
-
-
Constructor Summary
Constructors Constructor Description LazyContentStoreClient()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()booleancontains(java.lang.String id)True if the content store has a stream for this id.voiddelete(java.lang.String id)Delete a record by id from the content store.voiddeleteAll()Delete all content in the content store.longgetTotalRecords()Get the total number of records in the content store.ContentPointerretrieve(java.lang.String id)Retrieve a ContentPointer in the ContentStore.voidsetNamespace(java.lang.String namespace)Sets the namespace all ids will be stored in.ContentPointerstore(java.lang.String id, InputStreamBuilder input)Store a ContentPointer in the ContentStore.
-
-
-
Method Detail
-
setNamespace
public void setNamespace(java.lang.String namespace)
Sets the namespace all ids will be stored in. Defaults to "content".- Specified by:
setNamespacein interfaceContentStoreClient
-
store
public ContentPointer store(java.lang.String id, InputStreamBuilder input) throws AttivioException
Store a ContentPointer in the ContentStore.- Specified by:
storein interfaceContentStoreClient- Throws:
AttivioException
-
retrieve
public ContentPointer retrieve(java.lang.String id) throws AttivioException
Retrieve a ContentPointer in the ContentStore.- Specified by:
retrievein interfaceContentStoreClient- Returns:
- the ContentPointer or null if
idis not in the store. - Throws:
AttivioException
-
delete
public void delete(java.lang.String id) throws AttivioExceptionDelete a record by id from the content store.- Specified by:
deletein interfaceContentStoreClient- Throws:
AttivioException
-
deleteAll
public void deleteAll() throws AttivioExceptionDelete all content in the content store.- Specified by:
deleteAllin interfaceContentStoreClient- Throws:
AttivioException
-
getTotalRecords
public long getTotalRecords() throws AttivioExceptionGet the total number of records in the content store.- Specified by:
getTotalRecordsin interfaceContentStoreClient- Throws:
AttivioException
-
contains
public boolean contains(java.lang.String id) throws AttivioExceptionTrue if the content store has a stream for this id.- Specified by:
containsin interfaceContentStoreClient- Throws:
AttivioException
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
-