public abstract class AbstractAuditor extends 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(String principal,
AuditEvent event)
Writes an
AuditEvent to the audit sub-system. |
void |
audit(String principal,
AuditEvent event,
Collection<? extends AuditContext> contexts)
Writes an
AuditEvent to the audit sub-system with addition contextual data. |
abstract void |
writeEvent(UUID eventId,
Calendar eventTimeStamp,
String principal,
AuditEvent event,
Collection<? extends AuditContext> contexts)
Writes the auditable event to the storage medium.
|
public void audit(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(String principal, AuditEvent event, 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(UUID eventId, Calendar eventTimeStamp, String principal, AuditEvent event, 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–2021 The Direct Project. All rights reserved.