mcconnell    2004/01/11 22:22:53

  Modified:    merlin   Tag: RELEASE_3-2-3-BIS platform.xml
               
merlin/activation/impl/src/java/org/apache/avalon/activation/appliance/impl
                        Tag: RELEASE_3-2-3-BIS CompositeBlock.java
               merlin/activation/impl/src/test/org/apache/avalon/playground
                        Tag: RELEASE_3-2-3-BIS ComplexComponent.java
               merlin/composition/api Tag: RELEASE_3-2-3-BIS project.xml
               merlin/composition/api/src/java/org/apache/avalon/composition/model
                        Tag: RELEASE_3-2-3-BIS ContainmentModel.java
               merlin/composition/impl Tag: RELEASE_3-2-3-BIS project.xml
               
merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl
                        Tag: RELEASE_3-2-3-BIS DefaultContainmentModel.java
               merlin/composition/spi Tag: RELEASE_3-2-3-BIS project.xml
               merlin/kernel/impl Tag: RELEASE_3-2-3-BIS project.xml
               merlin/kernel/servlet Tag: RELEASE_3-2-3-BIS project.xml
  Added:       merlin/composition/api/src/java/org/apache/avalon/composition/model
                        Tag: RELEASE_3-2-3-BIS ServiceModel.java
               
merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl
                        Tag: RELEASE_3-2-3-BIS DefaultServiceModel.java
  Log:
  Update the meta model to formally handle binding of a service export directive with 
the implementing class (resolves bug concerning selection of a supplier within a 
composite when the invoking method is against a derived interface - bug identified by 
Timothy Bennett). Commit includes related version bumps.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.20.4.4  +2 -2      avalon/merlin/platform.xml
  
  Index: platform.xml
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/platform.xml,v
  retrieving revision 1.20.4.3
  retrieving revision 1.20.4.4
  diff -u -r1.20.4.3 -r1.20.4.4
  --- platform.xml      12 Jan 2004 01:12:10 -0000      1.20.4.3
  +++ platform.xml      12 Jan 2004 06:22:52 -0000      1.20.4.4
  @@ -141,7 +141,7 @@
       <dependency>
         <groupId>avalon-composition</groupId>
         <artifactId>avalon-composition-api</artifactId>
  -      <version>1.2.2</version>
  +      <version>1.2.3</version>
       </dependency>
       <dependency>
         <groupId>avalon-composition</groupId>
  @@ -151,7 +151,7 @@
       <dependency>
         <groupId>avalon-composition</groupId>
         <artifactId>avalon-composition-impl</artifactId>
  -      <version>1.2.4</version>
  +      <version>1.2.5</version>
       </dependency>
   
       <dependency>
  
  
  
  No                   revision
  No                   revision
  1.2.4.4   +7 -32     
avalon/merlin/activation/impl/src/java/org/apache/avalon/activation/appliance/impl/CompositeBlock.java
  
  Index: CompositeBlock.java
  ===================================================================
  RCS file: 
