Package org.apache.synapse.config.xml

Examples of org.apache.synapse.config.xml.ValueFactory.createValue()


                "target"));
        if (xqueryKey != null) {
            // KeyFactory for creating dynamic or static Key
            ValueFactory keyFac = new ValueFactory();
            // create dynamic or static key based on OMElement
            Value generatedKey = keyFac.createValue(XMLConfigConstants.KEY, elem);

            if (generatedKey != null) {
                // set generated key as the Key
                xQueryMediator.setQueryKey(generatedKey);
            } else {
View Full Code Here


        if (keyAtt != null) {

            // ValueFactory for creating dynamic or static Key
            ValueFactory keyFac = new ValueFactory();
            // create dynamic or static key based on OMElement
            Value generatedKey = keyFac.createValue(XMLConfigConstants.KEY, elem);

            String functionName = (functionAtt == null ? null : functionAtt.getAttributeValue());
            mediator = new ScriptMediator(langAtt.getAttributeValue(),
                    includeKeysMap, generatedKey, functionName);
        } else {
View Full Code Here

            OMAttribute key = includeElem.getAttribute(new QName(XMLConfigConstants.NULL_NAMESPACE,
                    "key"));
            // ValueFactory for creating dynamic or static Value
            ValueFactory keyFac = new ValueFactory();
            // create dynamic or static key based on OMElement
            Value generatedKey = keyFac.createValue(XMLConfigConstants.KEY, elem);

            if (key == null) {
                throw new SynapseException("Cannot use 'include' element without 'key'" +
                        " attribute for a script mediator");
            }
View Full Code Here

    public void build(OMElement element) {
        OMAttribute topicAttr = element.getAttribute(new QName("topic"));
        if (topicAttr != null) {
            ValueFactory vf = new ValueFactory();
            Value value = vf.createValue("topic", element);

            setTopic(value);
        }

        OMAttribute expression = element.getAttribute(new QName("expression"));
View Full Code Here

                setEndpoint(endpoint);
            }
        }
        if (elem.getAttributeValue(new QName(null, "receive")) != null) {
            ValueFactory keyFactory = new ValueFactory();
            receivingSeqValue = keyFactory.createValue("receive", elem);
        }
    }
}
View Full Code Here

        EventMediator event = new EventMediator();

        OMAttribute topicAttr = element.getAttribute(new QName("topic"));
        if (topicAttr != null) {
            ValueFactory vf = new ValueFactory();
            Value value = vf.createValue("topic", element);

            event.setTopic(value);
        }

        OMAttribute expression = element.getAttribute(new QName("expression"));
View Full Code Here

            } else {
                n = elem.getAttribute(ATT_KEY);
                if (n != null) {
                    //Use KeyFactory to create Key
                    ValueFactory keyFactory = new ValueFactory();
                    key = keyFactory.createValue(XMLConfigConstants.KEY, elem);

                    if (e != null) {
                        String msg = "A sequence mediator with a reference to another " +
                                "sequence can not have 'ErrorHandler'";
                        throw new MediatorException(msg);
View Full Code Here

            this.language = langAtt.getAttributeValue();
            this.function = functionName;

            //Use KeyFactory to create Key
            ValueFactory keyFactory = new ValueFactory();
            key = keyFactory.createValue(XMLConfigConstants.KEY, elem);
           
        } else {
            this.language = langAtt.getAttributeValue();
            this.scriptSourceCode = elem.getText();
        }
View Full Code Here

        OMAttribute attrTarget = elem.getAttribute(new QName(XMLConfigConstants.NULL_NAMESPACE,
                "target"));
        if (xqueryKey != null) {
            //Use KeyFactory to create Key
            ValueFactory keyFactory = new ValueFactory();
            queryKey = keyFactory.createValue(XMLConfigConstants.KEY, elem);
        } else {
            throw new MediatorException("The 'key' attribute is required for the XQuery mediator");
        }
        if (attrTarget != null) {
            String targetValue = attrTarget.getAttributeValue();
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.