Examples of InterceptorMapping


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

    private void verifyActionConfigInterceptors(PackageConfig pkgConfig, String actionName, String... refs) {
        ActionConfig ac = pkgConfig.getAllActionConfigs().get(actionName);
        assertNotNull(ac);
        List<InterceptorMapping> interceptorMappings = ac.getInterceptors();
        for (int i = 0; i < interceptorMappings.size(); i++) {
            InterceptorMapping interceptorMapping = interceptorMappings.get(i);
            assertEquals(refs[i], interceptorMapping.getName());
        }
    }
View Full Code Here

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

                                List interceptors = new ArrayList();

                                ValidationInterceptor validationInterceptor = new ValidationInterceptor();
                                validationInterceptor.setIncludeMethods("*");

                                InterceptorMapping interceptorMapping = new InterceptorMapping("validation", validationInterceptor);
                                interceptors.add(interceptorMapping);

                                return interceptors;
                            }
                            public String getClassName() {
View Full Code Here

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

                                    List interceptors = new ArrayList();

                                    ValidationInterceptor validationInterceptor = new ValidationInterceptor();
                                    validationInterceptor.setExcludeMethods("*");

                                    InterceptorMapping interceptorMapping = new InterceptorMapping("validation", validationInterceptor);
                                    interceptors.add(interceptorMapping);

                                    return interceptors;
                                }
                                public String getClassName() {
View Full Code Here

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

                                List interceptors = new ArrayList();

                                ValidationInterceptor validationInterceptor = new ValidationInterceptor();
                                validationInterceptor.setIncludeMethods("*");

                                InterceptorMapping interceptorMapping = new InterceptorMapping("validation", validationInterceptor);
                                interceptors.add(interceptorMapping);

                                return interceptors;
                            }
                            public String getClassName() {
View Full Code Here

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

                                List interceptors = new ArrayList();

                                ValidationInterceptor validationInterceptor = new ValidationInterceptor();
                                validationInterceptor.setIncludeMethods("*");

                                InterceptorMapping interceptorMapping = new InterceptorMapping("validation", validationInterceptor);
                                interceptors.add(interceptorMapping);

                                return interceptors;
                            }
                            public String getClassName() {
View Full Code Here

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

                                    List interceptors = new ArrayList();

                                    ValidationInterceptor validationInterceptor = new ValidationInterceptor();
                                    validationInterceptor.setExcludeMethods("*");

                                    InterceptorMapping interceptorMapping = new InterceptorMapping("validation", validationInterceptor);
                                    interceptors.add(interceptorMapping);

                                    return interceptors;
                                }
                                public String getClassName() {
View Full Code Here

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

                                List interceptors = new ArrayList();

                                ValidationInterceptor validationInterceptor = new ValidationInterceptor();
                                validationInterceptor.setIncludeMethods("*");

                                InterceptorMapping interceptorMapping = new InterceptorMapping("validation", validationInterceptor);
                                interceptors.add(interceptorMapping);

                                return interceptors;
                            }
                            public String getClassName() {
View Full Code Here

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

                                List interceptors = new ArrayList();

                                ValidationInterceptor validationInterceptor = new ValidationInterceptor();
                                validationInterceptor.setIncludeMethods("*");

                                InterceptorMapping interceptorMapping = new InterceptorMapping("validation", validationInterceptor);
                                interceptors.add(interceptorMapping);

                                return interceptors;
                            }
                            public String getClassName() {
View Full Code Here

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

            if (executed) {
                throw new IllegalStateException("Action has already executed");
            }

            if (interceptors.hasNext()) {
                final InterceptorMapping interceptor = interceptors.next();
                String interceptorMsg = "interceptor: " + interceptor.getName();
                UtilTimerStack.push(interceptorMsg);
                try {
                                resultCode = interceptor.getInterceptor().intercept(DefaultActionInvocation.this);
                            }
                finally {
                    UtilTimerStack.pop(interceptorMsg);
                }
            } else {
View Full Code Here

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

    public void testInterceptorDestroy() throws Exception {          
        Mock mockInterceptor = new Mock(Interceptor.class);
        mockInterceptor.matchAndReturn("hashCode", 0);
        mockInterceptor.expect("destroy");
       
        InterceptorMapping interceptorMapping = new InterceptorMapping("test", (Interceptor) mockInterceptor.proxy());
       
        InterceptorStackConfig isc = new InterceptorStackConfig.Builder("test").addInterceptor(interceptorMapping).build();
       
        PackageConfig packageConfig = new PackageConfig.Builder("test").addInterceptorStackConfig(isc).build();
       
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.