public abstract class AbstractAuditor extends java.lang.Object implements Auditor
Auditor that performs trivial sanity checks such as parameter validation. All calls are delegated to
{@link #writeEvent(String, Calendar, String, String, Collection) which is implemented by a concrete sub class to commit the event to the
underlying medium. Before calling {@link #writeEvent(String, Calendar, String, String, Collection), a unique event id and time stamp is generated.| Constructor and Description |
|---|
AbstractAuditor() |
| Modifier and Type | Method and Description |
|---|---|
void |
audit(java.lang.String principal,
AuditEvent event)
Writes an
AuditEvent to the audit sub-system. |
void |
audit(java.lang.String principal,
AuditEvent event,
java.util.Collection<? extends AuditContext> contexts)
Writes an
AuditEvent to the audit sub-system with addition contextual data. |
abstract void |
writeEvent(java.util.UUID eventId,
java.util.Calendar eventTimeStamp,
java.lang.String principal,
AuditEvent event,
java.util.Collection<? extends AuditContext> contexts)
Writes the auditable event to the storage medium.
|
public void audit(java.lang.String principal,
AuditEvent event)
AuditEvent to the audit sub-system.audit in interface Auditorprincipal - An identifier of the entity that performed the event. This may be an actual user performing a workflow or a system entity
performing back office processing. Cannot be null or empty.event - The event that was performed and that will be audited. Cannot be null.public void audit(java.lang.String principal,
AuditEvent event,
java.util.Collection<? extends AuditContext> contexts)
AuditEvent to the audit sub-system with addition contextual data.audit in interface Auditorprincipal - An identifier of the entity that performed the event. This may be an actual user performing a workflow or a system entity
performing back office processing. Cannot be null or empty.event - The event that was performed and that will be audited. Cannot be nullcontexts - A collection of contexts that provide additional information for the event.public abstract void writeEvent(java.util.UUID eventId,
java.util.Calendar eventTimeStamp,
java.lang.String principal,
AuditEvent event,
java.util.Collection<? extends AuditContext> contexts)
eventId - An arbitrary unique ID for the event.eventTimeStamp - The date/time that the event record was created.principal - An identifier of the entity that performed the event. This may be an actual user performing a workflow or a system entity
performing back office processing. Cannot be null or empty.event - The event that was performed and that will be audited. Cannot be nullcontexts - A collection of contexts that provide additional information for the event.Copyright © 2010-2019 The Direct Project. All Rights Reserved.