mcconnell    2003/07/24 06:14:56

  Modified:    merlin   maven.xml
               merlin/composition/src/java/org/apache/avalon/composition/model/impl
                        DefaultContextModel.java
                        DefaultDependencyModel.java
                        DefaultDeploymentContext.java
                        DefaultDeploymentModel.java Resources.properties
               merlin/composition/src/test/conf block.xml
               merlin/composition/src/test/org/apache/avalon/composition/model/test
                        DependencyTestCase.java
               merlin/composition-spi/src/java/org/apache/avalon/composition/data
                        DeploymentProfile.java
               merlin/composition-spi/src/java/org/apache/avalon/composition/model
                        ContextModel.java DependencyModel.java
                        DeploymentModel.java
               merlin/merlin-core/src/java/org/apache/avalon/merlin/block/impl
                        StandardBlockLoader.java
               merlin/merlin-platform project.xml
  Log:
  Sync. wioth ,meta package and general enhancements to the composition package.
  
  Revision  Changes    Path
  1.29      +3 -3      avalon-sandbox/merlin/maven.xml
  
  Index: maven.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/maven.xml,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- maven.xml 22 Jul 2003 04:11:56 -0000      1.28
  +++ maven.xml 24 Jul 2003 13:14:52 -0000      1.29
  @@ -232,14 +232,14 @@
           <j:forEach var="packageGroup" items="${pom.packageGroups}">
                  <group title="${packageGroup.title}" 
packages="${packageGroup.packages}"/>
           </j:forEach>
  +        <!--
           <sourcepath path="${basedir}/../extension-spi/src/java"/>
           <sourcepath path="${basedir}/../extension/src/java"/>
  -        <!--
  -        <sourcepath path="${basedir}/../activation-spi/src/java"/>
  -        <sourcepath path="${basedir}/../activation/src/java"/>
           -->
           <sourcepath path="${basedir}/../composition-spi/src/java"/>
           <sourcepath path="${basedir}/../composition/src/java"/>
  +        <sourcepath path="${basedir}/../activation-spi/src/java"/>
  +        <sourcepath path="${basedir}/../activation/src/java"/>
           <sourcepath path="${basedir}/../assembly-spi/src/java"/>
           <sourcepath path="${basedir}/../assembly/src/java"/>
           <sourcepath path="${basedir}/../merlin-spi/src/java"/>
  
  
  
  1.5       +3 -8      