/home/cvs/avalon/merlin/activation/impl/src/java/org/apache/avalon/activation/appliance/impl/CompositeBlock.java,v
  retrieving revision 1.2.4.3
  retrieving revision 1.2.4.4
  diff -u -r1.2.4.3 -r1.2.4.4
  --- CompositeBlock.java       12 Jan 2004 02:12:12 -0000      1.2.4.3
  +++ CompositeBlock.java       12 Jan 2004 06:22:52 -0000      1.2.4.4
  @@ -65,6 +65,7 @@
   import org.apache.avalon.activation.appliance.Home;
   import org.apache.avalon.composition.data.ServiceDirective;
   import org.apache.avalon.composition.model.ContainmentModel;
  +import org.apache.avalon.composition.model.ServiceModel;
   import org.apache.avalon.framework.logger.Logger;
   
   /**
  @@ -162,36 +163,12 @@
       private Class[] getInterfaceClasses() throws Exception
       {
           ContainmentModel model = m_context.getContainmentModel();
  -        ClassLoader loader = model.getClassLoaderModel().getClassLoader();
           ArrayList list = new ArrayList();
  -        ServiceDirective[] services = model.getExportDirectives();
  +        ServiceModel[] services = model.getServiceModels();
           for( int i=0; i<services.length; i++ )
           {
  -            final ServiceDirective service = services[i];
  -            final String classname = service.getReference().getClassname();
  -            try
  -            {
  -                Class clazz = loader.loadClass( classname );
  -                list.add( clazz );
  -            }
  -            catch( ClassNotFoundException cnfe )
  -            {
  -                final String error = 
  -                   "Class not found: [" + classname
  -                   + "] in block [" + this
  -                   + "] with classloader content: \n";
  -                StringBuffer buffer = new StringBuffer( error );
  -                if( loader instanceof URLClassLoader ) 
  -                {
  -                    URL[] urls = ((URLClassLoader)loader).getURLs();
  -                    for( int j=0; j<urls.length; j++ )
  -                    {
  -                        buffer.append( "\n  " + urls[j].toString() );
  -                    }
  -                }
  -                String message = buffer.toString();
  -                throw new ApplianceException( message );
  -            }
  +            final ServiceModel service = services[i];
  +            list.add( service.getServiceClass() );
           }
           return (Class[]) list.toArray( new Class[0] );
       }
  @@ -240,9 +217,7 @@
   
               final ContainmentModel model = m_context.getContainmentModel();
               Class source = method.getDeclaringClass();
  -            ServiceDirective service = 
  -              model.getExportDirective( source );
  -
  +            ServiceModel service = model.getServiceModel( source );
               if( null == service )
               {
                   final String error = 
  @@ -252,7 +227,7 @@
                   throw new IllegalStateException( error );
               }
   
  -            String path = service.getPath();
  +            String path = service.getServiceDirective().getPath();
               Appliance provider = (Appliance) m_block.locate( path );
               m_logger.debug( "delegating: " +  method.getName() );
   
  
  
  
  No                   revision
  No                   revision
  1.1.1.1.4.1 +4 -1      
avalon/merlin/activation/impl/src/test/org/apache/avalon/playground/ComplexComponent.java
  
  Index: ComplexComponent.java
  ===================================================================
  RCS file: 
/home/cvs/avalon/merlin/activation/impl/src/test/org/apache/avalon/playground/ComplexComponent.java,v
  retrieving revision 1.1.1.1
  retrieving revision 1.1.1.1.4.1
  diff -u -r1.1.1.1 -r1.1.1.1.4.1
  --- ComplexComponent.java     24 Sep 2003 09:30:51 -0000      1.1.1.1
  +++ ComplexComponent.java     12 Jan 2004 06:22:52 -0000      1.1.1.1.4.1
  @@ -144,10 +144,13 @@
           m_simple = (SimpleService) m_manager.lookup( "simple" );
           m_basic = (BasicService) m_manager.lookup( "basic" );
   
  +        getLogger().info( "simple: " + m_simple );
  +        getLogger().info( "basic: " + m_basic );
  +
           Logger logger = getLogger().getChildLogger( "internal" );
           if( logger.isInfoEnabled() )
           {
  -            logger.debug( "ready" );
  +            logger.info( "ready" );
           }
       }
   
  
  
  
  No                   revision
  No                   revision
  1.9.4.1   +1 -1      avalon/merlin/composition/api/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/composition/api/project.xml,v
  retrieving revision 1.9
  retrieving revision 1.9.4.1
  diff -u -r1.9 -r1.9.4.1
  --- project.xml       29 Dec 2003 22:56:18 -0000      1.9
  +++ project.xml       12 Jan 2004 06:22:53 -0000      1.9.4.1
  @@ -8,7 +8,7 @@
     <id>avalon-composition-api</id>
     <name>Avalon Composition API</name>
     <package>org.apache.avalon.assembly</package>
  -  <currentVersion>1.2.2</currentVersion>
  +  <currentVersion>1.2.3</currentVersion>
   
     <inceptionYear>2002</inceptionYear>
     <shortDescription>Avalon Composition SPI</shortDescription>
  
  
  
  No                   revision
  No                   revision
  1.9.4.1   +6 -6      
avalon/merlin/composition/api/src/java/org/apache/avalon/composition/model/ContainmentModel.java
  
  Index: ContainmentModel.java
  ===================================================================
  RCS file: 
/home/cvs/avalon/merlin/composition/api/src/java/org/apache/avalon/composition/model/ContainmentModel.java,v
  retrieving revision 1.9
  retrieving revision 1.9.4.1
  diff -u -r1.9 -r1.9.4.1
  --- ContainmentModel.java     29 Dec 2003 14:31:21 -0000      1.9
  +++ ContainmentModel.java     12 Jan 2004 06:22:53 -0000      1.9.4.1
  @@ -167,16 +167,16 @@
       void removeModel( String name );
   
      /**
  -    * Return the set of service export directives.
  +    * Return the set of service export models.
       * @return t he export directives
       */
  -    ServiceDirective[] getExportDirectives();
  +    ServiceModel[] getServiceModels();
   
      /**
  -    * Return the set of service export directives for a supplied class.
  -    * @return the export directives
  +    * Return a service exoport model matching a supplied class.
  +    * @return the service model
       */
  -    ServiceDirective getExportDirective( Class clazz );
  +    ServiceModel getServiceModel( Class clazz );
   
      /**
       * Apply a set of override targets resolvable from a supplied url.
  
  
  
  No                   revision
  
  Index: ContainmentModel.java
  ===================================================================
  RCS file: 
/home/cvs/avalon/merlin/composition/api/src/java/org/apache/avalon/composition/model/ContainmentModel.java,v
  retrieving revision 1.9
  retrieving revision 1.9.4.1
  diff -u -r1.9 -r1.9.4.1
  --- ContainmentModel.java     29 Dec 2003 14:31:21 -0000      1.9
  +++ ContainmentModel.java     12 Jan 2004 06:22:53 -0000      1.9.4.1
  @@ -167,16 +167,16 @@
       void removeModel( String name );
   
      /**
  -    * Return the set of service export directives.
  +    * Return the set of service export models.
       * @return t he export directives
       */
  -    ServiceDirective[] getExportDirectives();
  +    ServiceModel[] getServiceModels();
   
      /**
  -    * Return the set of service export directives for a supplied class.
  -    * @return the export directives
  +    * Return a service exoport model matching a supplied class.
  +    * @return the service model
       */
  -    ServiceDirective getExportDirective( Class clazz );
  +    ServiceModel getServiceModel( Class clazz );
   
      /**
       * Apply a set of override targets resolvable from a supplied url.
  
  
  
  No                   revision
  
  Index: ContainmentModel.java
  ===================================================================
  RCS file: 
/home/cvs/avalon/merlin/composition/api/src/java/org/apache/avalon/composition/model/ContainmentModel.java,v
  retrieving revision 1.9
  retrieving revision 1.9.4.1
  diff -u -r1.9 -r1.9.4.1
  --- ContainmentModel.java     29 Dec 2003 14:31:21 -0000      1.9
  +++ ContainmentModel.java     12 Jan 2004 06:22:53 -0000      1.9.4.1
  @@ -167,16 +167,16 @@
       void removeModel( String name );
   
      /**
  -    * Return the set of service export directives.
  +    * Return the set of service export models.
       * @return t he export directives
       */
  -    ServiceDirective[] getExportDirectives();
  +    ServiceModel[] getServiceModels();
   
      /**
  -    * Return the set of service export directives for a supplied class.
  -    * @return the export directives
  +    * Return a service exoport model matching a supplied class.
  +    * @return the service model
       */
  -    ServiceDirective getExportDirective( Class clazz );
  +    ServiceModel getServiceModel( Class clazz );
   
      /**
       * Apply a set of override targets resolvable from a supplied url.
  
  
  
  1.1.4.1   +75 -0     
avalon/merlin/composition/api/src/java/org/apache/avalon/composition/model/Attic/ServiceModel.java
  
  
  
  
  No                   revision
  No                   revision
  1.12.4.1  +2 -2      avalon/merlin/composition/impl/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/composition/impl/project.xml,v
  retrieving revision 1.12
  retrieving revision 1.12.4.1
  diff -u -r1.12 -r1.12.4.1
  --- project.xml       1 Jan 2004 23:34:45 -0000       1.12
  +++ project.xml       12 Jan 2004 06:22:53 -0000      1.12.4.1
  @@ -8,7 +8,7 @@
     <id>avalon-composition-impl</id>
     <name>Avalon Composition Framework</name>
     <package>org.apache.avalon.composition</package>
  -  <currentVersion>1.2.4</currentVersion>
  +  <currentVersion>1.2.5</currentVersion>
   
     <inceptionYear>2002</inceptionYear>
     <shortDescription>Avalon Composition Framework.</shortDescription>
  @@ -68,7 +68,7 @@
       <dependency>
         <groupId>avalon-composition</groupId>
         <artifactId>avalon-composition-api</artifactId>
  -      <version>1.2.2</version>
  +      <version>1.2.3</version>
       </dependency>
       <dependency>
         <groupId>avalon-composition</groupId>
  
  
  
  No                   revision
  No                   revision
  1.13.4.2  +56 -24    
avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultContainmentModel.java
  
  Index: DefaultContainmentModel.java
  ===================================================================
  RCS file: 
/home/cvs/avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultContainmentModel.java,v
  retrieving revision 1.13.4.1
  retrieving revision 1.13.4.2
  diff -u -r1.13.4.1 -r1.13.4.2
  --- DefaultContainmentModel.java      12 Jan 2004 02:12:12 -0000      1.13.4.1
  +++ DefaultContainmentModel.java      12 Jan 2004 06:22:53 -0000      1.13.4.2
  @@ -88,8 +88,10 @@
   import org.apache.avalon.composition.model.ModelSelector;
   import org.apache.avalon.composition.model.ProfileSelector;
   import org.apache.avalon.composition.model.TypeRepository;
  +import org.apache.avalon.composition.model.ServiceModel;
   import org.apache.avalon.composition.logging.LoggingManager;
   import org.apache.avalon.composition.util.StringHelper;
  +
   import org.apache.avalon.repository.Repository;
   import org.apache.avalon.repository.Artifact;
   import org.apache.avalon.repository.RepositoryException;
  @@ -161,6 +163,8 @@
   
       private final LinkedList m_compositionListeners = new LinkedList();
   
  +    private ServiceModel[] m_services;
  +
       //==============================================================
       // constructor
       //==============================================================
  @@ -188,6 +192,29 @@
               m_partition = getPath() + getName() + SEPERATOR;
           }
   
  +        ClassLoader classloader = context.getClassLoader();
  +        ServiceDirective[] export = 
  +          context.getContainmentProfile().getExportDirectives();
  +        m_services = new DefaultServiceModel[ export.length ];
  +        for( int i=0; i<export.length; i++ )
  +        {
  +            ServiceDirective service = export[i];
  +            String classname = service.getReference().getClassname();
  +            try
  +            {
  +                Class clazz = classloader.loadClass( classname );
  +                m_services[i] = new DefaultServiceModel( service, clazz ); 
  +            }
  +            catch( Throwable e )
  +            {
  +                final String error = 
  +                  "Cannot load service class [" 
  +                  + classname 
  +                  + "].";
  +                throw new ModelException( error, e );
  +            }
  +        }
  +
           Profile[] profiles = context.getContainmentProfile().getProfiles();
           for( int i=0; i<profiles.length; i++ )
           {
  @@ -215,7 +242,7 @@
       */
       public ServiceDescriptor[] getServices()
       {
  -        return getExportDirectives();
  +        return m_context.getContainmentProfile().getExportDirectives();
       }
   
      /**
  @@ -285,6 +312,34 @@
       }
   
      /**
  +    * Return the set of service export mappings
  +    * @return the set of export directives published by the model
  +    */
  +    public ServiceModel[] getServiceModels()
  +    {
  +        return m_services;
  +    }
  +
  +   /**
  +    * Return the set of service export directives for a supplied class.
  +    * @param clazz a cleaa identifying the directive
  +    * @return the export directives
  +    */
  +    public ServiceModel getServiceModel( Class clazz )
  +    {
  +        ServiceModel[] models = getServiceModels();
  +        for( int i=0; i<models.length; i++ )
  +        {
  +            ServiceModel model = models[i];
  +            if( model.getServiceClass().isAssignableFrom( clazz ) )
  +            {
  +                return model;
  +            }
  +        }
  +        return null;
  +    }
  +
  +   /**
       * Return the logging categories. 
       * @return the logging categories
       */
  @@ -1094,29 +1149,6 @@
           }
       }
   
  -   /**
  -    * Return the set of service export mappings
  -    * @return the set of export directives published by the model
  -    */
  -    public ServiceDirective[] getExportDirectives()
  -    {
  -        return m_context.getContainmentProfile().getExportDirectives();
  -    }
  -
  -   /**
  -    * Return the set of service export directives for a supplied class.
  -    * @param clazz a cleaa identifying the directive
  -    * @return the export directives
  -    */
  -    public ServiceDirective getExportDirective( Class clazz )
  -    {
  -        // ##
  -        // ## BUG
  -        // ## need to resolve class agaisnt class loaded from 
  -        // ## service export classname
  -        // ##
  -        return m_context.getContainmentProfile().getExportDirective( clazz );
  -    }
   
       //==============================================================
       // implementation
  
  
  
  No                   revision
  
  Index: DefaultContainmentModel.java
  ===================================================================
  RCS file: 
