Examples of TemplateFactory


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

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

                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

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

                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

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

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

        }

        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

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

    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

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

                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

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

                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

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

Examples of org.expressme.webwind.template.TemplateFactory

        String name = config.getInitParameter("template");
        if (name==null) {
            name = JspTemplateFactory.class.getName();
            log.info("No template factory specified. Default to '" + name + "'.");
        }
        TemplateFactory tf = Utils.createTemplateFactory(name);
        tf.init(config);
        log.info("Template factory '" + tf.getClass().getName() + "' init ok.");
        TemplateFactory.setTemplateFactory(tf);
    }
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.