Class AbstractStandaloneGroup<T extends Actor>

    • Field Detail

      • m_Actors

        protected List<T extends Actor> m_Actors
        the actors of the fixed group.
    • Constructor Detail

      • AbstractStandaloneGroup

        public AbstractStandaloneGroup()
    • Method Detail

      • getDefaultActors

        protected abstract List<T> getDefaultActors()
        Returns the list of default actors.
        Returns:
        the default actors
      • getActorFilter

        protected Class[] getActorFilter()
        Returns the classes that the flow editor uses for filtering.
        Returns:
        the classes
      • getActorHandlerInfo

        public ActorHandlerInfo getActorHandlerInfo()
        Returns some information about the actor handler, e.g., whether it can contain standalones and the actor execution.
        Specified by:
        getActorHandlerInfo in interface ActorHandler
        Returns:
        the info
      • setParent

        public void setParent​(Actor value)
        Sets the parent of this actor, e.g., the group it belongs to.
        Specified by:
        setParent in interface Actor
        Overrides:
        setParent in class AbstractActor
        Parameters:
        value - the new parent
      • updateParent

        protected void updateParent()
        Updates the parent of all actors in this group.
      • checkActors

        protected String checkActors​(Actor[] actors)
        Checks the actors whether they are of the correct type.
        Parameters:
        actors - the actor to check
        Returns:
        null if OK, otherwise the error message
      • checkActor

        protected String checkActor​(Actor actor)
        Checks the actor whether it is of the correct type.
        Parameters:
        actor - the actor to check
        Returns:
        null if OK, otherwise the error message
      • checkActor

        protected String checkActor​(Actor actor,
                                    int index)
        Checks the actor whether it is of the correct type.
        Parameters:
        actor - the actor to check
        index - the index of actor, ignored if -1
        Returns:
        null if OK, otherwise the error message
      • size

        public int size()
        Returns the size of the group.
        Specified by:
        size in interface ActorHandler
        Returns:
        the size, always 2
      • setActors

        protected void setActors​(Actor[] value)
        Sets the actors to use.
        Parameters:
        value - the actors
      • getActors

        protected Actor[] getActors()
        Returns the actors to use.
        Returns:
        the actors
      • get

        public Actor get​(int index)
        Returns the actor at the given position.
        Specified by:
        get in interface ActorHandler
        Parameters:
        index - the position
        Returns:
        the actor
      • set

        public String set​(int index,
                          Actor actor)
        Sets the actor at the given position.
        Specified by:
        set in interface ActorHandler
        Parameters:
        index - the position
        actor - the actor to set at this position
        Returns:
        null if everything is fine, otherwise the error
      • indexOf

        public int indexOf​(String actor)
        Returns the index of the actor.
        Specified by:
        indexOf in interface ActorHandler
        Parameters:
        actor - the name of the actor to look for
        Returns:
        the index of -1 if not found
      • check

        public abstract String check()
        Performs checks on the "sub-actors".
        Specified by:
        check in interface ActorHandler
        Returns:
        null if everything is fine, otherwise the error
      • firstActive

        public Actor firstActive()
        Returns the first non-skipped actor.
        Specified by:
        firstActive in interface ActorHandler
        Returns:
        the first 'active' actor, null if none available
      • lastActive

        public Actor lastActive()
        Returns the last non-skipped actor.
        Specified by:
        lastActive in interface ActorHandler
        Returns:
        the last 'active' actor, null if none available
      • find

        public Actor find​(String name)
        Finds the actor with the specified name recursively.
        Parameters:
        name - the name of the actor
        Returns:
        the actor, null if not found
      • hasActor

        public boolean hasActor​(Class actor)
        Checks whether an actor of this type is present as a default (exact match).
        Parameters:
        actor - the actor type to check
        Returns:
        true if such an actor is present
      • getActors

        public <A extends ActorList<A> getActors​(Class<A> actor)
        Returns a list of actors comprising of the requested actor type (exact match).
        Type Parameters:
        A - the type
        Parameters:
        actor - the actor type too look here
        Returns:
        the list of actors that were located
      • hasActorBelow

        public boolean hasActorBelow​(Class parent,
                                     Class actor)
        Checks whether an actor of this type is present as a default (exact match).
        Parameters:
        parent - the parent the actor needs to be below (assumed to be ActorHandler, uses first occurrence)
        actor - the actor type to check
        Returns:
        true if such an actor is present
      • getActorsBelow

        public <A extends ActorList<A> getActorsBelow​(Class parent,
                                                        Class<A> actor)
        Returns a list of actors comprising of the requested actor type (exact match).
        Type Parameters:
        A - the type
        Parameters:
        parent - the parent the actors need to be below (assumed to be ActorHandler, uses first occurrence)
        actor - the actor type too look here
        Returns:
        the list of actors that were located
      • forceVariables

        protected void forceVariables​(Variables value)
        Updates the Variables instance in use.

        Use with caution!
        Overrides:
        forceVariables in class AbstractActor
        Parameters:
        value - the instance to use
      • doExecute

        protected abstract String doExecute()
        Executes the flow item.
        Specified by:
        doExecute in class AbstractActor
        Returns:
        null if everything is fine, otherwise error message
      • wrapUp

        public void wrapUp()
        Cleans up after the execution has finished. Graphical output is left untouched.
        Specified by:
        wrapUp in interface Actor
        Overrides:
        wrapUp in class AbstractActor