avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: avalon-sandbox/merlin/merlin-core/src/java/org/apache/avalon/merlin/kernel/impl DefaultKernel.java
Date Sun, 13 Apr 2003 02:37:06 GMT
mcconnell    2003/04/12 19:37:06

  Modified:    merlin/merlin-core project.xml
               merlin/merlin-core/src/java/org/apache/avalon/merlin/container/builder
                        ContainerBuilder.java ContainerCreator.java
                        XMLContainerCreator.java
               merlin/merlin-core/src/java/org/apache/avalon/merlin/container/impl
                        DefaultContainer.java DefaultContainer.xinfo
               merlin/merlin-core/src/java/org/apache/avalon/merlin/kernel/impl
                        DefaultKernel.java
  Log:
  Improving terminology.
  
  Revision  Changes    Path
  1.4       +0 -13     avalon-sandbox/merlin/merlin-core/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-core/project.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- project.xml	29 Mar 2003 06:56:46 -0000	1.3
  +++ project.xml	13 Apr 2003 02:37:06 -0000	1.4
  @@ -187,19 +187,6 @@
       <!-- Integration unit test classes -->
       <integrationUnitTestPatterns></integrationUnitTestPatterns>
   
  -    <resources>
  -      <resource>
  -        <directory>${basedir}/src/java</directory> 
  -        <includes>
  -          <include>**/*.properties</include>
  -          <include>**/*.xinfo</include>
  -          <include>**/*.xconfig</include>
  -          <include>**/*.xml</include>
  -          <include>**/*.xservice</include>
  -        </includes>
  -      </resource>
  -    </resources>
  -
       <jars></jars>
   
     </build>
  
  
  
  1.2       +8 -8      avalon-sandbox/merlin/merlin-core/src/java/org/apache/avalon/merlin/container/builder/ContainerBuilder.java
  
  Index: ContainerBuilder.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-core/src/java/org/apache/avalon/merlin/container/builder/ContainerBuilder.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ContainerBuilder.java	13 Mar 2003 01:05:06 -0000	1.1
  +++ ContainerBuilder.java	13 Apr 2003 02:37:06 -0000	1.2
  @@ -58,12 +58,12 @@
   import java.io.InputStream;
   import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.avalon.excalibur.i18n.Resources;
  -import org.apache.avalon.merlin.container.ContainerDescriptor;
  +import org.apache.avalon.merlin.container.ContainmentProfile;
   import org.apache.avalon.merlin.container.ContainerRuntimeException;
   import org.apache.avalon.meta.info.Type;
   
   /**
  - * A ContainerCreator is responsible for building {@link ContainerDescriptor}
  + * A ContainerCreator is responsible for building {@link ContainmentProfile}
    * objects from Configuration objects.
    *
    * @author <a href="mailto:dev@avalon.apache.org">Avalon Development Team</a>
  @@ -78,7 +78,7 @@
   
       public ContainerBuilder() throws Exception
       {
  -        this( ContainerDescriptor.class );
  +        this( ContainmentProfile.class );
       }
   
      /**
  @@ -92,14 +92,14 @@
       }
   
       /**
  -     * Build ContainerDescriptor from the XML descriptor format.
  +     * Build ContainmentProfile from the XML descriptor format.
        *
        * @param loader the ClassLoader to load info from
        * @param type the Type on which the profile is based
  -     * @return the created ContainerDescriptor
  +     * @return the created ContainmentProfile
        * @throws Exception if an error occurs
        */
  -    public ContainerDescriptor[] build( ClassLoader loader, Type type )
  +    public ContainmentProfile[] build( ClassLoader loader, Type type )
           throws Exception
       {
           final String xprofile =
  @@ -108,7 +108,7 @@
               loader.getResourceAsStream( xprofile );
   
           final ContainerCreator creator = getXMLContainerCreator( xprofile );
  -        return creator.createPackagedContainerDescriptors( loader, type, inputStream );
  +        return creator.createPackagedContainmentProfiles( loader, type, inputStream );
       }
   
       /**
  
  
  
  1.2       +8 -8      avalon-sandbox/merlin/merlin-core/src/java/org/apache/avalon/merlin/container/builder/ContainerCreator.java
  
  Index: ContainerCreator.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-core/src/java/org/apache/avalon/merlin/container/builder/ContainerCreator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ContainerCreator.java	13 Mar 2003 01:05:07 -0000	1.1
  +++ ContainerCreator.java	13 Apr 2003 02:37:06 -0000	1.2
  @@ -57,11 +57,11 @@
   
   import java.io.InputStream;
   import org.apache.avalon.framework.configuration.Configuration;
  -import org.apache.avalon.merlin.container.ContainerDescriptor;
  +import org.apache.avalon.merlin.container.ContainmentProfile;
   import org.apache.avalon.meta.info.Type;
   
   /**
  - * Simple interface used to create {@link ContainerDescriptor}
  + * Simple interface used to create {@link ContainmentProfile}
    * from stream or Configuration sorce.
    *
    * @author <a href="mailto:dev@avalon.apache.org">Avalon Development Team</a>
  @@ -70,28 +70,28 @@
   public interface ContainerCreator
   {
       /**
  -     * Create a set of packaged {@link ContainerDescriptor}
  +     * Create a set of packaged {@link ContainmentProfile}
        * instances from stream
        *
        * @param loader the classloader
        * @param type the base type
        * @param inputStream the stream that the resource is loaded from
  -     * @return the newly created {@link ContainerDescriptor} array
  +     * @return the newly created {@link ContainmentProfile} array
        * @throws Exception if an error occurs while creating the descriptor
        */
  -    ContainerDescriptor[] createPackagedContainerDescriptors(
  +    ContainmentProfile[] createPackagedContainmentProfiles(
           ClassLoader loader, Type type, InputStream inputStream )
           throws Exception;
   
       /**
  -     * Create an explicit {@link ContainerDescriptor} instances from
  +     * Create an explicit {@link ContainmentProfile} instances from
        *   a configuration.
        * @param type the component type
        * @param config the profile description
        * @return the profile
        * @exception Exception if an error occurs during descriptor creation
        */
  -    ContainerDescriptor createContainerDescriptor(
  +    ContainmentProfile createContainmentProfile(
           Type type, Configuration config )
           throws Exception;
   
  
  
  
  1.3       +26 -26    avalon-sandbox/merlin/merlin-core/src/java/org/apache/avalon/merlin/container/builder/XMLContainerCreator.java
  
  Index: XMLContainerCreator.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-core/src/java/org/apache/avalon/merlin/container/builder/XMLContainerCreator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XMLContainerCreator.java	2 Apr 2003 15:57:14 -0000	1.2
  +++ XMLContainerCreator.java	13 Apr 2003 02:37:06 -0000	1.3
  @@ -85,7 +85,7 @@
   import org.apache.avalon.assembly.logging.FileTargetProvider;
   import org.apache.avalon.assembly.logging.TargetDescriptor;
   import org.apache.avalon.assembly.logging.TargetProvider;
  -import org.apache.avalon.merlin.container.ContainerDescriptor;
  +import org.apache.avalon.merlin.container.ContainmentProfile;
   import org.xml.sax.InputSource;
   
   /**
  @@ -106,7 +106,7 @@
   
       public XMLContainerCreator()
       {
  -        this( ContainerDescriptor.class );
  +        this( ContainmentProfile.class );
       }
   
      /**
  @@ -121,7 +121,7 @@
       }
   
       /**
  -     * Create an array of packaged {@link ContainerDescriptor} objects for specified
  +     * Create an array of packaged {@link ContainmentProfile} objects for specified
        * container type, loaded from specified {@link InputStream}.  If the
        * input stream is null, an implicit profile will be created.
        *
  @@ -131,7 +131,7 @@
        * @return the created set of container profiles
        * @throws Exception if an error occurs
        */
  -    public ContainerDescriptor[] createPackagedContainerDescriptors(
  +    public ContainmentProfile[] createPackagedContainmentProfiles(
           ClassLoader loader, Type type, InputStream inputStream )
           throws Exception
       {
  @@ -140,49 +140,49 @@
               final InputSource input = new InputSource( inputStream );
               final Configuration configuration =
                   ConfigurationBuilder.build( input );
  -            return createPackagedContainerDescriptors(
  +            return createPackagedContainmentProfiles(
                   loader, type, configuration );
           }
           else
           {
  -            ContainerDescriptor profile =
  -                createImplicitContainerDescriptor( type );
  -            return new ContainerDescriptor[]{profile};
  +            ContainmentProfile profile =
  +                createImplicitContainmentProfile( type );
  +            return new ContainmentProfile[]{profile};
           }
       }
   
       /**
  -     * Create an explicit {@link ContainerDescriptor} instance from a
  +     * Create an explicit {@link ContainmentProfile} instance from a
        *   configuration.
        * @param type the component type
        * @param config the profile description
        * @return the profile
        * @exception Exception if an error occurs during profile creation
        */
  -    public ContainerDescriptor createContainerDescriptor(
  +    public ContainmentProfile createContainmentProfile(
           Type type, Configuration config )
           throws Exception
       {
  -        return createContainerDescriptor( type, config, "container" );
  +        return createContainmentProfile( type, config, "container" );
       }
   
   
       /**
  -     * Create an explicit {@link ContainerDescriptor} instance from a
  +     * Create an explicit {@link ContainmentProfile} instance from a
        *   configuration.
        * @param type the component type
        * @param config the profile description
        * @return the profile
        * @exception Exception if an error occurs during profile creation
        */
  -    public ContainerDescriptor createContainerDescriptor(
  +    public ContainmentProfile createContainmentProfile(
           Type type, Configuration config, String name )
           throws Exception
       {
  -        return buildContainerDescriptor( type, config, Mode.EXPLICIT, name );
  +        return buildContainmentProfile( type, config, Mode.EXPLICIT, name );
       }
   
  -    private ContainerDescriptor buildContainerDescriptor(
  +    private ContainmentProfile buildContainmentProfile(
           Type type, Configuration profile, Mode mode, String defaultName )
           throws Exception
       {
  @@ -205,13 +205,13 @@
           // create the profile instance
           //
   
  -        return (ContainerDescriptor) getConstructor().newInstance(
  +        return (ContainmentProfile) getConstructor().newInstance(
             new Object[]{
               name, params, config, context, categories, type, mode } );
       }
   
       /**
  -     * Create an array of {@link ContainerDescriptor} object for specified
  +     * Create an array of {@link ContainmentProfile} object for specified
        * type from configuration data associated with a single type.
        *
        * @param loader the classloader to use
  @@ -220,7 +220,7 @@
        * @return the created set of profiles
        * @throws ConfigurationException if an error occurs
        */
  -    private ContainerDescriptor[] createPackagedContainerDescriptors(
  +    private ContainmentProfile[] createPackagedContainmentProfiles(
           ClassLoader loader, Type type, final Configuration info )
           throws Exception
       {
  @@ -228,18 +228,18 @@
           Configuration[] profiles = getComponentProfiles( info );
           if( profiles.length == 0 )
           {
  -            ContainerDescriptor profile =
  -                createImplicitContainerDescriptor( type );
  -            return new ContainerDescriptor[]{profile};
  +            ContainmentProfile profile =
  +                createImplicitContainmentProfile( type );
  +            return new ContainmentProfile[]{profile};
           }
           for( int i = 0; i < profiles.length; i++ )
           {
               vector.add(
  -                buildContainerDescriptor(
  +                buildContainmentProfile(
                       type, profiles[ i ], Mode.PACKAGED, "package-" + i ) );
           }
   
  -        return (ContainerDescriptor[])vector.toArray(
  +        return (ContainmentProfile[])vector.toArray(
                (Object[]) Array.newInstance( m_clazz, 0 )  );
       }
   
  @@ -259,7 +259,7 @@
           return (Configuration[]) vector.toArray( new Configuration[0] );
       }
   
  -    private ContainerDescriptor createImplicitContainerDescriptor( Type type )
  +    private ContainmentProfile createImplicitContainmentProfile( Type type )
           throws Exception
       {
           ContextDirective context = new ContextDirective(
  @@ -272,7 +272,7 @@
           final ClasspathDescriptor classpath =
               new ClasspathDescriptor();
   
  -        return (ContainerDescriptor) getConstructor().newInstance(
  +        return (ContainmentProfile) getConstructor().newInstance(
             new Object[]{
               null, null, defaults, context, categories, type, Mode.IMPLICIT } );
       }
  
  
  
  1.2       +4 -4      avalon-sandbox/merlin/merlin-core/src/java/org/apache/avalon/merlin/container/impl/DefaultContainer.java
  
  Index: DefaultContainer.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-core/src/java/org/apache/avalon/merlin/container/impl/DefaultContainer.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultContainer.java	13 Mar 2003 01:05:09 -0000	1.1
  +++ DefaultContainer.java	13 Apr 2003 02:37:06 -0000	1.2
  @@ -80,7 +80,7 @@
   import org.apache.avalon.framework.activity.Startable;
   import org.apache.avalon.merlin.container.Container;
   import org.apache.avalon.merlin.container.ContainerException;
  -import org.apache.avalon.merlin.container.ContainerDescriptor;
  +import org.apache.avalon.merlin.container.ContainmentProfile;
   import org.apache.avalon.merlin.container.StateEvent;
   import org.apache.avalon.merlin.container.StateListener;
   import org.apache.avalon.meta.model.Profile;
  @@ -102,7 +102,7 @@
   
       private DependencyGraph m_graph;
   
  -    private ContainerDescriptor m_descriptor;
  +    private ContainmentProfile m_descriptor;
   
      /**
       * Map of components keyed by appliance.
  @@ -135,7 +135,7 @@
       */
       public void contextualize( Context context ) throws ContextException
       {
  -        m_descriptor = (ContainerDescriptor) context.get( "urn:merlin:container.descriptor"
);
  +        m_descriptor = (ContainmentProfile) context.get( "urn:merlin:container.descriptor"
);
           m_graph = (DependencyGraph) context.get( "urn:merlin:container.dependency-graph"
);
           addStateListener( (StateListener) context.get( "urn:merlin:container.listener"
) ); 
       }
  
  
  
  1.2       +1 -1      avalon-sandbox/merlin/merlin-core/src/java/org/apache/avalon/merlin/container/impl/DefaultContainer.xinfo
  
  Index: DefaultContainer.xinfo
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-core/src/java/org/apache/avalon/merlin/container/impl/DefaultContainer.xinfo,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultContainer.xinfo	13 Mar 2003 01:05:09 -0000	1.1
  +++ DefaultContainer.xinfo	13 Apr 2003 02:37:06 -0000	1.2
  @@ -21,7 +21,7 @@
   
     <context>
       <entry key="urn:merlin:container.descriptor"
  -      type="org.apache.avalon.merlin.container.ContainerDescriptor"/>
  +      type="org.apache.avalon.merlin.container.ContainmentProfile"/>
       <entry key="urn:merlin:container.listener"
         type="org.apache.avalon.merlin.container.StateListener"/>
       <entry key="urn:merlin:container.dependency-graph"
  
  
  
  1.6       +4 -21     avalon-sandbox/merlin/merlin-core/src/java/org/apache/avalon/merlin/kernel/impl/DefaultKernel.java
  
  Index: DefaultKernel.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-core/src/java/org/apache/avalon/merlin/kernel/impl/DefaultKernel.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DefaultKernel.java	10 Apr 2003 14:19:49 -0000	1.5
  +++ DefaultKernel.java	13 Apr 2003 02:37:06 -0000	1.6
  @@ -82,6 +82,8 @@
   import org.apache.avalon.assembly.appliance.ApplianceContext;
   import org.apache.avalon.assembly.appliance.DefaultApplianceContext;
   import org.apache.avalon.assembly.appliance.DependencyGraph;
  +import org.apache.avalon.assembly.appliance.ApplianceRepository;
  +import org.apache.avalon.assembly.appliance.DefaultApplianceRepository;
   import org.apache.avalon.assembly.locator.Contextualizable;
   import org.apache.avalon.assembly.locator.Locator;
   import org.apache.avalon.assembly.locator.DefaultLocator;
  @@ -460,7 +462,7 @@
   
           if( getLogger().isInfoEnabled() )
           {
  -            getLogger().info( "initialization from: " + m_home + " on " + m_domain );
  +            getLogger().info( "initialization: " + m_domain );
           }
   
           //
  @@ -623,25 +625,6 @@
               }
               throw new KernelException( error, e );
           }
  -
  -        /*
  -        if( getLogger().isDebugEnabled() )
  -        {
  -            StringBuffer buffer = new StringBuffer( "listing declared hierachy\n" );
  -
  -            //
  -            // list the block URLs
  -            //
  -
  -            URL[] urls = block.getURLs();
  -            for( int i=0; i<urls.length; i++ )
  -            {
  -                buffer.append( "\n  " + urls[i].toString() );
  -            }
  -            buffer.append( "\n" );
  -            getLogger().debug( buffer.toString() );
  -        }
  -        */
   
           try
           {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message