geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r787267 - in /geronimo/sandbox/blueprint: blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/ blueprint-core/src/main/java/org/apache/geronimo/blueprint/ bl...
Date Mon, 22 Jun 2009 15:12:23 GMT
Author: gnodet
Date: Mon Jun 22 15:12:23 2009
New Revision: 787267

URL: http://svn.apache.org/viewvc?rev=787267&view=rev
Log:
Update API to use CollapsedType

Added:
    geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ReferenceListMetadata.java
  (contents, props changed)
      - copied, changed from r787261, geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/RefListMetadata.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ExtendedReferenceListMetadata.java
      - copied, changed from r787261, geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ExtendedRefListMetadata.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableReferenceListMetadata.java
      - copied, changed from r787261, geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableRefListMetadata.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ReferenceListMetadataImpl.java
      - copied, changed from r787261, geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/RefListMetadataImpl.java
Removed:
    geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/RefListMetadata.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ExtendedRefListMetadata.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableRefListMetadata.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/RefListMetadataImpl.java
Modified:
    geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ComponentMetadata.java
    geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmNamespaceHandler.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BlueprintContainerImpl.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/Parser.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/RecipeBuilder.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/RefListRecipe.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ext/AbstractPropertyPlaceholder.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ext/ExtNamespaceHandler.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/BeanMetadataImpl.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ComponentMetadataImpl.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/MetadataUtil.java

Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ComponentMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ComponentMetadata.java?rev=787267&r1=787266&r2=787267&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ComponentMetadata.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ComponentMetadata.java
Mon Jun 22 15:12:23 2009
@@ -29,14 +29,14 @@
 	/**
 	 * The component will be eagerly instanciated
 	 */
-	static final int INITIALIZATION_EAGER = 1;
+	static final int ACTIVATION_EAGER = 1;
 
 	/**
  	 * The component will be lazily instanciated
  	 */
-	static final int INITIALIZATION_LAZY = 2;
+	static final int ACTIVATION_LAZY = 2;
 
-	/**
+    /**
 	 * The id of the component.
 	 *
 	 * ### renamed to getId
@@ -53,10 +53,10 @@
  	 * if not set.
  	 *
  	 * @return the initialization method
- 	 * @see #INITIALIZATION_EAGER
- 	 * @see #INITIALIZATION_LAZY
+ 	 * @see #ACTIVATION_EAGER
+ 	 * @see #ACTIVATION_LAZY
  	 */
-	int getInitialization();
+	int getActivation();
 
     /**
      * The names of any components listed in a "depends-on" attribute for this

Copied: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ReferenceListMetadata.java
(from r787261, geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/RefListMetadata.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ReferenceListMetadata.java?p2=geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ReferenceListMetadata.java&p1=geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/RefListMetadata.java&r1=787261&r2=787267&rev=787267&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/RefListMetadata.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ReferenceListMetadata.java
Mon Jun 22 15:12:23 2009
@@ -21,7 +21,7 @@
  * <code>ref-set</code> element.
  *
  */
