public interface LogManagerFactory extends Action
Each transaction that results in updates to the database are
intercepted by the LoggingInterceptor
which calls
getLogManager(LogControl)
to create a new log
manager for the transaction.
For each created, modified or deleted item in the transaction,
getEntityLogger(LogManager, Object)
is called. If this method
returns an object, EntityLogger.logChanges(LogManager, EntityDetails)
is called and the rest is up to the actual implementation.
Modifier and Type | Method and Description |
---|---|
EntityLogger |
getEntityLogger(LogManager logManager,
java.lang.Object entity)
Get/create an entity logger for logging changes to the given entity.
|
LogManager |
getLogManager(LogControl logControl)
Get/create a log manager to log events in a given transaction.
|
boolean |
isLoggable(java.lang.Object entity)
Checks if changes to the given entity should be logged or not.
|
LogManager getLogManager(LogControl logControl)
logControl
- A log controller with information about the
current transactionboolean isLoggable(java.lang.Object entity)
getEntityLogger(LogManager, Object)
mustn't return null if called with the same entity parameter.entity
- The entity to checkEntityLogger getEntityLogger(LogManager logManager, java.lang.Object entity)
logManager
- The log manager used in the current transactionentity
- The entity to get a logger for