Package com.attivio.sdk.service
Class MockDocumentProcessorApi
- java.lang.Object
-
- com.attivio.sdk.service.MockDocumentProcessorApi
-
- All Implemented Interfaces:
DocumentProcessorApi
,ExposedApi
public class MockDocumentProcessorApi extends java.lang.Object implements DocumentProcessorApi
-
-
Constructor Summary
Constructors Constructor Description MockDocumentProcessorApi()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description IngestDocument
process(IngestDocument doc, java.lang.String workflowName)
Process a given document by running it through a given workflow.static void
registerWorkflow(java.lang.String name, MockDocumentProcessingWorkflow workflow)
Register a mock document processsing workflow to use for testing
-
-
-
Method Detail
-
registerWorkflow
public static void registerWorkflow(java.lang.String name, MockDocumentProcessingWorkflow workflow)
Register a mock document processsing workflow to use for testing- Parameters:
name
-workflow
-
-
process
public IngestDocument process(IngestDocument doc, java.lang.String workflowName) throws AttivioException
Description copied from interface:DocumentProcessorApi
Process a given document by running it through a given workflow.The specified workflow must contain only the following types of stages:
- A document transformer of type
DocumentModifyingTransformer
- A document transformer of type
FieldValueCreatingTransformer
- A document transformer of type
FieldValueModifyingTransformer
- Any workflow (other than index) that meets the same restrictions as the original workflow
NOTE: If the specified workflow contains any components using a non-default implementation of
ProcessingFeedbackDocumentTagger
, any processing errors that occur may not be handled correctly by this service- Specified by:
process
in interfaceDocumentProcessorApi
- Returns:
- the output document(s) as a list
- Throws:
AttivioException
- if thePlatformMessage
returned as a result of processing is not an instance ofDocumentList
with a singleIngestDocument
, if there is an error during processing, or if input workflow does not pass verification
- A document transformer of type
-
-