/home/cvs/avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultContainmentModel.java,v
  retrieving revision 1.13.4.1
  retrieving revision 1.13.4.2
  diff -u -r1.13.4.1 -r1.13.4.2
  --- DefaultContainmentModel.java      12 Jan 2004 02:12:12 -0000      1.13.4.1
  +++ DefaultContainmentModel.java      12 Jan 2004 06:22:53 -0000      1.13.4.2
  @@ -88,8 +88,10 @@
   import org.apache.avalon.composition.model.ModelSelector;
   import org.apache.avalon.composition.model.ProfileSelector;
   import org.apache.avalon.composition.model.TypeRepository;
  +import org.apache.avalon.composition.model.ServiceModel;
   import org.apache.avalon.composition.logging.LoggingManager;
   import org.apache.avalon.composition.util.StringHelper;
  +
   import org.apache.avalon.repository.Repository;
   import org.apache.avalon.repository.Artifact;
   import org.apache.avalon.repository.RepositoryException;
  @@ -161,6 +163,8 @@
   
       private final LinkedList m_compositionListeners = new LinkedList();
   
  +    private ServiceModel[] m_services;
  +
       //==============================================================
       // constructor
       //==============================================================
  @@ -188,6 +192,29 @@
               m_partition = getPath() + getName() + SEPERATOR;
           }
   
  +        ClassLoader classloader = context.getClassLoader();
  +        ServiceDirective[] export = 
  +          context.getContainmentProfile().getExportDirectives();
  +        m_services = new DefaultServiceModel[ export.length ];
  +        for( int i=0; i<export.length; i++ )
  +        {
  +            ServiceDirective service = export[i];
  +            String classname = service.getReference().getClassname();
  +            try
  +            {
  +                Class clazz = classloader.loadClass( classname );
  +                m_services[i] = new DefaultServiceModel( service, clazz ); 
  +            }
  +            catch( Throwable e )
  +            {
  +                final String error = 
  +                  "Cannot load service class [" 
  +                  + classname 
  +                  + "].";
  +                throw new ModelException( error, e );
  +            }
  +        }
  +
           Profile[] profiles = context.getContainmentProfile().getProfiles();
           for( int i=0; i<profiles.length; i++ )
           {
  @@ -215,7 +242,7 @@
       */
       public ServiceDescriptor[] getServices()
       {
  -        return getExportDirectives();
  +        return m_context.getContainmentProfile().getExportDirectives();
       }
   
      /**
  @@ -285,6 +312,34 @@
       }
   
      /**
  +    * Return the set of service export mappings
  +    * @return the set of export directives published by the model
  +    */
  +    public ServiceModel[] getServiceModels()
  +    {
  +        return m_services;
  +    }
  +
  +   /**
  +    * Return the set of service export directives for a supplied class.
  +    * @param clazz a cleaa identifying the directive
  +    * @return the export directives
  +    */
  +    public ServiceModel getServiceModel( Class clazz )
  +    {
  +        ServiceModel[] models = getServiceModels();
  +        for( int i=0; i<models.length; i++ )
  +        {
  +            ServiceModel model = models[i];
  +            if( model.getServiceClass().isAssignableFrom( clazz ) )
  +            {
  +                return model;
  +            }
  +        }
  +        return null;
  +    }
  +
  +   /**
       * Return the logging categories. 
       * @return the logging categories
       */
  @@ -1094,29 +1149,6 @@
           }
       }
   
  -   /**
  -    * Return the set of service export mappings
  -    * @return the set of export directives published by the model
  -    */
  -    public ServiceDirective[] getExportDirectives()
  -    {
  -        return m_context.getContainmentProfile().getExportDirectives();
  -    }
  -
  -   /**
  -    * Return the set of service export directives for a supplied class.
  -    * @param clazz a cleaa identifying the directive
  -    * @return the export directives
  -    */
  -    public ServiceDirective getExportDirective( Class clazz )
  -    {
  -        // ##
  -        // ## BUG
  -        // ## need to resolve class agaisnt class loaded from 
  -        // ## service export classname
  -        // ##
  -        return m_context.getContainmentProfile().getExportDirective( clazz );
  -    }
   
       //==============================================================
       // implementation
  
  
  
  No                   revision
  
  Index: DefaultContainmentModel.java
  ===================================================================
  RCS file: 
