Package com.attivio.sdk.esb
Class ProcessingResult
- java.lang.Object
-
- com.attivio.sdk.esb.ProcessingResult
-
- All Implemented Interfaces:
java.io.Serializable
public class ProcessingResult extends java.lang.Object implements java.io.SerializableA ProcessingResult at a minimum contains the result Code of a document processing step. The ProcessingResult may contain an arbitrary status message. Additionally a ProcessingResult may contain new auxiliary messages (ProcessingResult#addMessage(PlatformMessage)or new documents derived from the processing step (ProcessingResult#addDocument(IngestDocument).Generally a processing step will only set a Code however more complex stages such as those that process archive files may produce new documents and messages.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classProcessingResult.Datastatic classProcessingResult.DocDatastatic classProcessingResult.MsgData
-
Constructor Summary
Constructors Constructor Description ProcessingResult()Convenience constructor.ProcessingResult(java.util.UUID clientId, java.lang.String component)Creates a new Processing result.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidadd(ProcessingResult.DocData dd)voidaddDocumentData(ProcessingResult.DocData dd)voidaddMessageData(ProcessingResult.MsgData md)voidcompleted(PlatformMessage pm)voidcompleted(IngestDocument doc)voidcreated(PlatformMessage pm)Deprecated.voiddebug(IngestDocument doc, java.lang.String msg)voiddrop(PlatformMessage pm)voiddrop(PlatformMessage pm, ErrorCode errorCode, java.lang.String msg)voiddrop(PlatformMessage pm, ErrorCode errorCode, java.lang.Throwable t)voiddrop(PlatformMessage pm, ErrorCode errorCode, java.lang.Throwable t, java.lang.String msg)voiddrop(IngestDocument doc)voiddrop(IngestDocument doc, ErrorCode errorCode)voiddrop(IngestDocument doc, java.lang.String msg)voiddrop(IngestDocument doc, java.lang.Throwable t)booleanequals(java.lang.Object obj)voiderror(IngestDocument doc, java.lang.Throwable e, java.lang.String msg)static java.lang.String[]errorContexts(java.lang.String message)voidfail(PlatformMessage pm, AttivioException ex)voidfail(PlatformMessage pm, ErrorCode errorCode, java.lang.String msg)voidfail(PlatformMessage pm, ErrorCode errorCode, java.lang.Throwable t, java.lang.String msg)voidfail(PlatformMessage pm, java.lang.Throwable t)voidfail(IngestDocument doc)voidfail(IngestDocument doc, ErrorCode errorCode, java.lang.Throwable e)voidfail(IngestDocument doc, ErrorCode defaultErrorCode, java.lang.Throwable e, java.lang.String msg)voidfail(IngestDocument doc, java.lang.String msg)voidfail(IngestDocument doc, java.lang.Throwable e)static java.lang.StringformatError(ErrorCode error, java.lang.String message)Format context-awaremessageforerror.java.util.UUIDgetClientId()ProcessingResultCodegetCode(java.lang.String docId)Returns the worst code as determined by the ordinal of theProcessingResultCode.java.lang.StringgetComponent()java.util.List<ProcessingResult.DocData>getDocData()java.util.List<ProcessingResult.MsgData>getMsgData()inthashCode()voidlost(IngestDocument doc)voidmerge(ProcessingResult pr)voidnotHandled(PlatformMessage pm)voidnotHandled(PlatformMessage pm, ErrorCode errorCode, java.lang.Throwable t)voidnotHandled(IngestDocument doc)voidreset()voidsetClientId(java.util.UUID value)voidsetCurrentDocument(IngestDocument currentDocument)Convenience function to set the current document context.java.lang.StringtoString()voidwarn(PlatformMessage pm, ErrorCode errorCode, java.lang.Throwable t, java.lang.String msg)voidwarn(IngestDocument doc, ErrorCode errorCode, java.lang.String msg, java.lang.Object... args)voidwarn(IngestDocument doc, ErrorCode defaultErrorCode, java.lang.Throwable e, java.lang.String msg)voidwarn(IngestDocument doc, java.lang.Throwable e)voidwarn(IngestDocument doc, java.lang.Throwable e, java.lang.String msg, java.lang.Object... args)
-
-
-
Constructor Detail
-
ProcessingResult
public ProcessingResult()
Convenience constructor.This form should only be used when it will be merged with another result which has the clientId and component set.
-
ProcessingResult
public ProcessingResult(java.util.UUID clientId, java.lang.String component)Creates a new Processing result. A processing result with no message or document actions will be treated as an OK result.
-
-
Method Detail
-
formatError
public static java.lang.String formatError(ErrorCode error, java.lang.String message)
Format context-awaremessageforerror.
-
errorContexts
public static java.lang.String[] errorContexts(java.lang.String message)
-
created
@Deprecated public void created(PlatformMessage pm)
Deprecated.
-
drop
public void drop(PlatformMessage pm)
-
drop
public void drop(PlatformMessage pm, ErrorCode errorCode, java.lang.Throwable t)
-
drop
public void drop(PlatformMessage pm, ErrorCode errorCode, java.lang.String msg)
-
drop
public void drop(PlatformMessage pm, ErrorCode errorCode, java.lang.Throwable t, java.lang.String msg)
-
fail
public void fail(PlatformMessage pm, ErrorCode errorCode, java.lang.String msg)
-
fail
public void fail(PlatformMessage pm, java.lang.Throwable t)
-
fail
public void fail(PlatformMessage pm, AttivioException ex)
-
fail
public void fail(PlatformMessage pm, ErrorCode errorCode, java.lang.Throwable t, java.lang.String msg)
-
warn
public void warn(PlatformMessage pm, ErrorCode errorCode, java.lang.Throwable t, java.lang.String msg)
-
notHandled
public void notHandled(PlatformMessage pm)
-
notHandled
public void notHandled(PlatformMessage pm, ErrorCode errorCode, java.lang.Throwable t)
-
completed
public void completed(PlatformMessage pm)
-
debug
public void debug(IngestDocument doc, java.lang.String msg)
-
drop
public void drop(IngestDocument doc)
-
drop
public void drop(IngestDocument doc, ErrorCode errorCode)
-
drop
public void drop(IngestDocument doc, java.lang.String msg)
-
lost
public void lost(IngestDocument doc)
-
drop
public void drop(IngestDocument doc, java.lang.Throwable t)
-
notHandled
public void notHandled(IngestDocument doc)
-
error
public void error(IngestDocument doc, java.lang.Throwable e, java.lang.String msg)
-
warn
public void warn(IngestDocument doc, java.lang.Throwable e)
-
warn
public void warn(IngestDocument doc, java.lang.Throwable e, java.lang.String msg, java.lang.Object... args)
-
warn
public void warn(IngestDocument doc, ErrorCode errorCode, java.lang.String msg, java.lang.Object... args)
-
warn
public void warn(IngestDocument doc, ErrorCode defaultErrorCode, java.lang.Throwable e, java.lang.String msg)
-
fail
public void fail(IngestDocument doc)
-
fail
public void fail(IngestDocument doc, java.lang.String msg)
-
fail
public void fail(IngestDocument doc, java.lang.Throwable e)
-
fail
public void fail(IngestDocument doc, ErrorCode errorCode, java.lang.Throwable e)
-
fail
public void fail(IngestDocument doc, ErrorCode defaultErrorCode, java.lang.Throwable e, java.lang.String msg)
-
completed
public void completed(IngestDocument doc)
-
reset
public void reset()
-
merge
public void merge(ProcessingResult pr)
-
addDocumentData
public void addDocumentData(ProcessingResult.DocData dd)
-
addMessageData
public void addMessageData(ProcessingResult.MsgData md)
-
getClientId
public java.util.UUID getClientId()
-
setClientId
public void setClientId(java.util.UUID value)
-
getComponent
public java.lang.String getComponent()
-
getMsgData
public java.util.List<ProcessingResult.MsgData> getMsgData()
-
getDocData
public java.util.List<ProcessingResult.DocData> getDocData()
-
getCode
public ProcessingResultCode getCode(java.lang.String docId)
Returns the worst code as determined by the ordinal of theProcessingResultCode.- Parameters:
docId-- Returns:
- the "worst" code for the
docIdin the results orProcessingResultCode.OK.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
add
public void add(ProcessingResult.DocData dd)
-
setCurrentDocument
public void setCurrentDocument(IngestDocument currentDocument)
Convenience function to set the current document context. This is useful in cases where the code providing feedback or warnings is not passed the document but perhaps a part of it such as a field. If any of the document oriented methods is passed anullin place of the document, thecurrentDocumentis used. ThecurrentDocumentis cleared when thereset()method is called.A
nullparameter sets the current values tonull.- Parameters:
currentDocument- may be null
-
-