Interface Actor

    • Method Detail

      • isHeadless

        boolean isHeadless()
        Returns whether the actor is run in headless mode.
        Returns:
        true if GUI components are suppressed
      • getDefaultName

        String getDefaultName()
        Returns the default name of the actor.
        Returns:
        the default name
      • setName

        void setName​(String value)
        Sets the name of the actor.
        Parameters:
        value - the name
      • getName

        String getName()
        Returns the name of the actor.
        Returns:
        the name
      • setAnnotations

        void setAnnotations​(BaseAnnotation value)
        Sets the annoations.
        Parameters:
        value - the annotations
      • getAnnotations

        BaseAnnotation getAnnotations()
        Returns the current annotations.
        Returns:
        the annotations
      • setSkip

        void setSkip​(boolean value)
        Sets whether the transformation is skipped or not.
        Parameters:
        value - true if transformation is to be skipped
      • getSkip

        boolean getSkip()
        Returns whether transformation is skipped.
        Returns:
        true if transformation is skipped
      • setStopFlowOnError

        void setStopFlowOnError​(boolean value)
        Sets whether to stop the flow execution at this level in case this actor encounters an error.
        Parameters:
        value - true if flow gets stopped in case of an error
      • getStopFlowOnError

        boolean getStopFlowOnError()
        Returns whether to stop the flow execution at this level in case this actor encounters an error.
        Returns:
        true if flow gets stopped in case of an error
      • setSilent

        void setSilent​(boolean value)
        Sets whether to suppress output in the console. Note: the enclosing actor handler needs to have this enabled as well.
        Parameters:
        value - true if to suppress output in the console
      • getSilent

        boolean getSilent()
        Returns whether to suppress output in the console. Note: the enclosing actor handler needs to have this enabled as well.
        Returns:
        true if to suppress output in the console
      • setParent

        void setParent​(Actor value)
        Sets the parent of this actor, e.g., the group it belongs to.
        Parameters:
        value - the new parent
      • getParent

        Actor getParent()
        Returns the parent of this actor, e.g., the group.
        Returns:
        the current parent, can be null
      • getParentComponent

        Component getParentComponent()
        Returns the current parent component for interactive actors.
        Returns:
        the parent, null if not set
      • index

        int index()
        Returns the index of this actor in its parent's collection.
        Returns:
        the index, -1 if not applicable (e.g., no parent set)
      • getRoot

        Actor getRoot()
        Returns the root of this actor, e.g., the group at the highest level.
        Returns:
        the root, can be null
      • setVariables

        void setVariables​(Variables value)
        Updates the Variables instance in use, if different from current one.

        Use with caution!
        Parameters:
        value - the instance to use
      • getVariables

        Variables getVariables()
        Returns the Variables instance to use.
        Returns:
        the variables instance
      • getStorageHandler

        StorageHandler getStorageHandler()
        Returns the storage handler to use.
        Returns:
        the storage handler
      • getScopeHandler

        ScopeHandler getScopeHandler()
        Returns the scope handler for this actor.
        Returns:
        the scope handler
      • getFlowExecutionListeningSupporter

        FlowExecutionListeningSupporter getFlowExecutionListeningSupporter()
        Returns the flow execution handler in use.
        Returns:
        the execution handler
      • getFullName

        String getFullName()
        Returns the full name of the actor, i.e., the concatenated names of all parents. Used in error messages.
        Returns:
        the full name
      • getQuickInfo

        String getQuickInfo()
        Returns a quick info about the actor, which will be displayed in the GUI.

        Default implementation returns null.
        Specified by:
        getQuickInfo in interface QuickInfoSupporter
        Returns:
        null if no info available, otherwise short string
      • hasErrorHandler

        boolean hasErrorHandler()
        Checks if an error handler is set.
        Returns:
        true if an error handler is set
      • setErrorHandler

        void setErrorHandler​(ErrorHandler value)
        Sets the error handler to use for handling errors in the flow.
        Parameters:
        value - the error handler
      • getErrorHandler

        ErrorHandler getErrorHandler()
        Returns the current error handler for handling errors in the flow.
        Returns:
        the error handler
      • findVariables

        HashSet<String> findVariables()
        Recursively finds all the variables used in the actor's setup.
        Returns:
        the variables that were found
      • getDetectedVariables

        HashSet<String> getDetectedVariables()
        Returns the variables this actor is responsible for.
        Returns:
        the variables
      • setUp

        String setUp()
        Initializes the item for flow execution. Also calls the reset() method first before anything else.
        Returns:
        null if everything is fine, otherwise error message
      • execute

        String execute()
        Executes the flow item.
        Returns:
        null if everything is fine, otherwise error message
      • isFinished

        boolean isFinished()
        Returns whether the item has finished. The execute() will be called as long as the isFinished() method returns false.
        Returns:
        true if finished, false if further calls to execute() are necessary. Default implementation returns always true, i.e., fires only once.
      • wrapUp

        void wrapUp()
        Cleans up after the execution has finished. Graphical output is left untouched.
      • cleanUp

        void cleanUp()
        Cleans up after the execution has finished. Also removes graphical components.
        Specified by:
        cleanUp in interface CleanUpHandler
      • destroy

        void destroy()
        Frees up memory in a "destructive" non-reversible way.

        Calls cleanUp().
        Specified by:
        destroy in interface Destroyable
      • stopExecution

        void stopExecution()
        Stops the execution. No message set.
        Specified by:
        stopExecution in interface Stoppable
      • stopExecution

        void stopExecution​(String msg)
        Stops the execution.
        Parameters:
        msg - the message to set as reason for stopping, can be null
      • isStopped

        boolean isStopped()
        Returns whether the execution was stopped.
        Specified by:
        isStopped in interface StoppableWithFeedback
        Returns:
        true if the execution was stopped
      • hasStopMessage

        boolean hasStopMessage()
        Returns whether a stop message is available (in case the flow was stopped with a message).
        Returns:
        true if a message is available
      • getStopMessage

        String getStopMessage()
        Returns the stop message.
        Returns:
        the message, can be null
      • isExecuted

        boolean isExecuted()
        Returns whether the actor has been executed, after setting it up.
        Returns:
        true if the actor has been executed
      • getPreviousSibling

        Actor getPreviousSibling()
        If the actor is part of a group, this method returns the actor preceding it in that group.
        Returns:
        the preceding actor, null if not available
      • getNextSibling

        Actor getNextSibling()
        If the actor is part of a group, this method returns the actor following it in that group.
        Returns:
        the following actor, null if not available
      • compareTo

        int compareTo​(Object o)
        Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
        Specified by:
        compareTo in interface Comparable
        Parameters:
        o - the object to be compared.
        Returns:
        a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
        Throws:
        ClassCastException - if the specified object's type prevents it from being compared to this object.
      • equals

        boolean equals​(Object o)
        Returns whether the two objects are the same.
        Overrides:
        equals in class Object
        Parameters:
        o - the object to be compared
        Returns:
        true if the object is the same as this one
      • shallowCopy

        Actor shallowCopy​(boolean expand)
        Returns a shallow copy of itself, i.e., based on the commandline options.
        Specified by:
        shallowCopy in interface ShallowCopySupporter<Actor>
        Parameters:
        expand - whether to expand variables to their current values
        Returns:
        the shallow copy
      • sizeOf

        int sizeOf()
        Returns the size of the object.
        Returns:
        the size of the object