[jboss-cvs] JBossAS SVN: r90359 - in projects/jboss-osgi/trunk/blueprint: impl/src/main/resources/schema and 2 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Jun 17 17:13:29 EDT 2009


Author: thomas.diesler at jboss.com
Date: 2009-06-17 17:13:29 -0400 (Wed, 17 Jun 2009)
New Revision: 90359

Modified:
   projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ServiceMetadataImpl.java
   projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ServiceReferenceMetadataImpl.java
   projects/jboss-osgi/trunk/blueprint/impl/src/main/resources/schema/blueprint-jbxb.xsd
   projects/jboss-osgi/trunk/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/BasicServiceParserTestCase.java
   projects/jboss-osgi/trunk/blueprint/testsuite/src/test/resources/parser/blueprint-all-elements.xml
Log:
Use interfaceNames

Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ServiceMetadataImpl.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ServiceMetadataImpl.java	2009-06-17 20:49:25 UTC (rev 90358)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ServiceMetadataImpl.java	2009-06-17 21:13:29 UTC (rev 90359)
@@ -40,7 +40,7 @@
 public class ServiceMetadataImpl extends ComponentMetadataImpl
 {
    protected String description;
-   protected List<String> interfaces;
+   protected List<String> interfaceNames;
    protected List<ServicePropertyEntry> serviceProperties;
    protected Collection<RegistrationListenerImpl> registrationListener;
    protected BeanMetadataImpl bean;
@@ -75,17 +75,17 @@
    /**
     * Gets the value of the interfaces property.
     */
-   public List<String> getInterfaces()
+   public List<String> getInterfaceNames()
    {
-      if (interfaces == null)
-         interfaces = new ArrayList<String>();
+      if (interfaceNames == null)
+         interfaceNames = new ArrayList<String>();
       
-      return interfaces;
+      return interfaceNames;
    }
 
-   public void setInterfaces(List<String> interfaces)
+   public void setInterfaceNames(List<String> interfaces)
    {
-      this.interfaces = interfaces;
+      this.interfaceNames = interfaces;
    }
 
    /**

Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ServiceReferenceMetadataImpl.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ServiceReferenceMetadataImpl.java	2009-06-17 20:49:25 UTC (rev 90358)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ServiceReferenceMetadataImpl.java	2009-06-17 21:13:29 UTC (rev 90359)
@@ -65,7 +65,7 @@
 public class ServiceReferenceMetadataImpl extends ComponentMetadataImpl
 {
    protected String description;
-   protected List<String> interfaces;
+   protected List<String> interfaceNames;
    protected List<ReferenceListenerImpl> listener;
    protected List<Object> any;
    protected String filter;
@@ -99,22 +99,22 @@
     * Gets the value of the interfaces property.
     * 
     */
-   public List<String> getInterfaces()
+   public List<String> getInterfaceNames()
    {
-      if (interfaces == null)
-         interfaces = new ArrayList<String>();
+      if (interfaceNames == null)
+         interfaceNames = new ArrayList<String>();
       
-      return interfaces;
+      return interfaceNames;
    }
 
-   public void setInterfaces(List<String> interfaces)
+   public void setInterfaceNames(List<String> interfaces)
    {
-      this.interfaces = interfaces;
+      this.interfaceNames = interfaces;
    }
 
    public String getInterface()
    {
-      List<String> interfaces = getInterfaces();
+      List<String> interfaces = getInterfaceNames();
       if (interfaces.size() == 0)
          throw new IllegalStateException("Empty list of interfaces");
 

Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/resources/schema/blueprint-jbxb.xsd
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/resources/schema/blueprint-jbxb.xsd	2009-06-17 20:49:25 UTC (rev 90358)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/resources/schema/blueprint-jbxb.xsd	2009-06-17 21:13:29 UTC (rev 90359)
@@ -579,7 +579,7 @@
                 <xsd:attribute name="interface" use="optional" type="Tclass" >
                     <xsd:annotation>
                         <xsd:appinfo>
-                            <jbxb:property name="interfaces"/>
+                            <jbxb:property name="interfaceNames"/>
                         </xsd:appinfo>
                     </xsd:annotation>
                 </xsd:attribute>
@@ -712,7 +712,7 @@
                 <xsd:attribute name="interface" type="Tclass" use="optional" >
                     <xsd:annotation>
                         <xsd:appinfo>
-                            <jbxb:property name="interfaces"/>
+                            <jbxb:property name="interfaceNames"/>
                         </xsd:appinfo>
                     </xsd:annotation>
                 </xsd:attribute>
@@ -1113,7 +1113,7 @@
             <xsd:element name="value" type="TinterfaceValue" >
                 <xsd:annotation>
                     <xsd:appinfo>
-                        <jbxb:property name="interfaces"/>
+                        <jbxb:property name="interfaceNames"/>
                     </xsd:appinfo>
                 </xsd:annotation>
             </xsd:element>

Modified: projects/jboss-osgi/trunk/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/BasicServiceParserTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/BasicServiceParserTestCase.java	2009-06-17 20:49:25 UTC (rev 90358)
+++ projects/jboss-osgi/trunk/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/BasicServiceParserTestCase.java	2009-06-17 21:13:29 UTC (rev 90359)
@@ -64,14 +64,14 @@
       ServiceMetadataImpl serviceA = (ServiceMetadataImpl)compList.get(1);
       assertEquals("serviceA", serviceA.getId());
       
-      List<String> intfsA = serviceA.getInterfaces();
+      List<String> intfsA = serviceA.getInterfaceNames();
       assertTrue(intfsA.size() > 0);
       assertEquals(ServiceA.class.getName(), intfsA.get(0));
       
       ServiceMetadataImpl serviceB = (ServiceMetadataImpl)compList.get(2);
       assertEquals("serviceB", serviceB.getId());
       
-      List<String> intfsB = serviceB.getInterfaces();
+      List<String> intfsB = serviceB.getInterfaceNames();
       assertTrue(intfsB.size() > 0);
       assertEquals(ServiceB.class.getName(), intfsB.get(0));
    }

Modified: projects/jboss-osgi/trunk/blueprint/testsuite/src/test/resources/parser/blueprint-all-elements.xml
===================================================================
--- projects/jboss-osgi/trunk/blueprint/testsuite/src/test/resources/parser/blueprint-all-elements.xml	2009-06-17 20:49:25 UTC (rev 90358)
+++ projects/jboss-osgi/trunk/blueprint/testsuite/src/test/resources/parser/blueprint-all-elements.xml	2009-06-17 21:13:29 UTC (rev 90359)
@@ -18,12 +18,10 @@
 
   <service id="idServiceA" auto-export="disabled" depends-on="someServiceDependency" interface="foo.ServiceInterface" ranking="0">
     <description>service description</description>
-    <!-- 
     <interfaces>
       <value>foo.ServiceInterfA</value>
       <value>foo.ServiceInterfB</value>
     </interfaces>
-    -->
     <service-properties>
       <entry key="keyA" value="valueA" />
       <entry key="keyB" value="valueB" />
@@ -51,12 +49,10 @@
 
   <reference component-name="referenceCompName" interface="foo.referenceInterf" filter="referenceFilter" availablitity="optional">
     <description>reference description</description>
-    <!-- 
     <interfaces>
       <value>foo.ReferenceInterfA</value>
       <value>foo.ReferenceInterfB</value>
     </interfaces>
-    -->
     <listener ref="referenceListenerA" bind-method="bindMethod" unbind-method="unbindMethod" />
     <listener ref="referenceListenerB" />
   </reference>




More information about the jboss-cvs-commits mailing list