Class AuditEvent

java.lang.Object
org.jivesoftware.openfire.audit.AuditEvent
Direct Known Subclasses:
SessionEvent

public class AuditEvent extends Object
Defines the known event types used with audits on arbitrary data/events.
Author:
Iain Shigeoka
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    All user generated codes must be equal to or greater than this constant to avoid clashing with Openfire event codes.
  • Constructor Summary

    Constructors
    Constructor
    Description
    AuditEvent(Session eventSession, Date timestamp, int eventCode, int eventReason, String eventData)
    Create a new audit event.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Obtain the primary type of event.
    Obtain the data associated with the event.
    int
    Obtain the subtype of event.
    Obtain the session associated with the event.
    Obtain the timestamp of when the event occurred.
    void
    setCode(int code)
    Set the primary type of event.
    void
    Set the data associated with the event.
    void
    setReason(int reason)
    Set the subtype of event.
    void
    Set the session associated with the event.
    void
    Set the timestamp of when the event occurred.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • USER_CODES

      public static final int USER_CODES
      All user generated codes must be equal to or greater than this constant to avoid clashing with Openfire event codes.
      See Also:
  • Constructor Details

    • AuditEvent

      public AuditEvent(Session eventSession, Date timestamp, int eventCode, int eventReason, String eventData)
      Create a new audit event.
      Parameters:
      eventSession - the session that triggered the event or null if no session is associated with this event.
      timestamp - the date/time the event occurred.
      eventCode - a code indicating the type of event that occurred.
      eventReason - a second code indicating more details about the event type.
      eventData - arbitrary string data associated with the event or null.
  • Method Details

    • getCode

      public int getCode()
      Obtain the primary type of event.
      Returns:
      the code indicating the event's type.
    • setCode

      public void setCode(int code)
      Set the primary type of event.
      Parameters:
      code - the code indicating the event's type.
    • getData

      public String getData()
      Obtain the data associated with the event.
      Returns:
      the data associated with the event
    • setData

      public void setData(String data)
      Set the data associated with the event.
      Parameters:
      data - the data associated with the event.
    • getReason

      public int getReason()
      Obtain the subtype of event.
      Returns:
      the code indicating the event's subtype
    • setReason

      public void setReason(int reason)
      Set the subtype of event.
      Parameters:
      reason - the code indicating the event's subtype.
    • getSession

      public Session getSession()
      Obtain the session associated with the event.
      Returns:
      the session associated with the event.
    • setSession

      public void setSession(Session session)
      Set the session associated with the event.
      Parameters:
      session - the session associated with the event.
    • getTimestamp

      public Date getTimestamp()
      Obtain the timestamp of when the event occurred.
      Returns:
      the time the event occurred.
    • setTimestamp

      public void setTimestamp(Date time)
      Set the timestamp of when the event occurred.
      Parameters:
      time - the time the event occurred.