public class RegionChangeLogger extends Object implements org.nuiton.topia.event.TopiaEntityListener
Modifier and Type | Field and Description |
---|---|
protected static String |
CHANGES_FILE_NAME
CSV file name.
|
protected org.nuiton.topia.TopiaContext |
context
Context.
|
protected static char |
CSV_SEPARATOR
CSV separator char.
|
protected File |
logFile
Output log file.
|
protected RegionStorage |
regionStorage
Region storage.
|
Constructor and Description |
---|
RegionChangeLogger(RegionStorage regionStorage,
org.nuiton.topia.TopiaContext context) |
Modifier and Type | Method and Description |
---|---|
protected void |
addLine(String... data)
Add line into file.
|
protected void |
addLogLine(String changeType,
Class<? extends org.nuiton.topia.persistence.TopiaEntity> clazz,
Object entity) |
protected void |
addLogLine(String changeType,
Class<? extends org.nuiton.topia.persistence.TopiaEntity> clazz,
Object entity,
String field,
String oldValue,
String newValue) |
void |
create(org.nuiton.topia.event.TopiaEntityEvent event) |
void |
delete(org.nuiton.topia.event.TopiaEntityEvent event) |
protected String |
getEntityDisplayInfo(Object entity)
Most of entity have a 'name' attribute.
|
void |
load(org.nuiton.topia.event.TopiaEntityEvent event) |
void |
update(org.nuiton.topia.event.TopiaEntityEvent event) |
protected static final char CSV_SEPARATOR
protected static final String CHANGES_FILE_NAME
protected RegionStorage regionStorage
protected org.nuiton.topia.TopiaContext context
protected File logFile
public RegionChangeLogger(RegionStorage regionStorage, org.nuiton.topia.TopiaContext context)
public void create(org.nuiton.topia.event.TopiaEntityEvent event)
create
in interface org.nuiton.topia.event.TopiaEntityListener
public void load(org.nuiton.topia.event.TopiaEntityEvent event)
load
in interface org.nuiton.topia.event.TopiaEntityListener
public void update(org.nuiton.topia.event.TopiaEntityEvent event)
update
in interface org.nuiton.topia.event.TopiaEntityListener
public void delete(org.nuiton.topia.event.TopiaEntityEvent event)
delete
in interface org.nuiton.topia.event.TopiaEntityListener
protected void addLogLine(String changeType, Class<? extends org.nuiton.topia.persistence.TopiaEntity> clazz, Object entity)
protected void addLogLine(String changeType, Class<? extends org.nuiton.topia.persistence.TopiaEntity> clazz, Object entity, String field, String oldValue, String newValue)
protected void addLine(String... data)
data
- data to addCopyright © 1999–2020 CodeLutin. All rights reserved.