Package org.drools.ide.common.server.factconstraints.predefined

Examples of org.drools.ide.common.server.factconstraints.predefined.InvalidFieldConstraint


        } else if (NotMatchesConstraint.NAME.equals(config.getConstraintName())) {
            return new NotMatchesConstraint();
        }else if (MatchesConstraint.NAME.equals(config.getConstraintName())) {
            return new MatchesConstraint();
        }else if (InvalidFieldConstraint.NAME.equals(config.getConstraintName())) {
            return new InvalidFieldConstraint();
        } else {
            throw new IllegalArgumentException("Constraint unknown: " + config.getConstraintName());
        }
    }
View Full Code Here


        VerifierBuilder vBuilder = VerifierBuilderFactory.newVerifierBuilder();

        //VerifierConfiguration conf = new DefaultVerifierConfiguration();
        VerifierConfiguration vconf = new VerifierConfigurationImpl();

        Constraint cons = new InvalidFieldConstraint();
        System.out.println("\n\n\n"+cons.getVerifierRule(conf)+"\n\n\n");
        vconf.getVerifyingResources().put(ResourceFactory.newByteArrayResource(cons.getVerifierRule(conf).getBytes()), ResourceType.DRL);

        Verifier verifier = vBuilder.newVerifier(vconf);

        verifier.addResourcesToVerify(ResourceFactory.newByteArrayResource(ruleToVerify.getBytes()),
                ResourceType.DRL);
View Full Code Here

        } else if (NotMatchesConstraint.NAME.equals(config.getConstraintName())) {
            return new NotMatchesConstraint();
        }else if (MatchesConstraint.NAME.equals(config.getConstraintName())) {
            return new MatchesConstraint();
        }else if (InvalidFieldConstraint.NAME.equals(config.getConstraintName())) {
            return new InvalidFieldConstraint();
        }else if (MandatoryFieldConstraint.NAME.equals(config.getConstraintName())) {
            return new MandatoryFieldConstraint();
        } else {
            throw new IllegalArgumentException("Constraint unknown: " + config.getConstraintName());
        }
View Full Code Here

TOP

Related Classes of org.drools.ide.common.server.factconstraints.predefined.InvalidFieldConstraint

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.