geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r781778 - in /geronimo/sandbox/blueprint: blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ blueprint-cm/src/main/resources/org/apache/geronimo/blueprint/compendium/cm/ blueprint-core/src/main/java/org/apache/geronimo/blueprin...
Date Thu, 04 Jun 2009 15:35:23 GMT
Author: gnodet
Date: Thu Jun  4 15:35:21 2009
New Revision: 781778

URL: http://svn.apache.org/viewvc?rev=781778&view=rev
Log:
Update to latest schema and api

Modified:
    geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/BeanMetadata.java
    geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ComponentMetadata.java
    geronimo/sandbox/blueprint/blueprint-cm/src/main/resources/org/apache/geronimo/blueprint/compendium/cm/blueprint-cm.xsd
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/AbstractServiceReferenceRecipe.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/mutable/MutableBeanMetadata.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableComponentMetadata.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableServiceMetadata.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/ServiceMetadataImpl.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/resources/org/apache/geronimo/blueprint/blueprint.xsd
    geronimo/sandbox/blueprint/blueprint-core/src/test/java/org/apache/geronimo/blueprint/ParserTest.java

Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/BeanMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/BeanMetadata.java?rev=781778&r1=781777&r2=781778&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/BeanMetadata.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/BeanMetadata.java
Thu Jun  4 15:35:21 2009
@@ -44,6 +44,4 @@
 
     Class getRuntimeClass();
 
-    List<String> getExplicitDependencies();
-
 }

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=781778&r1=781777&r2=781778&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
Thu Jun  4 15:35:21 2009
@@ -16,6 +16,8 @@
  */
 package org.osgi.service.blueprint.reflect;
 
+import java.util.List;
+
 public interface ComponentMetadata extends NonNullMetadata {
 
     static final int INITIALIZATION_EAGER = 1;
@@ -26,4 +28,6 @@
 
     int getInitialization();
 
+    List<String> getDependsOn();
+
 }

Modified: geronimo/sandbox/blueprint/blueprint-cm/src/main/resources/org/apache/geronimo/blueprint/compendium/cm/blueprint-cm.xsd
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-cm/src/main/resources/org/apache/geronimo/blueprint/compendium/cm/blueprint-cm.xsd?rev=781778&r1=781777&r2=781778&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-cm/src/main/resources/org/apache/geronimo/blueprint/compendium/cm/blueprint-cm.xsd
(original)
+++ geronimo/sandbox/blueprint/blueprint-cm/src/main/resources/org/apache/geronimo/blueprint/compendium/cm/blueprint-cm.xsd
Thu Jun  4 15:35:21 2009
@@ -101,8 +101,8 @@
     <xsd:complexType name="TmanagedComponent">
         <xsd:group ref="bp:beanElements"/>
         <xsd:attribute name="class" type="bp:Tclass"/>
-        <xsd:attribute name="init-method" type="bp:TnullableMethod"/>
-        <xsd:attribute name="destroy-method" type="bp:TnullableMethod"/>
+        <xsd:attribute name="init-method" type="bp:Tmethod"/>
+        <xsd:attribute name="destroy-method" type="bp:Tmethod"/>
         <xsd:attribute name="factory-method" type="bp:Tmethod"/>
         <xsd:attribute name="factory-component" type="bp:Tidref"/>
         <xsd:anyAttribute namespace="##other" processContents="lax"/>

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/AbstractServiceReferenceRecipe.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/AbstractServiceReferenceRecipe.java?rev=781778&r1=781777&r2=781778&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/AbstractServiceReferenceRecipe.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/AbstractServiceReferenceRecipe.java
Thu Jun  4 15:35:21 2009
@@ -55,6 +55,8 @@
 /**
  * Abstract class for service reference recipes.
  *
+ * TODO: handle dependsOn on references
+ *
  * @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) $
  */

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=781778&r1=781777&r2=781778&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
Thu Jun  4 15:35:21 2009
@@ -97,6 +97,8 @@
 /**
  * TODO: javadoc
  *
+ * TODO: parse compliance attribute on <blueprint>
+ *
  * @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) $
  */