/home/cvs/avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultContainmentModel.java,v
  retrieving revision 1.13.4.1
  retrieving revision 1.13.4.2
  diff -u -r1.13.4.1 -r1.13.4.2
  --- DefaultContainmentModel.java      12 Jan 2004 02:12:12 -0000      1.13.4.1
  +++ DefaultContainmentModel.java      12 Jan 2004 06:22:53 -0000      1.13.4.2
  @@ -88,8 +88,10 @@
   import org.apache.avalon.composition.model.ModelSelector;
   import org.apache.avalon.composition.model.ProfileSelector;
   import org.apache.avalon.composition.model.TypeRepository;
  +import org.apache.avalon.composition.model.ServiceModel;
   import org.apache.avalon.composition.logging.LoggingManager;
   import org.apache.avalon.composition.util.StringHelper;
  +
   import org.apache.avalon.repository.Repository;
   import org.apache.avalon.repository.Artifact;
   import org.apache.avalon.repository.RepositoryException;
  @@ -161,6 +163,8 @@
   
       private final LinkedList m_compositionListeners = new LinkedList();
   
  +    private ServiceModel[] m_services;
  +
       //==============================================================
       // constructor
       //==============================================================
  @@ -188,6 +192,29 @@
               m_partition = getPath() + getName() + SEPERATOR;
           }
   
  +        ClassLoader classloader = context.getClassLoader();
  +        ServiceDirective[] export = 
  +          context.getContainmentProfile().getExportDirectives();
  +        m_services = new DefaultServiceModel[ export.length ];
  +        for( int i=0; i<export.length; i++ )
  +        {
  +            ServiceDirective service = export[i];
  +            String classname = service.getReference().getClassname();
  +            try
  +            {
  +                Class clazz = classloader.loadClass( classname );
  +                m_services[i] = new DefaultServiceModel( service, clazz ); 
  +            }
  +            catch( Throwable e )
  +            {
  +                final String error = 
  +                  "Cannot load service class [" 
  +                  + classname 
  +                  + "].";
  +                throw new ModelException( error, e );
  +            }
  +        }
  +
           Profile[] profiles = context.getContainmentProfile().getProfiles();
           for( int i=0; i<profiles.length; i++ )
           {
  @@ -215,7 +242,7 @@
       */
       public ServiceDescriptor[] getServices()
       {
  -        return getExportDirectives();
  +        return m_context.getContainmentProfile().getExportDirectives();
       }
   
      /**
  @@ -285,6 +312,34 @@
       }
   
      /**
  +    * Return the set of service export mappings
  +    * @return the set of export directives published by the model
  +    */
  +    public ServiceModel[] getServiceModels()
  +    {
  +        return m_services;
  +    }
  +
  +   /**
  +    * Return the set of service export directives for a supplied class.
  +    * @param clazz a cleaa identifying the directive
  +    * @return the export directives
  +    */
  +    public ServiceModel getServiceModel( Class clazz )
  +    {
  +        ServiceModel[] models = getServiceModels();
  +        for( int i=0; i<models.length; i++ )
  +        {
  +            ServiceModel model = models[i];
  +            if( model.getServiceClass().isAssignableFrom( clazz ) )
  +            {
  +                return model;
  +            }
  +        }
  +        return null;
  +    }
  +
  +   /**
       * Return the logging categories. 
       * @return the logging categories
       */
  @@ -1094,29 +1149,6 @@
           }
       }
   
  -   /**
  -    * Return the set of service export mappings
  -    * @return the set of export directives published by the model
  -    */
  -    public ServiceDirective[] getExportDirectives()
  -    {
  -        return m_context.getContainmentProfile().getExportDirectives();
  -    }
  -
  -   /**
  -    * Return the set of service export directives for a supplied class.
  -    * @param clazz a cleaa identifying the directive
  -    * @return the export directives
  -    */
  -    public ServiceDirective getExportDirective( Class clazz )
  -    {
  -        // ##
  -        // ## BUG
  -        // ## need to resolve class agaisnt class loaded from 
  -        // ## service export classname
  -        // ##
  -        return m_context.getContainmentProfile().getExportDirective( clazz );
  -    }
   
       //==============================================================
       // implementation
  
  
  
  1.1.4.1   +91 -0     
avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/Attic/DefaultServiceModel.java
  
  
  
  
  No                   revision
  No                   revision
  1.10.4.1  +1 -1      avalon/merlin/composition/spi/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/composition/spi/project.xml,v
  retrieving revision 1.10
  retrieving revision 1.10.4.1
  diff -u -r1.10 -r1.10.4.1
  --- project.xml       29 Dec 2003 22:56:18 -0000      1.10
  +++ project.xml       12 Jan 2004 06:22:53 -0000      1.10.4.1
  @@ -34,7 +34,7 @@
       <dependency>
         <groupId>avalon-composition</groupId>
         <artifactId>avalon-composition-api</artifactId>
  -      <version>1.2.2</version>
  +      <version>1.2.3</version>
       </dependency>
   
     </dependencies>
  
  
  
  No                   revision
  No                   revision
  1.16.4.3  +2 -2      avalon/merlin/kernel/impl/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/kernel/impl/project.xml,v
  retrieving revision 1.16.4.2
  retrieving revision 1.16.4.3
  diff -u -r1.16.4.2 -r1.16.4.3
  --- project.xml       12 Jan 2004 01:12:11 -0000      1.16.4.2
  +++ project.xml       12 Jan 2004 06:22:53 -0000      1.16.4.3
  @@ -74,7 +74,7 @@
       <dependency>
         <groupId>avalon-composition</groupId>
         <artifactId>avalon-composition-api</artifactId>
  -      <version>1.2.2</version>
  +      <version>1.2.3</version>
         <properties>
           <avalon.classloader>api</avalon.classloader>
         </properties>
  @@ -90,7 +90,7 @@
       <dependency>
         <groupId>avalon-composition</groupId>
         <artifactId>avalon-composition-impl</artifactId>
  -      <version>1.2.4</version>
  +      <version>1.2.5</version>
       </dependency>
   
       <dependency>
  
  
  
  No                   revision
  No                   revision
  1.3.4.3   +1 -1      avalon/merlin/kernel/servlet/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/kernel/servlet/project.xml,v
  retrieving revision 1.3.4.2
  retrieving revision 1.3.4.3
  diff -u -r1.3.4.2 -r1.3.4.3
  --- project.xml       12 Jan 2004 01:12:11 -0000      1.3.4.2
  +++ project.xml       12 Jan 2004 06:22:53 -0000      1.3.4.3
  @@ -48,7 +48,7 @@
       <dependency>
         <groupId>avalon-composition</groupId>
         <artifactId>avalon-composition-api</artifactId>
  -      <version>1.2.2</version>
  +      <version>1.2.3</version>
         <type>jar</type>
         <properties>
           <war.bundle>true</war.bundle>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to