Examples of OgnlFunctionExpressionParser


Examples of org.springmodules.validation.util.fel.parser.OgnlFunctionExpressionParser

    protected DefaultXmlBeanValidationConfigurationLoader createLoader(String resource, ApplicationContext context) throws Exception {
        DefaultXmlBeanValidationConfigurationLoader loader = new DefaultXmlBeanValidationConfigurationLoader();
        loader.setResource(new ClassPathResource(resource, getClass()));
        loader.setConditionExpressionParser(new OgnlConditionExpressionParser());
        loader.setFunctionExpressionParser(new OgnlFunctionExpressionParser());
        loader.setApplicationContext(context);
        loader.afterPropertiesSet();
        return loader;
    }
View Full Code Here

Examples of org.springmodules.validation.util.fel.parser.OgnlFunctionExpressionParser

                assertEquals("true", applyIfString);
                assertEquals("", contextsString);
                return super.createMethodValidationRule(clazz, methodName, errorCode, message, argsString, contextsString, applyIfString);
            }
        };
        loader.setFunctionExpressionParser(new OgnlFunctionExpressionParser());
        loader.setConditionExpressionParser(new OgnlConditionExpressionParser());
        loader.handleMethodDefinition(methodElement, TestBean.class, configuration);
    }
View Full Code Here

Examples of org.springmodules.validation.util.fel.parser.OgnlFunctionExpressionParser

            public String toString(Object[] objects) {
                return "";
            }
        });

        loader.setFunctionExpressionParser(new OgnlFunctionExpressionParser());
        loader.setConditionExpressionParser(new OgnlConditionExpressionParser());

        replay();
        loader.handleMethodDefinition(methodElement, TestBean.class, configuration);
        verify();
View Full Code Here

Examples of org.springmodules.validation.util.fel.parser.OgnlFunctionExpressionParser

        assertFalse("createMethodValidationRule on configuration was not called", list.isEmpty());
    }

    public void testCreateMethodValidationRule() throws Exception {
        loader.setFunctionExpressionParser(new OgnlFunctionExpressionParser());
        loader.setConditionExpressionParser(new OgnlConditionExpressionParser());
        ValidationMethodValidationRule rule = loader.createMethodValidationRule(TestBean.class, "validate", "code", "message", "'a', 'b', 'c'", "bla", "true");
        TestBean testBean = new TestBean() {
            public boolean validate() {
                return false;
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.