Package org.apache.tuscany.sca.assembly

Examples of org.apache.tuscany.sca.assembly.Implementation


                for (ComponentReference reference : component.getReferences()) {
                    deactivate((RuntimeComponent)component, (RuntimeComponentReference)reference);
                }

                Implementation implementation = component.getImplementation();
                if (implementation instanceof Composite) {
                    deactivate((Composite)implementation);
                } else if (implementation != null) {
                    removeImplementationProvider((RuntimeComponent)component);
                    removeScopeContainer(component);
View Full Code Here


            String uri = component.getURI();
            if (uri.equals(componentURI)) {
                return component;
            }
            if (componentURI.startsWith(prefix)) {
                Implementation implementation = component.getImplementation();
                if (!(implementation instanceof Composite)) {
                    return null;
                }
                return resolve((Composite)implementation, componentURI);
            }
View Full Code Here

                writeEnd(writer);
            }
   
            // Write the component implementation
            Implementation implementation = component.getImplementation();
            if (implementation instanceof Composite) {
                writeStart(writer, IMPLEMENTATION_COMPOSITE, new XAttr(NAME, composite.getName()));
                writeEnd(writer);
            } else {
                extensionProcessor.write(component.getImplementation(), writer);
View Full Code Here

                    }
                }
            }
           
            //resolve component implemenation
            Implementation implementation = component.getImplementation();
            if (implementation != null) {
                copyPoliciesToComponent(component, implementation, resolver);
               
                //now resolve the implementation so that even if there is a shared instance
                //for this that is resolved, the specified intents and policysets are safe in the
View Full Code Here

            } else {
                componentURI = URI.create(parentURI + '/').resolve(component.getName()).toString();
            }
            component.setURI(componentURI);

            Implementation implementation = component.getImplementation();
            if (implementation instanceof Composite) {

                // Process nested composite
                configureComponents((Composite)implementation, componentURI);
            }
View Full Code Here

    private void indexImplementationPropertiesServicesAndReferences(Component component,
                                                                    Map<String, Service> services,
                                                                    Map<String, Reference> references,
                                                                    Map<String, Property> properties) {
        // First check that the component has a resolved implementation
        Implementation implementation = component.getImplementation();
        if (implementation == null) {

            // A component must have an implementation
            warning("No implementation for component: " + component.getName(), component);

        } else if (implementation.isUnresolved()) {

            // The implementation must be fully resolved
            warning("Component implementation not found: " + component.getName()
                + " : "
                + implementation.getURI(), component);

        } else {

            // Index properties, services and references, also check for
            // duplicates
            for (Property property : implementation.getProperties()) {
                if (properties.containsKey(property.getName())) {
                    warning("Duplicate property name: " + component.getName()
                        + "/"
                        + property.getName(), component);
                } else {
                    properties.put(property.getName(), property);
                }
            }
            for (Service service : implementation.getServices()) {
                if (services.containsKey(service.getName())) {
                    warning("Duplicate service name: " + component.getName()
                        + "/"
                        + service.getName(), component);
                } else {
                    services.put(service.getName(), service);
                }
            }
            for (Reference reference : implementation.getReferences()) {
                if (references.containsKey(reference.getName())) {
                    warning("Duplicate reference name: " + component.getName()
                        + "/"
                        + reference.getName(), component);
                } else {
View Full Code Here

     */
    public void activateNestedCompositeServices(Composite composite) {

        // Process nested composites recursively
        for (Component component : composite.getComponents()) {
            Implementation implementation = component.getImplementation();
            if (implementation instanceof Composite) {

                // First process nested composites
                activateNestedCompositeServices((Composite)implementation);

View Full Code Here

                PropertyUtil.sourceComponentProperties(compositeProperties, component);
            } catch (Exception e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
            Implementation impl = component.getImplementation();
            if (impl instanceof Composite) {
                configureSourcedProperties((Composite)impl, component.getProperties());
            }
        }
    }
View Full Code Here

    private void configureNestedCompositeServices(Composite composite) {

        // Process nested composites recursively
        for (Component component : composite.getComponents()) {
            Implementation implementation = component.getImplementation();
            if (implementation instanceof Composite) {

                // First process nested composites
                configureNestedCompositeServices((Composite)implementation);
View Full Code Here

            } else {
                componentURI = URI.create(parentURI + '/').resolve(component.getName()).toString();
            }
            component.setURI(componentURI);

            Implementation implementation = component.getImplementation();
            if (implementation instanceof Composite) {

                // Process nested composite
                configureComponents((Composite)implementation, componentURI);
            }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.assembly.Implementation

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.