public class AuditManager extends InMemorySavepointManager implements TransactionListener, PCRegistry.RegisterClassListener
Auditor at transaction boundary.| Constructor and Description |
|---|
AuditManager(Auditor auditor) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterBegin(TransactionEvent event)
-----------------------------------------------------------------------
Transaction callbacks
|
void |
afterCommit(TransactionEvent event)
Notification that a transaction has successfully committed.
|
void |
afterCommitComplete(TransactionEvent event)
Notification that a transaction has successfully committed and
the transaction is no longer active.
|
void |
afterFlush(TransactionEvent event)
Notification that a transaction has flushed all object changes.
|
void |
afterRollback(TransactionEvent event)
Notification that a transaction has been rolled back.
|
void |
afterRollbackComplete(TransactionEvent event)
Notification that a transaction has been rolled back and
the transaction is no longer active.
|
void |
afterStateTransitions(TransactionEvent event)
Notification that state transitions are complete.
|
void |
beforeCommit(TransactionEvent event)
Notification that the next flush is for the transaction commit.
|
void |
beforeFlush(TransactionEvent event)
Notification that a transaction is about to flush all object changes.
|
Set<Class<?>> |
getAuditedTypes() |
Auditor |
getAuditor() |
protected Broker |
getBroker(PersistenceCapable pc)
Extracts the broker from the given persistence capable instance.
|
protected PersistenceCapable |
getPersistenceCapable(LifecycleEvent evt)
Extracts the persistence capable instance from the source of the given event.
|
protected boolean |
isAuditable(AuditableOperation op,
StateManagerImpl sm)
Affirms if the given state manager is auditable for the given operation.
|
void |
register(Class<?> cls)
Records all auditable classes in operation-specific sets.
|
getPreFlush, newSavepoint, setPreFlush, supportsIncrementalFlushpublic AuditManager(Auditor auditor)
public void register(Class<?> cls)
register in interface PCRegistry.RegisterClassListenerpublic Auditor getAuditor()
public void afterBegin(TransactionEvent event)
afterBegin in interface BeginTransactionListenerTransactionEvent.AFTER_BEGINpublic void beforeCommit(TransactionEvent event)
EndTransactionListenerbeforeCommit in interface EndTransactionListenerTransactionEvent.BEFORE_COMMITpublic void afterCommit(TransactionEvent event)
EndTransactionListenerafterCommit in interface EndTransactionListenerTransactionEvent.AFTER_COMMITpublic void afterRollback(TransactionEvent event)
EndTransactionListenerafterRollback in interface EndTransactionListenerTransactionEvent.AFTER_ROLLBACKpublic void afterCommitComplete(TransactionEvent event)
EndTransactionListenerafterCommitComplete in interface EndTransactionListenerTransactionEvent.AFTER_COMMIT_COMPLETEpublic void afterRollbackComplete(TransactionEvent event)
EndTransactionListenerafterRollbackComplete in interface EndTransactionListenerTransactionEvent.AFTER_ROLLBACK_COMPLETEpublic void beforeFlush(TransactionEvent event)
FlushTransactionListenerbeforeFlush in interface FlushTransactionListenerTransactionEvent.BEFORE_FLUSHpublic void afterFlush(TransactionEvent event)
FlushTransactionListenerafterFlush in interface FlushTransactionListenerTransactionEvent.AFTER_FLUSHpublic void afterStateTransitions(TransactionEvent event)
EndTransactionListenerafterStateTransitions in interface EndTransactionListenerTransactionEvent.AFTER_STATE_TRANSITIONSprotected PersistenceCapable getPersistenceCapable(LifecycleEvent evt)
protected Broker getBroker(PersistenceCapable pc)
pc - a persistence capable instanceprotected boolean isAuditable(AuditableOperation op, StateManagerImpl sm)
op - an auditable operationCopyright © 2006–2022 Apache Software Foundation. All rights reserved.