@@ -486,7 +488,7 @@
             throw new ComponentDefinitionException("Attribute " + INITIALIZATION_ATTRIBUTE
+ " must be equals to " + INITIALIZATION_EAGER + " or " + INITIALIZATION_LAZY);
         }
         if (element.hasAttribute(DEPENDS_ON_ATTRIBUTE)) {
-            metadata.setExplicitDependencies(parseList(element.getAttribute(DEPENDS_ON_ATTRIBUTE)));
+            metadata.setDependsOn(parseList(element.getAttribute(DEPENDS_ON_ATTRIBUTE)));
         }
         if (element.hasAttribute(INIT_METHOD_ATTRIBUTE)) {
             metadata.setInitMethodName(element.getAttribute(INIT_METHOD_ATTRIBUTE));
@@ -574,7 +576,7 @@
             service.setServiceComponent(new RefMetadataImpl(element.getAttribute(REF_ATTRIBUTE)));
         }
         if (element.hasAttribute(DEPENDS_ON_ATTRIBUTE)) {
-            service.setExplicitDependencies(parseList(element.getAttribute(DEPENDS_ON_ATTRIBUTE)));
+            service.setDependsOn(parseList(element.getAttribute(DEPENDS_ON_ATTRIBUTE)));
         }
         String autoExport = element.hasAttribute(AUTO_EXPORT_ATTRIBUTE) ? element.getAttribute(AUTO_EXPORT_ATTRIBUTE)
: AUTO_EXPORT_DEFAULT;
         if (AUTO_EXPORT_DISABLED.equals(autoExport)) {
@@ -997,6 +999,9 @@
         } else {
             throw new ComponentDefinitionException("Attribute " + INITIALIZATION_ATTRIBUTE
+ " must be equals to " + INITIALIZATION_EAGER + " or " + INITIALIZATION_LAZY);
         }
+        if (element.hasAttribute(DEPENDS_ON_ATTRIBUTE)) {
+            reference.setDependsOn(parseList(element.getAttribute(DEPENDS_ON_ATTRIBUTE)));
+        }
         if (element.hasAttribute(INTERFACE_ATTRIBUTE)) {
             reference.setInterfaceNames(Collections.singletonList(element.getAttribute(INTERFACE_ATTRIBUTE)));
         }

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=781778&r1=781777&r2=781778&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
Thu Jun  4 15:35:21 2009
@@ -189,7 +189,7 @@
                 beanMetadata.getRuntimeClass() != null ? beanMetadata.getRuntimeClass() :
beanMetadata.getClassName());
         // Create refs for explicit dependencies
         List<Recipe> deps = new ArrayList<Recipe>();
-        for (String name : beanMetadata.getExplicitDependencies()) {
+        for (String name : beanMetadata.getDependsOn()) {
             deps.add(new RefRecipe(getName(null), name));
         }
         recipe.setExplicitDependencies(deps);

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableBeanMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableBeanMetadata.java?rev=781778&r1=781777&r2=781778&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableBeanMetadata.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableBeanMetadata.java
Thu Jun  4 15:35:21 2009
@@ -32,8 +32,6 @@
  */
 public interface MutableBeanMetadata extends ExtendedBeanMetadata, MutableComponentMetadata
{
 
-    void setId(String id);
-
     void setClassName(String className);
 
     void setInitMethodName(String initMethodName);
@@ -58,10 +56,6 @@
 
     void setScope(String scope);
 
-    void addExplicitDependency(String dependency);
-
-    void removeExplicitDependency(String dependency);
-
     void setRuntimeClass(Class runtimeClass);
 
     void setProcessor(boolean processor);

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableComponentMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableComponentMetadata.java?rev=781778&r1=781777&r2=781778&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableComponentMetadata.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableComponentMetadata.java
Thu Jun  4 15:35:21 2009
@@ -18,6 +18,8 @@
  */
 package org.apache.geronimo.blueprint.mutable;
 
+import java.util.List;
+
 import org.osgi.service.blueprint.reflect.ComponentMetadata;
 
 /**
@@ -32,4 +34,10 @@
 
     void setInitialization(int initialization);
 
+    void setDependsOn(List<String> dependsOn);
+
+    void addDependsOn(String dependency);
+
+    void removeDependsOn(String dependency);
+
 }
\ No newline at end of file

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableServiceMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableServiceMetadata.java?rev=781778&r1=781777&r2=781778&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableServiceMetadata.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableServiceMetadata.java
Thu Jun  4 15:35:21 2009
@@ -33,8 +33,6 @@
  */
 public interface MutableServiceMetadata extends ServiceMetadata, MutableComponentMetadata
{
 
-    void setId(String id);
-
     void setServiceComponent(Target serviceComponent);
 
     void addInterfaceName(String interfaceName);
@@ -59,8 +57,4 @@
 
     void removeRegistrationListener(RegistrationListener listener);
 
-    void addExplicitDependency(String dependency);
-
-    void removeExplicitDependency(String dependency);
-
 }
\ No newline at end of file

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=781778&r1=781777&r2=781778&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
Thu Jun  4 15:35:21 2009
@@ -47,7 +47,6 @@
     private Target factoryComponent;
     private String scope;
     private Class runtimeClass;
-    private List<String> explicitDependencies;
     private boolean processor;
 
     public BeanMetadataImpl() {
@@ -70,7 +69,7 @@
         this.factoryComponent = MetadataUtil.cloneTarget(source.getFactoryComponent());
         this.scope = source.getScope();
         this.runtimeClass = source.getRuntimeClass();
-        this.explicitDependencies = new ArrayList<String>(source.getExplicitDependencies());
+        this.dependsOn = new ArrayList<String>(source.getDependsOn());
     }
 
     public String getClassName() {
@@ -191,31 +190,6 @@
         this.runtimeClass = runtimeClass;
     }
 
-    public List<String> getExplicitDependencies() {
-        if (this.explicitDependencies == null) {
-            return Collections.emptyList();
-        } else {
-            return Collections.unmodifiableList(this.explicitDependencies);
-        }
-    }
-
-    public void setExplicitDependencies(List<String> explicitDependencies) {
-        this.explicitDependencies = explicitDependencies != null ? new ArrayList<String>(explicitDependencies)
: null;
-    }
-
-    public void addExplicitDependency(String explicitDependency) {
-        if (this.explicitDependencies == null) {
-            this.explicitDependencies = new ArrayList<String>();
-        }
-        this.explicitDependencies.add(explicitDependency);
-    }
-
-    public void removeExplicitDependency(String dependency) {
-        if (this.explicitDependencies != null) {
-            this.explicitDependencies.remove(dependency);
-        }
-    }
-
     public boolean isProcessor() {
         return processor;
     }
@@ -238,7 +212,7 @@
                 ", factoryComponent=" + factoryComponent +
                 ", scope='" + scope + '\'' +
                 ", runtimeClass=" + runtimeClass +
-                ", explicitDependencies=" + explicitDependencies +
+                ", explicitDependencies=" + dependsOn +
                 ']';
     }
 }

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=781778&r1=781777&r2=781778&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
Thu Jun  4 15:35:21 2009
@@ -18,6 +18,10 @@
  */
 package org.apache.geronimo.blueprint.reflect;
 
