geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r765814 - in /geronimo/sandbox/blueprint/org.apache.felix.blueprint/src: main/java/org/apache/felix/blueprint/context/ main/java/org/apache/felix/blueprint/convert/ main/java/org/apache/felix/blueprint/reflect/ test/java/org/apache/felix/bl...
Date Fri, 17 Apr 2009 00:19:01 GMT
Author: gawor
Date: Fri Apr 17 00:19:01 2009
New Revision: 765814

URL: http://svn.apache.org/viewvc?rev=765814&view=rev
Log:
get list/set parsing and injection working

Modified:
    geronimo/sandbox/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/context/Instanciator.java
    geronimo/sandbox/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/context/ModuleContextImpl.java
    geronimo/sandbox/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/context/Parser.java
    geronimo/sandbox/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/convert/ConversionServiceImpl.java
    geronimo/sandbox/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/ConstructorInjectionMetadataImpl.java
    geronimo/sandbox/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/ParameterSpecificationImpl.java
    geronimo/sandbox/blueprint/org.apache.felix.blueprint/src/test/java/org/apache/felix/blueprint/WiringTest.java
    geronimo/sandbox/blueprint/org.apache.felix.blueprint/src/test/resources/test-wiring.xml

Modified: geronimo/sandbox/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/context/Instanciator.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/context/Instanciator.java?rev=765814&r1=765813&r2=765814&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/context/Instanciator.java
(original)
+++ geronimo/sandbox/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/context/Instanciator.java
Fri Apr 17 00:19:01 2009
@@ -60,14 +60,24 @@
  */
 public class Instanciator {
 
-    private Bundle bundle;
+    private ModuleContextImpl moduleContext;
     
-    public Instanciator(Bundle bundle) {
-        this.bundle = bundle;
+    public Instanciator(ModuleContextImpl moduleContext) {
+        this.moduleContext = moduleContext;
+    }
+    
+    private void addBuiltinComponents(Repository repository) {
+        if (moduleContext != null) {
+            repository.add("moduleContext", moduleContext);
+            repository.add("bundleContext", moduleContext.getBundleContext());          
        
+            repository.add("bundle", moduleContext.getBundleContext().getBundle());
+            repository.add("conversionService", moduleContext.getConversionService());
+        }
     }
     
     public Repository createRepository(ComponentDefinitionRegistry registry) throws Exception
{
         Repository repository = new DefaultRepository();
+        addBuiltinComponents(repository);
         // Create recipes
         for (String name : (Set<String>) registry.getComponentDefinitionNames()) {
             ComponentMetadata component = registry.getComponentDefinition(name);
@@ -77,14 +87,15 @@
         return repository;
     }
 
-    private Recipe createRecipe(ComponentMetadata component) {
+    private Recipe createRecipe(ComponentMetadata component) throws Exception {
         if (component instanceof LocalComponentMetadata) {
             LocalComponentMetadata local = (LocalComponentMetadata) component;
             ObjectRecipe recipe = new BundleObjectRecipe(local.getClassName());
             recipe.allow(Option.PRIVATE_PROPERTIES);
             recipe.setName(component.getName());
             for (PropertyInjectionMetadata property : (Collection<PropertyInjectionMetadata>)
local.getPropertyInjectionMetadata()) {
-                Object value = getValue(property.getValue());
+                // TODO: must pass the expected property type
+                Object value = getValue(property.getValue(), null);
                 recipe.setProperty(property.getName(), value);
             }
             // TODO: constructor args
@@ -101,40 +112,58 @@
         }
     }
 
-    private Object getValue(Value v) {
+    private Object getValue(Value v, Class hint) throws Exception {
         if (v instanceof NullValue) {
             return null;
         } else if (v instanceof TypedStringValue) {
-            // TODO: TypedStringValue#getTypeName()
-            return ((TypedStringValue) v).getStringValue();
+            TypedStringValue stringValue = (TypedStringValue) v;            
+            Class type = getType(stringValue.getTypeName());
+            String value = stringValue.getStringValue();
+            if (type != null) {
+                if (hint == null || hint.isAssignableFrom(type)) {
+                    return convert(value, type);
+                } else {
+                    throw new Exception("" + type + " " + hint);
+                }
+            } else if (hint != null) {
+                return convert(value, hint);
+            } else {
+                return value;
+            }
         } else if (v instanceof ReferenceValue) {
             String componentName = ((ReferenceValue) v).getComponentName();
             return new ReferenceRecipe(componentName);
         } else if (v instanceof ListValue) {
+            ListValue listValue = (ListValue) v;
+            Class type = getType(listValue.getValueType());
             CollectionRecipe cr = new CollectionRecipe(ArrayList.class);
-            for (Value lv : (List<Value>) ((ListValue) v).getList()) {
-                cr.add(getValue(lv));
+            for (Value lv : (List<Value>) listValue.getList()) {
+                cr.add(getValue(lv, type));
             }
-            // TODO: ListValue#getValueType()
             return cr;
         } else if (v instanceof SetValue) {
+            SetValue setValue = (SetValue) v;
+            Class type = getType(setValue.getValueType());
             CollectionRecipe cr = new CollectionRecipe(HashSet.class);
-            for (Value lv : (Set<Value>) ((SetValue) v).getSet()) {
-                cr.add(getValue(lv));
+            for (Value lv : (Set<Value>) setValue.getSet()) {
+                cr.add(getValue(lv, type));
             }
-            // TODO: SetValue#getValueType()
             return cr;
         } else if (v instanceof MapValue) {
+            MapValue mapValue = (MapValue) v;
+            Class keyType = getType(mapValue.getKeyType());
+            Class valueType = getType(mapValue.getValueType());            
             MapRecipe mr = new MapRecipe(HashMap.class);
-            for (Map.Entry<Value,Value> entry : ((Map<Value,Value>) ((MapValue)
v).getMap()).entrySet()) {
-                Object key = getValue(entry.getKey());
-                Object val = getValue(entry.getValue());
+            for (Map.Entry<Value,Value> entry : ((Map<Value,Value>) mapValue.getMap()).entrySet())
{
+                Object key = getValue(entry.getKey(), keyType);
+                Object val = getValue(entry.getValue(), valueType);
                 mr.put(key, val);
             }
-            // TODO: MapValue#getKeyType()
-            // TODO: MapValue#getValueType()
             return mr;
         } else if (v instanceof ArrayValue) {
+            ArrayValue arrayValue = (ArrayValue) v;
+            Class type = getType(arrayValue.getValueType());
+            
             // TODO
             throw new IllegalStateException("Unsupported value: " + v.getClass().getName());
         } else if (v instanceof ComponentValue) {
@@ -148,6 +177,21 @@
         }
     }
     
+    private Object convert(Object source, Class type) throws Exception {
+        return moduleContext.getConversionService().convert(source, type);
+    }
+    
+    private Class getType(String typeName) throws ClassNotFoundException {
+        if (typeName == null) {
+            return null;
+        }
+        if (moduleContext == null) {
+            return Class.forName(typeName);            
+        } else {
+            return moduleContext.getBundleContext().getBundle().loadClass(typeName);
+        }
+    }
+    
     private class BundleObjectRecipe extends ObjectRecipe {
         
         String typeName;
@@ -159,11 +203,11 @@
         
         @Override
         public Class getType() {
-            if (bundle == null) {
+            if (moduleContext == null) {
                 return super.getType();
             }
             try {
-                return bundle.loadClass(typeName);
+                return moduleContext.getBundleContext().getBundle().loadClass(typeName);
             } catch (ClassNotFoundException e) {
                 throw new ConstructionException("Type class could not be found: " + typeName);
             }

Modified: geronimo/sandbox/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/context/ModuleContextImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/context/ModuleContextImpl.java?rev=765814&r1=765813&r2=765814&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/context/ModuleContextImpl.java
(original)
+++ geronimo/sandbox/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/context/ModuleContextImpl.java
Fri Apr 17 00:19:01 2009
@@ -27,6 +27,7 @@
 import java.net.URL;
 
 import org.apache.felix.blueprint.HeaderParser.PathElement;
+import org.apache.felix.blueprint.convert.ConversionServiceImpl;
 import org.apache.felix.blueprint.namespace.ComponentDefinitionRegistryImpl;
 import org.apache.felix.blueprint.namespace.NamespaceHandlerRegistryImpl;
 import org.apache.felix.blueprint.BlueprintConstants;
@@ -40,6 +41,7 @@
 import org.osgi.framework.Constants;
 import org.osgi.service.blueprint.context.ModuleContext;
 import org.osgi.service.blueprint.context.NoSuchComponentException;
+import org.osgi.service.blueprint.convert.ConversionService;
 import org.osgi.service.blueprint.reflect.ComponentMetadata;
 import org.osgi.service.blueprint.reflect.LocalComponentMetadata;
 import org.osgi.service.blueprint.reflect.ServiceExportComponentMetadata;
@@ -58,12 +60,14 @@
     private final NamespaceHandlerRegistry handlers;
     private final List<URL> urls;
     private ComponentDefinitionRegistryImpl componentDefinitionRegistry;
+    private ConversionService conversionService;
 
     public ModuleContextImpl(BundleContext bundleContext, ModuleContextEventSender sender,
NamespaceHandlerRegistry handlers, List<URL> urls) {
         this.bundleContext = bundleContext;
         this.sender = sender;
         this.handlers = handlers;
         this.urls = urls;
+        this.conversionService = new ConversionServiceImpl();
     }
 
     private void checkDirectives() {
@@ -92,7 +96,7 @@
             parser.setNamespaceHandlerRegistry(handlers);
             parser.parse(urls);
             componentDefinitionRegistry = parser.getRegistry();
-            Instanciator i = new Instanciator(bundleContext.getBundle());
+            Instanciator i = new Instanciator(this);
             Repository repository = i.createRepository(componentDefinitionRegistry);
             ObjectGraph graph = new ObjectGraph(repository);
             System.out.println(graph.createAll(new ArrayList<String>(componentDefinitionRegistry.getComponentDefinitionNames())));
                   
@@ -150,6 +154,10 @@
 
     }
 
+    public ConversionService getConversionService() {
+        return conversionService;
+    }
+    
     public BundleContext getBundleContext() {
         return bundleContext;
     }

Modified: geronimo/sandbox/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/context/Parser.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/context/Parser.java?rev=765814&r1=765813&r2=765814&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/context/Parser.java
(original)
+++ geronimo/sandbox/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/context/Parser.java
Fri Apr 17 00:19:01 2009
@@ -512,7 +512,7 @@
         for (int i = 0; i < nl.getLength(); i++) {
             Node node = nl.item(i);
             if (node instanceof Element) {
-                Value val = parseValue((Element) node, enclosingComponent);
+                Value val = parseValueElement((Element) node, enclosingComponent, true);
                 list.add(val);
             }
         }
@@ -528,7 +528,7 @@
         for (int i = 0; i < nl.getLength(); i++) {
             Node node = nl.item(i);
             if (node instanceof Element) {
-                Value val = parseValue((Element) node, enclosingComponent);
+                Value val = parseValueElement((Element) node, enclosingComponent, true);
                 set.add(val);
             }
         }
@@ -893,14 +893,10 @@
                 Node node = nl.item(i);
                 if (node instanceof Element) {
                     Element e = (Element) node;
-                    if (isBlueprintNamespace(node.getNamespaceURI())) {
+                    if (isBlueprintNamespace(node.getNamespaceURI()) && nodeNameEquals(node,
DESCRIPTION_ELEMENT)) {
                         // Ignore description elements
-                        if (!nodeNameEquals(node, DESCRIPTION_ELEMENT)) {
-                            return parseValueElement(e, enclosingComponent, true);
-                        }
                     } else {
-                        ComponentMetadata innerComponent = parseCustomElement(e, enclosingComponent);
-                        return new ComponentValueImpl(innerComponent);
+                        return parseValueElement(e, enclosingComponent, true);
                     }
                 }
             }
@@ -909,41 +905,46 @@
     }
 
     private Value parseValueElement(Element element, ComponentMetadata enclosingComponent,
boolean allowNull) {
-        if (nodeNameEquals(element, COMPONENT_ELEMENT)) {
-            LocalComponentMetadata inner = parseComponentMetadata(element);
-            return new ComponentValueImpl(inner);
-        } else if (nodeNameEquals(element, NULL_ELEMENT) && allowNull) {
-            return NullValue.NULL;
-        } else if (nodeNameEquals(element, VALUE_ELEMENT)) {
-            String type = null;
-            if (element.hasAttribute(TYPE_ATTRIBUTE)) {
-                type = element.getAttribute(TYPE_ATTRIBUTE);
-            }
-            return new TypedStringValueImpl(getTextValue(element), type);
-        } else if (nodeNameEquals(element, REF_ELEMENT)) {
-            String component = element.getAttribute(COMPONENT_ATTRIBUTE);
-            if (component == null || component.length() == 0) {
-                throw new ComponentDefinitionException("Element " + REF_ELEMENT + " must
have a valid " + COMPONENT_ATTRIBUTE + " attribute");
-            }
-            return new ReferenceValueImpl(component);
-        } else if (nodeNameEquals(element, IDREF_ELEMENT)) {
-            String component = element.getAttribute(COMPONENT_ATTRIBUTE);
-            if (component == null || component.length() == 0) {
-                throw new ComponentDefinitionException("Element " + REF_ELEMENT + " must
have a valid " + COMPONENT_ATTRIBUTE + " attribute");
-            }
-            return new ReferenceValueImpl(component);
-        } else if (nodeNameEquals(element, LIST_ELEMENT)) {
-            return parseList(element, enclosingComponent);
-        } else if (nodeNameEquals(element, SET_ELEMENT)) {
-            return parseSet(element, enclosingComponent);
-        } else if (nodeNameEquals(element, MAP_ELEMENT)) {
-            return parseMap(element, enclosingComponent);
-        } else if (nodeNameEquals(element, PROPS_ELEMENT)) {
-            return parseProps(element);
-        } else if (nodeNameEquals(element, ARRAY_ELEMENT)) {
-            return parseArray(element, enclosingComponent);
+        if (isBlueprintNamespace(element.getNamespaceURI())) {
+            if (nodeNameEquals(element, COMPONENT_ELEMENT)) {
+                LocalComponentMetadata inner = parseComponentMetadata(element);
+                return new ComponentValueImpl(inner);
+            } else if (nodeNameEquals(element, NULL_ELEMENT) && allowNull) {
+                return NullValue.NULL;
+            } else if (nodeNameEquals(element, VALUE_ELEMENT)) {
+                String type = null;
+                if (element.hasAttribute(TYPE_ATTRIBUTE)) {
+                    type = element.getAttribute(TYPE_ATTRIBUTE);
+                }
+                return new TypedStringValueImpl(getTextValue(element), type);
+            } else if (nodeNameEquals(element, REF_ELEMENT)) {
+                String component = element.getAttribute(COMPONENT_ATTRIBUTE);
+                if (component == null || component.length() == 0) {
+                    throw new ComponentDefinitionException("Element " + REF_ELEMENT + " must
have a valid " + COMPONENT_ATTRIBUTE + " attribute");
+                }
+                return new ReferenceValueImpl(component);
+            } else if (nodeNameEquals(element, IDREF_ELEMENT)) {
+                String component = element.getAttribute(COMPONENT_ATTRIBUTE);
+                if (component == null || component.length() == 0) {
+                    throw new ComponentDefinitionException("Element " + REF_ELEMENT + " must
have a valid " + COMPONENT_ATTRIBUTE + " attribute");
+                }
+                return new ReferenceValueImpl(component);
+            } else if (nodeNameEquals(element, LIST_ELEMENT)) {
+                return parseList(element, enclosingComponent);
+            } else if (nodeNameEquals(element, SET_ELEMENT)) {
+                return parseSet(element, enclosingComponent);
+            } else if (nodeNameEquals(element, MAP_ELEMENT)) {
+                return parseMap(element, enclosingComponent);
+            } else if (nodeNameEquals(element, PROPS_ELEMENT)) {
+                return parseProps(element);
+            } else if (nodeNameEquals(element, ARRAY_ELEMENT)) {
+                return parseArray(element, enclosingComponent);
+            } else {
+                throw new ComponentDefinitionException("Unknown blueprint element " + element.getNodeName());
+            }
         } else {
-            throw new ComponentDefinitionException("Unknown element " + element.getNodeName());
+            ComponentMetadata innerComponent = parseCustomElement(element, enclosingComponent);
+            return new ComponentValueImpl(innerComponent);
         }
     }
 

Modified: geronimo/sandbox/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/convert/ConversionServiceImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/convert/ConversionServiceImpl.java?rev=765814&r1=765813&r2=765814&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/convert/ConversionServiceImpl.java
(original)
+++ geronimo/sandbox/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/convert/ConversionServiceImpl.java
Fri Apr 17 00:19:01 2009
@@ -72,6 +72,9 @@
     }
 
     private Object convertDefault(Object fromValue, Class toType) throws Exception {
+        if (!(fromValue instanceof String)) {
+            throw new RuntimeException("Unable to convert non-String value: " + fromValue.getClass());
+        }
         String value = (String)fromValue;
         if (Locale.class == toType) {
             String[] tokens = value.split("_");

Modified: geronimo/sandbox/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/ConstructorInjectionMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/ConstructorInjectionMetadataImpl.java?rev=765814&r1=765813&r2=765814&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/ConstructorInjectionMetadataImpl.java
(original)
+++ geronimo/sandbox/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/ConstructorInjectionMetadataImpl.java
Fri Apr 17 00:19:01 2009
@@ -55,7 +55,11 @@
     }
     
     public List<ParameterSpecification> getParameterSpecifications() {
-        return Collections.unmodifiableList(parameterSpecifications);
+        if (parameterSpecifications == null) {
+            return Collections.emptyList();
+        } else {
+            return Collections.unmodifiableList(parameterSpecifications);
+        }
     }
 
     public void addParameterSpecification(ParameterSpecification parameterSpecification)
{

Modified: geronimo/sandbox/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/ParameterSpecificationImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/ParameterSpecificationImpl.java?rev=765814&r1=765813&r2=765814&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/ParameterSpecificationImpl.java
(original)
+++ geronimo/sandbox/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/ParameterSpecificationImpl.java
Fri Apr 17 00:19:01 2009
@@ -72,4 +72,7 @@
         this.index = index;
     }
 
+    public String toString() {
+        return index + " " + value + " " + typeName;
+    }
 }

Modified: geronimo/sandbox/blueprint/org.apache.felix.blueprint/src/test/java/org/apache/felix/blueprint/WiringTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/org.apache.felix.blueprint/src/test/java/org/apache/felix/blueprint/WiringTest.java?rev=765814&r1=765813&r2=765814&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/org.apache.felix.blueprint/src/test/java/org/apache/felix/blueprint/WiringTest.java
(original)
+++ geronimo/sandbox/blueprint/org.apache.felix.blueprint/src/test/java/org/apache/felix/blueprint/WiringTest.java
Fri Apr 17 00:19:01 2009
@@ -25,6 +25,7 @@
 import org.apache.felix.blueprint.context.Instanciator;
 import org.apache.felix.blueprint.context.Parser;
 import org.apache.felix.blueprint.pojos.PojoA;
+import org.apache.felix.blueprint.pojos.PojoB;
 import org.apache.xbean.recipe.ObjectGraph;
 import org.apache.xbean.recipe.Repository;
 
@@ -36,12 +37,31 @@
         Instanciator i = new Instanciator(null);
         Repository repository = i.createRepository(parser.getRegistry());
         ObjectGraph graph = new ObjectGraph(repository);
-        Object obj = graph.create("pojoA");
-        assertNotNull(obj);
-        assertTrue(obj instanceof PojoA);
-        PojoA pojoa = (PojoA) obj;
+        
+        Object obj1 = graph.create("pojoA");
+        assertNotNull(obj1);
+        assertTrue(obj1 instanceof PojoA);
+        PojoA pojoa = (PojoA) obj1;
+        
+        Object obj2 = graph.create("pojoB");
+        assertNotNull(obj2);
+        assertTrue(obj2 instanceof PojoB);
+        PojoB pojob = (PojoB) obj2;
+        
         assertNotNull(pojoa.getPojob());
         assertNotNull(pojoa.getPojob().getUri());
+        
+        assertNotNull(pojoa.getList());
+        assertEquals("list value", pojoa.getList().get(0));
+        assertEquals(pojob, pojoa.getList().get(1));
+        
+        assertNotNull(pojoa.getSet());
+        assertTrue(pojoa.getSet().contains("set value"));
+        assertTrue(pojoa.getSet().contains(pojob));
+        
+        assertNotNull(pojoa.getMap());
+        assertEquals("val", pojoa.getMap().get("key"));
+        assertEquals(pojob, pojoa.getMap().get(pojob));        
     }
 
     protected Parser parse(String name) throws Exception {

Modified: geronimo/sandbox/blueprint/org.apache.felix.blueprint/src/test/resources/test-wiring.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/org.apache.felix.blueprint/src/test/resources/test-wiring.xml?rev=765814&r1=765813&r2=765814&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/org.apache.felix.blueprint/src/test/resources/test-wiring.xml
(original)
+++ geronimo/sandbox/blueprint/org.apache.felix.blueprint/src/test/resources/test-wiring.xml
Fri Apr 17 00:19:01 2009
@@ -16,9 +16,17 @@
                 <entry key-ref="pojoB" value-ref="pojoB" />
             </map>
         </property>
+        <property name="set">
+            <set>
+                <value>set value</value>
+                <ref component="pojoB" />
+            </set>
+        </property>
         <property name="list">
-            <value>val</value>
-            <ref component="pojoB" />
+            <list>
+                <value>list value</value>
+                <ref component="pojoB" />
+            </list>
         </property>
     </component>
 



Mime
View raw message