Package org.apache.tuscany.sca.implementation.spring.context.tie

Examples of org.apache.tuscany.sca.implementation.spring.context.tie.SCAGenericApplicationContext


public class ScaPropertyBeanDefinitionParser implements BeanDefinitionParser {

    public BeanDefinition parse(Element element, ParserContext parserContext) {
        BeanDefinitionRegistry registry = parserContext.getRegistry();
        if (registry instanceof SCAGenericApplicationContext) {
            SCAGenericApplicationContext context = (SCAGenericApplicationContext)registry;
            SpringSCAPropertyElement propertyElement =
                new SpringSCAPropertyElement(element.getAttributeNS(null, "name"), element.getAttributeNS(null, "type"));
            context.addSCAPropertyElement(propertyElement);
        }
        // do nothing, this is handled by Tuscany
        return null;
    }
View Full Code Here


public class ScaReferenceBeanDefinitionParser implements BeanDefinitionParser {

    public BeanDefinition parse(Element element, ParserContext parserContext) {
        BeanDefinitionRegistry registry = parserContext.getRegistry();
        if (registry instanceof SCAGenericApplicationContext) {
            SCAGenericApplicationContext context = (SCAGenericApplicationContext)registry;
            SpringSCAReferenceElement referenceElement =
                new SpringSCAReferenceElement(getAttribute(element, "name"), getAttribute(element, "type"));
            referenceElement.setDefaultBean(getAttribute(element, "default"));

            String requires = getAttribute(element, "requires");
            if (requires != null) {
                List<QName> qnames = ScaNamespaceHandler.resolve(element, requires);
                referenceElement.getIntentNames().addAll(qnames);
            }

            String policySets = getAttribute(element, "policySets");
            if (policySets != null) {
                List<QName> qnames = ScaNamespaceHandler.resolve(element, policySets);
                referenceElement.getPolicySetNames().addAll(qnames);
            }

            context.addSCAReferenceElement(referenceElement);
        }

        // do nothing, this is handled by Tuscany
        return null;
    }
View Full Code Here

public class ScaServiceBeanDefinitionParser implements BeanDefinitionParser {

    public BeanDefinition parse(Element element, ParserContext parserContext) {
        BeanDefinitionRegistry registry = parserContext.getRegistry();
        if (registry instanceof SCAGenericApplicationContext) {
            SCAGenericApplicationContext context = (SCAGenericApplicationContext)registry;
            SpringSCAServiceElement serviceElement =
                new SpringSCAServiceElement(getAttribute(element, "name"), getAttribute(element, "target"));
            serviceElement.setType(getAttribute(element, "type"));

            String requires = getAttribute(element, "requires");
            if (requires != null) {
                List<QName> qnames = ScaNamespaceHandler.resolve(element, requires);
                serviceElement.getIntentNames().addAll(qnames);
            }

            String policySets = getAttribute(element, "policySets");
            if (policySets != null) {
                List<QName> qnames = ScaNamespaceHandler.resolve(element, policySets);
                serviceElement.getPolicySetNames().addAll(qnames);
            }

            context.addSCAServiceElement(serviceElement);
        }
        // do nothing, handled by Tuscany
        return null;
    }
View Full Code Here

