Search in sources :

Example 1 with ActionMethodContainer

use of com.axway.ats.agent.core.action.ActionMethodContainer in project ats-framework by Axway.

the class ComponentActionMap method addAction.

/**
     * Add an action to the component map
     *
     * @param actionName    name of the action
     * @param method        the method which implements the action
     * @throws ActionAlreadyDefinedException    if an action with this name has already been defined
     */
private void addAction(String actionName, String actionClassName, String actionMethodName, Method method, Class<?> actualClass, boolean isRegularAction) throws ActionAlreadyDefinedException {
    ActionMethodContainer methodContainer = actions.get(actionName);
    if (methodContainer == null) {
        methodContainer = new ActionMethodContainer(componentName, actionName);
        actions.put(actionName, methodContainer);
    }
    ActionMethod actionMethod;
    if (isRegularAction) {
        actionMethod = new ActionMethod(componentName, actionName, method, actualClass);
    } else {
        actionMethod = new TemplateActionMethod(componentName, actionName, actionClassName, actionMethodName, method, actualClass);
    }
    methodContainer.add(actionMethod);
}
Also used : ActionMethod(com.axway.ats.agent.core.action.ActionMethod) TemplateActionMethod(com.axway.ats.agent.core.action.TemplateActionMethod) ActionMethodContainer(com.axway.ats.agent.core.action.ActionMethodContainer) TemplateActionMethod(com.axway.ats.agent.core.action.TemplateActionMethod)

Aggregations

ActionMethod (com.axway.ats.agent.core.action.ActionMethod)1 ActionMethodContainer (com.axway.ats.agent.core.action.ActionMethodContainer)1 TemplateActionMethod (com.axway.ats.agent.core.action.TemplateActionMethod)1