public class ProcessUpgrade extends java.lang.Object implements java.lang.Comparable<ProcessUpgrade>
Modifier and Type | Class and Description |
---|---|
static class |
ProcessUpgrade.Outcome
Represents the outcome of an attempted upgrade of a process.
|
Constructor and Description |
---|
ProcessUpgrade()
Creates a blank instance.
|
ProcessUpgrade(java.lang.Long processId,
ProcessUpgrade.Outcome outcome)
Creates an instance with the specified process id and result code.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ProcessUpgrade o)
Compares the specified object with this UpgradeProcessResult for order.
|
boolean |
equals(java.lang.Object o)
Compares the specified object with this one for equality.
|
ProcessUpgrade.Outcome |
getOutcome()
Gets the result code indicating the outcome of the attempted upgrade.
|
static ProcessUpgrade.Outcome[] |
getOutcomes(ProcessUpgrade[] upgrades)
Extracts the outcomes from the specified ProcessUpgrade objects.
|
java.lang.Long |
getProcessId()
Gets the id of the process.
|
static java.lang.Long[] |
getProcessIds(ProcessUpgrade[] upgrades)
Extracts the process ids from the specified ProcessUpgrade objects.
|
static java.lang.Long[] |
getProcessIdsWithOutcome(ProcessUpgrade[] upgrades,
ProcessUpgrade.Outcome... outcomes)
Extracts process ids from the specified ProcessUpgrade objects, filtering for those
processes whose upgrade had one of the specified outcomes.
|
int |
hashCode()
Returns a hash code for the object.
|
boolean |
isProcessInactive()
Gets whether the process is inactive after the upgrade.
|
void |
setOutcome(ProcessUpgrade.Outcome outcome)
Sets the result code indicating the outcome of the attempted upgrade.
|
void |
setProcessId(java.lang.Long processId)
Sets the id of the process.
|
void |
setProcessInactive(boolean isProcessInactive)
Sets whether the process is inactive after the upgrade.
|
public ProcessUpgrade()
public ProcessUpgrade(java.lang.Long processId, ProcessUpgrade.Outcome outcome)
processId
- the id of the processoutcome
- the code indicating the outcome of the attempted upgradepublic void setProcessId(java.lang.Long processId)
processId
- the id of the processpublic java.lang.Long getProcessId()
public void setProcessInactive(boolean isProcessInactive)
isProcessInactive
- whether the process is inactivepublic boolean isProcessInactive()
ProcessExecutionService.upgradeProcesses(Long, String, Long[])
and
ProcessExecutionService.upgradeProcesses(Long, String, Long, String[])
for
all outcomes other than ProcessUpgrade.Outcome.SUCCESS
. The processes may indeed be inactive
for other outcomes, but this will not be checked.public void setOutcome(ProcessUpgrade.Outcome outcome)
outcome
- the outcomepublic ProcessUpgrade.Outcome getOutcome()
public static ProcessUpgrade.Outcome[] getOutcomes(ProcessUpgrade[] upgrades)
results
- the ProcessUpgrade objects from which to extract the outcomespublic static java.lang.Long[] getProcessIds(ProcessUpgrade[] upgrades)
upgrades
- the ProcessUpgrade objects from which to extract the process idspublic static java.lang.Long[] getProcessIdsWithOutcome(ProcessUpgrade[] upgrades, ProcessUpgrade.Outcome... outcomes)
upgrades
- the ProcessUpgrade objects from which to extract the process idsoutcomes
- the outcomes to filter forpublic int compareTo(ProcessUpgrade o)
compareTo
in interface java.lang.Comparable<ProcessUpgrade>
o
- the object to compare with this onepublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- the object to be compared for equality with this UpgradeProcessResultpublic int hashCode()
hashCode
in class java.lang.Object
Copyright © 2003-2024 Appian Corporation. All Rights Reserved.