Class AuditHistoryRow

java.lang.Object
com.appiancorp.suiteapi.process.history.AuditHistoryRow
All Implemented Interfaces:
Serializable, Comparable<AuditHistoryRow>

public abstract class AuditHistoryRow extends Object implements Comparable<AuditHistoryRow>, Serializable
AuditHistoryRow AuditHistoryRow represents one row of audit log process history. There are no setters on this bean.
See Also:
  • Field Details

    • DOMAIN_PROCESS_VARIABLE

      public static final String DOMAIN_PROCESS_VARIABLE
      See Also:
    • DOMAIN_PROCESS_PROPERTY

      public static final String DOMAIN_PROCESS_PROPERTY
      See Also:
    • DOMAIN_TASK_PROPERTY

      public static final String DOMAIN_TASK_PROPERTY
      See Also:
    • userUuid

      protected String userUuid
    • username

      protected String username
    • timestamp

      protected Timestamp timestamp
    • order

      protected Integer order
    • dom

      protected String dom
    • key

      protected String key
    • name

      protected LocaleString name
    • processModelUuid

      protected String processModelUuid
    • processModelId

      protected Long processModelId
    • processId

      protected Long processId
    • taskId

      protected Long taskId
    • completeOrPartialValue

      protected Object completeOrPartialValue
  • Constructor Details

    • AuditHistoryRow

      public AuditHistoryRow()
  • Method Details

    • getUser

      public String getUser()
      Returns:
      user UUID that performed this row's action; an empty "" indicates it was performed by the system.
    • getUsername

      public String getUsername()
      Returns:
      username that performed this row's action
    • setUsername

      public abstract void setUsername(String username)
      Parameters:
      username - for updating by UserUuidMapper
    • getTimestamp

      public Timestamp getTimestamp()
      Returns:
      timestamp at which this row's action was recorded
    • setTimestamp

      public abstract void setTimestamp(Timestamp timestamp)
      Parameters:
      timestamp - for updating timestamp for history row, added due to java 17 introspector issues
    • getOrder

      public Integer getOrder()
      Returns:
      order of this row within its process, allows disambiguation at same timestamp
    • getDom

      public String getDom()
      dom!key is the row identifier within the process context.
      Returns:
      domain of the identifier modified in this row (e.g., DOMAIN_*); domains are case insensitive, may be returned in any mix of upper- and lower-case, i.e., use equalsIgnoreCase() when comparing.
    • getKey

      public String getKey()
      dom!key is the row identifier within the process context.
      Returns:
      key of the identifier modified in this row, unique within combination of domain and process context; keys are case insensitive, may be returned in any mix of upper- and lower-case, i.e., use equalsIgnoreCase() when comparing.
    • getDomKeyCaseSensitive

      protected String getDomKeyCaseSensitive()
      Returns:
      dom!key, or key if dom is null or "" (the default domain), using dom!key as given by dom and key
    • getDomKey

      public String getDomKey()
      Returns:
      dom!key in lowercase, or key if dom is null or "" (the default domain); this is an appropriate key within process id context for a Set to build a PartialValue to CompleteValue.
    • getName

      public LocaleString getName()
      Returns:
      name of this row's object, as a LocaleString; can use it to determine the Locales available, and get just that locale. Can use getName(Locale) directly if only one Locale is required.
    • getName

      public String getName(Locale locale)
      Parameters:
      locale -
      Returns:
      name of this row's object, in the given Locale or the first available
    • getNameLocales

      public Set<Locale> getNameLocales()
      Returns:
      Locales in which this row's name is defined (may be empty for names insensitive to Locale)
    • getProcessId

      public Long getProcessId()
      Returns:
      row's process id
    • getProcessModelId

      public Long getProcessModelId()
      Returns:
      row's process model id
    • getOptionalProcessModelUuid

      public Optional<String> getOptionalProcessModelUuid()
      Returns:
      row's process model UUID, if set
    • getOptionalTaskId

      public Optional<Long> getOptionalTaskId()
      Returns:
      row's task id, if available (not available in process level row actions, but typically set for "tp" domain rows)
    • determineCompleteOrPartialValue

      protected Object determineCompleteOrPartialValue()
    • getCompleteValue

      public Optional<CompleteValue> getCompleteValue()
      The value for a row may be either 'complete' or 'partial'. The first row of a given domain!key for a given process context will be complete. After that, rows may be either complete or partial. If partial, then the partial must be applied to the previous complete in order to yield another complete value. To do so, track the existing CompleteValue for that domain!key in the process context. This tracking is not necessary if not wanting to obtain the completed values.
      Returns:
      CompleteValue if available
    • getPartialValue

      public Optional<PartialValue> getPartialValue()
      The value for a row may be either 'complete' or 'partial'. The first row of a given domain!key for a given process context will be complete. After that, rows may be either complete or partial. If partial, then the partial must be applied to the previous complete in order to yield another complete value. To do so, track the existing CompleteValue for that domain!key in the process context. This tracking is not necessary if not wanting to obtain the completed values.
      Returns:
      PartialValue, if possible, which may be applied to a previous CompleteValue for the same dom!key in the same process id context
    • compareTo

      public int compareTo(AuditHistoryRow compareAgainst)
      Comparison is based on order, with secondary sort of timestamp. Notably, the only time that order is identical is in the case of divergent processes, where we reset a kdb back to an earlier version, causing the history to be inconsistent without the resiliency provided in ProcessHistoryKafkaReader.
      Specified by:
      compareTo in interface Comparable<AuditHistoryRow>
      Parameters:
      compareAgainst -
      Returns:
      0 if equal, less than 0 if this is before compareAgainst, greater than 0 if this is after compareAgainst
    • compareTimestamp

      protected int compareTimestamp(AuditHistoryRow compareAgainst)
      Comparison is based on timestamp, which is the secondary sort.
      Parameters:
      compareAgainst -
      Returns:
      0 if equal, less than 0 if this is before compareAgainst, greater than 0 if this is after compareAgainst
    • gatherUserUuids

      public abstract void gatherUserUuids(Set<String> setOfUuids)
      Gather the user UUIDs in this AuditHistoryRow, from both the user performing the action and the values, adding them to the provided Set.
      Parameters:
      setOfUuids -