+import java.util.List;
+import java.util.Collections;
+import java.util.ArrayList;
+
 import org.apache.geronimo.blueprint.mutable.MutableComponentMetadata;
 import org.osgi.service.blueprint.reflect.ComponentMetadata;
 
@@ -31,6 +35,7 @@
 
     protected String id;
     protected int initialization = INITIALIZATION_EAGER;
+    protected List<String> dependsOn;
 
     protected ComponentMetadataImpl() {
     }
@@ -54,4 +59,29 @@
     public void setInitialization(int initialization) {
         this.initialization = initialization;
     }
+
+    public List<String> getDependsOn() {
+        if (this.dependsOn == null) {
+            return Collections.emptyList();
+        } else {
+            return Collections.unmodifiableList(this.dependsOn);
+        }
+    }
+
+    public void setDependsOn(List<String> dependsOn) {
+        this.dependsOn = dependsOn != null ? new ArrayList<String>(dependsOn) : null;
+    }
+
+    public void addDependsOn(String explicitDependency) {
+        if (this.dependsOn == null) {
+            this.dependsOn = new ArrayList<String>();
+        }
+        this.dependsOn.add(explicitDependency);
+    }
+
+    public void removeDependsOn(String dependency) {
+        if (this.dependsOn != null) {
+            this.dependsOn.remove(dependency);
+        }
+    }
 }

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ServiceMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ServiceMetadataImpl.java?rev=781778&r1=781777&r2=781778&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ServiceMetadataImpl.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ServiceMetadataImpl.java
Thu Jun  4 15:35:21 2009
@@ -188,14 +188,14 @@
         this.explicitDependencies = explicitDependencies;
     }
 
