Class Outcome

java.lang.Object
org.apache.wiki.workflow.Outcome
All Implemented Interfaces:
Serializable

public final class Outcome
extends Object
implements 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 Details

  • Method Details

    • isCompletion

      public boolean isCompletion()
      Returns true if this Outcome represents a completion condition for a Step.
      Returns:
      the result
    • getMessageKey

      The i18n key for this outcome, which is prefixed by outcome.. 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:
      hashCode in class Object
      Returns:
      the hash code
    • equals

      public boolean equals​(Object obj)
      Two Outcome objects are equal if their message keys are equal.
      Overrides:
      equals in class Object
      Parameters:
      obj - the object to test
      Returns:
      true if logically equal, false if not
    • forName

      public static Outcome forName​(String key) throws NoSuchOutcomeException
      Returns a named Outcome. If an Outcome matching the supplied key is not found, this method throws a NoSuchOutcomeException.
      Parameters:
      key - the name of the outcome
      Returns:
      the Outcome
      Throws:
      NoSuchOutcomeException - if an Outcome matching the key isn't found.
    • toString

      public String toString()
      Overrides:
      toString in class Object