ccc.domain
Class LogEntry

java.lang.Object
  extended by ccc.domain.Entity
      extended by ccc.domain.LogEntry
All Implemented Interfaces:
Jsonable, java.io.Serializable

public class LogEntry
extends Entity

Captures detail relevant to a single user action for persistence in the audit log.

Author:
Civic Computing Ltd.
See Also:
Serialized Form

Constructor Summary
protected LogEntry()
          Constructor: for persistence only.
  LogEntry(UserEntity actor, CommandType action, java.util.Date happenedOn, java.util.UUID subjectId, java.lang.String detail)
          Constructor.
  LogEntry(UserEntity actor, java.lang.String action, java.util.Date happenedOn, java.util.UUID subjectId, java.lang.String detail)
          Constructor.
 
Method Summary
 java.lang.String getAction()
          Accessor.
 UserEntity getActor()
          Accessor.
 java.lang.String getDetail()
          Accessor.
 java.util.Date getHappenedOn()
          Accessor.
 long getIndex()
          Accessor.
 java.util.Date getRecordedOn()
          Accessor.
 java.util.UUID getSubjectId()
          Accessor.
 boolean isSystem()
          Accessor.
 
Methods inherited from class ccc.domain.Entity
equals, getId, getVersion, hashCode, setId, toJson, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LogEntry

protected LogEntry()
Constructor: for persistence only.


LogEntry

public LogEntry(UserEntity actor,
                CommandType action,
                java.util.Date happenedOn,
                java.util.UUID subjectId,
                java.lang.String detail)
Constructor.

Parameters:
actor - The actor that performed the action.
action - The action performed.
happenedOn - When the action took place.
subjectId - The subject of the action.
detail - Details of the action.

LogEntry

public LogEntry(UserEntity actor,
                java.lang.String action,
                java.util.Date happenedOn,
                java.util.UUID subjectId,
                java.lang.String detail)
Constructor.

Parameters:
actor - The actor that performed the action.
action - The action performed.
happenedOn - When the action took place.
subjectId - The subject of the action.
detail - Details of the action.
Method Detail

getSubjectId

public java.util.UUID getSubjectId()
Accessor.

Returns:
The uuid of the resource upon which the action was performed.

getActor

public UserEntity getActor()
Accessor.

Returns:
The user that performed the action.

getAction

public java.lang.String getAction()
Accessor.

Returns:
The action that was performed.

getIndex

public long getIndex()
Accessor.

Returns:
The index of the log entry in the audit log.

getRecordedOn

public java.util.Date getRecordedOn()
Accessor.

Returns:
The date that the log entry was recorded to the audit log.

getHappenedOn

public java.util.Date getHappenedOn()
Accessor.

Returns:
The date that the user performed the action.

getDetail

public java.lang.String getDetail()
Accessor.

Returns:
Details of the state of the object after the action took place.

isSystem

public boolean isSystem()
Accessor.

Returns:
Returns true if this is a system log entry, false otherwise.


Copyright © 2010. All Rights Reserved.