Package org.apache.synapse.endpoints

Examples of org.apache.synapse.endpoints.Template


        Map<String, Template> definedTemplates = new HashMap<String, Template>();

        synchronized (this) {
            for (Object o : localRegistry.values()) {
                if (o instanceof Template) {
                    Template template = (Template) o;
                    definedTemplates.put(template.getName(), template);
                }
            }
        }
        return definedTemplates;
    }
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

                    }
                } else {
                    element = document.getFirstChildWithName(
                            new QName(SynapseConstants.SYNAPSE_NAMESPACE, "endpoint"));
                    if (element != null) {
                        Template endpointTemplate =
                                SynapseXMLConfigurationFactory.defineEndpointTemplate(
                                        synapseConfig, document, properties);
                        if (endpointTemplate != null) {
                            endpointTemplate.setFileName(file.getName());
                            synapseConfig.getArtifactDeploymentStore().addArtifact(
                                    file.getAbsolutePath(), endpointTemplate.getName());
                        }
                    }
                }
            }
        }
View Full Code Here

                                                    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) {
            String msg = "Endpoint Template: " + name + "configuration cannot be built";
            handleConfigurationError(SynapseConstants.FAIL_SAFE_MODE_TEMPLATES, msg, e);
View Full Code Here

            }
        }

        Map<String, Template> endpointTemplates = newConfig.getEndpointTemplates();
        for (String name : endpointTemplates.keySet()) {
            Template oldEndpointTempl = currentConfig.getEndpointTemplates().get(name);
            if (oldEndpointTempl != null) {
                endpointTemplates.get(name).setFileName(oldEndpointTempl.getFileName());
            }
        }

        if (Boolean.valueOf(currentConfig.getProperty(
                MultiXMLConfigurationBuilder.SEPARATE_REGISTRY_DEFINITION))) {
View Full Code Here

TOP

Related Classes of org.apache.synapse.endpoints.Template

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.