Package org.apache.tuscany.sca.implementation.osgi.impl

Examples of org.apache.tuscany.sca.implementation.osgi.impl.OSGiImplementationImpl


        Object resolved = map.get(unresolved);
        if (resolved != null) {

            if (unresolved instanceof OSGiImplementationImpl && !(resolved instanceof OSGiImplementationImpl)) {

                OSGiImplementationImpl impl = ((OSGiImplementationImpl)unresolved);
                ComponentType componentType = (ComponentType)resolved;

                List<Property> properties = componentType.getProperties();
                for (Property property : properties) {
                    impl.getProperties().add(property);
                }
                impl.setUnresolved(false);
                return unresolved;
            }

            // Return the resolved object
            return modelClass.cast(resolved);
View Full Code Here


        ByteArrayInputStream is = new ByteArrayInputStream(str.getBytes());

        XMLStreamReader reader = inputFactory.createXMLStreamReader(is);
        reader.next();

        OSGiImplementationImpl osgiImpl = (OSGiImplementationImpl)staxProcessor.read(reader);

        assertEquals(osgiImpl.getBundleSymbolicName(), "OSGiTestService");
        assertEquals(osgiImpl.getBundleVersion(), "2.0.0");
        assertTrue(osgiImpl.getImports().length == 2);
        assertEquals(osgiImpl.getImports()[0], "import1.jar");
        assertEquals(osgiImpl.getImports()[1], "import2.jar");
    }
View Full Code Here

        Object resolved = map.get(unresolved);
        if (resolved != null) {
           
            if (unresolved instanceof OSGiImplementationImpl && !(resolved instanceof OSGiImplementationImpl)) {
               
                OSGiImplementationImpl impl = ((OSGiImplementationImpl)unresolved);
                ComponentType componentType = (ComponentType)resolved;
               
                List<Property> properties = componentType.getProperties();
                for (Property property : properties) {
                    impl.getProperties().add(property);
                }
                impl.setUnresolved(false);
                return unresolved;
            }
               
           
            // Return the resolved object
View Full Code Here

                }
            }

        }
           
        OSGiImplementationImpl implementation = new OSGiImplementationImpl(
                    modelFactories,
                    bundleSymbolicName,
                    bundleVersion,
                    importList,
                    classList,
                    refProperties,
                    serviceProperties);
        implementation.setCallbackProperties(refCallbackProperties, serviceCallbackProperties);
          
        implementation.setUnresolved(true);
           
        return implementation;
       
    }
View Full Code Here

        Object resolved = map.get(unresolved);
        if (resolved != null) {

            if (unresolved instanceof OSGiImplementationImpl && !(resolved instanceof OSGiImplementationImpl)) {

                OSGiImplementationImpl impl = ((OSGiImplementationImpl)unresolved);
                ComponentType componentType = (ComponentType)resolved;

                List<Property> properties = componentType.getProperties();
                for (Property property : properties) {
                    impl.getProperties().add(property);
                }
                impl.setUnresolved(false);
                return unresolved;
            }

            // Return the resolved object
            return modelClass.cast(resolved);
View Full Code Here

        Object resolved = map.get(unresolved);
        if (resolved != null) {

            if (unresolved instanceof OSGiImplementationImpl && !(resolved instanceof OSGiImplementationImpl)) {

                OSGiImplementationImpl impl = ((OSGiImplementationImpl)unresolved);
                ComponentType componentType = (ComponentType)resolved;

                List<Property> properties = componentType.getProperties();
                for (Property property : properties) {
                    impl.getProperties().add(property);
                }
                impl.setUnresolved(false);
                return unresolved;
            }

            // Return the resolved object
            return modelClass.cast(resolved);
View Full Code Here

                }
            }

        }
           
        OSGiImplementationImpl implementation = new OSGiImplementationImpl(
                    modelFactories,
                    bundleSymbolicName,
                    bundleVersion,
                    importList,
                    classList,
                    refProperties,
                    serviceProperties);
        implementation.setCallbackProperties(refCallbackProperties, serviceCallbackProperties);
          
        implementation.setUnresolved(true);
           
        return implementation;
       
    }
View Full Code Here

        ByteArrayInputStream is = new ByteArrayInputStream(str.getBytes());

        XMLStreamReader reader = inputFactory.createXMLStreamReader(is);
        reader.next();

        OSGiImplementationImpl osgiImpl = (OSGiImplementationImpl)staxProcessor.read(reader);

        assertEquals(osgiImpl.getBundleSymbolicName(), "OSGiTestService");
        assertEquals(osgiImpl.getBundleVersion(), "2.0.0");
        assertTrue(osgiImpl.getImports().length == 2);
        assertEquals(osgiImpl.getImports()[0], "import1.jar");
        assertEquals(osgiImpl.getImports()[1], "import2.jar");
    }
View Full Code Here

        Object resolved = map.get(unresolved);
        if (resolved != null) {
           
            if (unresolved instanceof OSGiImplementationImpl && !(resolved instanceof OSGiImplementationImpl)) {
               
                OSGiImplementationImpl impl = ((OSGiImplementationImpl)unresolved);
                ComponentType componentType = (ComponentType)resolved;
               
                List<Property> properties = componentType.getProperties();
                for (Property property : properties) {
                    impl.getProperties().add(property);
                }
                impl.setUnresolved(false);
                return unresolved;
            }
               
           
            // Return the resolved object
View Full Code Here

        Object resolved = map.get(unresolved);
        if (resolved != null) {

            if (unresolved instanceof OSGiImplementationImpl && !(resolved instanceof OSGiImplementationImpl)) {

                OSGiImplementationImpl impl = ((OSGiImplementationImpl)unresolved);
                ComponentType componentType = (ComponentType)resolved;

                List<Property> properties = componentType.getProperties();
                for (Property property : properties) {
                    impl.getProperties().add(property);
                }
                impl.setUnresolved(false);
                return unresolved;
            }

            // Return the resolved object
            return modelClass.cast(resolved);
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.implementation.osgi.impl.OSGiImplementationImpl

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.