[jboss-osgi-commits] JBoss-OSGI SVN: r89610 - in projects/jboss-osgi/trunk: blueprint/impl/src/main/java/org/jboss/osgi/blueprint/context and 7 other directories.

jboss-osgi-commits at lists.jboss.org jboss-osgi-commits at lists.jboss.org
Mon Jun 1 12:36:25 EDT 2009


Author: thomas.diesler at jboss.com
Date: 2009-06-01 12:36:23 -0400 (Mon, 01 Jun 2009)
New Revision: 89610

Modified:
   projects/jboss-osgi/trunk/3rdparty/apache-xerces/src/main/java/org/jboss/osgi/apache/xerces/internal/XMLParserActivatorExt.java
   projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/context/BlueprintContextImpl.java
   projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/BeanMetadataImpl.java
   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/osgi/service/blueprint/context/BlueprintContext.java
   projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/context/ComponentDefinitionException.java
   projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/context/EventConstants.java
   projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/context/NoSuchComponentException.java
   projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/context/ServiceUnavailableException.java
   projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/convert/ConversionService.java
   projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/convert/Converter.java
   projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/namespace/ComponentDefinitionRegistry.java
   projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/namespace/ComponentNameAlreadyInUseException.java
   projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/reflect/BeanMetadata.java
   projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/reflect/CollectionMetadata.java
   projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/reflect/MapMetadata.java
   projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/reflect/PropsMetadata.java
   projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/reflect/RefCollectionMetadata.java
   projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/reflect/ServiceMetadata.java
   projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/reflect/ServiceReferenceMetadata.java
   projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/service/DeployerServiceDelegate.java
   projects/jboss-osgi/trunk/distribution/runtime/conf/jboss-osgi-knopflerfish.properties
Log:
Add blueprint generics

