Class FlowVariables

    • Field Detail

      • PREFIX_CALLABLEACTOR

        public static final String PREFIX_CALLABLEACTOR
        the callable actor reference prefix.
        See Also:
        Constant Field Values
      • CALLABLEREF_NOT_FOUND

        public static final String CALLABLEREF_NOT_FOUND
        the default value if callable reference could not be expanded.
        See Also:
        Constant Field Values
      • STORAGEREF_NOT_FOUND

        public static final String STORAGEREF_NOT_FOUND
        the default value if storage reference could not be expanded.
        See Also:
        Constant Field Values
      • m_Flow

        protected Actor m_Flow
        the flow reference.
    • Constructor Detail

      • FlowVariables

        public FlowVariables()
        Initializes the container.
    • Method Detail

      • setFlow

        public void setFlow​(Actor value)
        Sets the flow to obtain callable actors from.
        Parameters:
        value - the flow reference
      • getFlow

        public Actor getFlow()
        Returns the flow to obtain callable actors from.
        Returns:
        the flow reference
      • hasFlow

        public boolean hasFlow()
        Checks whether a flow reference is available.
        Returns:
        true if reference available
      • assign

        public void assign​(Variables other)
        Adds all the variables from the other Variables object (overwrites any existing ones).
        Overrides:
        assign in class Variables
        Parameters:
        other - the Variables to copy
      • has

        public boolean has​(String name)
        Checks whether a variable is stored or not.
        Overrides:
        has in class Variables
        Parameters:
        name - the name (or placeholder string) of the variable
        Returns:
        true if the variable is stored or a callable reference (check is too expensive)
      • getCallableActorValue

        protected Object getCallableActorValue​(String name,
                                               Object defValue)
        Returns the value obtain from the callable actor.
        Parameters:
        name - the name of the callable actor
        defValue - the default value
        Returns:
        the value obtained from the callable actor, defValue in case of error
      • getStorageValue

        protected Object getStorageValue​(String name,
                                         Object defValue)
        Returns the value obtain from storage.
        Parameters:
        name - the name of the storage value
        defValue - the default value
        Returns:
        the value obtained from storage, defValue in case of value not present in storage
      • get

        public String get​(String name,
                          String defValue)
        Returns the stored value if present, otherwise the default value.
        Overrides:
        get in class Variables
        Parameters:
        name - the name (or placeholder string) of the variable
        defValue - the default value, in case the variable is not stored
        Returns:
        the associated value
      • getObject

        public Object getObject​(String name,
                                Object defValue)
        Returns the stored value.
        Overrides:
        getObject in class Variables
        Parameters:
        name - the name of the value
        defValue - the default value to use if value not present
        Returns:
        the value referenced by the name, defValue if not available
      • doExpandGlobalRefs

        protected String doExpandGlobalRefs​(String s)
        Expands regular variables.
        Parameters:
        s - the string to expand
        Returns:
        the potentially expanded string
      • doExpand

        protected String doExpand​(String s)
        Performs all expansions.
        Overrides:
        doExpand in class Variables
        Parameters:
        s - the string to expand
        Returns:
        the potentially expanded string