avalon-sandbox/merlin/composition/src/java/org/apache/avalon/composition/model/impl/DefaultContextModel.java
  
  Index: DefaultContextModel.java
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/merlin/composition/src/java/org/apache/avalon/composition/model/impl/DefaultContextModel.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DefaultContextModel.java  17 Jul 2003 21:21:57 -0000      1.4
  +++ DefaultContextModel.java  24 Jul 2003 13:14:53 -0000      1.5
  @@ -94,12 +94,6 @@
        */
       public static final Class DEFAULT_CONTEXT_CLASS = DefaultContext.class;
   
  -    /**
  -     * The default context strategy interface class.
  -     */
  -    public static final String DEFAULT_STRATEGY_CLASSNAME = 
  -      "org.apache.avalon.framework.context.Contextualizable";
  -
       //==============================================================
       // immutable state
       //==============================================================
  @@ -133,7 +127,8 @@
       * @param system the system context
       */
       public DefaultContextModel( 
  -      Logger logger, ContextDescriptor descriptor, ContextDirective directive, 
DeploymentContext context )
  +      Logger logger, ContextDescriptor descriptor, 
  +      ContextDirective directive, DeploymentContext context )
         throws ModelException
       {
           enableLogging( logger );
  
  
  
  1.4       +42 -87    
avalon-sandbox/merlin/composition/src/java/org/apache/avalon/composition/model/impl/DefaultDependencyModel.java
  
  Index: DefaultDependencyModel.java
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/merlin/composition/src/java/org/apache/avalon/composition/model/impl/DefaultDependencyModel.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DefaultDependencyModel.java       22 Jul 2003 04:11:57 -0000      1.3
  +++ DefaultDependencyModel.java       24 Jul 2003 13:14:53 -0000      1.4
  @@ -89,19 +89,15 @@
       // immutable state
       //==============================================================
   
  -    private final DependencyDescriptor[] m_descriptors;
  +    private final DependencyDescriptor m_descriptor;
   
  -    private final DependencyDirective[] m_directives;
  +    private final DependencyDirective m_directive;
   
       private final String m_partition;
   
       private final String m_name;
   
  -    private final Map m_paths = new Hashtable();
  -
  -    //==============================================================
  -    // mutable state
  -    //==============================================================
  +    private final String m_source;
   
       //==============================================================
       // constructor
  @@ -112,20 +108,19 @@
       *
       * @param logger the logging channel
       * @param descriptors the dependency descriptors
  -    * @param directives the dependency directives
  +    * @param directives the dependency directives (possibly null)
       */
       public DefaultDependencyModel( 
         final Logger logger, final String partition, final String name, 
  -      final DependencyDescriptor[] descriptors, DependencyDirective[] directives )
  +      final DependencyDescriptor descriptor, DependencyDirective directive )
         throws ModelException
       {
           if( logger == null ) throw new NullPointerException( "logger" );
  -        if( descriptors == null ) throw new NullPointerException( "descriptors" );
  -        if( directives == null ) throw new NullPointerException( "directives" );
  +        if( descriptor == null ) throw new NullPointerException( "descriptor" );
   
           enableLogging( logger );
  -        m_descriptors = descriptors;
  -        m_directives = directives;
  +        m_descriptor = descriptor;
  +        m_directive = directive;
           m_partition = partition;
           m_name = name;
   
  @@ -136,18 +131,23 @@
           // add it to the table to paths keyed by depedency key names
           //
   
  -        for( int i=0; i<directives.length; i++ )
  +        if( directive != null )
           {
  -            DependencyDirective directive = directives[i];
               if( directive.getSource() != null )
               {
  -                String source = resolvePath( m_partition, directive.getSource() );
  -                m_paths.put( directive.getKey(), source );
  -
  +                m_source = resolvePath( partition, directive.getSource() );
                   final String message =
  -                  REZ.getString( "dependency.path.debug", source, 
directive.getKey() );
  +                  REZ.getString( "dependency.path.debug", m_source, 
directive.getKey() );
                   getLogger().debug( message );
               }
  +            else
  +            {
  +                m_source = null;
  +            }
  +        }
  +        else
  +        {
  +            m_source = null;
           }
       }
   
  @@ -156,35 +156,27 @@
       //==============================================================
   
      /**
  -    * Return an explicit path to a component relative to a supplied 
  -    * dependency key.  If a dependency directive has been declared
  -    * and the directive contains a source declaration, the value 
  -    * returned is the result of parsing the source value relative 
  -    * to the absolute address of the implementing component.
  +    * Return the dependency descriptor.
       *
  -    * @return the explicit path
  -    * @exception IllegalArgumentException if the key is unknown
  +    * @return the descriptor
       */
  -    public String getPath( String key ) throws IllegalArgumentException
  +    public DependencyDescriptor getDependency()
       {
  -        if( !valideKey( key ) )
  -        {
  -            final String error = 
  -              REZ.getString( "dependency.bad-key.error", key, m_partition, m_name );
  -            throw new IllegalArgumentException( error );
  -        }
  -        return (String) m_paths.get( key );
  +        return m_descriptor;
       }
   
      /**
  -    * Return the set of dependecies for the model.
  +    * Return an explicit path to a supplier component.  
  +    * If a dependency directive has been declared
  +    * and the directive contains a source declaration, the value 
  +    * returned is the result of parsing the source value relative 
  +    * to the absolute address of the implementing component.
       *
  -    * @return the the set of descriptors declaring the component 
  -    *    dependencies
  +    * @return the explicit path
       */
  -    public DependencyDescriptor[] getDependencies()
  +    public String getPath()
       {
  -        return m_descriptors;
  +        return m_source;
       }
   
      /**
  @@ -196,18 +188,17 @@
       * @param candidates the set of candidate models
       * @return the selected candidate 
       */
  -    public Model select( String key, Model[] candidates ) throws ModelException
  +    public Model select( Model[] candidates ) throws ModelException
       {
  -        DependencyDirective directive = getDirective( key );
  -        if( directive != null )
  +        if( m_directive != null )
           {
  -            if( directive.getSource() != null )
  +            if( m_directive.getSource() != null )
               {
                   //
                   // its an explicit assignment
                   //
   
  -                String path = directive.getSource();
  +                String path = m_directive.getSource();
                   String source = resolvePath( m_partition, path );
                   for( int i=0; i<candidates.length; i++ )
                   {
  @@ -217,7 +208,7 @@
                       {
                           getLogger().debug( 
                             "selected [" + name + "] for key [" 
  -                          + key + "] using [" + path + "].");
  +                          + m_descriptor.getKey() + "] using [" + path + "].");
                           return candidate;
                       }
                   }
  @@ -231,7 +222,7 @@
                   final String error = 
                     REZ.getString( 
                       "dependency.unresolvable-directive.error",
  -                    key, m_partition, m_name, path );
  +                    m_descriptor.getKey(), m_partition, m_name, path );
                   throw new ModelException( error );
               }
           }
  @@ -248,21 +239,13 @@
       * @return the accepted candidates in ranked order
       * @exception IllegalArgumentException if the key is unknown
       */
  -    public ServiceDescriptor[] filter( String key, ServiceDescriptor[] candidates ) 
  +    public ServiceDescriptor[] filter( ServiceDescriptor[] candidates ) 
       {
  -        if( !valideKey( key ) )
  -        {
  -            final String error = 
  -              REZ.getString( "dependency.bad-key.error", key, m_partition, m_name );
  -            throw new IllegalArgumentException( error );
  -        }
  -
  -        DependencyDirective directive = getDirective( key );
  -        if( directive != null )
  +        if( m_directive != null )
           {
  -            if( directive.getSource() == null )
  +            if( m_directive.getSource() == null )
               {
  -                return filter( directive, candidates );
  +                return filter( m_directive, candidates );
               }
           }
           return candidates;
  @@ -483,34 +466,6 @@
                 "Illegal attempt to reference a containment context above the root 
context.";
               throw new IllegalArgumentException( error );
           }
  -    }
  -
  -    private DependencyDirective getDirective( final String key )
  -    {
  -        for( int i=0; i<m_directives.length; i++ )
  -        {
  -            final DependencyDirective directive = m_directives[i];
  -            if( directive.getKey().equals( key ) ) return directive;
  -        }
  -        return null;
  -    }
  -
  -   /**
  -    * Validate that a key is known withing the set of 
  -    * dependency descriptors.
  -    * @param key the key to validate
  -    * @return TRUE if the key is known
  -    */
  -    private boolean valideKey( final String key )
  -    {
  -        for( int i=0; i<m_descriptors.length; i++ )
  -        {
  -            if( m_descriptors[i].getKey().equals( key ) )
  -            {
  -                return true;
  -            }
  -        }
  -        return false;
       }
   
      /**
  
  
  
  1.6       +43 -47    
avalon-sandbox/merlin/composition/src/java/org/apache/avalon/composition/model/impl/DefaultDeploymentContext.java
  
  Index: DefaultDeploymentContext.java
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/merlin/composition/src/java/org/apache/avalon/composition/model/impl/DefaultDeploymentContext.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DefaultDeploymentContext.java     17 Jul 2003 21:21:57 -0000      1.5
  +++ DefaultDeploymentContext.java     24 Jul 2003 13:14:54 -0000      1.6
  @@ -325,65 +325,61 @@
       {
           if( alias == null ) throw new NullPointerException( "alias" );
   
  +        String key = alias;
           EntryDescriptor entry = 
             getType().getContext().getEntry( alias );
   
           if( entry != null )
           {
  -            final String key = entry.getKey();
  -            if( key.equals( NAME_KEY ) )
  -            {
  -                return getName();
  -            }
  -            else if( key.equals( PARTITION_KEY ) )
  -            {
  -                return getPartitionName();
  -            }
  -            else if( key.equals( CLASSLOADER_KEY ) )
  -            {
  -                return getClassLoader();
  -            }
  -            else if( key.equals( HOME_KEY ) )
  -            {
  -                return getHomeDirectory();
  -            }
  -            else if( key.equals( TEMP_KEY ) )
  -            {
  -                return getTempDirectory();
  -            }
  -            else
  +            key = entry.getKey();
  +        }
  +        
  +        if( key.equals( NAME_KEY ) )
  +        {
  +            return getName();
  +        }
  +        else if( key.equals( PARTITION_KEY ) )
  +        {
  +            return getPartitionName();
  +        }
  +        else if( key.equals( CLASSLOADER_KEY ) )
  +        {
  +            return getClassLoader();
  +        }
  +        else if( key.equals( HOME_KEY ) )
  +        {
  +            return getHomeDirectory();
  +        }
  +        else if( key.equals( TEMP_KEY ) )
  +        {
  +            return getTempDirectory();
  +        }
  +        else
  +        {
  +            Object object = m_map.get( key );
  +            if( null != object )
               {
  -                Object object = m_map.get( key );
  -                if( null != object )
  +                final String classname = object.getClass().getName();
  +                try
                   {
  -                    final String classname = object.getClass().getName();
  -                    try
  -                    {
  -                        return ((EntryModel)object).getValue();
  -                    }
  -                    catch( Throwable e )
  -                    {
  -                        final String error = 
  -                          REZ.getString( 
  -                            "deployment.context.runtime-get", 
  -                            key, classname );
  -                        throw new ModelRuntimeException( error, e );
  -                    }
  +                    return ((EntryModel)object).getValue();
                   }
  -                else
  +                catch( Throwable e )
                   {
                       final String error = 
                         REZ.getString( 
  -                        "deployment.context.runtime-get", key );
  -                    throw new ModelRuntimeException( error );
  +                        "deployment.context.runtime-get", 
  +                        key, classname );
  +                    throw new ModelRuntimeException( error, e );
                   }
               }
  -        }
  -        else
  -        {
  -            final String error = 
  -              REZ.getString( "deployment.context.invalid-key-request", alias );
  -            throw new ContextException( error );
  +            else
  +            {
  +                final String error = 
  +                  REZ.getString( 
  +                   "deployment.context.runtime-get", key );
  +                throw new ModelRuntimeException( error );
  +            }
           }
       }
   }
  
  
  
  1.16      +24 -14    
avalon-sandbox/merlin/composition/src/java/org/apache/avalon/composition/model/impl/DefaultDeploymentModel.java
  
  Index: DefaultDeploymentModel.java
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/merlin/composition/src/java/org/apache/avalon/composition/model/impl/DefaultDeploymentModel.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- DefaultDeploymentModel.java       19 Jul 2003 06:16:42 -0000      1.15
  +++ DefaultDeploymentModel.java       24 Jul 2003 13:14:54 -0000      1.16
  @@ -64,6 +64,7 @@
   import org.apache.avalon.composition.model.ClassLoaderModel;
   import org.apache.avalon.composition.model.ModelException;
   import org.apache.avalon.composition.model.SystemContext;
  +import org.apache.avalon.composition.data.DependencyDirective;
   import org.apache.avalon.composition.repository.Repository;
   import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.avalon.excalibur.i18n.Resources;
  @@ -117,7 +118,7 @@
   
       private final boolean m_contextDependent;
   
  -    private final DependencyModel m_dependencyModel;
  +    private final DependencyModel[] m_dependencies;
   
       //==============================================================
       // mutable state
  @@ -208,19 +209,28 @@
   
    
           //
  -        // create the dependency model for subsequent assembly
  +        // create the dependency models for subsequent assembly
           // management
           //
   
  -        m_dependencyModel = 
  -          new DefaultDependencyModel( 
  -            context.getLogger().getChildLogger( "deps" ), 
  -            context.getPartitionName(), 
  -            context.getProfile().getName(), 
  -            context.getType().getDependencies(),
  -            context.getProfile().getDependencyDirectives() );
  -
  -   }
  +        DependencyDescriptor[] dependencies = 
  +          m_context.getType().getDependencies();
  +        m_dependencies = new DefaultDependencyModel[ dependencies.length ];
  +
  +        for( int i=0; i<dependencies.length; i++ )
  +        {
  +            DependencyDescriptor descriptor = dependencies[i];
  +            DependencyDirective directive = 
  +              context.getProfile().getDependencyDirective( descriptor.getKey() );
  +            m_dependencies[i] = 
  +              new DefaultDependencyModel( 
  +                context.getLogger().getChildLogger( "deps" ), 
  +                context.getPartitionName(), 
  +                context.getProfile().getName(), 
  +                descriptor,
  +                directive );
  +        }
  +    }
   
       //==============================================================
       // Model
  @@ -511,9 +521,9 @@
       *
       * @return the dependency model
       */
  -    public DependencyModel getDependencyModel()
  +    public DependencyModel[] getDependencyModels()
       {
  -        return m_dependencyModel;
  +        return m_dependencies;
       }
   
   
  
  
  
  1.14      +3 -3      
