|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.openjpa.audit.AuditLogger
public class AuditLogger
A default auditor that simply prints the audited instances. The output could be directed to a file, defaults to System.out.
Constructor Summary | |
---|---|
AuditLogger()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AuditLogger()
Method Detail |
---|
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
public void close() throws Exception
close
in interface Closeable
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |