Package org.copperengine.core.audit
Class MockAuditTrail
- java.lang.Object
-
- org.copperengine.core.audit.MockAuditTrail
-
- All Implemented Interfaces:
AuditTrail
public class MockAuditTrail extends java.lang.Object implements AuditTrail
Mock implementation of an audit trail.
-
-
Constructor Summary
Constructors Constructor Description MockAuditTrail()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
asynchLog(int logLevel, java.util.Date occurrence, java.lang.String conversationId, java.lang.String context, java.lang.String instanceId, java.lang.String correlationId, java.lang.String transactionId, java.lang.String message, java.lang.String messageType)
void
asynchLog(int logLevel, java.util.Date occurrence, java.lang.String conversationId, java.lang.String context, java.lang.String instanceId, java.lang.String correlationId, java.lang.String transactionId, java.lang.String message, java.lang.String messageType, AuditTrailCallback cb)
void
asynchLog(AuditTrailEvent e)
void
asynchLog(AuditTrailEvent e, AuditTrailCallback cb)
int
getLevel()
boolean
isEnabled(int level)
void
setLevel(int level)
void
synchLog(int logLevel, java.util.Date occurrence, java.lang.String conversationId, java.lang.String context, java.lang.String instanceId, java.lang.String correlationId, java.lang.String transactionId, java.lang.String message, java.lang.String messageType)
writes an event to the audit trail log and returns after the log message is written to the underlying storage.void
synchLog(AuditTrailEvent e)
writes an event to the audit trail log and returns after the log message is written to the underlying storage.
-
-
-
Method Detail
-
setLevel
public void setLevel(int level)
- Specified by:
setLevel
in interfaceAuditTrail
-
isEnabled
public boolean isEnabled(int level)
- Specified by:
isEnabled
in interfaceAuditTrail
-
synchLog
public void synchLog(int logLevel, java.util.Date occurrence, java.lang.String conversationId, java.lang.String context, java.lang.String instanceId, java.lang.String correlationId, java.lang.String transactionId, java.lang.String message, java.lang.String messageType)
Description copied from interface:AuditTrail
writes an event to the audit trail log and returns after the log message is written to the underlying storage.- Specified by:
synchLog
in interfaceAuditTrail
- Parameters:
logLevel
- the level on that the audit trail event is recorded (might be used for filtering)occurrence
- timestamp of the audit trail eventconversationId
- conversation id embraces all audit trail events for one business process (might be the same for a whole business transaction over a range of involved systems)context
- the context of the audit trail event (e.g. a camel route, a workflow task, ...)instanceId
- workflow id for a single workflowcorrelationId
- correlates a request response pair (e.g. workflow calls another workflow, workflow calls a camel route, ...)transactionId
- Same ID vor several conversations, that belongs to the same transaction. Example: ExecuteOrder (conversation 1), ChangeOrder (conversation 2) and CancelOrder (conversation 3) that all belongs to transaction 77. When transaction 77 can be deleted, all conversations for this transaction can be deleted.message
- a message describing the audit trail eventmessageType
- type of the message, e.g. XML, used for message rendering in the COPPER monitor
-
asynchLog
public void asynchLog(int logLevel, java.util.Date occurrence, java.lang.String conversationId, java.lang.String context, java.lang.String instanceId, java.lang.String correlationId, java.lang.String transactionId, java.lang.String message, java.lang.String messageType)
-
asynchLog
public void asynchLog(int logLevel, java.util.Date occurrence, java.lang.String conversationId, java.lang.String context, java.lang.String instanceId, java.lang.String correlationId, java.lang.String transactionId, java.lang.String message, java.lang.String messageType, AuditTrailCallback cb)
-
getLevel
public int getLevel()
- Specified by:
getLevel
in interfaceAuditTrail
-
asynchLog
public void asynchLog(AuditTrailEvent e)
-
asynchLog
public void asynchLog(AuditTrailEvent e, AuditTrailCallback cb)
-
synchLog
public void synchLog(AuditTrailEvent e)
Description copied from interface:AuditTrail
writes an event to the audit trail log and returns after the log message is written to the underlying storage.- Specified by:
synchLog
in interfaceAuditTrail
- Parameters:
e
- the AuditTrailEvent to be logged
-
-