avalon-sandbox/merlin/composition/src/java/org/apache/avalon/composition/model/impl/Resources.properties
  
  Index: Resources.properties
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/merlin/composition/src/java/org/apache/avalon/composition/model/impl/Resources.properties,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- Resources.properties      22 Jul 2003 04:11:57 -0000      1.13
  +++ Resources.properties      24 Jul 2003 13:14:54 -0000      1.14
  @@ -34,8 +34,8 @@
   deployment.context.runtime-get="Unable to resolve context value for key {0} due to 
an unexpected runtime error in: " {1}
   deployment.inconsitent-strategy.error=The custom contextualization strategy 
interface class [{0}] is not implemented by the component class [{1}].
   deployment.missing-strategy.error=The custom contextualization strategy interface 
class [{0}] declared by the class [{1}] is not present in the containment context 
classloader.
  -deployment.context.invalid-key-request=The requested context resolution for the key 
[{0}] cannot be performed because the component type does declare entry declaration as 
a key or alias.
  -deployment.context.internal.error=The context key [{0}] was recognized but could 
not be fulfilled as no context entry model has be assigned to handle the request.
  +deployment.context.invalid-key-request=The requested context resolution for the key 
[{0}] cannot be performed because the component type does declare an entry declaration 
as a key or alias.
  +deployment.context.internal.error=The context key [{0}] was recognized but could 
