Class DefaultAuditRecord

  • All Implemented Interfaces:
    AuditRecord, java.io.Serializable

    public class DefaultAuditRecord
    extends java.lang.Object
    implements AuditRecord
    A simple immutable implementation of AuditRecord
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultAuditRecord​(AuditAction action, java.lang.String actionTarget, java.lang.String actionValue, java.lang.String actor, java.lang.String actorHost, int originatingContext, java.lang.String originatingSystem)
      Uses a GOOD status code and the current timestamp
      DefaultAuditRecord​(java.lang.String action, java.lang.String actionTarget, java.lang.String actionValue, java.lang.String actor, java.lang.String actorHost, int originatingContext, java.lang.String originatingSystem, int statusCode, java.util.Date timestamp)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getAction()
      A description of the action.
      java.lang.String getActionTarget()
      The target of the action.
      java.lang.String getActionValue()
      The value of the action.
      java.lang.String getActor()
      Who performed the event.
      java.lang.String getActorHost()
      Where the actor was when the action was performed.
      int getOriginatingContext()
      The ApplicationScope where this record was generated from
      java.lang.String getOriginatingSystem()
      A Description of the originating system for this record
      int getStatusCode()
      The StatusCode that represents whether this action was successful or not.
      java.util.Date getTimestamp()
      The timestamp at which this record occured
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • DefaultAuditRecord

        public DefaultAuditRecord​(AuditAction action,
                                  java.lang.String actionTarget,
                                  java.lang.String actionValue,
                                  java.lang.String actor,
                                  java.lang.String actorHost,
                                  int originatingContext,
                                  java.lang.String originatingSystem)
        Uses a GOOD status code and the current timestamp
      • DefaultAuditRecord

        public DefaultAuditRecord​(java.lang.String action,
                                  java.lang.String actionTarget,
                                  java.lang.String actionValue,
                                  java.lang.String actor,
                                  java.lang.String actorHost,
                                  int originatingContext,
                                  java.lang.String originatingSystem,
                                  int statusCode,
                                  java.util.Date timestamp)
    • Method Detail

      • getAction

        public java.lang.String getAction()
        Description copied from interface: AuditRecord
        A description of the action. Examples: "tag write", "tag delete", "tag edit", " query update", " login", "logout" "project save"
        Specified by:
        getAction in interface AuditRecord
      • getActionTarget

        public java.lang.String getActionTarget()
        Description copied from interface: AuditRecord
        The target of the action.
        Specified by:
        getActionTarget in interface AuditRecord
      • getActionValue

        public java.lang.String getActionValue()
        Description copied from interface: AuditRecord
        The value of the action. Might not be present for all action types
        Specified by:
        getActionValue in interface AuditRecord
      • getActor

        public java.lang.String getActor()
        Description copied from interface: AuditRecord
        Who performed the event. Should be a username or appropriate system equivalent if the event was performed automatically by a program
        Specified by:
        getActor in interface AuditRecord
      • getActorHost

        public java.lang.String getActorHost()
        Description copied from interface: AuditRecord
        Where the actor was when the action was performed. Should be an IP address or a hostname of a computer
        Specified by:
        getActorHost in interface AuditRecord
      • getOriginatingContext

        public int getOriginatingContext()
        Description copied from interface: AuditRecord
        The ApplicationScope where this record was generated from
        Specified by:
        getOriginatingContext in interface AuditRecord
      • getOriginatingSystem

        public java.lang.String getOriginatingSystem()
        Description copied from interface: AuditRecord
        A Description of the originating system for this record
        Specified by:
        getOriginatingSystem in interface AuditRecord
      • getStatusCode

        public int getStatusCode()
        Description copied from interface: AuditRecord
        The StatusCode that represents whether this action was successful or not.
        Specified by:
        getStatusCode in interface AuditRecord
      • getTimestamp

        public java.util.Date getTimestamp()
        Description copied from interface: AuditRecord
        The timestamp at which this record occured
        Specified by:
        getTimestamp in interface AuditRecord
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object