org.jcoderz.commons
Class AuditLogEvent

java.lang.Object
  extended by java.lang.Throwable
      extended by org.jcoderz.commons.LogEvent
          extended by org.jcoderz.commons.AuditLogEvent
All Implemented Interfaces:
Serializable, Loggable

public class AuditLogEvent
extends LogEvent

This is the base class for audit log events.

The base class of this AuditLogEvent is Throwable but instances of this class are not expected to be thrown.

Most functionality is implemented and documented by the LoggableImpl which is used a member of objects of this class.

Author:
Andreas Mandel, Michael Griffel
See Also:
org.jcoderz.commons, Serialized Form

Field Summary
static String AUDIT_PRINCIPAL_PARAMETER_NAME
          Key used for the audit principal parameter object.
 
Constructor Summary
AuditLogEvent(LogMessageInfo messageInfo, AuditPrincipal principal)
          Constructor to create a AuditLogEvent instance with the minimum mandatory parameters.
AuditLogEvent(LogMessageInfo messageInfo, AuditPrincipal principal, Throwable cause)
          Constructor to create a AuditLogEvent instance with a given root cause.
 
Method Summary
 boolean equals(Object obj)
          Indicates whether some other object is "equal to" this one.
 AuditPrincipal getAuditPrincipal()
          Returns the audit principal of this audit log event.
 int hashCode()
          Override hashCode.
 
Methods inherited from class org.jcoderz.commons.LogEvent
addParameter, getCause, getEventTime, getInstanceId, getLogMessageInfo, getMessage, getNodeId, getParameter, getParameterNames, getSourceClass, getSourceMethod, getThreadId, getThreadName, getTrackingNumber, initCause, log, toDetailedString, toString
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getStackTrace, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

AUDIT_PRINCIPAL_PARAMETER_NAME

public static final String AUDIT_PRINCIPAL_PARAMETER_NAME
Key used for the audit principal parameter object.

See Also:
Constant Field Values
Constructor Detail

AuditLogEvent

public AuditLogEvent(LogMessageInfo messageInfo,
                     AuditPrincipal principal)
Constructor to create a AuditLogEvent instance with the minimum mandatory parameters.

Parameters:
messageInfo - the log message info of this audit log event.
principal - the audit principal that cause this audit log event.

AuditLogEvent

public AuditLogEvent(LogMessageInfo messageInfo,
                     AuditPrincipal principal,
                     Throwable cause)
Constructor to create a AuditLogEvent instance with a given root cause.

Parameters:
messageInfo - the log message info of this audit log event.
principal - the audit principal that cause this audit log event.
cause - the cause of this audit log event.
Method Detail

getAuditPrincipal

public final AuditPrincipal getAuditPrincipal()
Returns the audit principal of this audit log event.

Returns:
the audit principal of this audit log event.

equals

public boolean equals(Object obj)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class Object
Parameters:
obj - the object to compare to.
Returns:
true if this object is the same as the obj argument; false otherwise.

hashCode

public int hashCode()
Override hashCode.

Overrides:
hashCode in class Object
Returns:
the Object's hashcode.


Copyright 2007 The jCoderZ Project.