Package org.springmodules.validation.util.cel.valang

Examples of org.springmodules.validation.util.cel.valang.ValangCondition


    public void testBeanValidator_WithCustomValangFunctions() throws Exception {

        Map functionsByName = new HashMap();
        functionsByName.put("tupper", UpperCaseFunction.class.getName());
        ValangCondition goodCondition = new ValangCondition("tupper(name) == 'URI'", functionsByName, null);
        ValangCondition badCondition = new ValangCondition("tupper(name) == 'Uri'", functionsByName, null);

        // creating the validation configuration for the bean.
        DefaultBeanValidationConfiguration personValidationConfiguration = new DefaultBeanValidationConfiguration();
        personValidationConfiguration.addGlobalRule(new DefaultValidationRule(goodCondition, "good"));
        personValidationConfiguration.addGlobalRule(new DefaultValidationRule(badCondition, "bad"));
View Full Code Here


    public void testBeanValidator_WithCustomValangFunctions() throws Exception {

        Map functionsByName = new HashMap();
        functionsByName.put("tupper", UpperCaseFunction.class.getName());
        ValangCondition goodCondition = new ValangCondition("tupper(name) == 'URI'", functionsByName, null);
        ValangCondition badCondition = new ValangCondition("tupper(name) == 'Uri'", functionsByName, null);

        // creating the validation configuration for the bean.
        DefaultBeanValidationConfiguration personValidationConfiguration = new DefaultBeanValidationConfiguration();
        personValidationConfiguration.addGlobalRule(new DefaultValidationRule(goodCondition, "good"));
        personValidationConfiguration.addGlobalRule(new DefaultValidationRule(badCondition, "bad"));
View Full Code Here

TOP

Related Classes of org.springmodules.validation.util.cel.valang.ValangCondition

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.