Record Class AuditProvenance

java.lang.Object
java.lang.Record
com.inductiveautomation.ignition.common.audit.AuditProvenance
Record Components:
actor - the acting user (or unknown) recorded as the audit actor.
host - the host the action originated from.
scope - the ApplicationScope the action originated in, recorded as the originating context.
originatingSystem - the originating-system path recorded on the audit record.
project - the project whose audit profile the emitter resolves when gatewayProfile is false; ignored otherwise. A null or empty project with gatewayProfile false leaves the action unaudited.
timestampMillis - the audit timestamp, in epoch milliseconds.
gatewayProfile - true when the emitter resolves the single gateway-wide audit profile rather than project's. Says nothing about where the action came from: Gateway Network writes and Gateway web API writes both set it.

public record AuditProvenance(String actor, String host, int scope, String originatingSystem, @Nullable String project, long timestampMillis, boolean gatewayProfile) extends Record
Where an audited action came from, captured at the origin site and carried to whichever component emits the audit record — so one emitter builds the record instead of every origin site building its own.

These are the fields known when the user acts; the rest of an AuditRecord (target, value, previous value, status) is only knowable at completion, which is why this is its own type rather than a half-populated record. project() and gatewayProfile() have no counterpart on the record at all — the emitter needs them to resolve the audit profile.

Nothing here is subsystem-specific. A tag write carries it on its most-recent TagReferenceLocation, which holds it in a transient field: provenance is gateway-local and never travels.

  • Constructor Details

    • AuditProvenance

      public AuditProvenance(String actor, String host, int scope, String originatingSystem, @Nullable String project, long timestampMillis, boolean gatewayProfile)
      Creates an instance of a AuditProvenance record class.
      Parameters:
      actor - the value for the actor record component
      host - the value for the host record component
      scope - the value for the scope record component
      originatingSystem - the value for the originatingSystem record component
      project - the value for the project record component
      timestampMillis - the value for the timestampMillis record component
      gatewayProfile - the value for the gatewayProfile record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • actor

      public String actor()
      Returns the value of the actor record component.
      Returns:
      the value of the actor record component
    • host

      public String host()
      Returns the value of the host record component.
      Returns:
      the value of the host record component
    • scope

      public int scope()
      Returns the value of the scope record component.
      Returns:
      the value of the scope record component
    • originatingSystem

      public String originatingSystem()
      Returns the value of the originatingSystem record component.
      Returns:
      the value of the originatingSystem record component
    • project

      public @Nullable String project()
      Returns the value of the project record component.
      Returns:
      the value of the project record component
    • timestampMillis

      public long timestampMillis()
      Returns the value of the timestampMillis record component.
      Returns:
      the value of the timestampMillis record component
    • gatewayProfile

      public boolean gatewayProfile()
      Returns the value of the gatewayProfile record component.
      Returns:
      the value of the gatewayProfile record component