Package org.apache.wiki.workflow
Class Outcome
- java.lang.Object
-
- org.apache.wiki.workflow.Outcome
-
- All Implemented Interfaces:
java.io.Serializable
public final class Outcome extends java.lang.Object implements java.io.Serializable
Resolution of a workflow Step, such as "approve," "deny," "hold," "task error," or other potential resolutions.- Since:
- 2.5
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static OutcomeDECISION_ACKNOWLEDGEAcknowlege the Decision.static OutcomeDECISION_APPROVEApprove the Decision (and complete the step).static OutcomeDECISION_DENYDeny the Decision (and complete the step).static OutcomeDECISION_HOLDPut the Decision on hold (and pause the step).static OutcomeDECISION_REASSIGNReassign the Decision to another actor (and pause the step).static OutcomeSTEP_ABORTTerminate workflow step (without errors)static OutcomeSTEP_COMPLETEComplete workflow step (without errors)static OutcomeSTEP_CONTINUEContinue workflow step (without errors)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Two Outcome objects are equal if their message keys are equal.static OutcomeforName(java.lang.String key)Returns a named Outcome.java.lang.StringgetMessageKey()The i18n key for this outcome, which is prefixed byoutcome..inthashCode()The hashcode of an Outcome is identical to the hashcode of its message key, multiplied by 2 if it is a "completion" Outcome.booleanisCompletion()Returnstrueif this Outcome represents a completion condition for a Step.java.lang.StringtoString()
-
-
-
Field Detail
-
STEP_COMPLETE
public static final Outcome STEP_COMPLETE
Complete workflow step (without errors)
-
STEP_ABORT
public static final Outcome STEP_ABORT
Terminate workflow step (without errors)
-
STEP_CONTINUE
public static final Outcome STEP_CONTINUE
Continue workflow step (without errors)
-
DECISION_ACKNOWLEDGE
public static final Outcome DECISION_ACKNOWLEDGE
Acknowlege the Decision.
-
DECISION_APPROVE
public static final Outcome DECISION_APPROVE
Approve the Decision (and complete the step).
-
DECISION_DENY
public static final Outcome DECISION_DENY
Deny the Decision (and complete the step).
-
DECISION_HOLD
public static final Outcome DECISION_HOLD
Put the Decision on hold (and pause the step).
-
DECISION_REASSIGN
public static final Outcome DECISION_REASSIGN
Reassign the Decision to another actor (and pause the step).
-
-
Method Detail
-
isCompletion
public boolean isCompletion()
Returnstrueif this Outcome represents a completion condition for a Step.- Returns:
- the result
-
getMessageKey
public java.lang.String getMessageKey()
The i18n key for this outcome, which is prefixed byoutcome.. If calling classes wish to return a locale-specific name for this task (such as "approve this request"), they can use this method to obtain the correct key suffix.- Returns:
- the i18n key for this outcome
-
hashCode
public int hashCode()
The hashcode of an Outcome is identical to the hashcode of its message key, multiplied by 2 if it is a "completion" Outcome.- Overrides:
hashCodein classjava.lang.Object- Returns:
- the hash code
-
equals
public boolean equals(java.lang.Object obj)
Two Outcome objects are equal if their message keys are equal.- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- the object to test- Returns:
trueif logically equal,falseif not
-
forName
public static Outcome forName(java.lang.String key) throws NoSuchOutcomeException
Returns a named Outcome. If an Outcome matching the supplied key is not found, this method throws aNoSuchOutcomeException.- Parameters:
key- the name of the outcome- Returns:
- the Outcome
- Throws:
NoSuchOutcomeException- if an Outcome matching the key isn't found.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-