public final class AuditEvent
extends java.util.EventObject
I'm not very satisfied about the design of this event since there are optional methods that will return null in most of the case. This will need some work to clean it up especially if we want to introduce a more sequential reporting action rather than a packet error reporting. This will allow for example to follow the process quickly in an interface or a servlet (yep, that's cool to run a check via a web interface in a source repository ;-)
AuditListener
,
Serialized FormModifier and Type | Field and Description |
---|---|
private java.lang.String |
fileName
Filename event associated with.
|
private LocalizedMessage |
localizedMessage
Message associated with the event.
|
private static long |
serialVersionUID
Record a version.
|
Constructor and Description |
---|
AuditEvent(java.lang.Object source)
Creates a new instance.
|
AuditEvent(java.lang.Object src,
java.lang.String fileName)
Creates a new
AuditEvent instance. |
AuditEvent(java.lang.Object src,
java.lang.String fileName,
LocalizedMessage localizedMessage)
Creates a new
AuditEvent instance. |
Modifier and Type | Method and Description |
---|---|
int |
getColumn()
Gets the column associated with the message.
|
java.lang.String |
getFileName()
Returns name of file being audited.
|
int |
getLine()
Return the line number on the source file where the event occurred.
|
LocalizedMessage |
getLocalizedMessage()
Gets the localized message.
|
java.lang.String |
getMessage()
Return the message associated to the event.
|
java.lang.String |
getModuleId()
Returns id of module.
|
SeverityLevel |
getSeverityLevel()
Gets the audit event severity level.
|
java.lang.String |
getSourceName()
Gets the name of the source for the message.
|
private static final long serialVersionUID
private final java.lang.String fileName
private final LocalizedMessage localizedMessage
public AuditEvent(java.lang.Object source)
source
- the object that created the eventpublic AuditEvent(java.lang.Object src, java.lang.String fileName)
AuditEvent
instance.src
- source of the eventfileName
- file associated with the eventpublic AuditEvent(java.lang.Object src, java.lang.String fileName, LocalizedMessage localizedMessage)
AuditEvent
instance.src
- source of the eventfileName
- file associated with the eventlocalizedMessage
- the actual messagepublic java.lang.String getFileName()
public int getLine()
public java.lang.String getMessage()
public int getColumn()
public SeverityLevel getSeverityLevel()
public java.lang.String getModuleId()
public java.lang.String getSourceName()
public LocalizedMessage getLocalizedMessage()