-    public void addExplicitDependency(String explicitDependency) {
+    public void addDependsOn(String explicitDependency) {
         if (this.explicitDependencies == null) {
             this.explicitDependencies = new ArrayList<String>();
         }
         this.explicitDependencies.add(explicitDependency);
     }
 
-    public void removeExplicitDependency(String dependency) {
+    public void removeDependsOn(String dependency) {
         if (this.explicitDependencies != null) {
             this.explicitDependencies.remove(dependency);
         }

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/resources/org/apache/geronimo/blueprint/blueprint.xsd
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/resources/org/apache/geronimo/blueprint/blueprint.xsd?rev=781778&r1=781777&r2=781778&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/resources/org/apache/geronimo/blueprint/blueprint.xsd
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/resources/org/apache/geronimo/blueprint/blueprint.xsd
Thu Jun  4 15:35:21 2009
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <!--
     /*
-    * $Revision: 7065 $
+    * $Revision: 7250 $
     *
     * Copyright (c) OSGi Alliance (2008, 2009). All Rights Reserved.
     *
@@ -71,6 +71,22 @@
                 </xsd:documentation>
             </xsd:annotation>
         </xsd:attribute>
+
+        <xsd:attribute name="depends-on" type="TdependsOn" use="optional">
+            <xsd:annotation>
+                <xsd:documentation>
+                  <![CDATA[
+                  depends-on identifies (by name) other components that this component
+                  depends on.  The component only be activated after the
+                  depends-on components are successfully activated.  Also, if there
+                  are <reference>, <ref-list>, <ref-set> elements with
unstatisfied
+                  manadatory references, then the depends-on relationship will also
+                  be used to determine whether this service is registered or
+                  unregistered.
+                  ]]>
+                </xsd:documentation>
+            </xsd:annotation>
+        </xsd:attribute>
     </xsd:complexType>
 
     <xsd:element name="blueprint" type="Tblueprint">
@@ -150,6 +166,17 @@
                 </xsd:documentation>
             </xsd:annotation>
         </xsd:attribute>
+        <xsd:attribute name="compliance" type="Tcompliance" default="strict">
+            <xsd:annotation>
+                <xsd:documentation>
+                  <![CDATA[
+                  Specifies the whether the blueprint definition must be interpreted
+                  using strict specification compliance, or whether additional extensions
+                  can be enabled.
+                  ]]>
+                </xsd:documentation>
+            </xsd:annotation>
+        </xsd:attribute>
         <xsd:anyAttribute namespace="##other" processContents="lax" />
     </xsd:complexType>
 
@@ -252,9 +279,8 @@
             <xsd:extension base="Tcomponent">
                 <xsd:group ref="beanElements" />
                 <xsd:attribute name="class" type="Tclass" />
-                <xsd:attribute name="depends-on" type="TdependsOn" />
-                <xsd:attribute name="init-method" type="TnullableMethod" />
-                <xsd:attribute name="destroy-method" type="TnullableMethod" />
+                <xsd:attribute name="init-method" type="Tmethod" />
+                <xsd:attribute name="destroy-method" type="Tmethod" />
                 <xsd:attribute name="factory-method" type="Tmethod" />
                 <xsd:attribute name="factory-ref" type="Tidref" />
                 <xsd:attribute name="scope" type="Tscope" />
@@ -278,8 +304,7 @@
                 <xsd:group ref="beanElements" />
                 <xsd:attribute name="id" use="prohibited"/>
                 <xsd:attribute name="class" type="Tclass" />
-                <xsd:attribute name="depends-on" type="TdependsOn" />
-                <xsd:attribute name="init-method" type="TnullableMethod" />
+                <xsd:attribute name="init-method" type="Tmethod" />
                 <xsd:attribute name="destroy-method" use="prohibited"/>
                 <xsd:attribute name="factory-method" type="Tmethod" />
                 <xsd:attribute name="factory-ref" type="Tidref" />
@@ -402,6 +427,7 @@
                 <xsd:attribute name="component-name" type="Tidref" use="optional"/>
                 <xsd:attribute name="availability" type="Tavailability" use="optional"/>
                 <xsd:attribute name="timeout" type="Ttimeout" use="optional"/>
+                <xsd:attribute name="depends-on" type="TdependsOn" use="optional"/>
                 <xsd:anyAttribute namespace="##other" processContents="lax" />
             </xsd:restriction>
         </xsd:complexContent>
@@ -504,6 +530,7 @@
                 <xsd:attribute name="comparator-ref" type="Tidref" use="optional"/>
                 <xsd:attribute name="member-type" use="optional" type="Tservice-use"/>
                 <xsd:attribute name="ordering-basis" use="optional" type="Tservice-use"/>
+                <xsd:attribute name="depends-on" type="TdependsOn" use="optional"/>
                 <xsd:anyAttribute namespace="##other" processContents="lax" />
             </xsd:restriction>
         </xsd:complexContent>
@@ -614,8 +641,8 @@
         </xsd:annotation>
         <xsd:group ref="targetComponent" />
         <xsd:attribute name="ref" type="xsd:NMTOKEN" use="optional" />
-        <xsd:attribute name="bind-method" type="Tmethod" use="required" />
-        <xsd:attribute name="unbind-method" type="Tmethod" use="required" />
+        <xsd:attribute name="bind-method" type="Tmethod" use="optional" />
+        <xsd:attribute name="unbind-method" type="Tmethod" use="optional" />
     </xsd:complexType>
 
     <xsd:simpleType name="Tinitialization">
@@ -638,7 +665,7 @@
         <xsd:annotation>
             <xsd:documentation>
               <![CDATA[
-              Tlazy-init defines an availability attribute type.  This is used in this
+              Tavailability defines an availability attribute type.  This is used in this
               schema by the <blueprint> default-availability attribute and the
               <reference>, <ref-set>, and <ref-list> availability attribute.
               ]]>
@@ -650,6 +677,21 @@
         </xsd:restriction>
     </xsd:simpleType>
 
+    <xsd:simpleType name="Tcompliance">
+        <xsd:annotation>
+            <xsd:documentation>
+              <![CDATA[
+              Tcompliance defines a compliance attribute type.  This is used in this
+              schema by the <blueprint> compliance atribute.
+              ]]>
+            </xsd:documentation>
+        </xsd:annotation>
+        <xsd:restriction base="xsd:NMTOKEN">
+            <xsd:enumeration value="strict"/>
+            <xsd:enumeration value="loose" />
+        </xsd:restriction>
+    </xsd:simpleType>
+
     <xsd:complexType name="Tcomparator">
         <xsd:group ref="targetComponent" />
         <xsd:attribute name="ref" type="Tidref" />
@@ -676,21 +718,6 @@
                 </xsd:sequence>
                 <xsd:attribute name="interface" type="Tclass" use="optional" />
                 <xsd:attribute name="ref" type="Tidref" use="optional" />
-                <xsd:attribute name="depends-on" type="TdependsOn" use="optional">
-                    <xsd:annotation>
-                        <xsd:documentation>
-                          <![CDATA[
-                          depends-on identifies (by name) other components that this service
-                          depends on.  The service will only be registered after the
-                          depends-on services are successfully completed.  Also, if there
-                          are <reference>, <ref-list>, <ref-set> elements
with unstatisfied
-                          manadatory references, then the depends-on relationship will also
-                          be used to determine whether this service is registered or
-                          unregistered.
-                          ]]>
-                        </xsd:documentation>
-                    </xsd:annotation>
-                </xsd:attribute>
                 <xsd:attribute name="auto-export" type="TautoExportModes" default="disabled"
/>
                 <xsd:attribute name="ranking" type="xsd:int" default="0">
                     <xsd:annotation>
@@ -817,8 +844,8 @@
         <xsd:group ref="targetComponent" />
         <xsd:attribute name="ref" type="Tidref" use="optional" />
         <!--  ### why are there both required? -->
-        <xsd:attribute name="registration-method" type="Tmethod" use="required" />
-        <xsd:attribute name="unregistration-method" type="Tmethod" use="required" />
+        <xsd:attribute name="registration-method" type="Tmethod" use="optional" />
+        <xsd:attribute name="unregistration-method" type="Tmethod" use="optional" />
     </xsd:complexType>
 
     <!--
@@ -1118,22 +1145,6 @@
         <xsd:restriction base="xsd:NCName" />
     </xsd:simpleType>
 
-    <xsd:simpleType name="TnullableMethod">
-        <xsd:annotation>
-            <xsd:documentation>
-              <![CDATA[
-              Tmethod is a base type that should be used for all attributes that
-              refer to java method names.  This version also allows "" to be
-              specified to specify that no name should be used.
-              ]]>
-            </xsd:documentation>
-        </xsd:annotation>
-        <xsd:restriction base="xsd:NMTOKEN">
-            <xsd:pattern value="[\i-[:]][\c-[:]]*" />
-            <xsd:pattern value="" />
-        </xsd:restriction>
-    </xsd:simpleType>
-
     <!-- Should be used for all attributes and elements that refer to method names -->
     <xsd:simpleType name="Tidref">
         <xsd:annotation>

Modified: geronimo/sandbox/blueprint/blueprint-core/src/test/java/org/apache/geronimo/blueprint/ParserTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/test/java/org/apache/geronimo/blueprint/ParserTest.java?rev=781778&r1=781777&r2=781778&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/test/java/org/apache/geronimo/blueprint/ParserTest.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/test/java/org/apache/geronimo/blueprint/ParserTest.java
Thu Jun  4 15:35:21 2009
@@ -55,7 +55,7 @@
         assertEquals("pojoA", component.getId());
         assertTrue(component instanceof BeanMetadata);
         BeanMetadata local = (BeanMetadata) component;
-        List<String> deps = local.getExplicitDependencies();
+        List<String> deps = local.getDependsOn();
         assertNotNull(deps);
         assertEquals(2, deps.size());
         assertTrue(deps.contains("pojoB"));



Mime
View raw message