Interface DocumentFetchRequest
-
public interface DocumentFetchRequest
This interface is implemented by the scanner. The scanner will queue an implementation of thisDocumentFetchRequest
interface for each document it wants to ingest. The connector framework will callgetDocument()
and#getAcl()
concurrently for multipleDocumentFetchRequest
objects and publish the documents.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
cancel()
Cancel fetching if possible.DocumentAndAcl
getDocument()
Called by the framework to get the generated document.java.lang.String
name()
A name that identifies the document, typically a URL.void
published()
This is called by the framework to let the fetcher know the document is published.void
setContentStoreAccess(ContentStoreAccess contentStoreAccess)
ContentStoreAccess
is used by the fetcher to store content in the content store.
-
-
-
Method Detail
-
setContentStoreAccess
void setContentStoreAccess(ContentStoreAccess contentStoreAccess)
ContentStoreAccess
is used by the fetcher to store content in the content store.- Parameters:
contentStoreAccess
-
-
getDocument
DocumentAndAcl getDocument() throws AttivioException
Called by the framework to get the generated document. MultipleDocumentFetchRequest
objects will be queued by the scanner and their getDocument methods will be called concurrently by the framework's thread pool.- Returns:
- the generated document and optionally the generated ACL (null can be returned if the request was canceled)
- Throws:
AttivioException
- if document generation has failed
-
name
java.lang.String name()
A name that identifies the document, typically a URL.- Returns:
- name
-
cancel
void cancel()
Cancel fetching if possible. This method should not block.
-
published
void published()
This is called by the framework to let the fetcher know the document is published. It can be used, for example, to report IngestionHistoryApi that the document was published.
-
-