geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r780029 - in /geronimo/sandbox/blueprint: blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/ blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutab...
Date Fri, 29 May 2009 16:43:14 GMT
Author: gnodet
Date: Fri May 29 16:43:13 2009
New Revision: 780029

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

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/RefCollectionMetadata.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/RefCollectionRecipe.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/reflect/BeanMetadataImpl.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/resources/org/apache/geronimo/blueprint/blueprint.xsd

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=780029&r1=780028&r2=780029&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
Fri May 29 16:43:13 2009
@@ -26,6 +26,10 @@
 
     static final String SCOPE_BUNDLE = "bundle";
 
+    static final int INITIALIZATION_EAGER = 1;
+
+    static final int INITIALIZATION_LAZY = 2;
+
     String getClassName();
 
     String getInitMethodName();
@@ -36,7 +40,7 @@
 
     List<BeanProperty> getProperties();
 
-    boolean isLazyInit();
+    int getInitialization();
 
     String getFactoryMethodName();
     

Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/RefCollectionMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/RefCollectionMetadata.java?rev=780029&r1=780028&r2=780029&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/RefCollectionMetadata.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/RefCollectionMetadata.java
Fri May 29 16:43:13 2009
@@ -18,13 +18,9 @@
 
 public interface RefCollectionMetadata extends ServiceReferenceMetadata {
 
-    static final int ORDERING_BASIS_SERVICE = 1;
+    static final int USE_SERVICE_OBJECT = 1;
 
-    static final int ORDERING_BASIS_SERVICE_REFERENCE = 2;
-
-    static final int MEMBER_TYPE_SERVICE_INSTANCE = 1;
-
-    static final int MEMBER_TYPE_SERVICE_REFERENCE = 2;
+    static final int USE_SERVICE_REFERENCE = 1;
 
     Class getCollectionType();
 

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=780029&r1=780028&r2=780029&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
Fri May 29 16:43:13 2009
@@ -468,7 +468,7 @@
             if (component instanceof BeanMetadata) {
                 BeanMetadata local = (BeanMetadata) component;
                 String scope = local.getScope();
-                if (!local.isLazyInit() && BeanMetadata.SCOPE_SINGLETON.equals(scope))
{
+                if (local.getInitialization() == BeanMetadata.INITIALIZATION_EAGER &&
BeanMetadata.SCOPE_SINGLETON.equals(scope)) {
                     components.add(name);
                 }
             } else {

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=780029&r1=780028&r2=780029&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
Fri May 29 16:43:13 2009
@@ -131,7 +131,7 @@
     public static final String ENTRY_ELEMENT = "entry";
     public static final String KEY_ELEMENT = "key";
     public static final String COMPARATOR_ELEMENT = "comparator";
-    public static final String DEFAULT_LAZY_INIT_ATTRIBUTE = "default-lazy-init";
+    public static final String DEFAULT_INITIALIZATION_ATTRIBUTE = "initialization";
     public static final String DEFAULT_TIMEOUT_ATTRIBUTE = "default-timeout";
     public static final String DEFAULT_AVAILABILITY_ATTRIBUTE = "default-availability";
     public static final String NAME_ATTRIBUTE = "name";
@@ -166,7 +166,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 LAZY_INIT_ATTRIBUTE = "lazy-init";
+    public static final String INITIALIZATION_ATTRIBUTE = "initialization";
     public static final String FACTORY_COMPONENT_ATTRIBUTE = "factory-component";
     public static final String FACTORY_METHOD_ATTRIBUTE = "factory-method";
 
@@ -188,7 +188,9 @@
     public static final String MEMBER_TYPE_SERVICE_REFERENCE = "service-reference";
     public static final String ORDERING_BASIS_SERVICES = "service";
     public static final String ORDERING_BASIS_SERVICE_REFERENCES = "service-reference";
-    public static final String LAZY_INIT_DEFAULT = BOOLEAN_FALSE;
+    public static final String INITIALIZATION_EAGER = "eager";
+    public static final String INITIALIZATION_LAZY = "lazy";
+    public static final String INITIALIZATION_DEFAULT = INITIALIZATION_EAGER;
 
     private static final Logger LOGGER = LoggerFactory.getLogger(Parser.class);
 
@@ -203,7 +205,7 @@
     private int idCounter;
     private String defaultTimeout;
     private String defaultAvailability;
-    private String defaultLazyInit;
+    private String defaultInitialization;
     private Set<URI> namespaces;
     private boolean validation;
     private boolean validated;
@@ -319,15 +321,15 @@
     private void loadComponents(Document doc) {
         defaultTimeout = TIMEOUT_DEFAULT;
         defaultAvailability = AVAILABILITY_DEFAULT;
-        defaultLazyInit = LAZY_INIT_DEFAULT;
+        defaultInitialization = INITIALIZATION_DEFAULT;
         Element root = doc.getDocumentElement();
         if (!isBlueprintNamespace(root.getNamespaceURI()) ||
                 !nodeNameEquals(root, BLUEPRINT_ELEMENT)) {
             throw new ComponentDefinitionException("Root element must be {" + BLUEPRINT_NAMESPACE
+ "}" + BLUEPRINT_ELEMENT + " element");
         }
         // Parse global attributes
-        if (root.hasAttribute(DEFAULT_LAZY_INIT_ATTRIBUTE)) {
-            defaultLazyInit = root.getAttribute(DEFAULT_LAZY_INIT_ATTRIBUTE);
+        if (root.hasAttribute(DEFAULT_INITIALIZATION_ATTRIBUTE)) {
+            defaultInitialization = root.getAttribute(DEFAULT_INITIALIZATION_ATTRIBUTE);
         }
         if (root.hasAttribute(DEFAULT_TIMEOUT_ATTRIBUTE)) {
             defaultTimeout = root.getAttribute(DEFAULT_TIMEOUT_ATTRIBUTE);
@@ -477,18 +479,13 @@
         } else {
             metadata.setScope(BeanMetadata.SCOPE_PROTOTYPE);
         }
-        String lazy = element.hasAttribute(LAZY_INIT_ATTRIBUTE) ? element.getAttribute(LAZY_INIT_ATTRIBUTE)
: defaultLazyInit;
-        if (BOOLEAN_DEFAULT.equals(lazy)) {
-            if (BOOLEAN_DEFAULT.equals(defaultLazyInit)) {
-                lazy = BOOLEAN_FALSE;
-            }
-        }
-        if (BOOLEAN_TRUE.equals(lazy)) {
-            metadata.setLazyInit(true);
-        } else if (BOOLEAN_FALSE.equals(lazy)) {
-            metadata.setLazyInit(false);
+        String initialization = element.hasAttribute(INITIALIZATION_ATTRIBUTE) ? element.getAttribute(INITIALIZATION_ATTRIBUTE)
: defaultInitialization;
+        if (INITIALIZATION_EAGER.equals(initialization)) {
+            metadata.setInitialization(BeanMetadata.INITIALIZATION_EAGER);
+        } else if (INITIALIZATION_LAZY.equals(initialization)) {
+            metadata.setInitialization(BeanMetadata.INITIALIZATION_LAZY);
         } else {
-            throw new ComponentDefinitionException("Attribute " + LAZY_INIT_ATTRIBUTE + "
must be equals to " + BOOLEAN_DEFAULT + ", " + BOOLEAN_TRUE + " or " + BOOLEAN_FALSE);
+            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)));
@@ -888,9 +885,9 @@
         if (element.hasAttribute(MEMBER_TYPE_ATTRIBUTE)) {
             String memberType = element.getAttribute(MEMBER_TYPE_ATTRIBUTE);
             if (MEMBER_TYPE_SERVICES.equals(memberType)) {
-                references.setMemberType(RefCollectionMetadata.MEMBER_TYPE_SERVICE_INSTANCE);
+                references.setMemberType(RefCollectionMetadata.USE_SERVICE_OBJECT);
             } else if (MEMBER_TYPE_SERVICE_REFERENCE.equals(memberType)) {
-                references.setMemberType(RefCollectionMetadata.MEMBER_TYPE_SERVICE_REFERENCE);
+                references.setMemberType(RefCollectionMetadata.USE_SERVICE_REFERENCE);
             }
 //        } else {
 //            references.setMemberType(RefCollectionMetadata.MEMBER_TYPE_SERVICE_INSTANCE);
@@ -898,9 +895,9 @@
         if (element.hasAttribute(ORDERING_BASIS_ATTRIBUTE)) {
             String ordering = element.getAttribute(ORDERING_BASIS_ATTRIBUTE);
             if (ORDERING_BASIS_SERVICES.equals(ordering)) {
-                references.setOrderingBasis(RefCollectionMetadata.ORDERING_BASIS_SERVICE);
+                references.setOrderingBasis(RefCollectionMetadata.USE_SERVICE_OBJECT);
             } else if (ORDERING_BASIS_SERVICE_REFERENCES.equals(ordering)) {
-                references.setOrderingBasis(RefCollectionMetadata.ORDERING_BASIS_SERVICE_REFERENCE);
+                references.setOrderingBasis(RefCollectionMetadata.USE_SERVICE_REFERENCE);
             }
         }
         parseReference(element, references);
@@ -1250,7 +1247,7 @@
     }
 
     private static List<String> parseList(String list) {
-        String[] items = list.split(",");
+        String[] items = list.split(" ");
         List<String> set = new ArrayList<String>();
         for (String item : items) {
             item = item.trim();

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/RefCollectionRecipe.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/RefCollectionRecipe.java?rev=780029&r1=780028&r2=780029&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/RefCollectionRecipe.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/RefCollectionRecipe.java
Fri May 29 16:43:13 2009
@@ -81,11 +81,11 @@
             } else if (metadata.getOrderingBasis() != 0) {
                 comparator = new NaturalOrderComparator();
             }
-            boolean orderReferences = metadata.getOrderingBasis() == RefCollectionMetadata.ORDERING_BASIS_SERVICE_REFERENCE;
+            boolean orderReferences = metadata.getOrderingBasis() == RefCollectionMetadata.USE_SERVICE_REFERENCE;
             Boolean memberReferences;
-            if (metadata.getMemberType() == RefCollectionMetadata.MEMBER_TYPE_SERVICE_REFERENCE)
{
+            if (metadata.getMemberType() == RefCollectionMetadata.USE_SERVICE_REFERENCE)
{
                 memberReferences = true;
-            } else if (metadata.getMemberType() == RefCollectionMetadata.MEMBER_TYPE_SERVICE_INSTANCE)
{
+            } else if (metadata.getMemberType() == RefCollectionMetadata.USE_SERVICE_OBJECT)
{
                 memberReferences = false;
             } else {
                 memberReferences = null;

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=780029&r1=780028&r2=780029&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
Fri May 29 16:43:13 2009
@@ -52,7 +52,7 @@
 
     void removeProperty(BeanProperty property);
 
-    void setLazyInit(boolean lazyInit);
+    void setInitialization(int initialization);
 
     void setFactoryMethodName(String factoryMethodName);
 

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=780029&r1=780028&r2=780029&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
Fri May 29 16:43:13 2009
@@ -42,7 +42,7 @@
     private String destroyMethodName;
     private List<BeanArgument> arguments;
     private List<BeanProperty> properties;
-    private boolean lazyInit;
+    private int initialization;
     private String factoryMethodName;
     private Target factoryComponent;
     private String scope;
@@ -64,7 +64,7 @@
         for (BeanProperty property : source.getProperties()) {
             addProperty(new BeanPropertyImpl(property));
         }
-        this.lazyInit = source.isLazyInit();
+        this.initialization = source.getInitialization();
         this.factoryMethodName = source.getFactoryMethodName();
         this.factoryComponent = MetadataUtil.cloneTarget(source.getFactoryComponent());
         this.scope = source.getScope();
@@ -158,12 +158,12 @@
         }
     }
 
-    public boolean isLazyInit() {
-        return this.lazyInit;
+    public int getInitialization() {
+        return initialization;
     }
 
-    public void setLazyInit(boolean lazyInit) {
-        this.lazyInit = lazyInit;
+    public void setInitialization(int initialization) {
+        this.initialization = initialization;
     }
 
     public String getFactoryMethodName() {
@@ -240,7 +240,7 @@
                 ", destroyMethodName='" + destroyMethodName + '\'' +
                 ", arguments=" + arguments +
                 ", properties=" + properties +
-                ", lazyInit=" + lazyInit +
+                ", initialization=" + initialization +
                 ", factoryMethodName='" + factoryMethodName + '\'' +
                 ", factoryComponent=" + factoryComponent +
                 ", scope='" + scope + '\'' +

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=780029&r1=780028&r2=780029&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
Fri May 29 16:43:13 2009
@@ -52,7 +52,7 @@
           the Tcomponent type.  This type defines an id attributre
           that is used create references between different components.
           Component elements can also be inlined within other component
-          definitions.  The id attribute is not valid when inliine.
+          definitions.  The id attribute is not valid when inlined.
           ]]>
             </xsd:documentation>
         </xsd:annotation>
@@ -88,18 +88,23 @@
                 maxOccurs="1" />
             <!-- top-level components -->
             <xsd:choice minOccurs="0" maxOccurs="unbounded">
-                <xsd:group ref="allComponents" />
+                <xsd:element name="service" type="Tservice" />
+                <xsd:element name="ref-list" type="Tref-collection" />
+                <xsd:element name="ref-set" type="Tref-collection" />
+                <xsd:element name="bean" type="Tbean" />
+                <xsd:element name="reference" type="Treference" />
+                <xsd:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded"
/>
             </xsd:choice>
         </xsd:sequence>
 
         <!-- Defaults-->
-        <xsd:attribute name="default-lazy-init" default="false" type="Tlazy-init">
+        <xsd:attribute name="default-initialization" default="eager" type="Tinitialization">
             <xsd:annotation>
                 <xsd:documentation>
                   <![CDATA[
-                  Specifies the default lazy-init setting that will be defined
+                  Specifies the default initialization setting that will be defined
                   for <bean> components.  If not specified, the global
-                  default is "false".  Individual <bean> components may
+                  default is "eager".  Individual <bean> components may
                   override the default
                   ]]>
                 </xsd:documentation>
@@ -147,7 +152,10 @@
             </xsd:documentation>
         </xsd:annotation>
         <xsd:choice minOccurs="0" maxOccurs="unbounded">
-            <xsd:group ref="targetComponent" />
+            <xsd:element name="bean" type="Tbean" />
+            <xsd:element name="reference" type="Treference" />
+            <xsd:element name="ref" type="Tref" />
+            <xsd:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded"
/>
         </xsd:choice>
     </xsd:complexType>
 
@@ -168,8 +176,8 @@
             </xsd:documentation>
         </xsd:annotation>
         <xsd:choice>
-            <xsd:element name="bean" type="Tbean" />
-            <xsd:element name="reference" type="Treference" />
+            <xsd:element name="bean" type="Tinlined-bean" />
+            <xsd:element name="reference" type="Tinlined-reference" />
             <xsd:element name="ref" type="Tref" />
             <xsd:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded"
/>
         </xsd:choice>
@@ -186,9 +194,9 @@
             </xsd:documentation>
         </xsd:annotation>
         <xsd:choice>
-            <xsd:element name="service" type="Tservice" />
-            <xsd:element name="ref-list" type="Tref-collection" />
-            <xsd:element name="ref-set" type="Tref-collection" />
+            <xsd:element name="service" type="Tinlined-service" />
+            <xsd:element name="ref-list" type="Tinlined-ref-collection" />
+            <xsd:element name="ref-set" type="Tinlined-ref-collection" />
             <xsd:group ref="targetComponent" />
         </xsd:choice>
     </xsd:group>
@@ -218,7 +226,7 @@
         <xsd:annotation>
             <xsd:documentation>
               <![CDATA[
-              The type defintion for a <bean> component.
+              The type definition for a <bean> component.
               This definition is also used by the <bpcm:managed-component>
               element used in the blueprint-cm schema.  The <bean> attributes
               provide the characteristics for how to create a bean instance.
@@ -235,25 +243,17 @@
                 <xsd:attribute name="init-method" type="TnullableMethod" />
                 <xsd:attribute name="destroy-method" type="TnullableMethod" />
                 <xsd:attribute name="factory-method" type="Tmethod" />
-                <xsd:attribute name="factory-component" type="Tidref" />
+                <xsd:attribute name="factory-ref" type="Tidref" />
 
-                <xsd:attribute name="scope">
-                    <xsd:simpleType>
-                        <xsd:restriction base="xsd:NMTOKEN">
-                            <xsd:enumeration value="singleton" />
-                            <xsd:enumeration value="prototype" />
-                            <xsd:enumeration value="bundle" />
-                        </xsd:restriction>
-                    </xsd:simpleType>
-                </xsd:attribute>
+                <xsd:attribute name="scope" type="Tscope" />
 
-                <xsd:attribute name="lazy-init" type="Tlazy-init">
+                <xsd:attribute name="initialization" type="Tinitialization">
                     <xsd:annotation>
                         <xsd:documentation>
                           <![CDATA[
-                          The lazy-init attribute for this <bean>.  This can either
-                          be "eager" ("false") or "lazy" ("true").  If not specified, it
-                          defaults to default-lazy-init attribute of the enclosing
+                          The initialization attribute for this <bean>.  This can either
+                          be "eager" or "lazy".  If not specified, it
+                          defaults to default-initialization attribute of the enclosing
                           <blueprint> element.  The default, default is "eager"
                           ]]>
                         </xsd:documentation>
@@ -264,6 +264,33 @@
         </xsd:complexContent>
     </xsd:complexType>
 
+    <xsd:complexType name="Tinlined-bean">
+        <xsd:annotation>
+            <xsd:documentation>
+              <![CDATA[
+              The Tinlined-bean type is used for inlined (i.e. non top level)
+              <bean> elements.  Those elements have some restrictions on
+              the attributes that can be used to define them.
+              ]]>
+            </xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexContent>
+            <xsd:restriction base="Tbean">
+                <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="destroy-method" use="prohibited"/>
+                <xsd:attribute name="factory-method" type="Tmethod" />
+                <xsd:attribute name="factory-ref" type="Tidref" />
+                <xsd:attribute name="scope" fixed="prototype" type="Tscope"/>
+                <xsd:attribute name="lazy-init" use="prohibited"/>
+                <xsd:anyAttribute namespace="##other" processContents="lax" />
+            </xsd:restriction>
+        </xsd:complexContent>
+    </xsd:complexType>
+
     <xsd:complexType name="Targument">
         <xsd:annotation>
             <xsd:documentation>
@@ -347,11 +374,40 @@
         </xsd:annotation>
         <xsd:complexContent>
             <xsd:extension base="TserviceReference">
+                <xsd:sequence>
+                    <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="lax"
/>
+                </xsd:sequence>
                 <xsd:attribute name="timeout" use="optional" type="Ttimeout" />
             </xsd:extension>
         </xsd:complexContent>
     </xsd:complexType>
 
+    <xsd:complexType name="Tinlined-reference">
+        <xsd:annotation>
+            <xsd:documentation>
+              <![CDATA[
+              The Tinlined-reference type is used for inlined (i.e. non top level)
+              <reference> elements.
+              ]]>
+            </xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexContent>
+            <xsd:restriction base="Treference">
+                <xsd:sequence>
+                    <xsd:group ref="serviceReferenceElements"/>
+                    <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="lax"
/>
+                </xsd:sequence>
+                <xsd:attribute name="id" use="prohibited"/>
+                <xsd:attribute name="interface" type="Tclass" use="optional"/>
+                <xsd:attribute name="filter" type="xsd:normalizedString" use="optional"/>
+                <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:anyAttribute namespace="##other" processContents="lax" />
+            </xsd:restriction>
+        </xsd:complexContent>
+    </xsd:complexType>
+
     <!-- ref-set, ref-list -->
     <xsd:complexType name="Tref-collection">
         <xsd:annotation>
@@ -378,9 +434,11 @@
                             </xsd:documentation>
                         </xsd:annotation>
                     </xsd:element>
+                    <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"
+                        processContents="lax" />
                 </xsd:sequence>
 
-                <xsd:attribute name="comparator-ref" type="xsd:token" use="optional">
+                <xsd:attribute name="comparator-ref" type="Tidref" use="optional">
                     <xsd:annotation>
                         <xsd:documentation>
                           <![CDATA[
@@ -391,7 +449,7 @@
                     </xsd:annotation>
                 </xsd:attribute>
 
-                <xsd:attribute name="member-type" use="optional">
+                <xsd:attribute name="member-type" type="Tservice-use" use="optional">
                     <xsd:annotation>
                         <xsd:documentation>
                           <![CDATA[
@@ -403,15 +461,9 @@
                           ]]>
                         </xsd:documentation>
                     </xsd:annotation>
-                    <xsd:simpleType>
-                        <xsd:restriction base="xsd:NMTOKEN">
-                            <xsd:enumeration value="service-instance" />
-                            <xsd:enumeration value="service-reference" />
-                        </xsd:restriction>
-                    </xsd:simpleType>
                 </xsd:attribute>
 
-                <xsd:attribute name="ordering-basis" use="optional">
+                <xsd:attribute name="ordering-basis" type="Tservice-use" use="optional">
                     <xsd:annotation>
                         <xsd:documentation>
                           <![CDATA[
@@ -423,18 +475,41 @@
                           ]]>
                         </xsd:documentation>
                     </xsd:annotation>
-                    <xsd:simpleType>
-                        <xsd:restriction base="xsd:NMTOKEN">
-                            <xsd:enumeration value="service" />
-                            <xsd:enumeration value="service-reference" />
-                        </xsd:restriction>
-                    </xsd:simpleType>
                 </xsd:attribute>
 
             </xsd:extension>
         </xsd:complexContent>
     </xsd:complexType>
 
+    <xsd:complexType name="Tinlined-ref-collection">
+        <xsd:annotation>
+            <xsd:documentation>
+              <![CDATA[
+              The Tinlined-ref-collection type is used for inlined (i.e. non top level)
+              <ref-list> and <ref-set> elements.
+              ]]>
+            </xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexContent>
+            <xsd:restriction base="Tref-collection">
+                <xsd:sequence>
+                    <xsd:group ref="serviceReferenceElements"/>
+                    <xsd:element name="comparator" type="Tcomparator" minOccurs="0" maxOccurs="1"/>
+                    <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="lax"
/>
+                </xsd:sequence>
+                <xsd:attribute name="id" use="prohibited"/>
+                <xsd:attribute name="interface" type="Tclass" use="optional"/>
+                <xsd:attribute name="filter" type="xsd:normalizedString" use="optional"/>
+                <xsd:attribute name="component-name" type="Tidref" use="optional"/>
+                <xsd:attribute name="availability" type="Tavailability" use="optional"/>
+                <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:anyAttribute namespace="##other" processContents="lax" />
+            </xsd:restriction>
+        </xsd:complexContent>
+    </xsd:complexType>
+
     <!-- Reference base class -->
     <xsd:complexType name="TserviceReference">
         <xsd:annotation>
@@ -449,35 +524,7 @@
         <xsd:complexContent>
             <xsd:extension base="Tcomponent">
                 <xsd:sequence>
-                    <xsd:element name="description" type="Tdescription" minOccurs="0"
/>
-                    <xsd:element name="interfaces" minOccurs="0" maxOccurs="1" type="Tinterfaces">
-                        <xsd:annotation>
-                            <xsd:documentation>
-                          <![CDATA[
-                          The definition of the required interfaces that the obtained services
-                          must implement.   There is also a shortcut attribute defined for
-                          the typical case of just a single interface class.
-                          ]]>
-                            </xsd:documentation>
-                        </xsd:annotation>
-                    </xsd:element>
-
-                    <!-- listener -->
-                    <xsd:element name="listener" type="TReferenceListener" minOccurs="0"
-                        maxOccurs="unbounded">
-                        <xsd:annotation>
-                            <xsd:documentation>
-                              <![CDATA[
-                              A definition of a listener that will watch for bind/unbind
events
-                              associated with the service reference.  The targetted listener
can
-                              be a <ref> to a <bean> or <reference> element,
or an inline
-                              <bean> or <reference>.
-                              ]]>
-                            </xsd:documentation>
-                        </xsd:annotation>
-                    </xsd:element>
-                    <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"
-                        processContents="lax" />
+                    <xsd:group ref="serviceReferenceElements"/>
                 </xsd:sequence>
 
                 <xsd:attribute name="interface" use="optional" type="Tclass" />
@@ -522,7 +569,39 @@
         </xsd:complexContent>
     </xsd:complexType>
 
-    <xsd:complexType name="TReferenceListener">
+    <xsd:group name="serviceReferenceElements">
+        <xsd:sequence>
+            <xsd:element name="description" type="Tdescription" minOccurs="0" />
+            <xsd:element name="interfaces" minOccurs="0" maxOccurs="1" type="Tinterfaces">
+                <xsd:annotation>
+                    <xsd:documentation>
+                  <![CDATA[
+                  The definition of the required interfaces that the obtained services
+                  must implement.   There is also a shortcut attribute defined for
+                  the typical case of just a single interface class.
+                  ]]>
+                    </xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+
+            <!-- listener -->
+            <xsd:element name="listener" type="TreferenceListener" minOccurs="0"
+                maxOccurs="unbounded">
+                <xsd:annotation>
+                    <xsd:documentation>
+                      <![CDATA[
+                      A definition of a listener that will watch for bind/unbind events
+                      associated with the service reference.  The targetted listener can
+                      be a <ref> to a <bean> or <reference> element, or
an inline
+                      <bean> or <reference>.
+                      ]]>
+                    </xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+
+    <xsd:complexType name="TreferenceListener">
         <xsd:annotation>
             <xsd:documentation>
               <![CDATA[
@@ -535,22 +614,25 @@
             </xsd:documentation>
         </xsd:annotation>
         <xsd:group ref="targetComponent" />
-        <xsd:attribute name="ref" type="xsd:token" use="optional" />
+        <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:complexType>
 
-    <xsd:simpleType name="Tlazy-init">
+    <xsd:simpleType name="Tinitialization">
         <xsd:annotation>
             <xsd:documentation>
               <![CDATA[
-              Tlazy-init defines a lazy-init type.  This is used in this
-              schema by the <blueprint> default-lazy-init attribute and the
-              <bean> lazy-init attribute.
+              Tinitializationt defines the initialization type for beans.  This is used in
this
+              schema by the <blueprint> default-initialization attribute and the
+              <bean> initialization attribute.
               ]]>
             </xsd:documentation>
         </xsd:annotation>
-        <xsd:restriction base="xsd:boolean" />
+        <xsd:restriction base="xsd:NMTOKEN">
+            <xsd:enumeration value="eager"/>
+            <xsd:enumeration value="lazy"/>
+        </xsd:restriction>
     </xsd:simpleType>
 
     <xsd:simpleType name="Tavailability">
@@ -563,7 +645,7 @@
               ]]>
             </xsd:documentation>
         </xsd:annotation>
-        <xsd:restriction base="xsd:token">
+        <xsd:restriction base="xsd:NMTOKEN">
             <xsd:enumeration value="mandatory" />
             <xsd:enumeration value="optional" />
         </xsd:restriction>
@@ -571,6 +653,7 @@
 
     <xsd:complexType name="Tcomparator">
         <xsd:group ref="targetComponent" />
+        <xsd:attribute name="ref" type="Tidref" />
     </xsd:complexType>
 
     <!-- service -->
@@ -625,6 +708,32 @@
         </xsd:complexContent>
     </xsd:complexType>
 
+    <xsd:complexType name="Tinlined-service">
+        <xsd:annotation>
+            <xsd:documentation>
+              <![CDATA[
+              The Tinlined-service type is used for inlined (i.e. non top level)
+              <service> elements.
+              ]]>
+            </xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexContent>
+            <xsd:restriction base="Tservice">
+                <xsd:sequence>
+                    <xsd:group ref="serviceElements" />
+                    <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="lax"
/>
+                </xsd:sequence>
+                <xsd:attribute name="id" use="prohibited"/>
+                <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:attribute name="auto-export" type="TautoExportModes" default="disabled"
/>
+                <xsd:attribute name="ranking" type="xsd:int" default="0"/>
+                <xsd:anyAttribute namespace="##other" processContents="lax" />
+            </xsd:restriction>
+        </xsd:complexContent>
+    </xsd:complexType>
+
     <xsd:group name="serviceElements">
         <xsd:annotation>
             <xsd:documentation>
@@ -684,7 +793,7 @@
                       ]]>
                     </xsd:documentation>
                 </xsd:annotation>
-                <xsd:element name="bean" type="Tbean" />
+                <xsd:element name="bean" type="Tinlined-bean" />
                 <xsd:element name="ref" type="Tref" />
             </xsd:choice>
         </xsd:sequence>
@@ -784,7 +893,7 @@
               ]]>
             </xsd:documentation>
         </xsd:annotation>
-        <xsd:attribute name="component" type="Tidref" use="required" />
+        <xsd:attribute name="component-id" type="Tidref" use="required" />
     </xsd:complexType>
 
     <xsd:complexType name="Tvalue" mixed="true">
@@ -1020,7 +1129,7 @@
               ]]>
             </xsd:documentation>
         </xsd:annotation>
-        <xsd:restriction base="xsd:token">
+        <xsd:restriction base="xsd:NMTOKEN">
             <xsd:pattern value="[\i-[:]][\c-[:]]*" />
             <xsd:pattern value="" />
         </xsd:restriction>
@@ -1060,7 +1169,7 @@
               ]]>
             </xsd:documentation>
         </xsd:annotation>
-        <xsd:restriction base="xsd:token">
+        <xsd:restriction base="xsd:NMTOKEN">
             <xsd:enumeration value="disabled" />
             <xsd:enumeration value="interfaces" />
             <xsd:enumeration value="class-hierarchy" />
@@ -1089,7 +1198,27 @@
               ]]>
             </xsd:documentation>
         </xsd:annotation>
-        <xsd:restriction base="xsd:normalizedString" />
+        <xsd:restriction>
+            <xsd:simpleType>
+                <xsd:list itemType="Tidref"/>
+            </xsd:simpleType>
+            <xsd:minLength value="1"/>
+        </xsd:restriction>
+    </xsd:simpleType>
+
+    <xsd:simpleType name="Tscope">
+        <xsd:restriction base="xsd:NMTOKEN">
+            <xsd:enumeration value="singleton" />
+            <xsd:enumeration value="prototype" />
+            <xsd:enumeration value="bundle" />
+        </xsd:restriction>
+    </xsd:simpleType>
+
+    <xsd:simpleType name="Tservice-use">
+        <xsd:restriction base="xsd:NMTOKEN">
+            <xsd:enumeration value="service-object" />
+            <xsd:enumeration value="service-reference" />
+        </xsd:restriction>
     </xsd:simpleType>
 
 </xsd:schema>



Mime
View raw message