geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r771533 - /geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/Instanciator.java
Date Tue, 05 May 2009 03:20:01 GMT
Author: gawor
Date: Tue May  5 03:20:00 2009
New Revision: 771533

URL: http://svn.apache.org/viewvc?rev=771533&view=rev
Log:
check idrefs at injection time

Modified:
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/Instanciator.java

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/Instanciator.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/Instanciator.java?rev=771533&r1=771532&r2=771533&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/Instanciator.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/Instanciator.java
Tue May  5 03:20:00 2009
@@ -35,6 +35,7 @@
 import org.apache.xbean.recipe.ObjectRecipe;
 import org.apache.xbean.recipe.Option;
 import org.apache.xbean.recipe.Recipe;
+import org.apache.xbean.recipe.ReferenceNameRecipe;
 import org.apache.xbean.recipe.ReferenceRecipe;
 import org.apache.xbean.recipe.Repository;
 import org.osgi.service.blueprint.convert.ConversionService;
@@ -60,8 +61,6 @@
 /**
  * TODO: javadoc
  *
- * TODO: compound property names
- *
  * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
  * @version $Rev: 760378 $, $Date: 2009-03-31 11:31:38 +0200 (Tue, 31 Mar 2009) $
  */
@@ -275,6 +274,7 @@
             type = (type == null) ? groupingType : type;
             return new ValueRecipe(getConversionService(), stringValue, type);
         } else if (v instanceof RefMetadata) {
+            // TODO: make it work with property-placeholders?
             String componentName = ((RefMetadata) v).getComponentId();
             return new ReferenceRecipe(componentName);
         } else if (v instanceof CollectionMetadata) {
@@ -315,7 +315,9 @@
             }
             return mr;
         } else if (v instanceof IdRefMetadata) {
-            return ((IdRefMetadata) v).getComponentId();
+            // TODO: make it work with property-placeholders?
+            String componentName = ((IdRefMetadata) v).getComponentId();
+            return new ReferenceNameRecipe(componentName);
         } else {
             throw new IllegalStateException("Unsupported value: " + v.getClass().getName());
         }



Mime
View raw message