Modified: projects/jboss-osgi/trunk/3rdparty/apache-xerces/src/main/java/org/jboss/osgi/apache/xerces/internal/XMLParserActivatorExt.java
===================================================================
--- projects/jboss-osgi/trunk/3rdparty/apache-xerces/src/main/java/org/jboss/osgi/apache/xerces/internal/XMLParserActivatorExt.java	2009-06-01 16:12:34 UTC (rev 89609)
+++ projects/jboss-osgi/trunk/3rdparty/apache-xerces/src/main/java/org/jboss/osgi/apache/xerces/internal/XMLParserActivatorExt.java	2009-06-01 16:36:23 UTC (rev 89610)
@@ -40,62 +40,47 @@
 import org.osgi.framework.ServiceRegistration;
 
 /**
- * This is a copy of the {@link XMLParserActivatorExt} mentioned in the CVS 
- * Header above with added XInclude support. 
+ * This is a copy of the {@link XMLParserActivatorExt} mentioned in the CVS Header above with added XInclude support.
  * 
  * Using this copy is a workarround for issue
  * 
- *     https://jira.jboss.org/jira/browse/JBOSGI-92
+ * https://jira.jboss.org/jira/browse/JBOSGI-92
  * 
- * A BundleActivator class that allows any JAXP compliant XML Parser to register
- * itself as an OSGi parser service.
+ * A BundleActivator class that allows any JAXP compliant XML Parser to register itself as an OSGi parser service.
  * 
- * Multiple JAXP compliant parsers can concurrently register by using this
- * BundleActivator class. Bundles who wish to use an XML parser can then use the
- * framework's service registry to locate available XML Parsers with the desired
- * characteristics such as validating and namespace-aware.
+ * Multiple JAXP compliant parsers can concurrently register by using this BundleActivator class. Bundles who wish to use an XML parser can then use the framework's
+ * service registry to locate available XML Parsers with the desired characteristics such as validating and namespace-aware.
  * 
  * <p>
  * The services that this bundle activator enables a bundle to provide are:
  * <ul>
  * <li><code>javax.xml.parsers.SAXParserFactory</code>({@link #SAXFACTORYNAME})
- * <li><code>javax.xml.parsers.DocumentBuilderFactory</code>(
- * {@link #DOMFACTORYNAME})
+ * <li><code>javax.xml.parsers.DocumentBuilderFactory</code>( {@link #DOMFACTORYNAME})
  * </ul>
  * 
  * <p>
- * The algorithm to find the implementations of the abstract parsers is derived
- * from the JAR file specifications, specifically the Services API.
+ * The algorithm to find the implementations of the abstract parsers is derived from the JAR file specifications, specifically the Services API.
  * <p>
- * An XMLParserActivator assumes that it can find the class file names of the
- * factory classes in the following files:
+ * An XMLParserActivator assumes that it can find the class file names of the factory classes in the following files:
  * <ul>
- * <li><code>/META-INF/services/javax.xml.parsers.SAXParserFactory</code> is
- * a file contained in a jar available to the runtime which contains the
- * implementation class name(s) of the SAXParserFactory.
- * <li><code>/META-INF/services/javax.xml.parsers.DocumentBuilderFactory</code>
- * is a file contained in a jar available to the runtime which contains the
- * implementation class name(s) of the <code>DocumentBuilderFactory</code>
+ * <li><code>/META-INF/services/javax.xml.parsers.SAXParserFactory</code> is a file contained in a jar available to the runtime which contains the implementation class
+ * name(s) of the SAXParserFactory.
+ * <li><code>/META-INF/services/javax.xml.parsers.DocumentBuilderFactory</code> is a file contained in a jar available to the runtime which contains the implementation
+ * class name(s) of the <code>DocumentBuilderFactory</code>
  * </ul>
  * <p>
- * If either of the files does not exist, <code>XMLParserActivator</code>
- * assumes that the parser does not support that parser type.
+ * If either of the files does not exist, <code>XMLParserActivator</code> assumes that the parser does not support that parser type.
  * 
  * <p>
- * <code>XMLParserActivator</code> attempts to instantiate both the
- * <code>SAXParserFactory</code> and the <code>DocumentBuilderFactory</code>.
- * It registers each factory with the framework along with service properties:
+ * <code>XMLParserActivator</code> attempts to instantiate both the <code>SAXParserFactory</code> and the <code>DocumentBuilderFactory</code>. It registers each factory
+ * with the framework along with service properties:
  * <ul>
- * <li>{@link #PARSER_VALIDATING}- indicates if this factory supports
- * validating parsers. It's value is a <code>Boolean</code>.
- * <li>{@link #PARSER_NAMESPACEAWARE}- indicates if this factory supports
- * namespace aware parsers It's value is a <code>Boolean</code>.
+ * <li>{@link #PARSER_VALIDATING}- indicates if this factory supports validating parsers. It's value is a <code>Boolean</code>.
+ * <li>{@link #PARSER_NAMESPACEAWARE}- indicates if this factory supports namespace aware parsers It's value is a <code>Boolean</code>.
  * </ul>
  * <p>
- * Individual parser implementations may have additional features, properties,
- * or attributes which could be used to select a parser with a filter. These can
- * be added by extending this class and overriding the
- * <code>setSAXProperties</code> and <code>setDOMProperties</code> methods.
+ * Individual parser implementations may have additional features, properties, or attributes which could be used to select a parser with a filter. These can be added by
+ * extending this class and overriding the <code>setSAXProperties</code> and <code>setDOMProperties</code> methods.
  */
 public class XMLParserActivatorExt implements BundleActivator, ServiceFactory
 {
@@ -182,9 +167,9 @@
     * @return A vector of strings containing the parser class names or null if parserUrl is null
     * @throws IOException if there is a problem reading the URL input stream
     */
-   private Vector getParserFactoryClassNames(URL parserUrl) throws IOException
+   private Vector<String> getParserFactoryClassNames(URL parserUrl) throws IOException
    {
-      Vector v = new Vector(1);
+      Vector<String> v = new Vector<String>(1);
       if (parserUrl != null)
       {
          String parserFactoryClassName = null;
@@ -229,11 +214,11 @@
     * @param parserFactoryClassNames - a <code>Vector</code> of <code>String</code> objects containing the names of the parser Factory Classes
     * @throws FactoryConfigurationError if thrown from <code>getFactory</code>
     */
-   private void registerSAXParsers(Vector parserFactoryClassNames) throws FactoryConfigurationError
+   private void registerSAXParsers(Vector<String> parserFactoryClassNames) throws FactoryConfigurationError
    {
       if (parserFactoryClassNames != null)
       {
-         Enumeration e = parserFactoryClassNames.elements();
+         Enumeration<String> e = parserFactoryClassNames.elements();
          int index = 0;
          while (e.hasMoreElements())
          {
@@ -243,7 +228,7 @@
             // this class will operate as a service factory and give each
             // service requestor it's own SaxParserFactory
             SAXParserFactory factory = (SAXParserFactory)getFactory(parserFactoryClassName);
-            Hashtable properties = new Hashtable(7);
+            Hashtable<String, Object> properties = new Hashtable<String, Object>(7);
             // figure out the default properties of the parser
             setDefaultSAXProperties(factory, properties, index);
             // store the parser factory class name in the properties so that
@@ -266,7 +251,7 @@
     * @param factory The <code>SAXParserFactory</code> object
     * @param props <code>Hashtable</code> of service properties.
     */
-   private void setDefaultSAXProperties(SAXParserFactory factory, Hashtable props, int index)
+   private void setDefaultSAXProperties(SAXParserFactory factory, Hashtable<String, Object> props, int index)
    {
       props.put(Constants.SERVICE_DESCRIPTION, SAXFACTORYDESCRIPTION);
       props.put(Constants.SERVICE_PID, SAXFACTORYNAME + "." + context.getBundle().getBundleId() + "." + index);
@@ -281,7 +266,7 @@
     * @param factory - the SAXParserFactory object
     * @param properties - the properties object for the service
     */
-   public void setSAXProperties(SAXParserFactory factory, Hashtable props)
+   public void setSAXProperties(SAXParserFactory factory, Hashtable<String, Object> props)
    {
       // check if this parser can be configured to validate
       boolean validating = true;
@@ -295,7 +280,7 @@
       {
          validating = false;
       }
-      
+
       // check if this parser can be configured to be namespaceaware
       boolean namespaceaware = true;
       factory.setValidating(false);
@@ -308,7 +293,7 @@
       {
          namespaceaware = false;
       }
-      
+
       // check if this parser can be configured to be xinclude aware
       boolean xinclude = true;
       factory.setValidating(validating);
@@ -322,12 +307,12 @@
       {
          xinclude = false;
       }
-      
+
       // set the factory values
       factory.setValidating(validating);
       factory.setNamespaceAware(namespaceaware);
       factory.setXIncludeAware(xinclude);
-      
+
       // set the OSGi service properties
       props.put(PARSER_NAMESPACEAWARE, new Boolean(namespaceaware));
       props.put(PARSER_VALIDATING, new Boolean(validating));
@@ -339,11 +324,11 @@
     * @param parserFactoryClassNames - a <code>Vector</code> of <code>String</code> objects containing the names of the parser Factory Classes
     * @throws FactoryConfigurationError if thrown from <code>getFactory</code>
     */
-   private void registerDOMParsers(Vector parserFactoryClassNames) throws FactoryConfigurationError
+   private void registerDOMParsers(Vector<String> parserFactoryClassNames) throws FactoryConfigurationError
    {
       if (parserFactoryClassNames != null)
       {
-         Enumeration e = parserFactoryClassNames.elements();
+         Enumeration<String> e = parserFactoryClassNames.elements();
          int index = 0;
          while (e.hasMoreElements())
          {
@@ -353,7 +338,7 @@
             // this class will operate as a service factory and give each
             // service requestor it's own DocumentBuilderFactory
             DocumentBuilderFactory factory = (DocumentBuilderFactory)getFactory(parserFactoryClassName);
-            Hashtable properties = new Hashtable(7);
+            Hashtable<String, Object> properties = new Hashtable<String, Object>(7);
             // figure out the default properties of the parser
             setDefaultDOMProperties(factory, properties, index);
             // store the parser factory class name in the properties so that
@@ -375,7 +360,7 @@
     * @param factory The <code>DocumentBuilderFactory</code> object
     * @param props <code>Hashtable</code> of service properties.
     */
-   private void setDefaultDOMProperties(DocumentBuilderFactory factory, Hashtable props, int index)
+   private void setDefaultDOMProperties(DocumentBuilderFactory factory, Hashtable<String, Object> props, int index)
    {
       props.put(Constants.SERVICE_DESCRIPTION, DOMFACTORYDESCRIPTION);
       props.put(Constants.SERVICE_PID, DOMFACTORYNAME + "." + context.getBundle().getBundleId() + "." + index);
@@ -390,7 +375,7 @@
     * @param factory - the DocumentBuilderFactory object
     * @param props - Hashtable of service properties.
     */
-   public void setDOMProperties(DocumentBuilderFactory factory, Hashtable props)
+   public void setDOMProperties(DocumentBuilderFactory factory, Hashtable<String, Object> props)
    {
       // check if this parser can be configured to validate
       boolean validating = true;
@@ -404,7 +389,7 @@
       {
          validating = false;
       }
-      
+
       // check if this parser can be configured to be namespaceaware
       boolean namespaceaware = true;
       factory.setValidating(false);
@@ -417,7 +402,7 @@
       {
          namespaceaware = false;
       }
-      
+
       // check if this parser can be configured to be xinclude aware
       boolean xinclude = true;
       factory.setValidating(validating);
@@ -431,12 +416,12 @@
       {
          xinclude = false;
       }
-      
+
       // set the factory values
       factory.setValidating(validating);
       factory.setNamespaceAware(namespaceaware);
       factory.setXIncludeAware(xinclude);
-      
+
       // set the OSGi service properties
       props.put(PARSER_VALIDATING, new Boolean(validating));
       props.put(PARSER_NAMESPACEAWARE, new Boolean(namespaceaware));

Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/context/BlueprintContextImpl.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/context/BlueprintContextImpl.java	2009-06-01 16:12:34 UTC (rev 89609)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/context/BlueprintContextImpl.java	2009-06-01 16:36:23 UTC (rev 89610)
@@ -30,7 +30,10 @@
 import org.jboss.osgi.spi.NotImplementedException;
 import org.osgi.framework.BundleContext;
 import org.osgi.service.blueprint.context.BlueprintContext;
+import org.osgi.service.blueprint.reflect.BeanMetadata;
 import org.osgi.service.blueprint.reflect.ComponentMetadata;
+import org.osgi.service.blueprint.reflect.ServiceMetadata;
+import org.osgi.service.blueprint.reflect.ServiceReferenceMetadata;
 
 /**
  * BlueprintContext providing access to the components, service exports, and
@@ -43,14 +46,14 @@
  */
 public class BlueprintContextImpl implements BlueprintContext
 {
-   private Blueprint blueprintMetadata;
+   //private Blueprint blueprintMetadata;
    
    public BlueprintContextImpl(Blueprint blueprintMetadata)
    {
-      this.blueprintMetadata = blueprintMetadata;
+      //this.blueprintMetadata = blueprintMetadata;
    }
    
-   public Collection getBeanComponentsMetadata()
+   public Collection<BeanMetadata> getBeanComponentsMetadata()
    {
       throw new NotImplementedException();
    }
@@ -70,17 +73,17 @@
       throw new NotImplementedException();
    }
 
-   public Set getComponentNames()
+   public Set<String> getComponentNames()
    {
       throw new NotImplementedException();
    }
 
-   public Collection getExportedServicesMetadata()
+   public Collection<ServiceMetadata> getExportedServicesMetadata()
    {
       throw new NotImplementedException();
    }
 
-   public Collection getReferencedServicesMetadata()
+   public Collection<ServiceReferenceMetadata> getReferencedServicesMetadata()
    {
       throw new NotImplementedException();
    }

Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/BeanMetadataImpl.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/BeanMetadataImpl.java	2009-06-01 16:12:34 UTC (rev 89609)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/BeanMetadataImpl.java	2009-06-01 16:36:23 UTC (rev 89610)
@@ -32,7 +32,9 @@
 import javax.xml.namespace.QName;
 
 import org.jboss.osgi.spi.NotImplementedException;
+import org.osgi.service.blueprint.reflect.BeanArgument;
 import org.osgi.service.blueprint.reflect.BeanMetadata;
+import org.osgi.service.blueprint.reflect.BeanProperty;
 import org.osgi.service.blueprint.reflect.Target;
 
 /**
@@ -287,7 +289,7 @@
    // **********************************************************************
    
 
-   public List getArguments()
+   public List<BeanArgument> getArguments()
    {
       throw new NotImplementedException();
    }
@@ -297,7 +299,7 @@
       throw new NotImplementedException();
    }
 
-   public List getExplicitDependencies()
+   public List<String> getExplicitDependencies()
    {
       throw new NotImplementedException();
    }
@@ -312,12 +314,12 @@
       throw new NotImplementedException();
    }
 
-   public List getProperties()
+   public List<BeanProperty> getProperties()
    {
       throw new NotImplementedException();
    }
 
-   public Class getRuntimeClass()
+   public Class<?> getRuntimeClass()
    {
       throw new NotImplementedException();
    }

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-01 16:12:34 UTC (rev 89609)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/reflect/ServiceMetadataImpl.java	2009-06-01 16:36:23 UTC (rev 89610)
@@ -31,6 +31,7 @@
 import javax.xml.namespace.QName;
 
 import org.jboss.osgi.spi.NotImplementedException;
+import org.osgi.service.blueprint.reflect.RegistrationListener;
 import org.osgi.service.blueprint.reflect.ServiceMetadata;
 import org.osgi.service.blueprint.reflect.Target;
 import org.w3c.dom.Element;
@@ -337,12 +338,12 @@
       throw new NotImplementedException();
    }
 
-   public List getExplicitDependencies()
+   public List<String> getExplicitDependencies()
    {
       throw new NotImplementedException();
    }
 
-   public Collection getRegistrationListeners()
+   public Collection<RegistrationListener> getRegistrationListeners()
    {
       throw new NotImplementedException();
    }

Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/context/BlueprintContext.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/context/BlueprintContext.java	2009-06-01 16:12:34 UTC (rev 89609)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/context/BlueprintContext.java	2009-06-01 16:36:23 UTC (rev 89610)
@@ -19,7 +19,10 @@
 import java.util.Set;
 
 import org.osgi.framework.BundleContext;
+import org.osgi.service.blueprint.reflect.BeanMetadata;
 import org.osgi.service.blueprint.reflect.ComponentMetadata;
+import org.osgi.service.blueprint.reflect.ServiceMetadata;
+import org.osgi.service.blueprint.reflect.ServiceReferenceMetadata;
 
 /**
  * BlueprintContext providing access to the components, service exports, and
@@ -64,7 +67,7 @@
 	 * @return an immutable set (of Strings) containing the names of all of the components within the
 	 * context.
 	 */
-	Set getComponentNames();
+	Set<String> getComponentNames();
 
 	/**
 	 * Get the component instance for a given named component. If the component has
@@ -114,7 +117,7 @@
 	 *
 	 * @return an immutable collection of ServiceComponentMetadata, with one entry for each referenced service.
 	 */
-	Collection /*<ServiceReferenceMetadata>*/ getReferencedServicesMetadata();
+	Collection<ServiceReferenceMetadata> getReferencedServicesMetadata();
 
 	/**
 	 * Get the service export metadata for every service exported by this
@@ -122,14 +125,14 @@
 	 *
 	 * @return an immutable collection of ServiceMetadata, with one entry for each service export.
 	 */
-	Collection /*<ServiceMetadata>*/ getExportedServicesMetadata();
+	Collection<ServiceMetadata> getExportedServicesMetadata();
 
 	/**
 	 * Get the metadata for all components defined locally within this context.
 	 *
 	 * @return an immutable collection of BeanMetadata, with one entry for each component.
 	 */
-	Collection /*<BeanMetadata>*/ getBeanComponentsMetadata();
+	Collection<BeanMetadata> getBeanComponentsMetadata();
 
 	/**
 	 * Get the bundle context of the bundle this blueprint context is associated

Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/context/ComponentDefinitionException.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/context/ComponentDefinitionException.java	2009-06-01 16:12:34 UTC (rev 89609)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/context/ComponentDefinitionException.java	2009-06-01 16:36:23 UTC (rev 89610)
@@ -16,13 +16,15 @@
 package org.osgi.service.blueprint.context;
 
 /**
- * Exception thrown when a configuration-related error occurs during
- * creation of a module context. 
+ * Exception thrown when a configuration-related error occurs during creation of a module context.
  */
-public class ComponentDefinitionException extends RuntimeException {
+public class ComponentDefinitionException extends RuntimeException
+{
+   private static final long serialVersionUID = 1L;
 
-	public ComponentDefinitionException(String explanation) {
-		super(explanation);
-	}
-	
+   public ComponentDefinitionException(String explanation)
+   {
+      super(explanation);
+   }
+
 }

Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/context/EventConstants.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/context/EventConstants.java	2009-06-01 16:12:34 UTC (rev 89609)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/context/EventConstants.java	2009-06-01 16:36:23 UTC (rev 89610)
@@ -16,7 +16,6 @@
 package org.osgi.service.blueprint.context;
 
 import org.osgi.framework.Bundle;
-import org.osgi.framework.Version;
 
 /**
  * Event property names used in EventAdmin events published for a

Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/context/NoSuchComponentException.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/context/NoSuchComponentException.java	2009-06-01 16:12:34 UTC (rev 89609)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/context/NoSuchComponentException.java	2009-06-01 16:36:23 UTC (rev 89610)
@@ -16,24 +16,26 @@
 package org.osgi.service.blueprint.context;
 
 /**
- * Thrown when an attempt is made to lookup a component by name and no such named
- * component exists in the module context.
+ * Thrown when an attempt is made to lookup a component by name and no such named component exists in the module context.
  */
-public class NoSuchComponentException extends RuntimeException {
+public class NoSuchComponentException extends RuntimeException
+{
+   private static final long serialVersionUID = 8380280560429930729L;
+   
+   private final String componentName;
 
-	private final String componentName;
-	
-	public NoSuchComponentException(String componentName) {
-		this.componentName = componentName;
-	}
-	
-	public String getComponentName() {
-		return this.componentName;
-	}
+   public NoSuchComponentException(String componentName)
+   {
+      this.componentName = componentName;
+   }
 
-	public String getMessage() {
-		return "No component named '" + 
-		       (this.componentName == null ? "<null>" : this.componentName) + 
-		       "' could be found";
-	}
+   public String getComponentName()
+   {
+      return this.componentName;
+   }
+
+   public String getMessage()
+   {
+      return "No component named '" + (this.componentName == null ? "<null>" : this.componentName) + "' could be found";
+   }
 }

Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/context/ServiceUnavailableException.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/context/ServiceUnavailableException.java	2009-06-01 16:12:34 UTC (rev 89609)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/context/ServiceUnavailableException.java	2009-06-01 16:36:23 UTC (rev 89610)
@@ -16,37 +16,35 @@
 package org.osgi.service.blueprint.context;
 
 /**
- * Thrown when an invocation is made on an OSGi service reference component, and 
- * a backing service is not available.
+ * Thrown when an invocation is made on an OSGi service reference component, and a backing service is not available.
  */
-public class ServiceUnavailableException extends RuntimeException {
+public class ServiceUnavailableException extends RuntimeException
+{
+   private static final long serialVersionUID = -994241378447777904L;
+   
+   private final Class<?> serviceType;
+   private final String filter;
 
-	private final Class serviceType;
-	private final String filter;
-	
-	public ServiceUnavailableException(
-           String message,
-           Class serviceType,
-           String filterExpression) {
-		super(message);
-		this.serviceType = serviceType;
-		this.filter = filterExpression;
-	}
-  
-	/**
-	 * The type of the service that would have needed to be available in 
-	 * order for the invocation to proceed.
-	 */
-	public Class getServiceType() {
-		return this.serviceType;
-	}
- 
-	/**
-	 * The filter expression that a service would have needed to satisfy in order
-	 * for the invocation to proceed.
-	 */
-	public String getFilter() {
-		return this.filter;
-	}
-}
+   public ServiceUnavailableException(String message, Class<?> serviceType, String filterExpression)
+   {
+      super(message);
+      this.serviceType = serviceType;
+      this.filter = filterExpression;
+   }
 
+   /**
+    * The type of the service that would have needed to be available in order for the invocation to proceed.
+    */
+   public Class<?> getServiceType()
+   {
+      return this.serviceType;
+   }
+
+   /**
+    * The filter expression that a service would have needed to satisfy in order for the invocation to proceed.
+    */
+   public String getFilter()
+   {
+      return this.filter;
+   }
+}

Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/convert/ConversionService.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/convert/ConversionService.java	2009-06-01 16:12:34 UTC (rev 89609)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/convert/ConversionService.java	2009-06-01 16:36:23 UTC (rev 89610)
@@ -16,21 +16,20 @@
 package org.osgi.service.blueprint.convert;
 
 /**
- * Provides access to the type conversions (both predefined and user registered)
- * that are defined for the module context
+ * Provides access to the type conversions (both predefined and user registered) that are defined for the module context
  */
-public interface ConversionService {
-	
-	/**
-	 * Convert an object to an instance of the given class, using the built-in and 
-	 * user-registered type converters as necessary.
-	 * @param fromValue the object to be converted
-	 * @param toType the type that the instance is to be converted to
-	 * @return an instance of the class 'toType'
-	 * @throws Exception if the conversion cannot succeed. This exception is
-	 * checked because callers should expect that not all source objects
-	 * can be successfully converted.
-	 */
-	Object convert(Object fromValue, Class toType) throws Exception;
-	
+public interface ConversionService
+{
+
+   /**
+    * Convert an object to an instance of the given class, using the built-in and user-registered type converters as necessary.
+    * 
+    * @param fromValue the object to be converted
+    * @param toType the type that the instance is to be converted to
+    * @return an instance of the class 'toType'
+    * @throws Exception if the conversion cannot succeed. This exception is checked because callers should expect that not all 
+    *       source objects can be successfully converted.
+    */
+   Object convert(Object fromValue, Class<?> toType) throws Exception;
+
 }
\ No newline at end of file

Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/convert/Converter.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/convert/Converter.java	2009-06-01 16:12:34 UTC (rev 89609)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/convert/Converter.java	2009-06-01 16:36:23 UTC (rev 89610)
@@ -16,24 +16,25 @@
 package org.osgi.service.blueprint.convert;
 
 /**
- * Implemented by type converters that extend the type conversion
- * capabilties of a module context container.
+ * Implemented by type converters that extend the type conversion capabilties of a module context container.
  */
-public interface Converter {
-	
-	/**
-	 * The type that this converter converts String values into.
-	 * @return Class object for the class that this converter converts to
-	 */
-	Class getTargetClass();
+public interface Converter
+{
 
-	/**
-	 * Convert an object to an instance of the target class.
-	 * @param source the object to be converted
-	 * @return an instance of the class returned by getTargetClass
-	 * @throws Exception if the conversion cannot succeed. This exception is
-	 * checked because callers should expect that not all source objects
-	 * can be successfully converted.
-	 */
-	Object convert(Object source) throws Exception;
+   /**
+    * The type that this converter converts String values into.
+    * 
+    * @return Class object for the class that this converter converts to
+    */
+   Class<?> getTargetClass();
+
+   /**
+    * Convert an object to an instance of the target class.
+    * 
+    * @param source the object to be converted
+    * @return an instance of the class returned by getTargetClass
+    * @throws Exception if the conversion cannot succeed. This exception is checked because callers should expect that not all source objects can be successfully
+    *            converted.
+    */
+   Object convert(Object source) throws Exception;
 }

Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/namespace/ComponentDefinitionRegistry.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/namespace/ComponentDefinitionRegistry.java	2009-06-01 16:12:34 UTC (rev 89609)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/namespace/ComponentDefinitionRegistry.java	2009-06-01 16:36:23 UTC (rev 89610)
@@ -51,7 +51,7 @@
 	 * 
 	 * @return an immutable set (of Strings) containing the names of all registered components.
 	 */
-	Set getComponentDefinitionNames();
+	Set<String> getComponentDefinitionNames();
 	
 	/**
 	 * Register a new component definition.

Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/namespace/ComponentNameAlreadyInUseException.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/namespace/ComponentNameAlreadyInUseException.java	2009-06-01 16:12:34 UTC (rev 89609)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/namespace/ComponentNameAlreadyInUseException.java	2009-06-01 16:36:23 UTC (rev 89610)
@@ -16,22 +16,26 @@
 package org.osgi.service.blueprint.namespace;
 
 /**
- * Exception thrown when an attempt is made to register a component with a 
- * name that is already in use by an existing component.
+ * Exception thrown when an attempt is made to register a component with a name that is already in use by an existing component.
  */
-public class ComponentNameAlreadyInUseException extends RuntimeException {
+public class ComponentNameAlreadyInUseException extends RuntimeException
+{
+   private static final long serialVersionUID = 1L;
+   
+   private String duplicateName;
 
-	private String duplicateName;
-	
-	public ComponentNameAlreadyInUseException(String name) {
-		this.duplicateName = name;
-	}
-	
-	public String getMessage() {
-		return "Name '" + this.duplicateName + "' is already in use by a registered component";
-	}
-	
-	public String getConflictingName() {
-		return this.duplicateName;
-	}
+   public ComponentNameAlreadyInUseException(String name)
+   {
+      this.duplicateName = name;
+   }
+
+   public String getMessage()
+   {
+      return "Name '" + this.duplicateName + "' is already in use by a registered component";
+   }
+
+   public String getConflictingName()
+   {
+      return this.duplicateName;
+   }
 }

Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/reflect/BeanMetadata.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/reflect/BeanMetadata.java	2009-06-01 16:12:34 UTC (rev 89609)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/reflect/BeanMetadata.java	2009-06-01 16:36:23 UTC (rev 89610)
@@ -66,7 +66,7 @@
 	 *
 	 * @return The metadata for the factory method or constructor. Can be empty if no arguments are specified
 	 */
-	List/* <BeanArgument> */getArguments();
+	List<BeanArgument>getArguments();
 
 	/**
 	 * The property injection metadata for this component.
@@ -79,7 +79,7 @@
 	 *         returned.
 	 *
 	 */
-	List /* <BeanProperty> */getProperties();
+	List<BeanProperty>getProperties();
 
 	/**
 	 * Is this component to be lazily instantiated?
@@ -140,7 +140,7 @@
 	 * @return Return the class to use in runtime or <code>null</code>.
 	 */
 
-	Class /* <?> */getRuntimeClass();
+	Class<?> getRuntimeClass();
 
     /**
      * The names of any components listed in a "depends-on" attribute for this
@@ -149,5 +149,5 @@
      * @return an immutable List of component names for components that we have explicitly
      * declared a dependency on, or an empty set if none.
      */
-    List/*<String>*/ getExplicitDependencies();
+    List<String> getExplicitDependencies();
 }

Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/reflect/CollectionMetadata.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/reflect/CollectionMetadata.java	2009-06-01 16:12:34 UTC (rev 89609)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/reflect/CollectionMetadata.java	2009-06-01 16:36:23 UTC (rev 89610)
@@ -33,7 +33,7 @@
 	 *
 	 * @return The interface class that the collection must implement.
 	 */
-	Class/*<?>*/ getCollectionClass();
+	Class<?> getCollectionClass();
 
     /**
      * The value-type specified for the array
@@ -46,5 +46,5 @@
     /**
      * The of Metadata objects that describe the value.
      */
-	List /*<Metadata>*/ getValues();
+	List<Metadata> getValues();
 }

Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/reflect/MapMetadata.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/reflect/MapMetadata.java	2009-06-01 16:12:34 UTC (rev 89609)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/reflect/MapMetadata.java	2009-06-01 16:36:23 UTC (rev 89610)
@@ -19,29 +19,28 @@
 
 /**
  * A map-based value. This represented as a collection of entries (as it is done in the schema).
- *
+ * 
  * A map is defined in the <code>map</code> element.
- *
+ * 
  */
-public interface MapMetadata extends NonNullMetadata {
-	/**
-	 * The key-type specified for map keys, or null if none given
-	 *
-	 * Defined in the <code>key-type</code> attribute.
-	 * ### should we have getRuntimeKeyType?
-	 */
-	String getKeyTypeName();
+public interface MapMetadata extends NonNullMetadata
+{
+   /**
+    * The key-type specified for map keys, or null if none given
+    * 
+    * Defined in the <code>key-type</code> attribute. ### should we have getRuntimeKeyType?
+    */
+   String getKeyTypeName();
 
-    /**
-     * The value-type specified for the array
-     *
-	 * ### should we have getRuntimeValueType?
-     * The <code>value-type</code> attribute.
-     */
-	String getValueTypeName();
+   /**
+    * The value-type specified for the array
+    * 
+    * ### should we have getRuntimeValueType? The <code>value-type</code> attribute.
+    */
+   String getValueTypeName();
 
-    /**
-     * The of Metadata objects that describe the value.
-     */
-	List /*<MapEntry>*/ getEntries();
+   /**
+    * The of Metadata objects that describe the value.
+    */
+   List<MapEntry> getEntries();
 }

Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/reflect/PropsMetadata.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/reflect/PropsMetadata.java	2009-06-01 16:12:34 UTC (rev 89609)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/reflect/PropsMetadata.java	2009-06-01 16:36:23 UTC (rev 89610)
@@ -37,5 +37,5 @@
 	 *
 	 * @return
 	 */
-	List/*<MapEntry>*/ getEntries();
+	List<MapEntry> getEntries();
 }

Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/reflect/RefCollectionMetadata.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/reflect/RefCollectionMetadata.java	2009-06-01 16:12:34 UTC (rev 89609)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/reflect/RefCollectionMetadata.java	2009-06-01 16:36:23 UTC (rev 89610)
@@ -51,7 +51,7 @@
 	 *
 	 * @return Class object for the specified collection type (List, Set).
 	 */
-	Class/* <?> */getCollectionType();
+	Class<?> getCollectionType();
 
 	/**
 	 * The comparator specified for ordering the collection, or <code>null</code> if no

Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/reflect/ServiceMetadata.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/reflect/ServiceMetadata.java	2009-06-01 16:12:34 UTC (rev 89609)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/reflect/ServiceMetadata.java	2009-06-01 16:36:23 UTC (rev 89610)
@@ -18,7 +18,9 @@
 import java.util.Collection;
 import java.util.List;
 
+import org.jboss.osgi.blueprint.reflect.ServicePropertyEntry;
 
+
 /**
  * Metadata representing a service to be exported by a module context.
  *
@@ -85,7 +87,7 @@
 	 * @return Map containing the set of user declared service properties (may be
 	 * empty if no properties were specified).
 	 */
-	List/*<MapEntry>*/ getServiceProperties();
+	List<ServicePropertyEntry> getServiceProperties();
 
 	/**
 	 * The ranking value to use when advertising the service
@@ -104,7 +106,7 @@
 	 *
 	 * @return an immutable collection of RegistrationListenerMetadata
 	 */
-	Collection /*<RegistrationListener>*/ getRegistrationListeners();
+	Collection<RegistrationListener> getRegistrationListeners();
 
     /**
      * The names of any components listed in a "depends-on" attribute for this
@@ -113,5 +115,5 @@
      * @return an immutable List of component names for components that we have explicitly
      * declared a dependency on, or an empty set if none.
      */
-    List/*<String>*/ getExplicitDependencies();
+    List<String> getExplicitDependencies();
 }

Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/reflect/ServiceReferenceMetadata.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/reflect/ServiceReferenceMetadata.java	2009-06-01 16:12:34 UTC (rev 89609)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/osgi/service/blueprint/reflect/ServiceReferenceMetadata.java	2009-06-01 16:36:23 UTC (rev 89610)
@@ -52,7 +52,7 @@
 	 *
 	 * @return an immutable list of type names
 	 */
-	List/*<String>*/ getInterfaceNames();
+	List<String> getInterfaceNames();
 
 	/**
 	 * The value of the component-name attribute, if specified. This specifies
@@ -83,6 +83,6 @@
 	 *
 	 * @return an immutable collection of registered ListenerMetadata
 	 */
-	Collection /*<Listener>*/ getServiceListeners();
+	Collection<Listener> getServiceListeners();
 
 }

Modified: projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/service/DeployerServiceDelegate.java
===================================================================
--- projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/service/DeployerServiceDelegate.java	2009-06-01 16:12:34 UTC (rev 89609)
+++ projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/service/DeployerServiceDelegate.java	2009-06-01 16:36:23 UTC (rev 89610)
@@ -25,7 +25,6 @@
 
 import java.net.URL;
 
-import org.jboss.osgi.common.log.LogServiceTracker;
 import org.jboss.osgi.spi.service.BundleInfo;
 import org.jboss.osgi.spi.service.DeployerService;
 import org.osgi.framework.BundleContext;
@@ -43,12 +42,10 @@
  */
 public class DeployerServiceDelegate implements DeployerService
 {
-   private LogServiceTracker log;
    private BundleContext context;
 
    public DeployerServiceDelegate(BundleContext context)
    {
-      this.log = new LogServiceTracker(context);
       this.context = context;
    }
 

Modified: projects/jboss-osgi/trunk/distribution/runtime/conf/jboss-osgi-knopflerfish.properties
===================================================================
--- projects/jboss-osgi/trunk/distribution/runtime/conf/jboss-osgi-knopflerfish.properties	2009-06-01 16:12:34 UTC (rev 89609)
+++ projects/jboss-osgi/trunk/distribution/runtime/conf/jboss-osgi-knopflerfish.properties	2009-06-01 16:36:23 UTC (rev 89610)
@@ -38,8 +38,8 @@
 org.jboss.osgi.husky.runtime.connector.host=${jboss.bind.address}
 org.jboss.osgi.husky.runtime.connector.port=5401
 
-# Extra System Packages
-org.osgi.framework.system.packages.extra=\
+# System Packages
+org.osgi.framework.system.packages=\
    javax.management, \
    javax.management.remote, \
    javax.naming, \




More information about the jboss-osgi-commits mailing list