Package net.sf.basedb.core.log
Class ManualLogEntry
java.lang.Object
net.sf.basedb.core.log.ManualLogEntry
- All Implemented Interfaces:
LoggableData
Represents a manual entry into the change history log.
After creating an instance of this class, call
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.
- Since:
- 3.9
- Author:
- nicklas
-
Field Summary
Modifier and TypeFieldDescriptionprivate final ChangeType
private final BasicItem
private final String
private final String
private final String
-
Constructor Summary
ConstructorDescriptionManualLogEntry
(BasicItem item, ChangeType changeType, String logInfo) Create a new log entry.ManualLogEntry
(BasicItem item, ChangeType changeType, String logInfo, String oldValue, String newValue) Create a new log entry with optional old and new values. -
Method Summary
Modifier and TypeMethodDescriptionGet the change type.getItem()
Get the item this log entry is related to.Get information about the log entry.New value after the change.Old value before the change.
-
Field Details
-
changeType
-
item
-
logInfo
-
oldValue
-
newValue
-
-
Constructor Details
-
ManualLogEntry
Create a new log entry. An item and change type is required.- Parameters:
item
- The item the entry is related tochangeType
- The type of log entrylogInfo
- Other information about the log entry
-
ManualLogEntry
public ManualLogEntry(BasicItem item, ChangeType changeType, String logInfo, String oldValue, String newValue) Create a new log entry with optional old and new values.- Parameters:
item
- The item the entry is related tochangeType
- The type of log entrylogInfo
- Other information about the log entryoldValue
- Old valuenewValue
- New value
-
-
Method Details
-
getChangeType
Get the change type. -
getItem
Get the item this log entry is related to. -
getLogInfo
Get information about the log entry. -
getOldValue
Old value before the change. -
getNewValue
New value after the change.
-