Examples of ActionConfig


Examples of com.opensymphony.xwork2.config.entities.ActionConfig

        });


      RuntimeConfiguration rtConf = conf.getRuntimeConfiguration();

      ActionConfig actionOne = rtConf.getActionConfig("", "actionOne");
      ActionConfig actionTwo = rtConf.getActionConfig("", "actionTwo");

      List actionOneInterceptors = actionOne.getInterceptors();
      List actionTwoInterceptors = actionTwo.getInterceptors();

      assertNotNull(actionOne);
      assertNotNull(actionTwo);
      assertNotNull(actionOneInterceptors);
      assertNotNull(actionTwoInterceptors);
View Full Code Here

Examples of com.opensymphony.xwork2.config.entities.ActionConfig

        ConfigurationManager configurationManager = new ConfigurationManager();
        configurationManager.addContainerProvider(new XWorkConfigurationProvider());
        configurationManager.addContainerProvider(provider);
        Configuration configuration = configurationManager.getConfiguration();

        ActionConfig parentActionConfig = configuration.getRuntimeConfiguration().getActionConfig("/base", "parentAction");
        ActionConfig anotherActionConfig = configuration.getRuntimeConfiguration().getActionConfig("/base", "anotherAction");
        ActionConfig childActionConfig = configuration.getRuntimeConfiguration().getActionConfig("/base", "childAction");

        ResultConfig parentResultConfig1 = parentActionConfig.getResults().get("mockResult1");
        ResultConfig parentResultConfig2 = parentActionConfig.getResults().get("mockResult2");
        ResultConfig anotherResultConfig1 = anotherActionConfig.getResults().get("mockResult1");
        ResultConfig anotherResultConfig2 = anotherActionConfig.getResults().get("mockResult2");
        ResultConfig childResultConfig1 = childActionConfig.getResults().get("mockResult1");
        ResultConfig childResultConfig2 = childActionConfig.getResults().get("mockResult2");

        System.out.println(parentResultConfig1.getParams().get("identity"));
        System.out.println(parentResultConfig2.getParams().get("identity"));
        System.out.println(anotherResultConfig1.getParams().get("identity"));
        System.out.println(anotherResultConfig2.getParams().get("identity"));
View Full Code Here

Examples of com.opensymphony.xwork2.config.entities.ActionConfig

   
    PackageConfig packageConfig = configuration.getPackageConfig("xworkResultTypesTestPackage2");
    Map actionConfigMap = packageConfig.getActionConfigs();
   
   
    ActionConfig action1ActionConfig = (ActionConfig) actionConfigMap.get("action1");
    ActionConfig action2ActionConfig = (ActionConfig) actionConfigMap.get("action2");
   
    ResultConfig action1Result = (ResultConfig) action1ActionConfig.getResults().get("success");
    ResultConfig action2Result = (ResultConfig) action2ActionConfig.getResults().get("success");
   
    assertEquals(action1Result.getName(), "success");
    assertEquals(action1Result.getClassName(), "com.opensymphony.xwork2.mock.MockResult");
    assertEquals(action1Result.getName(), "success");
    assertEquals(action1Result.getClassName(), "com.opensymphony.xwork2.mock.MockResult");
View Full Code Here

Examples of com.sun.appserv.management.config.ActionConfig

        }
           
      final ManagementRuleConfig  ruleConfig  =
          (ManagementRuleConfig)getFactoryContainer();
       
        ActionConfig actionConfig = ruleConfig.getActionConfig();
        if ( actionConfig != null )
        {
            throw new IllegalStateException( "action already exists as " +
                        actionConfig.getName() + ", " + actionConfig.getActionMBeanName());
        }
       
      final String ruleName   = ruleConfig.getName();
        getOldManagementRules().addActionToManagementRule( ruleName, mbeanName );
     
View Full Code Here

