Package org.apache.synapse.commons.evaluators

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


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

        Evaluator evaluator = ef.create(ce);

        r.setEvaluator(evaluator);
        return r;
    }
View Full Code Here


                handleException("Invalid configuration element: " +
                        evaluatorElement.getLocalName());
                return null;
            }

            Evaluator evaluator = ef.create(evaluatorElement);
            evaluators.add(evaluator);
        }

        if (evaluators.size() > 1) {
            o.setEvaluators(evaluators.toArray(new Evaluator[evaluators.size()]));
View Full Code Here

                handleException("Invalid configuration element: " +
                        evaluatorElement.getLocalName());
                return null;
            }

            Evaluator evaluator = ef.create(evaluatorElement);
            evaluators.add(evaluator);
        }

        if (evaluators.size() > 1) {          
            o.setEvaluators(evaluators.toArray(new Evaluator[evaluators.size()]));
View Full Code Here

        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

        return rewrite;
    }

    private OMElement serializeRule(RewriteRule r) throws EvaluatorException {
        OMElement rule = fac.createOMElement("rule", synNS);
        Evaluator condition = r.getCondition();
        if (condition != null) {
            OMElement conditionElt = fac.createOMElement("condition", synNS);
            EvaluatorSerializer serializer = EvaluatorSerializerFinder.getInstance().
                    getSerializer(condition.getName());
            serializer.serialize(conditionElt, condition);
            rule.addChild(conditionElt);
        }

        List<RewriteAction> actions = r.getActions();
View Full Code Here

                handleException("Couldn't find the condition of the conditional router");
                return null;
            }

            try {
                Evaluator evaluator = EvaluatorFactoryFinder.getInstance().getEvaluator(
                        conditionElem.getFirstElement());
                route.setEvaluator(evaluator);
            } catch (EvaluatorException ee) {
                handleException("Couldn't build the condition of the conditional router", ee);
            }
View Full Code Here

        OMElement condition = ruleElement.getFirstChildWithName(CONDITION_Q);
        if (condition != null) {
            OMElement child = condition.getFirstElement();
            if (child != null) {
                try {
                    Evaluator eval = EvaluatorFactoryFinder.getInstance().getEvaluator(child);
                    rule.setCondition(eval);
                } catch (EvaluatorException e) {
                    handleException("Error while parsing the rule condition", e);
                }
            }
View Full Code Here

        OMElement condition = ruleElement.getFirstChildWithName(CONDITION_Q);
        if (condition != null) {
            OMElement child = condition.getFirstElement();
            if (child != null) {
                try {
                    Evaluator eval = EvaluatorFactoryFinder.getInstance().getEvaluator(child);
                    rule.setCondition(eval);
                } catch (EvaluatorException e) {
                    handleException("Error while parsing the rule condition", e);
                }
            }
View Full Code Here

                handleException("Couldn't find the condition of the conditional router");
                return null;
            }

            try {
                Evaluator evaluator = EvaluatorFactoryFinder.getInstance().getEvaluator(
                        conditionElem.getFirstElement());
                conditionalRoute.setEvaluator(evaluator);
            } catch (EvaluatorException ee) {
                handleException("Couldn't build the condition of the conditional router", ee);
            }
View Full Code Here

        return rewrite;
    }

    private OMElement serializeRule(RewriteRule r) throws EvaluatorException {
        OMElement rule = fac.createOMElement("rewriterule", synNS);
        Evaluator condition = r.getCondition();
        if (condition != null) {
            OMElement conditionElt = fac.createOMElement("condition", synNS);
            EvaluatorSerializer serializer = EvaluatorSerializerFinder.getInstance().
                    getSerializer(condition.getName());
            serializer.serialize(conditionElt, condition);
            rule.addChild(conditionElt);
        }

        List<RewriteAction> actions = r.getActions();
View Full Code Here

TOP

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

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.