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 Summary
Modifier and TypeFieldDescriptionprotected Object
protected String
static final String
static final String
static final String
protected String
protected LocaleString
protected Integer
protected Long
protected Long
protected String
protected Long
protected Timestamp
protected String
protected String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected int
compareTimestamp
(AuditHistoryRow compareAgainst) Comparison is based on timestamp, which is the secondary sort.int
compareTo
(AuditHistoryRow compareAgainst) Comparison is based on order, with secondary sort of timestamp.protected Object
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.The value for a row may be either 'complete' or 'partial'.getDom()
dom!protected String
getKey()
dom!getName()
getOrder()
The value for a row may be either 'complete' or 'partial'.getUser()
abstract void
setTimestamp
(Timestamp timestamp) abstract void
setUsername
(String username)
-
Field Details
-
DOMAIN_PROCESS_VARIABLE
- See Also:
-
DOMAIN_PROCESS_PROPERTY
- See Also:
-
DOMAIN_TASK_PROPERTY
- See Also:
-
userUuid
-
username
-
timestamp
-
order
-
dom
-
key
-
name
-
processModelUuid
-
processModelId
-
processId
-
taskId
-
completeOrPartialValue
-
-
Constructor Details
-
AuditHistoryRow
public AuditHistoryRow()
-
-
Method Details
-
getUser
- Returns:
- user UUID that performed this row's action; an empty "" indicates it was performed by the system.
-
getUsername
- Returns:
- username that performed this row's action
-
setUsername
- Parameters:
username
- for updating by UserUuidMapper
-
getTimestamp
- Returns:
- timestamp at which this row's action was recorded
-
setTimestamp
- Parameters:
timestamp
- for updating timestamp for history row, added due to java 17 introspector issues
-
getOrder
- Returns:
- order of this row within its process, allows disambiguation at same timestamp
-
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
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
- Returns:
- dom!key, or key if dom is null or "" (the default domain), using dom!key as given by dom and key
-
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
- 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
- Parameters:
locale
-- Returns:
- name of this row's object, in the given Locale or the first available
-
getNameLocales
- Returns:
- Locales in which this row's name is defined (may be empty for names insensitive to Locale)
-
getProcessId
- Returns:
- row's process id
-
getProcessModelId
- Returns:
- row's process model id
-
getOptionalProcessModelUuid
- Returns:
- row's process model UUID, if set
-
getOptionalTaskId
- Returns:
- row's task id, if available (not available in process level row actions, but typically set for "tp" domain rows)
-
determineCompleteOrPartialValue
-
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
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
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 interfaceComparable<AuditHistoryRow>
- Parameters:
compareAgainst
-- Returns:
- 0 if equal, less than 0 if this is before compareAgainst, greater than 0 if this is after compareAgainst
-
compareTimestamp
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
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
-
-