Package com.opensymphony.xwork2.config

Examples of com.opensymphony.xwork2.config.RuntimeConfiguration


                        }
                    }
                };
            }
            public RuntimeConfiguration getRuntimeConfiguration() {
                return new RuntimeConfiguration() {
                    public ActionConfig getActionConfig(String namespace, String name) {
                        ActionConfig actionConfig = new ActionConfig("", name, DoubleValidationAction.class.getName()) {
                            public List getInterceptors() {
                                List interceptors = new ArrayList();
View Full Code Here


                add(p);
            }
        });


      RuntimeConfiguration rtConf = conf.getRuntimeConfiguration();

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

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

      assertNotNull(actionOne);
View Full Code Here

        Boolean validate = (Boolean) getParameters().get("validate");
        if (validate != null && validate) {

            addParameter("performValidation", Boolean.FALSE);

            RuntimeConfiguration runtimeConfiguration = configuration.getRuntimeConfiguration();
            ActionConfig actionConfig = runtimeConfiguration.getActionConfig(namespace, actionName);

            if (actionConfig != null) {
                List<InterceptorMapping> interceptors = actionConfig.getInterceptors();
                for (InterceptorMapping interceptorMapping : interceptors) {
                    if (ValidationInterceptor.class.isInstance(interceptorMapping.getInterceptor())) {
View Full Code Here

                            }
                        }
                    };
                }
                public RuntimeConfiguration getRuntimeConfiguration() {
                    return new RuntimeConfiguration() {
                        public ActionConfig getActionConfig(String namespace, String name) {
                            ActionConfig actionConfig = new ActionConfig() {
                                public List getInterceptors() {
                                    List interceptors = new ArrayList();
View Full Code Here

                            }
                        }
                    };
                }
                public RuntimeConfiguration getRuntimeConfiguration() {
                    return new RuntimeConfiguration() {
                        public ActionConfig getActionConfig(String namespace, String name) {
                            ActionConfig actionConfig = new ActionConfig() {
                                public List getInterceptors() {
                                    List interceptors = new ArrayList();
View Full Code Here

        configurationManager.addConfigurationProvider(c);
        configurationManager.reload();
    }

    protected ActionConfig assertClass(String namespace, String action_name, String class_name) {
        RuntimeConfiguration configuration = configurationManager.getConfiguration().getRuntimeConfiguration();
        ActionConfig config = configuration.getActionConfig(namespace, action_name);
        assertNotNull("Mssing action", config);
        assertTrue("Wrong class name: [" + config.getClassName() + "]",
                class_name.equals(config.getClassName()));
        return config;
    }
View Full Code Here

    // See superclass for Javadoc
    public void loadPackages() throws ConfigurationException {

        Set namespaces = Collections.EMPTY_SET;
        RuntimeConfiguration rc = configuration.getRuntimeConfiguration();
        Map allActionConfigs = rc.getActionConfigs();
        if (allActionConfigs != null) {
            namespaces = allActionConfigs.keySet();
        }

        if (namespaces.size() == 0) {
View Full Code Here

        Boolean validate = (Boolean) getParameters().get("validate");
        if (validate != null && validate) {

            addParameter("performValidation", Boolean.FALSE);

            RuntimeConfiguration runtimeConfiguration = configuration.getRuntimeConfiguration();
            ActionConfig actionConfig = runtimeConfiguration.getActionConfig(namespace, actionName);

            if (actionConfig != null) {
                List<InterceptorMapping> interceptors = actionConfig.getInterceptors();
                for (InterceptorMapping interceptorMapping : interceptors) {
                    if (ValidationInterceptor.class.isInstance(interceptorMapping.getInterceptor())) {
View Full Code Here

        ActionConfig anotherActionWithOwnRef = new ActionConfig.Builder("", "AnotherActionWithOwnRef", SimpleAction.class.getName())
            .addInterceptor(new InterceptorMapping("logging", objectFactory.buildInterceptor(loggingInterceptor, new HashMap<String, String>())))
            .build();

        RuntimeConfiguration runtimeConfig = configurationManager.getConfiguration().getRuntimeConfiguration();

        // assertions
        assertEquals(actionWithOwnRef, runtimeConfig.getActionConfig("", "ActionWithOwnRef"));
        assertEquals(actionWithDefaultRef, runtimeConfig.getActionConfig("", "ActionWithDefaultRef"));

        assertEquals(actionWithNoRef, runtimeConfig.getActionConfig("", "ActionWithNoRef"));
        assertEquals(anotherActionWithOwnRef, runtimeConfig.getActionConfig("", "AnotherActionWithOwnRef"));
    }
View Full Code Here

                add(new XWorkConfigurationProvider());
                add(p);
            }
        });

        RuntimeConfiguration rtConf = conf.getRuntimeConfiguration();

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

        List<InterceptorMapping> actionOneInterceptors = actionOne.getInterceptors();
        List<InterceptorMapping> actionTwoInterceptors = actionTwo.getInterceptors();

        assertNotNull(actionOne);
View Full Code Here

TOP

Related Classes of com.opensymphony.xwork2.config.RuntimeConfiguration

Copyright © 2018 www.massapicom. 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.