org.opencms.db.log
Class CmsLogEntry

java.lang.Object
  extended by org.opencms.db.log.CmsLogEntry

public class CmsLogEntry
extends Object

Wrapper class for a DB log entry.

Since:
8.0.0

Field Summary
static String ATTR_LOG_ENTRY
          DB context attribute name constant.
 
Constructor Summary
CmsLogEntry(CmsDbContext dbc, CmsUUID structureId, CmsLogEntryType type, String[] data)
          Public constructor, will use the current time for time stamp.
CmsLogEntry(CmsUUID userId, long date, CmsUUID structureId, CmsLogEntryType type, String[] data)
          Public constructor.
 
Method Summary
 String[] getData()
          Returns the additional data.
 long getDate()
          Returns the date.
 String getDetails(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.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ATTR_LOG_ENTRY

public static final 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,
                   String[] data)
Public constructor, will use the current time for time stamp.

Parameters:
dbc - the current database context with the current user
structureId - the structure id
type - the entry type
data - the additional data to be parsed as a map

CmsLogEntry

public CmsLogEntry(CmsUUID userId,
                   long date,
                   CmsUUID structureId,
                   CmsLogEntryType type,
                   String[] data)
Public constructor.

Parameters:
userId - the user id
date - the date in milliseconds
structureId - the structure id
type - the entry type
data - the optional additional data
Method Detail

getData

public String[] getData()
Returns the additional data.

Returns:
the additional data

getDate

public long getDate()
Returns the date.

Returns:
the date

getDetails

public String getDetails(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

getUserId

public CmsUUID getUserId()
Returns the user id.

Returns:
the user id

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()