Package org.imixs.archive.importer
Class DocumentImportEvent
- java.lang.Object
-
- org.imixs.archive.importer.DocumentImportEvent
-
public class DocumentImportEvent extends Object
The DocumentImportEvent provides a CDI observer pattern. The DocumentImportEvent is fired by the DocumentImportScheduler EJB. An event Observer can react on this event to process imports form a external data source.The DocumentImportEvent contains the property 'source' with a description of the data source. The source object provides the following items:
- type - type of the data source (e.g. FTP, IMAP, ...)
- server - server name of the data source
- port - optional server port
- userId - optional userId to access the server
- password - optional password to access the server
- workflowGroup - the workflow group a new document should be assigned to.
The property 'result' indicates if the source was processed completely or if the source can be processed by the next processor. The result is evaluated by the DocumentImportScheduler service.
If the data source was completely processed by the adapter the adapter should return the processing result PROCESSING_COMPLETED = 1 . Otherwise PROCESSING_OUTSTANDING = 0.
An adapter can signal an error by setting the processing result to PROCESSING_ERROR = 2 . The property 'message' can be filled with a error message text.
- Version:
- 1.0
- Author:
- Ralph Soika
- See Also:
SetupService
-
-
Field Summary
Fields Modifier and Type Field Description static intPROCESSING_COMPLETEDstatic intPROCESSING_ERRORstatic intPROCESSING_OUTSTANDING
-
Constructor Summary
Constructors Constructor Description DocumentImportEvent(org.imixs.workflow.ItemCollection source)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappendMessage(String message)List<String>getMessages()intgetResult()org.imixs.workflow.ItemCollectiongetSource()voidsetMessages(List<String> messages)voidsetResult(int result)
-
-
-
Field Detail
-
PROCESSING_OUTSTANDING
public static final int PROCESSING_OUTSTANDING
- See Also:
- Constant Field Values
-
PROCESSING_COMPLETED
public static final int PROCESSING_COMPLETED
- See Also:
- Constant Field Values
-
PROCESSING_ERROR
public static final int PROCESSING_ERROR
- See Also:
- Constant Field Values
-
-
Method Detail
-
getSource
public org.imixs.workflow.ItemCollection getSource()
-
getResult
public int getResult()
-
setResult
public void setResult(int result)
-
appendMessage
public void appendMessage(String message)
-
-