Package com.opensymphony.xwork2.config.entities

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


        assertEquals(chainResultToCompare, chainResult);
    }

    private void verifyActionConfig(PackageConfig pkgConfig, String actionName, Class<?> actionClass,
            String methodName, String packageName) {
        ActionConfig ac = pkgConfig.getAllActionConfigs().get(actionName);
        assertNotNull(ac);
        assertEquals(actionClass.getName(), ac.getClassName());
        assertEquals(methodName, ac.getMethodName());
        assertEquals(packageName, ac.getPackageName());
    }
View Full Code Here


        assertFalse(configuration.getPackageConfigNames().contains(packageName));
    }

    private void verifyMissingActionConfig(PackageConfig pkgConfig, String actionName, Class<?> actionClass,
            String methodName, String packageName) {
        ActionConfig ac = pkgConfig.getAllActionConfigs().get(actionName);
        assertNull(ac);
    }
View Full Code Here

        ActionConfig ac = pkgConfig.getAllActionConfigs().get(actionName);
        assertNull(ac);
    }

    private void verifyActionConfig(PackageConfig pkgConfig, String actionName, String actionClass, String methodName, String packageName) {
        ActionConfig ac = pkgConfig.getAllActionConfigs().get(actionName);
        assertNotNull(ac);
        assertEquals(actionClass, ac.getClassName());
        assertEquals(methodName, ac.getMethodName());
        assertEquals(packageName, ac.getPackageName());
    }
View Full Code Here

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

                                ValidationInterceptor validationInterceptor = new ValidationInterceptor();
                                validationInterceptor.setIncludeMethods("*");
 
View Full Code Here

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

                                    ValidationInterceptor validationInterceptor = new ValidationInterceptor();
                                    validationInterceptor.setExcludeMethods("*");
 
View Full Code Here

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

                                ValidationInterceptor validationInterceptor = new ValidationInterceptor();
                                validationInterceptor.setIncludeMethods("*");
 
View Full Code Here

                };
            }
            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();

                                ValidationInterceptor validationInterceptor = new ValidationInterceptor();
                                validationInterceptor.setIncludeMethods("*");
 
View Full Code Here

        initDispatcher(new HashMap<String,String>(){{
            put("configProviders", TestConfigurationProvider.class.getName());
        }});
        ActionContext.getContext().setValueStack(stack);

        ActionConfig config = new ActionConfig.Builder("", "name", "").build();
        ActionInvocation invocation = EasyMock.createNiceMock(ActionInvocation.class);
        ActionProxy proxy = EasyMock.createNiceMock(ActionProxy.class);

        EasyMock.expect(invocation.getProxy()).andReturn(proxy).anyTimes();
        EasyMock.expect(invocation.getAction()).andReturn(null).anyTimes();
View Full Code Here

        HashMap<String, Object> extraContext = new HashMap<String, Object>();
        extraContext.put(ActionContext.PARAMETERS, params);

        ActionProxy proxy = actionProxyFactory.createActionProxy("", MockConfigurationProvider.PARAM_INTERCEPTOR_ACTION_NAME, extraContext);

        ActionConfig config = configuration.getRuntimeConfiguration().getActionConfig("", MockConfigurationProvider.PARAM_INTERCEPTOR_ACTION_NAME);
        ParametersInterceptor pi =(ParametersInterceptor) config.getInterceptors().get(0).getInterceptor();
        pi.setExcludeParams("name");

        proxy.execute();

        SimpleAction action = (SimpleAction) proxy.getAction();
View Full Code Here

        HashMap<String, Object> extraContext = new HashMap<String, Object>();
        extraContext.put(ActionContext.PARAMETERS, params);

        ActionProxy proxy = actionProxyFactory.createActionProxy("", MockConfigurationProvider.PARAM_INTERCEPTOR_ACTION_NAME, extraContext);

        ActionConfig config = configuration.getRuntimeConfiguration().getActionConfig("", MockConfigurationProvider.PARAM_INTERCEPTOR_ACTION_NAME);
        ParametersInterceptor pi =(ParametersInterceptor) config.getInterceptors().get(0).getInterceptor();
        pi.setAcceptParamNames("blah, baz");

        proxy.execute();

        SimpleAction action = (SimpleAction) proxy.getAction();
View Full Code Here

TOP

Related Classes of com.opensymphony.xwork2.config.entities.ActionConfig

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.