Package org.apache.axiom.om

Examples of org.apache.axiom.om.OMElement.addAttribute()


            script.addAttribute(fac.createOMAttribute("key", nullNS, key));
            if (!function.equals("mediate")) {
                script.addAttribute(fac.createOMAttribute("function", nullNS, function));
            }
        } else {
            script.addAttribute(fac.createOMAttribute("language", nullNS, language));
            OMTextImpl textData = (OMTextImpl) fac.createOMText(
                    scriptMediator.getScriptSrc().trim());
            textData.setType(XMLStreamConstants.CDATA);
            script.addChild(textData);
        }
View Full Code Here


        Map<String, Object> includeMap = scriptMediator.getIncludeMap();
        for (String includeKey : includeMap.keySet()) {
            if (includeKey != null && includeKey.length() != 0) {
                OMElement includeKeyElement = fac.createOMElement("include", synNS);
                includeKeyElement.addAttribute(fac.createOMAttribute("key", nullNS, includeKey));
                script.addChild(includeKeyElement);
            }
        }

        saveTracingState(script, scriptMediator);
View Full Code Here

        SpringMediator mediator = (SpringMediator) m;
        OMElement spring = fac.createOMElement("spring", sprNS);

        if (mediator.getBeanName() != null) {
            spring.addAttribute(fac.createOMAttribute(
                "bean", nullNS, mediator.getBeanName()));
        } else {
            handleException("Invalid mediator. Bean name required.");
        }
        saveTracingState(spring,mediator);
View Full Code Here

            handleException("Invalid mediator. Bean name required.");
        }
        saveTracingState(spring,mediator);

        if (mediator.getConfigKey() != null) {
            spring.addAttribute(fac.createOMAttribute(
                "key", nullNS, mediator.getConfigKey()));
        }

        // TODO add support for src attribute - or replace with a reg key!
View Full Code Here

        OMElement store = fac.createOMElement("messageStore", synNS);

        if (messageStore.getProviderClass() != null) {
            if (!messageStore.getProviderClass().equals(InMemoryMessageStore.class.getName())) {
                store.addAttribute(fac.createOMAttribute("class", nullNS,
                        messageStore.getProviderClass()));
            }
        } else {
            handleException("Invalid MessageStore. Provider is required");
        }
View Full Code Here

        } else {
            handleException("Invalid MessageStore. Provider is required");
        }

        if (messageStore.getSequence() != null) {
            store.addAttribute(fac.createOMAttribute("sequence", nullNS, messageStore.getSequence()));
        }

        if (messageStore.getName() != null) {
            store.addAttribute(fac.createOMAttribute("name", nullNS, messageStore.getName()));
        } else {
View Full Code Here

        if (messageStore.getSequence() != null) {
            store.addAttribute(fac.createOMAttribute("sequence", nullNS, messageStore.getSequence()));
        }

        if (messageStore.getName() != null) {
            store.addAttribute(fac.createOMAttribute("name", nullNS, messageStore.getName()));
        } else {
            handleException("Message store Name not specified");
        }

        //Redelivery processor
View Full Code Here

            Iterator iter = messageStore.getParameters().keySet().iterator();
            while (iter.hasNext()) {
                String name = (String) iter.next();
                String value = (String) messageStore.getParameters().get(name);
                OMElement property = fac.createOMElement("parameter", synNS);
                property.addAttribute(fac.createOMAttribute(
                        "name", nullNS, name));
                property.setText(value.trim());
                store.addChild(property);
            }
        }
View Full Code Here

        if (mediator.getSource() != null && mediator.getRegex() != null) {

            SynapseXPathSerializer.serializeXPath(mediator.getSource(), filter, "source");

            filter.addAttribute(fac.createOMAttribute(
                "regex", nullNS, mediator.getRegex().pattern()));

        } else if (mediator.getXpath() != null) {

            SynapseXPathSerializer.serializeXPath(mediator.getXpath(), filter, "xpath");
View Full Code Here

            OMElement thenElem = fac.createOMElement("then", synNS);
            filter.addChild(thenElem);

            if (mediator.getThenKey() != null) {
                thenElem.addAttribute(
                    fac.createOMAttribute("sequence", nullNS, mediator.getThenKey()));
            } else {
                serializeChildren(thenElem, mediator.getList());
            }
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.