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)
Auditor
audit
in interface Auditor
broker
- 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
FileNotFoundException
public String getFile()
public boolean isRollbackOnError()
Auditor
audit
operation fails with an exception.isRollbackOnError
in interface Auditor
public void setConfiguration(Configuration conf)
Configurable
setConfiguration
in interface Configurable
public void startConfiguration()
Configurable
startConfiguration
in interface Configurable
public void endConfiguration()
Configurable
endConfiguration
in interface Configurable
Copyright © 2006–2020 Apache Software Foundation. All rights reserved.