public class AuditLogger extends Object implements Auditor
| Constructor and Description |
|---|
AuditLogger() |
| Modifier and Type | Method and Description |
|---|---|
void |
audit(Broker broker,
Collection<Audited> newObjects,
Collection<Audited> updates,
Collection<Audited> deletes)
OpenJPA runtime will invoke this method with the given parameters
within a transaction.
|
void |
close() |
void |
endConfiguration()
Invoked upon completion of bean property configuration for this object.
|
String |
getFile() |
boolean |
isRollbackOnError()
Affirm if the transaction be rolled back if
audit
operation fails with an exception. |
void |
setConfiguration(Configuration conf)
Invoked prior to setting bean properties.
|
void |
setFile(String file) |
void |
startConfiguration()
Invoked before bean property configuration is begun on this object.
|
public void audit(Broker broker, Collection<Audited> newObjects, Collection<Audited> updates, Collection<Audited> deletes)
Auditoraudit in interface Auditorbroker - the active persistence context.newObjects - the set of auditable objects being created. Can be empty, but never null.updates - the set of auditable objects being updated. Can be empty, but never null.deletes - the set of auditable objects being deleted. Can be empty, but never null.public void setFile(String file) throws FileNotFoundException
FileNotFoundExceptionpublic String getFile()
public boolean isRollbackOnError()
Auditoraudit
operation fails with an exception.isRollbackOnError in interface Auditorpublic void setConfiguration(Configuration conf)
ConfigurablesetConfiguration in interface Configurablepublic void startConfiguration()
ConfigurablestartConfiguration in interface Configurablepublic void endConfiguration()
ConfigurableendConfiguration in interface ConfigurableCopyright © 2006–2020 Apache Software Foundation. All rights reserved.