public class ManualLogEntry extends java.lang.Object implements LoggableData
DbControl.logEntry(ManualLogEntry)
to register the
entry. If the entry is actually logged or not depends on if
logging has been enabled and also on the extensions that handle
logging. Note that the built-in logging will only log entries
for items that implements the LoggableData
interface.
The manual log entries are mainly intended for logging
ChangeType.VIEW
and ChangeType.DOWNLOAD
but can be
used for the other change types as well.
Modifier and Type | Field and Description |
---|---|
private ChangeType |
changeType |
private BasicItem |
item |
private java.lang.String |
logInfo |
private java.lang.String |
newValue |
private java.lang.String |
oldValue |
Constructor and Description |
---|
ManualLogEntry(BasicItem item,
ChangeType changeType,
java.lang.String logInfo)
Create a new log entry.
|
ManualLogEntry(BasicItem item,
ChangeType changeType,
java.lang.String logInfo,
java.lang.String oldValue,
java.lang.String newValue)
Create a new log entry with optional old and new values.
|
Modifier and Type | Method and Description |
---|---|
ChangeType |
getChangeType()
Get the change type.
|
BasicItem |
getItem()
Get the item this log entry is related to.
|
java.lang.String |
getLogInfo()
Get information about the log entry.
|
java.lang.String |
getNewValue()
New value after the change.
|
java.lang.String |
getOldValue()
Old value before the change.
|
private final ChangeType changeType
private final BasicItem item
private final java.lang.String logInfo
private final java.lang.String oldValue
private final java.lang.String newValue
public ManualLogEntry(BasicItem item, ChangeType changeType, java.lang.String logInfo)
item
- The item the entry is related tochangeType
- The type of log entrylogInfo
- Other information about the log entrypublic ManualLogEntry(BasicItem item, ChangeType changeType, java.lang.String logInfo, java.lang.String oldValue, java.lang.String newValue)
item
- The item the entry is related tochangeType
- The type of log entrylogInfo
- Other information about the log entryoldValue
- Old valuenewValue
- New valuepublic ChangeType getChangeType()
public BasicItem getItem()
public java.lang.String getLogInfo()
public java.lang.String getOldValue()
public java.lang.String getNewValue()