Examples of de.odysseus.calyxo.control.conf.ActionConfig

    }   
    ActionsConfig actionsConfig = this.config.getActionsConfig();
    if (actionsConfig != null) {
      Iterator configs = actionsConfig.getActionConfigs();
      while (configs.hasNext()) {
        ActionConfig actionConfig = (ActionConfig)configs.next();
        Iterator exceptionConfigs = actionConfig.getExceptionHandlerConfigs();
        while (exceptionConfigs.hasNext()) {
          addHandler((ExceptionHandlerConfig)exceptionConfigs.next());
        }
      }
    }
View Full Code Here

Examples of de.odysseus.calyxo.control.conf.ActionConfig

    // Instantiate and initialized action chains
    ActionsConfig actionsConfig = this.config.getActionsConfig();
    if (actionsConfig != null) {
      Iterator configs = actionsConfig.getActionConfigs();
      while (configs.hasNext()) {
        ActionConfig actionConfig = (ActionConfig)configs.next();
        String className = actionConfig.getClassName();
        Class clazz = null;
        if (className == null) {
          clazz = pluginContext.getDefaultActionClass();
        } else {
          clazz = context.getClassLoader().loadClass(className);
        }
        Action action = (Action)clazz.newInstance();
        action.init(actionConfig, context);
        Command command = chain(actionConfig.getFilterConfigs(), action);
        ActionCommand item = new ActionCommand(actionConfig, command);
        commands.put(actionConfig.getPath(), item);
      }
    }
  }
View Full Code Here

Examples of jodd.madvoc.ActionConfig

    public void bind() {
      if (actionMethodString != null) {
        actionClassMethod = actionMethodParser.resolveActionMethod(actionClass, actionMethodString);
      }

      ActionConfig actionConfig =
          actionMethodParser.createActionConfig(
              actionClass, actionClassMethod,
              actionFilters, actionInterceptors,
              actionPath, method, async, null);
View Full Code Here

Examples of org.apache.struts.config.ActionConfig

  public void testCreateAction() throws Exception
  {
    ActionCreator actionCreator = newMock(ActionCreator.class);
    CreateAction createAction = getCreateAction(actionCreator);
    ServletActionContext actionContext = getActionContext();
    ActionConfig actionConfig = newMock(ActionConfig.class);
    ModuleConfig moduleConfig = newMock(ModuleConfig.class);
    ActionServlet servlet = newMock(ActionServlet.class);
    Map applicationScope = newMock(Map.class);
    Map actions = new HashMap();
    Action action = new Action();
   
    expect(actionConfig.getModuleConfig()).andReturn(moduleConfig);
    expect(moduleConfig.getPrefix()).andReturn("prefix");
    expect(actionContext.getApplicationScope()).andReturn(applicationScope);
    expect(applicationScope.get("actionsprefix")).andReturn(actions);
    expect(actionCreator.createAction(String.class)).andReturn(action);
    expect(actionContext.getActionServlet()).andReturn(servlet);
View Full Code Here

Examples of org.apache.struts.config.ActionConfig

            /*
             * First get all of the availble action mappings and create all of
             * the forms First try to find the panels action config. Look for
             * the same name as the panel id prefixed by a /
             */
            ActionConfig config = mapping.getModuleConfig().findActionConfig("/" + panel.getId());
            if (null != config && config instanceof ActionMapping) {
                ActionMapping subMapping = (ActionMapping) config;
                SubActionWrapper subActionWrapper = getSubActionWrapper(mapping, form, subMapping, request, index);
                if (null != subActionWrapper)
                    subActions.add(subActionWrapper);
View Full Code Here

Examples of org.apache.struts.config.ActionConfig

     */
    public static ActionForm getActionForm(HttpServletRequest request,
                                           HttpSession session)
    {
        /* Is there a mapping associated with this request? */
        ActionConfig mapping =
            (ActionConfig)request.getAttribute(Globals.MAPPING_KEY);
        if (mapping == null)
        {
            return null;
        }

        /* Is there a form bean associated with this mapping? */
        String attribute = mapping.getAttribute();
        if (attribute == null)
        {
            return null;
        }

        /* Look up the existing form bean */
        if ("request".equals(mapping.getScope()))
        {
            return (ActionForm)request.getAttribute(attribute);
        }
        if (session != null)
        {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.