not be fulfilled as no context entry manager has be assigned to handle the request.
   deployment.registration.override.error=Illegal attempt to override an existing 
model entry [{0}].
   
   # DefaultSystemContext
  @@ -75,7 +75,7 @@
   # DefaultImportModel
   # ==================
   import.type-conflict.error=The object returned from the internal deployment context 
matching the import directive key: {0} does not implement the context entry class: {1} 
requested by the component under its local key: {2}.;
  -import.missing-entry.error=Cannot import context entry {0} requested for the 
component context entry key {1} because the requested import key is unknown within the 
scope of the supplied containment context.
  +import.missing-entry.error=Cannot import context entry [{0}] requested for the 
component context entry key [{1}] because the requested import key is unknown within 
the scope of the supplied containment context.
   import.load.error=Cannot load context entry for the component key: {0} because a 
corresponding import directive could not load the class {1} declared as a constraint 
by the component type entry declaration.
   import.null-object.error=Resolution of the include directive for the containment 
key {0} undeer the component context entry {1) return a null object reference. 
   
  
  
  
  1.8       +1 -1      avalon-sandbox/merlin/composition/src/test/conf/block.xml
  
  Index: block.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/composition/src/test/conf/block.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- block.xml 14 Jul 2003 04:49:36 -0000      1.7
  +++ block.xml 24 Jul 2003 13:14:55 -0000      1.8
  @@ -44,7 +44,7 @@
          <component name="test" 
