Package org.imixs.archive.importer
Class DocumentImportEvent
java.lang.Object
org.imixs.archive.importer.DocumentImportEvent
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
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidappendMessage(String message) intorg.imixs.workflow.ItemCollectionvoidsetMessages(List<String> messages) voidsetResult(int result)
-
Field Details
-
PROCESSING_OUTSTANDING
public static final int PROCESSING_OUTSTANDING- See Also:
-
PROCESSING_COMPLETED
public static final int PROCESSING_COMPLETED- See Also:
-
PROCESSING_ERROR
public static final int PROCESSING_ERROR- See Also:
-
-
Constructor Details
-
DocumentImportEvent
public DocumentImportEvent(org.imixs.workflow.ItemCollection source)
-
-
Method Details
-
getSource
public org.imixs.workflow.ItemCollection getSource() -
getResult
public int getResult() -
setResult
public void setResult(int result) -
appendMessage
-
getMessages
-
setMessages
-