Package org.opencms.db.log
Class CmsLogEntry
- java.lang.Object
-
- org.opencms.db.log.CmsLogEntry
-
public class CmsLogEntry extends java.lang.Object
Wrapper class for a DB log entry.- Since:
- 8.0.0
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ATTR_LOG_ENTRY
DB context attribute name constant.
-
Constructor Summary
Constructors Constructor Description CmsLogEntry(CmsDbContext dbc, CmsUUID structureId, CmsLogEntryType type, java.lang.String[] data)
Public constructor, will use the current time for time stamp.CmsLogEntry(CmsUUID userId, long date, CmsUUID structureId, CmsLogEntryType type, java.lang.String[] data)
Public constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]
getData()
Returns the additional data.long
getDate()
Returns the date.java.lang.String
getDetails(java.util.Locale locale)
Returns the formatted details for this log entry.CmsUUID
getStructureId()
Returns the structure id.CmsLogEntryType
getType()
Returns the type.CmsUUID
getUserId()
Returns the user id.java.lang.String
toString()
-
-
-
Field Detail
-
ATTR_LOG_ENTRY
public static final java.lang.String ATTR_LOG_ENTRY
DB context attribute name constant.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CmsLogEntry
public CmsLogEntry(CmsDbContext dbc, CmsUUID structureId, CmsLogEntryType type, java.lang.String[] data)
Public constructor, will use the current time for time stamp.- Parameters:
dbc
- the current database context with the current userstructureId
- the structure idtype
- the entry typedata
- the additional data to be parsed as a map
-
CmsLogEntry
public CmsLogEntry(CmsUUID userId, long date, CmsUUID structureId, CmsLogEntryType type, java.lang.String[] data)
Public constructor.- Parameters:
userId
- the user iddate
- the date in millisecondsstructureId
- the structure idtype
- the entry typedata
- the optional additional data
-
-
Method Detail
-
getData
public java.lang.String[] getData()
Returns the additional data.- Returns:
- the additional data
-
getDate
public long getDate()
Returns the date.- Returns:
- the date
-
getDetails
public java.lang.String getDetails(java.util.Locale locale)
Returns the formatted details for this log entry.- Parameters:
locale
- the locale- Returns:
- the formatted details for this log entry
-
getStructureId
public CmsUUID getStructureId()
Returns the structure id.- Returns:
- the structure id
-
getType
public CmsLogEntryType getType()
Returns the type.- Returns:
- the type
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
- See Also:
Object.toString()
-
-