class="org.apache.avalon.composition.model.teste.TestE">
            <context>
              <entry key="home">
  -             <import key="urn:avalon:home"/>
  +             <import key="urn:avalon:home.dir"/>
              </entry>
            </context>
          </component>
  
  
  
  1.4       +8 -19     
avalon-sandbox/merlin/composition/src/test/org/apache/avalon/composition/model/test/DependencyTestCase.java
  
  Index: DependencyTestCase.java
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/merlin/composition/src/test/org/apache/avalon/composition/model/test/DependencyTestCase.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DependencyTestCase.java   22 Jul 2003 04:11:57 -0000      1.3
  +++ DependencyTestCase.java   24 Jul 2003 13:14:55 -0000      1.4
  @@ -20,7 +20,7 @@
      // constructor
      //-------------------------------------------------------
   
  -    public DependencyTestCase( )
  +    public DependencyTestCase()
       {
           super( "dependency.xml" );
       }
  @@ -45,26 +45,15 @@
               fail( "null deployment model 'test-c'" );
           }
   
  -        DependencyModel dependencyModel = c.getDependencyModel();
  -        if( dependencyModel == null )
  -        {
  -            fail( "null dependency model" );
  -        }
  -
  -        DependencyDescriptor[] deps = dependencyModel.getDependencies();
  -        if( deps != null )
  -        {
  -            assertTrue( "dependency count", deps.length == 3 );
  -        }
  -        else
  -        {
  -            fail( "null dependency descriptor array" );
  -        }
  +        DependencyModel[] deps = c.getDependencyModels();
  +        assertTrue( "dependency count", deps.length == 3 );
   
           for( int i=0; i<deps.length; i++ )
           {
  -            String key = deps[i].getKey();
  -            assertNotNull( "selection for key: " + key, dependencyModel.getPath( 
key ) );
  +            DependencyModel dep = deps[i];
  +            String key = dep.getDependency().getKey();
  +            String path = dep.getPath();
  +            assertNotNull( "selection for key: " + key, path );
           }
  -    } 
  +    }
   }
  
  
  
  1.2       +21 -1     
avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/data/DeploymentProfile.java
  
  Index: DeploymentProfile.java
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/data/DeploymentProfile.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DeploymentProfile.java    17 Jul 2003 21:21:58 -0000      1.1
  +++ DeploymentProfile.java    24 Jul 2003 13:14:55 -0000      1.2
  @@ -258,6 +258,26 @@
       }
   
       /**
  +     * Return the dependency directive for a supplied key.
  +     *
  +     * @return the matching DependencyDirective (possibly null if 
  +     *   no directive is declared for the given key)
  +     */
  +    public DependencyDirective getDependencyDirective( final String key )
  +    {
  +        DependencyDirective[] directives = getDependencyDirectives();
  +        for( int i=0; i<directives.length; i++ )
  +        {
  +            DependencyDirective directive = directives[i];
  +            if( directive.getKey().equals( key ) )
  +            {
  +                return directive;
  +            }
  +        }
  +        return null;
  +    }
  +
  +    /**
        * Return the Parameters for the profile.
        *
        * @return the Parameters for Component (if any).
  
  
  
  1.3       +8 -1      
avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/model/ContextModel.java
  
  Index: ContextModel.java
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/model/ContextModel.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ContextModel.java 14 Jul 2003 04:37:02 -0000      1.2
  +++ ContextModel.java 24 Jul 2003 13:14:55 -0000      1.3
  @@ -61,6 +61,13 @@
    */
   public interface ContextModel
   {
  +    /**
  +     * The default context strategy interface class.
  +     */
  +    public static final String DEFAULT_STRATEGY_CLASSNAME = 
  +      "org.apache.avalon.framework.context.Contextualizable";
  +
  +
      /**
       * Return the class representing the contextualization 
       * stage interface.
  
  
  
  1.3       +13 -13    
avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/model/DependencyModel.java
  
  Index: DependencyModel.java
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/model/DependencyModel.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DependencyModel.java      22 Jul 2003 04:11:57 -0000      1.2
  +++ DependencyModel.java      24 Jul 2003 13:14:55 -0000      1.3
  @@ -54,7 +54,9 @@
   import org.apache.avalon.meta.info.ServiceDescriptor;
   
   /**
  - * Dependency model defintion.
  + * Dependency model handles the establishment of an explicit source 
  + * provider defintion and functionality dealing with service provider 
  + * selection based on service qualification.
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Avalon Development Team</a>
    * @version $Revision$ $Date$
  @@ -62,34 +64,32 @@
   public interface DependencyModel
   {
      /**
  -    * Return the set of dependecies for the model.
  +    * Return the dependencies for the model.
       *
  -    * @return the the set of descriptors declaring the component 
  -    *    dependencies
  +    * @return the descriptors declaring the component 
  +    *    dependency
       */
  -    DependencyDescriptor[] getDependencies();
  +    DependencyDescriptor getDependency();
   
      /**
  -    * Return an explicit path to a component relative to a supplied 
  -    * dependency key.  If a dependency directive has been declared
  +    * Return an explicit path to a component.  
  +    * If a dependency directive has been declared
       * and the directive contains a source declaration, the value 
       * returned is the result of parsing the source value relative 
       * to the absolute address of the implementing component.
       *
       * @return the explicit path
  -    * @exception IllegalArgumentException if the key is unknown
       */
  -    String getPath( String key ) throws IllegalArgumentException;
  +    String getPath();
   
      /**
       * Filter a set of candidate service descriptors and return the 
  -    * set of acceptable service as a andered sequence.
  +    * set of acceptable service as a ordered sequence.
       *
  -    * @param key the dependency key
       * @param candidates the set of candidate services for the dependency
       *    matching the supplied key
       * @return the accepted candidates in ranked order
       */
  -    ServiceDescriptor[] filter( String key, ServiceDescriptor[] candidates );
  +    ServiceDescriptor[] filter( ServiceDescriptor[] candidates );
   
   }
  
  
  
  1.9       +4 -4      
avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/model/DeploymentModel.java
  
  Index: DeploymentModel.java
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/model/DeploymentModel.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DeploymentModel.java      19 Jul 2003 05:25:35 -0000      1.8
  +++ DeploymentModel.java      24 Jul 2003 13:14:55 -0000      1.9
  @@ -182,10 +182,10 @@
       ContextModel getContextModel();
   
      /**
  -    * Return the dependency model for this deployment model.
  +    * Return the dependency models for this deployment model.
       *
  -    * @return the dependency model
  +    * @return the dependency models
       */
  -    DependencyModel getDependencyModel();
  +    DependencyModel[] getDependencyModels();
   
   }
  
  
  
  1.19      +4 -2      
avalon-sandbox/merlin/merlin-core/src/java/org/apache/avalon/merlin/block/impl/StandardBlockLoader.java
  
  Index: StandardBlockLoader.java
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/merlin/merlin-core/src/java/org/apache/avalon/merlin/block/impl/StandardBlockLoader.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- StandardBlockLoader.java  19 Jul 2003 01:54:38 -0000      1.18
  +++ StandardBlockLoader.java  24 Jul 2003 13:14:55 -0000      1.19
  @@ -693,13 +693,15 @@
           String classname = StandardBlock.class.getName();
           final Version version = 
             Version.getVersion( info.getChild( "version" ).getValue( "1.0" ) );
  +        final String schema = 
  +          info.getChild( "schema" ).getValue( null );
   
           try
           {
               final Properties attributes = 
                 CREATOR.buildAttributes( info.getChild( "attributes" ) ); 
               return new InfoDescriptor( 
  -              name, classname, version, InfoDescriptor.SINGLETON, attributes ); 
  +              name, classname, version, InfoDescriptor.SINGLETON, schema, 
attributes ); 
           }
           catch( Throwable e )
           {
  
  
  
  1.13      +0 -2      avalon-sandbox/merlin/merlin-platform/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-platform/project.xml,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- project.xml       19 Jul 2003 01:54:39 -0000      1.12
  +++ project.xml       24 Jul 2003 13:14:55 -0000      1.13
  @@ -46,7 +46,6 @@
         <version>SNAPSHOT</version>
       </dependency>
   
  -    <!--
       <dependency>
         <groupId>avalon</groupId>
         <artifactId>avalon-activation-spi</artifactId>
  @@ -57,7 +56,6 @@
         <artifactId>avalon-activation</artifactId>
         <version>1.0</version>
       </dependency>
  -    -->
   
       <dependency>
         <groupId>avalon</groupId>
  
  
  

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

Reply via email to