Class Transition

  • All Implemented Interfaces:
    java.io.Serializable

    public class Transition
    extends java.lang.Object
    implements java.io.Serializable

    Workflow transition

    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      Transition​(java.lang.String id, java.lang.String name, Activity from, Activity to, java.lang.String condition, java.lang.String callback)  
    • Method Summary

      Modifier and Type Method Description
      void callback​(ActivityFile context, Grant g)
      Invoke the callback and send the notification when specified
      boolean condition​(java.lang.String code)
      Transition condition
      Activity fromActivity()
      Origin
      Action getAction()
      Action button
      Alert getAlert()
      Get the transition notification
      java.lang.String getCallback()
      Callback name
      java.lang.String getCondition()
      Condition value of transition
      java.lang.String getId()
      Transition id
      java.lang.String getName()
      Optional name
      void setAction​(Action a)  
      void setAlert​(Alert a)
      Assign a transition notification
      Activity toActivity()
      Destination
      org.json.JSONObject toJSONObject()
      Generates a JSON object representation of the transition
      java.lang.String toString()
      Generates a string representation of the transition
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Transition

        public Transition​(java.lang.String id,
                          java.lang.String name,
                          Activity from,
                          Activity to,
                          java.lang.String condition,
                          java.lang.String callback)
    • Method Detail

      • getId

        public java.lang.String getId()
        Transition id
        Returns:
        Transition id
      • getName

        public java.lang.String getName()
        Optional name
        Returns:
        Optional name
      • fromActivity

        public Activity fromActivity()
        Origin
        Returns:
        Origin
      • toActivity

        public Activity toActivity()
        Destination
        Returns:
        Destination
      • getAction

        public Action getAction()
        Action button
        Returns:
        Action
      • setAction

        public void setAction​(Action a)
      • condition

        public boolean condition​(java.lang.String code)
        Transition condition
        Parameters:
        code - Returned code from activity
        Returns:
        True if code is null or matches with one conditional value (separator ;)
      • getCondition

        public java.lang.String getCondition()
        Condition value of transition
        Returns:
        Condition value of transition
      • getCallback

        public java.lang.String getCallback()
        Callback name
        Returns:
        callback
      • callback

        public void callback​(ActivityFile context,
                             Grant g)
        Invoke the callback and send the notification when specified
        Parameters:
        context - Contextual activity
        g - Grant
      • getAlert

        public Alert getAlert()
        Get the transition notification
        Returns:
        Alert
      • setAlert

        public void setAlert​(Alert a)
        Assign a transition notification
        Parameters:
        a - Alert
      • toJSONObject

        public org.json.JSONObject toJSONObject()
        Generates a JSON object representation of the transition
        Returns:
        transition as JSON object
      • toString

        public java.lang.String toString()
        Generates a string representation of the transition
        Overrides:
        toString in class java.lang.Object
        Returns:
        transition as string