Package org.apache.synapse.config.xml.endpoints

Examples of org.apache.synapse.config.xml.endpoints.TemplateFactory


    }

    public static Template defineEndpointTemplate(SynapseConfiguration config,
                                                    OMElement elem, Properties properties) {

        TemplateFactory templateFactory = new TemplateFactory();
        String name = elem.getAttributeValue(new QName(XMLConfigConstants.NULL_NAMESPACE, "name"));
        try {
            Template template = templateFactory.createEndpointTemplate(elem, properties);
            if (template != null) {
                config.addEndpointTemplate(template.getName(), template);
            }
            return template;
        } catch (Exception e) {
View Full Code Here


                o = registry.getResource(entry, getProperties());
                if (o != null && o instanceof Template) {
                    localRegistry.put(key, entry);
                    return (Template) o;
                } else if (o instanceof OMNode) {
                    Template m = new TemplateFactory().createEndpointTemplate(
                            (OMElement) o, properties);
                    if (m != null) {
                        entry.setValue(m);
                        return m;
                    }
View Full Code Here

                o = registry.getResource(entry, getProperties());
                if (o != null && o instanceof Template) {
                    localRegistry.put(key, entry);
                    return (Template) o;
                } else if (o instanceof OMNode) {
                    Template m = new TemplateFactory().createEndpointTemplate(
                            (OMElement) o, properties);
                    if (m != null) {
                        entry.setValue(m);
                        return m;
                    }
View Full Code Here

    }

    public static Template defineEndpointTemplate(SynapseConfiguration config,
                                                    OMElement elem, Properties properties) {

        TemplateFactory templateFactory = new TemplateFactory();
        String name = elem.getAttributeValue(new QName(XMLConfigConstants.NULL_NAMESPACE, "name"));
        try {
            Template template = templateFactory.createEndpointTemplate(elem, properties);
            if (template != null) {
                config.addEndpointTemplate(template.getName(), template);
            }
            return template;
        } catch (Exception e) {
View Full Code Here

        }

        element = elem.getFirstChildWithName(
                new QName(SynapseConstants.SYNAPSE_NAMESPACE, "endpoint"));
        if (element != null) {
            TemplateFactory templateFactory = new TemplateFactory();
            return templateFactory.createEndpointTemplate(elem, properties);
        }
        return null;
    }
View Full Code Here

    public Template getTempalate(String templateName) throws RemoteException, TemplateEditorException {
        OMElement element = null;
        Template template = null;
        try {
            element = endpointTemplateAdminStub.getTemplate(templateName).getFirstElement();
            template = new TemplateFactory().createEndpointTemplate(element, new Properties());
        } catch (Exception e) {
            handleException("Couldn't retrieve the endpoint template element with name '"
                            + templateName + "'", e);
        }
        return template;
View Full Code Here

                Template preSeq = config.getEndpointTemplates().get(templateName);
                if (preSeq == null) {
                    handleException("Unable to save template " + templateName + ". Does not exist");
                } else {
                    // we should first try to build the new sequence. if exception we return
                    Template endpointTemplate = new TemplateFactory().createEndpointTemplate(
                            templateElement, getSynapseConfiguration().getProperties());

                    // if everything went successfully we remove the sequence
                    config.removeEndpointTemplate(templateName);
                    if (endpointTemplate instanceof Template) {
View Full Code Here

                o = registry.getResource(entry, getProperties());
                if (o != null && o instanceof Template) {
                    localRegistry.put(key, entry);
                    return (Template) o;
                } else if (o instanceof OMNode) {
                    Template m = new TemplateFactory().createEndpointTemplate(
                            (OMElement) o, properties);
                    if (m != null) {
                        entry.setValue(m);
                        return m;
                    }
View Full Code Here

    }

    public static Template defineEndpointTemplate(SynapseConfiguration config,
                                                    OMElement elem, Properties properties) {

        TemplateFactory templateFactory = new TemplateFactory();
        String name = elem.getAttributeValue(new QName(XMLConfigConstants.NULL_NAMESPACE, "name"));
        try {
            Template template = templateFactory.createEndpointTemplate(elem, properties);
            if (template != null) {
                config.addEndpointTemplate(template.getName(), template);
            }
            return template;
        } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.apache.synapse.config.xml.endpoints.TemplateFactory

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.