-public interface RefListMetadata extends ServiceReferenceMetadata {
+public interface ReferenceListMetadata extends ServiceReferenceMetadata {
 
 	/**
 	 * Use the service objects to compare or include in the collection

Propchange: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ReferenceListMetadata.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ReferenceListMetadata.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ReferenceListMetadata.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmNamespaceHandler.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmNamespaceHandler.java?rev=787267&r1=787266&r2=787267&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmNamespaceHandler.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmNamespaceHandler.java
Mon Jun 22 15:12:23 2009
@@ -44,7 +44,6 @@
 import org.apache.geronimo.blueprint.mutable.MutableIdRefMetadata;
 import org.apache.geronimo.blueprint.mutable.MutableMapMetadata;
 import org.apache.geronimo.blueprint.mutable.MutableRefMetadata;
-import org.apache.geronimo.blueprint.mutable.MutableReferenceMetadata;
 import org.apache.geronimo.blueprint.mutable.MutableValueMetadata;
 import org.osgi.service.blueprint.container.ComponentDefinitionException;
 import org.osgi.service.blueprint.reflect.BeanMetadata;
@@ -55,7 +54,6 @@
 import org.osgi.service.blueprint.reflect.MapMetadata;
 import org.osgi.service.blueprint.reflect.Metadata;
 import org.osgi.service.blueprint.reflect.RefMetadata;
-import org.osgi.service.blueprint.reflect.ReferenceMetadata;
 import org.osgi.service.blueprint.reflect.RegistrationListener;
 import org.osgi.service.blueprint.reflect.ServiceMetadata;
 import org.osgi.service.blueprint.reflect.ValueMetadata;
@@ -422,7 +420,7 @@
         MutableBeanMetadata bean = context.createMetadata(MutableBeanMetadata.class);
         bean.setRuntimeClass(CmNamespaceHandler.class);
         bean.setFactoryMethod("getConfigAdmin");
-        bean.setInitialization(MutableBeanMetadata.INITIALIZATION_LAZY);
+        bean.setInitialization(MutableBeanMetadata.ACTIVATION_LAZY);
         bean.setScope(MutableBeanMetadata.SCOPE_PROTOTYPE);
         return bean;
     }

Copied: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ExtendedReferenceListMetadata.java
(from r787261, geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ExtendedRefListMetadata.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ExtendedReferenceListMetadata.java?p2=geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ExtendedReferenceListMetadata.java&p1=geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ExtendedRefListMetadata.java&r1=787261&r2=787267&rev=787267&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ExtendedRefListMetadata.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ExtendedReferenceListMetadata.java
Mon Jun 22 15:12:23 2009
@@ -16,7 +16,7 @@
  */
 package org.apache.geronimo.blueprint;
 
-import org.osgi.service.blueprint.reflect.RefListMetadata;
+import org.osgi.service.blueprint.reflect.ReferenceListMetadata;
 
 /**
  * TODO: javadoc
@@ -24,7 +24,7 @@
  * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
  * @version $Rev: 766508 $, $Date: 2009-04-19 22:09:27 +0200 (Sun, 19 Apr 2009) $
  */
-public interface ExtendedRefListMetadata extends RefListMetadata, ExtendedServiceReferenceMetadata
{
+public interface ExtendedReferenceListMetadata extends ReferenceListMetadata, ExtendedServiceReferenceMetadata
{
 
     int PROXY_METHOD_GREEDY = 2;
 

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BlueprintContainerImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BlueprintContainerImpl.java?rev=787267&r1=787266&r2=787267&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BlueprintContainerImpl.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BlueprintContainerImpl.java
Mon Jun 22 15:12:23 2009
@@ -185,6 +185,8 @@
             LOGGER.debug("Xml-validation directive: " + xmlValidationDirective);
             xmlValidation = Boolean.parseBoolean(xmlValidationDirective);
         }
+
+        // TODO: load compliant
     }
     
     public void schedule() {
@@ -244,7 +246,6 @@
                             return;
                         }
                         parser.populate(handlers, componentDefinitionRegistry);
-                        compliance = parser.getCompliance();
                         state = State.Populated;
                         break;
                     }
@@ -485,7 +486,7 @@
         List<String> components = new ArrayList<String>();
         for (String name : componentDefinitionRegistry.getComponentDefinitionNames()) {
             ComponentMetadata component = componentDefinitionRegistry.getComponentDefinition(name);
-            boolean eager = component.getInitialization() == ComponentMetadata.INITIALIZATION_EAGER;
+            boolean eager = component.getActivation() == ComponentMetadata.ACTIVATION_EAGER;
             if (component instanceof BeanMetadata) {
                 BeanMetadata local = (BeanMetadata) component;
                 String scope = local.getScope();

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/Parser.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/Parser.java?rev=787267&r1=787266&r2=787267&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/Parser.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/Parser.java
Mon Jun 22 15:12:23 2009
@@ -60,7 +60,7 @@
 import org.apache.geronimo.blueprint.reflect.MapMetadataImpl;
 import org.apache.geronimo.blueprint.reflect.MetadataUtil;
 import org.apache.geronimo.blueprint.reflect.PropsMetadataImpl;
-import org.apache.geronimo.blueprint.reflect.RefListMetadataImpl;
+import org.apache.geronimo.blueprint.reflect.ReferenceListMetadataImpl;
 import org.apache.geronimo.blueprint.reflect.RefMetadataImpl;
 import org.apache.geronimo.blueprint.reflect.ReferenceListenerImpl;
 import org.apache.geronimo.blueprint.reflect.ReferenceMetadataImpl;
@@ -82,7 +82,7 @@
 import org.osgi.service.blueprint.reflect.NonNullMetadata;
 import org.osgi.service.blueprint.reflect.NullMetadata;
 import org.osgi.service.blueprint.reflect.PropsMetadata;
-import org.osgi.service.blueprint.reflect.RefListMetadata;
+import org.osgi.service.blueprint.reflect.ReferenceListMetadata;
 import org.osgi.service.blueprint.reflect.RefMetadata;
 import org.osgi.service.blueprint.reflect.ReferenceListener;
 import org.osgi.service.blueprint.reflect.ReferenceMetadata;
@@ -123,7 +123,7 @@
     public static final String VALUE_ELEMENT = "value";
     public static final String SERVICE_ELEMENT = "service";
     public static final String REFERENCE_ELEMENT = "reference";
-    public static final String REFLIST_ELEMENT = "ref-list";
+    public static final String REFERENCE_LIST_ELEMENT = "reference-list";
     public static final String INTERFACES_ELEMENT = "interfaces";
     public static final String REFERENCE_LISTENER_ELEMENT = "reference-listener";
     public static final String SERVICE_PROPERTIES_ELEMENT = "service-properties";
@@ -163,7 +163,7 @@
     public static final String SCOPE_ATTRIBUTE = "scope";
     public static final String INIT_METHOD_ATTRIBUTE = "init-method";
     public static final String DESTROY_METHOD_ATTRIBUTE = "destroy-method";
-    public static final String INITIALIZATION_ATTRIBUTE = "initialization";
+    public static final String ACTIVATION_ATTRIBUTE = "activation";
     public static final String FACTORY_REF_ATTRIBUTE = "factory-ref";
     public static final String FACTORY_METHOD_ATTRIBUTE = "factory-method";
 
@@ -183,14 +183,10 @@
     public static final String TIMEOUT_DEFAULT = "300000";
     public static final String USE_SERVICE_OBJECT = "service-object";
     public static final String USE_SERVICE_REFERENCE = "service-reference";
-    public static final String INITIALIZATION_EAGER = "eager";
-    public static final String INITIALIZATION_LAZY = "lazy";
-    public static final String INITIALIZATION_DEFAULT = INITIALIZATION_EAGER;
+    public static final String ACTIVATION_EAGER = "eager";
+    public static final String ACTIVATION_LAZY = "lazy";
+    public static final String ACTIVATION_DEFAULT = ACTIVATION_EAGER;
     
-    public static final String COMPLIANCE_ATTRIBUTE = "compliance";
-    public static final String COMPLIANCE_STRICT = "strict";
-    public static final String COMPLIANCE_LOOSE = "loose"; 
-
     private static final Logger LOGGER = LoggerFactory.getLogger(Parser.class);
 
     private static DocumentBuilderFactory documentBuilderFactory;
@@ -205,7 +201,6 @@
     private String defaultTimeout;
     private String defaultAvailability;
     private String defaultInitialization;
-    private int compliance = BlueprintContainer.COMPLIANCE_STRICT;
     private Set<URI> namespaces;
     private boolean validation;
     private boolean validated;
@@ -239,17 +234,6 @@
         this.documents = documents;
     }
 
-    public int getCompliance() {
-        return this.compliance;
-    }
-    
-    private void setCompliance(int compliance) {
-        // If one config specifies loose compliance, we stick with it 
-        if (this.compliance != BlueprintContainer.COMPLIANCE_LOOSE) {
-            this.compliance = compliance;
-        }
-    }
-    
     public Set<URI> getNamespaces() {
         if (this.namespaces == null) {
             if (documents == null) {
@@ -332,7 +316,7 @@
     private void loadComponents(Document doc) {
         defaultTimeout = TIMEOUT_DEFAULT;
         defaultAvailability = AVAILABILITY_DEFAULT;
-        defaultInitialization = INITIALIZATION_DEFAULT;
+        defaultInitialization = ACTIVATION_DEFAULT;
         Element root = doc.getDocumentElement();
         if (!isBlueprintNamespace(root.getNamespaceURI()) ||
                 !nodeNameEquals(root, BLUEPRINT_ELEMENT)) {
@@ -349,17 +333,6 @@
             defaultAvailability = root.getAttribute(DEFAULT_AVAILABILITY_ATTRIBUTE);
         }
         
-        if (root.hasAttribute(COMPLIANCE_ATTRIBUTE)) {
-            String attribute = root.getAttribute(COMPLIANCE_ATTRIBUTE);
-            if (COMPLIANCE_STRICT.equals(attribute)) {
-                setCompliance(BlueprintContainer.COMPLIANCE_STRICT);            
-            } else if (COMPLIANCE_LOOSE.equals(attribute)) {
-                setCompliance(BlueprintContainer.COMPLIANCE_LOOSE);            
-            } else {
-                throw new ComponentDefinitionException("Attribute " + COMPLIANCE_ATTRIBUTE
+ " must be equal to " + COMPLIANCE_STRICT + " or " + COMPLIANCE_LOOSE);
-            }
-        }
-
         // Parse custom attributes
         NamedNodeMap attributes = root.getAttributes();
         if (attributes != null) {
@@ -416,7 +389,7 @@
             return type.cast(parseProps(element));
         } else if (ReferenceMetadata.class.isAssignableFrom(type)) {
             return type.cast(parseReference(element, enclosingComponent == null));
-        } else if (RefListMetadata.class.isAssignableFrom(type)) {
+        } else if (ReferenceListMetadata.class.isAssignableFrom(type)) {
             return type.cast(parseRefList(element, enclosingComponent == null));
         } else if (IdRefMetadata.class.isAssignableFrom(type)) {
             return type.cast(parseIdRef(element));
@@ -443,7 +416,7 @@
         } else if (nodeNameEquals(element, REFERENCE_ELEMENT)) {
             ComponentMetadata reference = parseReference(element, true);
             registry.registerComponentDefinition(reference);
-        } else if (nodeNameEquals(element, REFLIST_ELEMENT) ) {
+        } else if (nodeNameEquals(element, REFERENCE_LIST_ELEMENT) ) {
             ComponentMetadata references = parseRefList(element, true);
             registry.registerComponentDefinition(references);
         } else {
@@ -490,7 +463,7 @@
             metadata.setInitialization(parseInitialization(element));
         } else {
             metadata.setScope(BeanMetadata.SCOPE_PROTOTYPE);
-            metadata.setInitialization(ComponentMetadata.INITIALIZATION_LAZY);
+            metadata.setInitialization(ComponentMetadata.ACTIVATION_LAZY);
         }
         if (element.hasAttribute(CLASS_ATTRIBUTE)) {
             metadata.setClassName(element.getAttribute(CLASS_ATTRIBUTE));
@@ -569,7 +542,7 @@
             service.setId(getId(element));
             service.setInitialization(parseInitialization(element));
         } else {
-            service.setInitialization(ComponentMetadata.INITIALIZATION_LAZY);
+            service.setInitialization(ComponentMetadata.ACTIVATION_LAZY);
         }
         if (element.hasAttribute(INTERFACE_ATTRIBUTE)) {
             service.setInterfaceNames(Collections.singletonList(element.getAttribute(INTERFACE_ATTRIBUTE)));
@@ -891,16 +864,16 @@
     }
 
     private ComponentMetadata parseRefList(Element element, boolean topElement) {
-        RefListMetadataImpl references = new RefListMetadataImpl();
+        ReferenceListMetadataImpl references = new ReferenceListMetadataImpl();
         if (topElement) {
             references.setId(getId(element));
         }
         if (element.hasAttribute(MEMBER_TYPE_ATTRIBUTE)) {
             String memberType = element.getAttribute(MEMBER_TYPE_ATTRIBUTE);
             if (USE_SERVICE_OBJECT.equals(memberType)) {
-                references.setMemberType(RefListMetadata.USE_SERVICE_OBJECT);
+                references.setMemberType(ReferenceListMetadata.USE_SERVICE_OBJECT);
             } else if (USE_SERVICE_REFERENCE.equals(memberType)) {
-                references.setMemberType(RefListMetadata.USE_SERVICE_REFERENCE);
+                references.setMemberType(ReferenceListMetadata.USE_SERVICE_REFERENCE);
             }
         }
         parseReference(element, references, topElement);
@@ -921,7 +894,7 @@
         if (topElement) {
             reference.setInitialization(parseInitialization(element));
         } else {
-            reference.setInitialization(ComponentMetadata.INITIALIZATION_LAZY);
+            reference.setInitialization(ComponentMetadata.ACTIVATION_LAZY);
         }
         if (element.hasAttribute(DEPENDS_ON_ATTRIBUTE)) {
             reference.setDependsOn(parseList(element.getAttribute(DEPENDS_ON_ATTRIBUTE)));
@@ -1077,7 +1050,7 @@
                 return parseReference(element, false);
             } else if (nodeNameEquals(element, SERVICE_ELEMENT)) {
                 return parseService(element, false);
-            } else if (nodeNameEquals(element, REFLIST_ELEMENT) ) {
+            } else if (nodeNameEquals(element, REFERENCE_LIST_ELEMENT) ) {
                 return parseRefList(element, false);
             } else if (nodeNameEquals(element, NULL_ELEMENT) && allowNull) {
                 return NullMetadata.NULL;
@@ -1129,13 +1102,13 @@
     }
 
     private int parseInitialization(Element element) {
-        String initialization = element.hasAttribute(INITIALIZATION_ATTRIBUTE) ? element.getAttribute(INITIALIZATION_ATTRIBUTE)
: defaultInitialization;
-        if (INITIALIZATION_EAGER.equals(initialization)) {
-            return ComponentMetadata.INITIALIZATION_EAGER;
-        } else if (INITIALIZATION_LAZY.equals(initialization)) {
-            return ComponentMetadata.INITIALIZATION_LAZY;
+        String initialization = element.hasAttribute(ACTIVATION_ATTRIBUTE) ? element.getAttribute(ACTIVATION_ATTRIBUTE)
: defaultInitialization;
+        if (ACTIVATION_EAGER.equals(initialization)) {
+            return ComponentMetadata.ACTIVATION_EAGER;
+        } else if (ACTIVATION_LAZY.equals(initialization)) {
+            return ComponentMetadata.ACTIVATION_LAZY;
         } else {
-            throw new ComponentDefinitionException("Attribute " + INITIALIZATION_ATTRIBUTE
+ " must be equal to " + INITIALIZATION_EAGER + " or " + INITIALIZATION_LAZY);
+            throw new ComponentDefinitionException("Attribute " + ACTIVATION_ATTRIBUTE +
" must be equal to " + ACTIVATION_EAGER + " or " + ACTIVATION_LAZY);
         }
     }
     

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/RecipeBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/RecipeBuilder.java?rev=787267&r1=787266&r2=787267&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/RecipeBuilder.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/RecipeBuilder.java
Mon Jun 22 15:12:23 2009
@@ -49,7 +49,7 @@
 import org.osgi.service.blueprint.reflect.Metadata;
 import org.osgi.service.blueprint.reflect.NullMetadata;
 import org.osgi.service.blueprint.reflect.PropsMetadata;
-import org.osgi.service.blueprint.reflect.RefListMetadata;
+import org.osgi.service.blueprint.reflect.ReferenceListMetadata;
 import org.osgi.service.blueprint.reflect.RefMetadata;
 import org.osgi.service.blueprint.reflect.ReferenceListener;
 import org.osgi.service.blueprint.reflect.ReferenceMetadata;
@@ -105,14 +105,14 @@
             return createServiceRecipe((ServiceMetadata) component);
         } else if (component instanceof ReferenceMetadata) {
             return createReferenceRecipe((ReferenceMetadata) component);
-        } else if (component instanceof RefListMetadata) {
-            return createRefCollectionRecipe((RefListMetadata) component);
+        } else if (component instanceof ReferenceListMetadata) {
+            return createRefCollectionRecipe((ReferenceListMetadata) component);
         } else {
             throw new IllegalStateException("Unsupported component type " + component.getClass());
         }
     }
 
-    private Recipe createRefCollectionRecipe(RefListMetadata metadata) {
+    private Recipe createRefCollectionRecipe(ReferenceListMetadata metadata) {
         CollectionRecipe listenersRecipe = null;
         if (metadata.getReferenceListeners() != null) {
             listenersRecipe = new CollectionRecipe(getName(null), ArrayList.class);

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/RefListRecipe.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/RefListRecipe.java?rev=787267&r1=787266&r2=787267&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/RefListRecipe.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/RefListRecipe.java
Mon Jun 22 15:12:23 2009
@@ -32,7 +32,7 @@
 import java.util.concurrent.Callable;
 
 import org.apache.geronimo.blueprint.ExtendedBlueprintContainer;
-import org.apache.geronimo.blueprint.ExtendedRefListMetadata;
+import org.apache.geronimo.blueprint.ExtendedReferenceListMetadata;
 import org.apache.geronimo.blueprint.di.Recipe;
 import org.apache.geronimo.blueprint.utils.DynamicCollection;
 import org.osgi.framework.Constants;
@@ -40,7 +40,7 @@
 import org.osgi.service.blueprint.container.CollapsedType;
 import org.osgi.service.blueprint.container.ComponentDefinitionException;
 import org.osgi.service.blueprint.container.ServiceUnavailableException;
-import org.osgi.service.blueprint.reflect.RefListMetadata;
+import org.osgi.service.blueprint.reflect.ReferenceListMetadata;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -54,14 +54,14 @@
 
     private static final Logger LOGGER = LoggerFactory.getLogger(RefListRecipe.class);
 
-    private final RefListMetadata metadata;
+    private final ReferenceListMetadata metadata;
     private final List<ManagedCollection> collections = new ArrayList<ManagedCollection>();
     private final DynamicCollection<ServiceDispatcher> storage = new DynamicCollection<ServiceDispatcher>();
     private final List<ServiceDispatcher> unboundDispatchers = new ArrayList<ServiceDispatcher>();
 
     public RefListRecipe(String name,
                          ExtendedBlueprintContainer blueprintContainer,
-                         RefListMetadata metadata,
+                         ReferenceListMetadata metadata,
                          Recipe listenersRecipe,
                          List<Recipe> explicitDependencies) {
         super(name, blueprintContainer, metadata, listenersRecipe, explicitDependencies);
@@ -129,8 +129,8 @@
                 } else {
                     dispatcher = new ServiceDispatcher(reference);
                     List<String> interfaces = Collections.singletonList(metadata.getInterface());
-                    if (metadata instanceof ExtendedRefListMetadata) {
-                        boolean greedy = (((ExtendedRefListMetadata) metadata).getProxyMethod()
& ExtendedRefListMetadata.PROXY_METHOD_GREEDY) != 0;
+                    if (metadata instanceof ExtendedReferenceListMetadata) {
+                        boolean greedy = (((ExtendedReferenceListMetadata) metadata).getProxyMethod()
& ExtendedReferenceListMetadata.PROXY_METHOD_GREEDY) != 0;
                         if (greedy) {
                             interfaces = Arrays.asList((String[]) reference.getProperty(Constants.OBJECTCLASS));
                         }
@@ -243,9 +243,9 @@
                 }
             }
             boolean references;
-            if (metadata.getMemberType() == RefListMetadata.USE_SERVICE_REFERENCE) {
+            if (metadata.getMemberType() == ReferenceListMetadata.USE_SERVICE_REFERENCE)
{
                 references = true;
-            } else if (metadata.getMemberType() == RefListMetadata.USE_SERVICE_OBJECT) {
+            } else if (metadata.getMemberType() == ReferenceListMetadata.USE_SERVICE_OBJECT)
{
                 references = false;
             } else {
                 references = useRef;

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ext/AbstractPropertyPlaceholder.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ext/AbstractPropertyPlaceholder.java?rev=787267&r1=787266&r2=787267&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ext/AbstractPropertyPlaceholder.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ext/AbstractPropertyPlaceholder.java
Mon Jun 22 15:12:23 2009
@@ -45,7 +45,7 @@
 import org.osgi.service.blueprint.reflect.Metadata;
 import org.osgi.service.blueprint.reflect.NonNullMetadata;
 import org.osgi.service.blueprint.reflect.PropsMetadata;
-import org.osgi.service.blueprint.reflect.RefListMetadata;
+import org.osgi.service.blueprint.reflect.ReferenceListMetadata;
 import org.osgi.service.blueprint.reflect.ReferenceListener;
 import org.osgi.service.blueprint.reflect.ReferenceMetadata;
 import org.osgi.service.blueprint.reflect.RegistrationListener;
@@ -90,8 +90,8 @@
     protected Metadata processMetadata(Metadata metadata) {
         if (metadata instanceof BeanMetadata) {
             return processBeanMetadata((BeanMetadata) metadata);
-        } else if (metadata instanceof RefListMetadata) {
-            return processRefCollectionMetadata((RefListMetadata) metadata);
+        } else if (metadata instanceof ReferenceListMetadata) {
+            return processRefCollectionMetadata((ReferenceListMetadata) metadata);
         } else if (metadata instanceof ReferenceMetadata) {
             return processReferenceMetadata((ReferenceMetadata) metadata);
         } else if (metadata instanceof ServiceMetadata) {
@@ -142,7 +142,7 @@
         return component;
     }
 
-    protected Metadata processRefCollectionMetadata(RefListMetadata component) {
+    protected Metadata processRefCollectionMetadata(ReferenceListMetadata component) {
         for (ReferenceListener listener : component.getReferenceListeners()) {
             ((MutableReferenceListener) listener).setListenerComponent((Target) processMetadata(listener.getListenerComponent()));
         }

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ext/ExtNamespaceHandler.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ext/ExtNamespaceHandler.java?rev=787267&r1=787266&r2=787267&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ext/ExtNamespaceHandler.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ext/ExtNamespaceHandler.java
Mon Jun 22 15:12:23 2009
@@ -30,7 +30,7 @@
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 
-import org.apache.geronimo.blueprint.ExtendedRefListMetadata;
+import org.apache.geronimo.blueprint.ExtendedReferenceListMetadata;
 import org.apache.geronimo.blueprint.ParserContext;
 import org.apache.geronimo.blueprint.mutable.MutableBeanMetadata;
 import org.apache.geronimo.blueprint.mutable.MutableCollectionMetadata;
@@ -47,7 +47,7 @@
 import org.osgi.service.blueprint.reflect.ComponentMetadata;
 import org.osgi.service.blueprint.reflect.IdRefMetadata;
 import org.osgi.service.blueprint.reflect.Metadata;
-import org.osgi.service.blueprint.reflect.RefListMetadata;
+import org.osgi.service.blueprint.reflect.ReferenceListMetadata;
 import org.osgi.service.blueprint.reflect.RefMetadata;
 import org.osgi.service.blueprint.reflect.ServiceReferenceMetadata;
 import org.osgi.service.blueprint.reflect.ValueMetadata;
@@ -150,16 +150,16 @@
         String[] flags = value.trim().split(" ");
         for (String flag : flags) {
             if (PROXY_METHOD_DEFAULT.equals(flag)) {
-                method += ExtendedRefListMetadata.PROXY_METHOD_DEFAULT;
+                method += ExtendedReferenceListMetadata.PROXY_METHOD_DEFAULT;
             } else if (PROXY_METHOD_CLASSES.equals(flag)) {
-                method += ExtendedRefListMetadata.PROXY_METHOD_CLASSES;
+                method += ExtendedReferenceListMetadata.PROXY_METHOD_CLASSES;
             } else if (PROXY_METHOD_GREEDY.equals(flag)) {
-                method += ExtendedRefListMetadata.PROXY_METHOD_GREEDY;
+                method += ExtendedReferenceListMetadata.PROXY_METHOD_GREEDY;
             } else {
                 throw new ComponentDefinitionException("Unknown proxy method: " + flag);
             }
         }
-        if ((method & ExtendedRefListMetadata.PROXY_METHOD_GREEDY) != 0 && !(component
instanceof RefListMetadata)) {
+        if ((method & ExtendedReferenceListMetadata.PROXY_METHOD_GREEDY) != 0 &&
!(component instanceof ReferenceListMetadata)) {
             throw new ComponentDefinitionException("Greedy proxying is only available for
<ref-list> and <ref-set> elements");
         }
         ((MutableServiceReferenceMetadata) component).setProxyMethod(method);

Copied: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableReferenceListMetadata.java
(from r787261, geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableRefListMetadata.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableReferenceListMetadata.java?p2=geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableReferenceListMetadata.java&p1=geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableRefListMetadata.java&r1=787261&r2=787267&rev=787267&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableRefListMetadata.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableReferenceListMetadata.java
Mon Jun 22 15:12:23 2009
@@ -18,7 +18,7 @@
  */
 package org.apache.geronimo.blueprint.mutable;
 
-import org.apache.geronimo.blueprint.ExtendedRefListMetadata;
+import org.apache.geronimo.blueprint.ExtendedReferenceListMetadata;
 
 /**
  * A mutable version of the <code>RefCollectionMetadata</code> that allows modifications.
@@ -26,7 +26,7 @@
  * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
  * @version $Rev: 766508 $, $Date: 2009-04-19 22:09:27 +0200 (Sun, 19 Apr 2009) $
  */
-public interface MutableRefListMetadata extends ExtendedRefListMetadata, MutableServiceReferenceMetadata
{
+public interface MutableReferenceListMetadata extends ExtendedReferenceListMetadata, MutableServiceReferenceMetadata
{
 
     void setMemberType(int memberType);
 

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/BeanMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/BeanMetadataImpl.java?rev=787267&r1=787266&r2=787267&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/BeanMetadataImpl.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/BeanMetadataImpl.java
Mon Jun 22 15:12:23 2009
@@ -64,7 +64,7 @@
         for (BeanProperty property : source.getProperties()) {
             addProperty(new BeanPropertyImpl(property));
         }
-        this.initialization = source.getInitialization();
+        this.initialization = source.getActivation();
         this.factoryMethod = source.getFactoryMethod();
         this.factoryComponent = MetadataUtil.cloneTarget(source.getFactoryComponent());
         this.scope = source.getScope();

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ComponentMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ComponentMetadataImpl.java?rev=787267&r1=787266&r2=787267&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ComponentMetadataImpl.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ComponentMetadataImpl.java
Mon Jun 22 15:12:23 2009
@@ -34,7 +34,7 @@
 public class ComponentMetadataImpl implements MutableComponentMetadata {
 
     protected String id;
-    protected int initialization = INITIALIZATION_EAGER;
+    protected int initialization = ACTIVATION_EAGER;
     protected List<String> dependsOn;
 
     protected ComponentMetadataImpl() {
@@ -42,7 +42,7 @@
     
     protected ComponentMetadataImpl(ComponentMetadata source) {
         id = source.getId();
-        initialization = source.getInitialization();
+        initialization = source.getActivation();
         dependsOn = new ArrayList<String>(source.getDependsOn());
     }
     
@@ -54,7 +54,7 @@
         this.id = id;
     }
 
-    public int getInitialization() {
+    public int getActivation() {
         return initialization;
     }
 

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/MetadataUtil.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/MetadataUtil.java?rev=787267&r1=787266&r2=787267&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/MetadataUtil.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/MetadataUtil.java
Mon Jun 22 15:12:23 2009
@@ -32,7 +32,7 @@
 import org.osgi.service.blueprint.reflect.Metadata;
 import org.osgi.service.blueprint.reflect.NullMetadata;
 import org.osgi.service.blueprint.reflect.PropsMetadata;
-import org.osgi.service.blueprint.reflect.RefListMetadata;
+import org.osgi.service.blueprint.reflect.ReferenceListMetadata;
 import org.osgi.service.blueprint.reflect.RefMetadata;
 import org.osgi.service.blueprint.reflect.ReferenceMetadata;
 import org.osgi.service.blueprint.reflect.ServiceMetadata;
@@ -76,8 +76,8 @@
         else if (source instanceof BeanMetadata) {
             return new BeanMetadataImpl((BeanMetadata)source);
         }
-        else if (source instanceof RefListMetadata) {
-            return new RefListMetadataImpl((RefListMetadata)source);
+        else if (source instanceof ReferenceListMetadata) {
+            return new ReferenceListMetadataImpl((ReferenceListMetadata)source);
         }
         else if (source instanceof ServiceMetadata) {
             return new ServiceMetadataImpl((ServiceMetadata)source);
@@ -139,8 +139,8 @@
             return type.cast(new ValueMetadataImpl());
         } else if (BeanMetadata.class.isAssignableFrom(type)) {
             return type.cast(new BeanMetadataImpl());
-        } else if (RefListMetadata.class.isAssignableFrom(type)) {
-            return type.cast(new RefListMetadataImpl());
+        } else if (ReferenceListMetadata.class.isAssignableFrom(type)) {
+            return type.cast(new ReferenceListMetadataImpl());
         } else if (ServiceMetadata.class.isAssignableFrom(type)) {
             return type.cast(new ServiceMetadataImpl());
         } else if (ReferenceMetadata.class.isAssignableFrom(type)) {

Copied: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ReferenceListMetadataImpl.java
(from r787261, geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/RefListMetadataImpl.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ReferenceListMetadataImpl.java?p2=geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ReferenceListMetadataImpl.java&p1=geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/RefListMetadataImpl.java&r1=787261&r2=787267&rev=787267&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/RefListMetadataImpl.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ReferenceListMetadataImpl.java
Mon Jun 22 15:12:23 2009
@@ -18,8 +18,8 @@
  */
 package org.apache.geronimo.blueprint.reflect;
 
-import org.apache.geronimo.blueprint.mutable.MutableRefListMetadata;
-import org.osgi.service.blueprint.reflect.RefListMetadata;
+import org.apache.geronimo.blueprint.mutable.MutableReferenceListMetadata;
+import org.osgi.service.blueprint.reflect.ReferenceListMetadata;
 
 /**
  * Implementation of RefCollectionMetadata 
@@ -27,14 +27,14 @@
  * @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) $
  */
-public class RefListMetadataImpl extends ServiceReferenceMetadataImpl implements MutableRefListMetadata
{
+public class ReferenceListMetadataImpl extends ServiceReferenceMetadataImpl implements MutableReferenceListMetadata
{
 
     private int memberType;
 
-    public RefListMetadataImpl() {
+    public ReferenceListMetadataImpl() {
     }
     
-    public RefListMetadataImpl(RefListMetadata source) {
+    public ReferenceListMetadataImpl(ReferenceListMetadata source) {
         super(source);
         memberType = source.getMemberType();
     }



Mime
View raw message