Class FindActionInUsageBehaviour<R extends org.palladiosimulator.pcm.usagemodel.AbstractUserAction>

  • Type Parameters:
    R - the type of the action that is to be searched for
    All Implemented Interfaces:
    ICommand<R,​PCMModel>, IPCMCommand<R>

    public class FindActionInUsageBehaviour<R extends org.palladiosimulator.pcm.usagemodel.AbstractUserAction>
    extends Object
    implements IPCMCommand<R>
    This command searches for an action of the specified type in the specified scenario behaviour and returns the first occurrence.
    • Constructor Detail

      • FindActionInUsageBehaviour

        public FindActionInUsageBehaviour​(org.palladiosimulator.pcm.usagemodel.ScenarioBehaviour behaviour,
                                          Class<R> actionClass)
        Constructs a new command that searches in the passed behaviour for an action of the specified class.
        Parameters:
        behaviour - the behaviour in which to search
        actionClass - the class of the action that is to be found
    • Method Detail

      • execute

        public R execute​(PCMModel pcm,
                         ICommandExecutor<PCMModel> executor)
        Executes the operation encapsulated by this class.

        Notice: This method is not intended to be called by clients. Use a ICommandExecutor instead to execute the operation.

        Specified by:
        execute in interface ICommand<R extends org.palladiosimulator.pcm.usagemodel.AbstractUserAction,​PCMModel>
        Parameters:
        pcm - the model
        executor - the ICommandExecutor that currently executes this operation. Use this reference to invoke sub-operations also implementing this ICommand interface.
        Returns:
      • cachable

        public boolean cachable()
        Specified by:
        cachable in interface ICommand<R extends org.palladiosimulator.pcm.usagemodel.AbstractUserAction,​PCMModel>
        Returns:
        whether the command may be cached or not.