com.h3c.sdn.auditlog

## Class AuditLogEntry

- java.lang.Object
- - com.h3c.sdn.AbstractModel<T,UUID>
  - - com.h3c.sdn.Model<T>
    - - com.h3c.sdn.SystemModel<AuditLogEntry>
      - - com.h3c.sdn.auditlog.AuditLogEntry

- All Implemented Interfaces:
    Timeable, Transportable<AuditLogEntry,UUID>, Serializable

      public class AuditLogEntry
      extends SystemModel<AuditLogEntry>
      implements Timeable

  Descriptor holding the basic information required to represent an Audit Log Entry. TODO: should alert and audit log use builder pattern to encapsulate fields?
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AuditLogEntry(Id<AuditLogEntry,UUID> id, Id<SystemInformation,UUID> sysId, String user, String origin, Date timestamp, String activity, String description)` Constructs an Audit Log Entry using the supplied unique identification and system identification.
    `AuditLogEntry(Id<SystemInformation,UUID> sysId, String user, String origin, Date timestamp, String activity, String description)` Constructs an Audit Log Entry.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getActivity()` Returns the activity associated with this audit log entry
    `String` | `getDescription()` Returns the description associated with this audit log entry
    `String` | `getOrigin()` Returns the origin associated with this audit log entry.
    `Date` | `getTimestamp()` Gets the time the event occurred.
    `String` | `getUser()` Returns the user associated with this audit log entry.

    - ### Methods inherited from class com.h3c.sdn.SystemModel

      `getSysId, toString`

    - ### Methods inherited from class com.h3c.sdn.AbstractModel

      `equals, getId, hashCode`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### AuditLogEntry

          public AuditLogEntry(Id<SystemInformation,UUID> sysId,
                       String user,
                       String origin,
                       Date timestamp,
                       String activity,
                       String description)

      Constructs an Audit Log Entry. The supplied system identification must not be null. An unique identification will be generated.
      Parameters:
        `sysId` - system identification for this audit log
        `user` - user name for this audit log
        `origin` - the originating entity for this alert
        `timestamp` - the date when the audit log was created
        `activity` - type of action associated with audit log
        `description` - brief description of activity
      Throws:
        `IllegalArgumentException` - if system identification is null
        `NullPointerException` - if user, time stamp, activity or description are null

    - #### AuditLogEntry

          public AuditLogEntry(Id<AuditLogEntry,UUID> id,
                       Id<SystemInformation,UUID> sysId,
                       String user,
                       String origin,
                       Date timestamp,
                       String activity,
                       String description)

      Constructs an Audit Log Entry using the supplied unique identification and system identification. The unique identification and system identification must not be null.
      Parameters:
        `id` - external identification for this audit log
        `sysId` - system id for this audit log
        `user` - user name for this audit log
        `origin` - the originating entity for this alert
        `timestamp` - the date when the audit log was created
        `activity` - type of action associated with audit log
        `description` - brief description of activity
      Throws:
        `IllegalArgumentException` - if unique identification or system identification are null
        `NullPointerException` - if user, time stamp, activity or description are null

  - ### Method Detail

    - #### getUser

          public String getUser()

      Returns the user associated with this audit log entry.
      Returns:
        the user associated with this audit log entry represented as a string

    - #### getOrigin

          public String getOrigin()

      Returns the origin associated with this audit log entry.
      Returns:
        the origin associated with this audit log entry represented as a string

    - #### getTimestamp

          public Date getTimestamp()

      Description copied from interface: `Timeable`
      Gets the time the event occurred.
      Specified by:
        `getTimestamp` in interface `Timeable`
      Returns:
        the timestamp

    - #### getActivity

          public String getActivity()

      Returns the activity associated with this audit log entry
      Returns:
        the activity of this audit log entry

    - #### getDescription

          public String getDescription()

      Returns the description associated with this audit log entry
      Returns:
        the textual description associated with this audit log entry

Copyright © 2014. All Rights Reserved.