Package org.apache.synapse.commons.evaluators

Examples of org.apache.synapse.commons.evaluators.NotEvaluator


    public OMElement serialize(OMElement parent, Evaluator evaluator) throws EvaluatorException {
        if (!(evaluator instanceof NotEvaluator)) {
            throw new IllegalArgumentException("Evalutor should be a NotEvalutor");
        }

        NotEvaluator notEvaluator = (NotEvaluator) evaluator;

        OMElement notElement = fac.createOMElement(new QName(EvaluatorConstants.NOT));
        serializeChild(notElement, notEvaluator.getEvaluator());

        if (parent != null) {
            parent.addChild(notElement);
        }
       
View Full Code Here


*/
public class NotFactory implements EvaluatorFactory {
    private Log log = LogFactory.getLog(NotFactory.class);

    public Evaluator create(OMElement e) throws EvaluatorException {
        NotEvaluator not = new NotEvaluator();

        OMElement ce = e.getFirstElement();

        EvaluatorFactory ef = EvaluatorFactoryFinder.getInstance().
                findEvaluatorFactory(ce.getLocalName());

        if (ef == null) {
            handleException("Invalid configuration element: " + ce.getLocalName());
            return null;
        }

        Evaluator evaluator = ef.create(ce);

        not.setEvaluator(evaluator);

        return not;
    }
View Full Code Here

TOP

Related Classes of org.apache.synapse.commons.evaluators.NotEvaluator

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.