                                                              List<URL> resources) {
        if (classLoader == null) {
            classLoader = Thread.currentThread().getContextClassLoader();
        }

        SCAGenericApplicationContext appCtx =
            new SCAGenericApplicationContext((ApplicationContext)scaParentContext, classLoader);
        XmlBeanDefinitionReader xmlReader = new XmlBeanDefinitionReader(appCtx);

        // REVIEW: [rfeng] How do we control the schema validation
        xmlReader.setValidating(false);
View Full Code Here

public class ScaPropertyBeanDefinitionParser implements BeanDefinitionParser {

    public BeanDefinition parse(Element element, ParserContext parserContext) {
        BeanDefinitionRegistry registry = parserContext.getRegistry();
        if (registry instanceof SCAGenericApplicationContext) {
            SCAGenericApplicationContext context = (SCAGenericApplicationContext)registry;
            SpringSCAPropertyElement propertyElement =
                new SpringSCAPropertyElement(element.getAttributeNS(null, "name"), element.getAttributeNS(null, "type"));
            context.addSCAPropertyElement(propertyElement);
        }
        // do nothing, this is handled by Tuscany
        return null;
    }
View Full Code Here

public class ScaReferenceBeanDefinitionParser implements BeanDefinitionParser {

    public BeanDefinition parse(Element element, ParserContext parserContext) {
        BeanDefinitionRegistry registry = parserContext.getRegistry();
        if (registry instanceof SCAGenericApplicationContext) {
            SCAGenericApplicationContext context = (SCAGenericApplicationContext)registry;
            SpringSCAReferenceElement referenceElement =
                new SpringSCAReferenceElement(getAttribute(element, "name"), getAttribute(element, "type"));
            referenceElement.setDefaultBean(getAttribute(element, "default"));

            String requires = getAttribute(element, "requires");
            if (requires != null) {
                List<QName> qnames = ScaNamespaceHandler.resolve(element, requires);
                referenceElement.getIntentNames().addAll(qnames);
            }

            String policySets = getAttribute(element, "policySets");
            if (policySets != null) {
                List<QName> qnames = ScaNamespaceHandler.resolve(element, policySets);
                referenceElement.getPolicySetNames().addAll(qnames);
            }

            context.addSCAReferenceElement(referenceElement);
        }

        // do nothing, this is handled by Tuscany
        return null;
    }
View Full Code Here

public class ScaServiceBeanDefinitionParser implements BeanDefinitionParser {

    public BeanDefinition parse(Element element, ParserContext parserContext) {
        BeanDefinitionRegistry registry = parserContext.getRegistry();
        if (registry instanceof SCAGenericApplicationContext) {
            SCAGenericApplicationContext context = (SCAGenericApplicationContext)registry;
            SpringSCAServiceElement serviceElement =
                new SpringSCAServiceElement(getAttribute(element, "name"), getAttribute(element, "target"));
            serviceElement.setType(getAttribute(element, "type"));

            String requires = getAttribute(element, "requires");
            if (requires != null) {
                List<QName> qnames = ScaNamespaceHandler.resolve(element, requires);
                serviceElement.getIntentNames().addAll(qnames);
            }

            String policySets = getAttribute(element, "policySets");
            if (policySets != null) {
                List<QName> qnames = ScaNamespaceHandler.resolve(element, policySets);
                serviceElement.getPolicySetNames().addAll(qnames);
            }

            context.addSCAServiceElement(serviceElement);
        }
        // do nothing, handled by Tuscany
        return null;
    }
View Full Code Here

public class ScaPropertyBeanDefinitionParser implements BeanDefinitionParser {

    public BeanDefinition parse(Element element, ParserContext parserContext) {
        BeanDefinitionRegistry registry = parserContext.getRegistry();
        if (registry instanceof SCAGenericApplicationContext) {
            SCAGenericApplicationContext context = (SCAGenericApplicationContext)registry;
            SpringSCAPropertyElement propertyElement =
                new SpringSCAPropertyElement(element.getAttributeNS(null, "name"), element.getAttributeNS(null, "type"));
            context.addSCAPropertyElement(propertyElement);
        }
        // do nothing, this is handled by Tuscany
        return null;
    }
View Full Code Here

public class ScaReferenceBeanDefinitionParser implements BeanDefinitionParser {

    public BeanDefinition parse(Element element, ParserContext parserContext) {
        BeanDefinitionRegistry registry = parserContext.getRegistry();
        if (registry instanceof SCAGenericApplicationContext) {
            SCAGenericApplicationContext context = (SCAGenericApplicationContext)registry;
            SpringSCAReferenceElement referenceElement =
                new SpringSCAReferenceElement(getAttribute(element, "name"), getAttribute(element, "type"));
            referenceElement.setDefaultBean(getAttribute(element, "default"));

            String requires = getAttribute(element, "requires");
            if (requires != null) {
                List<QName> qnames = ScaNamespaceHandler.resolve(element, requires);
                referenceElement.getIntentNames().addAll(qnames);
            }

            String policySets = getAttribute(element, "policySets");
            if (policySets != null) {
                List<QName> qnames = ScaNamespaceHandler.resolve(element, policySets);
                referenceElement.getPolicySetNames().addAll(qnames);
            }

            context.addSCAReferenceElement(referenceElement);
        }

        // do nothing, this is handled by Tuscany
        return null;
    }
View Full Code Here

public class ScaServiceBeanDefinitionParser implements BeanDefinitionParser {

    public BeanDefinition parse(Element element, ParserContext parserContext) {
        BeanDefinitionRegistry registry = parserContext.getRegistry();
        if (registry instanceof SCAGenericApplicationContext) {
            SCAGenericApplicationContext context = (SCAGenericApplicationContext)registry;
            SpringSCAServiceElement serviceElement =
                new SpringSCAServiceElement(getAttribute(element, "name"), getAttribute(element, "target"));
            serviceElement.setType(getAttribute(element, "type"));

            String requires = getAttribute(element, "requires");
            if (requires != null) {
                List<QName> qnames = ScaNamespaceHandler.resolve(element, requires);
                serviceElement.getIntentNames().addAll(qnames);
            }

            String policySets = getAttribute(element, "policySets");
            if (policySets != null) {
                List<QName> qnames = ScaNamespaceHandler.resolve(element, policySets);
                serviceElement.getPolicySetNames().addAll(qnames);
            }

            context.addSCAServiceElement(serviceElement);
        }
        // do nothing, handled by Tuscany
        return null;
    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.implementation.spring.context.tie.SCAGenericApplicationContext

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.