You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by mc...@apache.org on 2003/03/07 08:48:45 UTC

cvs commit: avalon-sandbox/assembly/src/test/org/apache/avalon/playground/factory CustomComponent.xinfo

mcconnell    2003/03/06 23:48:45

  Modified:    assembly build.xml default.properties
               assembly/src/java/org/apache/avalon/assembly/appliance
                        ContextBuilder.java DefaultAppliance.java
                        DefaultApplianceFactory.java
               assembly/src/java/org/apache/avalon/assembly/engine
                        DefaultRepositoryManager.java
                        EngineClassLoader.java
               assembly/src/java/org/apache/avalon/assembly/engine/profile
                        package.html
               assembly/src/java/org/apache/avalon/assembly/engine/service
                        package.html
               assembly/src/java/org/apache/avalon/assembly/engine/type
                        package.html
               assembly/src/java/org/apache/avalon/assembly/lifecycle
                        DefaultDeploymentService.java
               assembly/src/java/org/apache/avalon/assembly/lifecycle/context
                        DefaultCompositionService.java
                        WrapperComponentManager.java
               assembly/src/java/org/apache/avalon/assembly/lifestyle
                        DefaultLifestyleService.java
               assembly/src/test/org/apache/avalon/assembly TestBase.java
               assembly/src/test/org/apache/avalon/assembly/engine
                        ApplianceTestCase.java
               assembly/src/test/org/apache/avalon/assembly/engine/profile
                        ProfileManagerTestCase.java
               assembly/src/test/org/apache/avalon/assembly/engine/type
                        TypeManagerTestCase.java
               assembly/src/test/org/apache/avalon/playground/factory
                        CustomComponent.xinfo
  Added:       assembly/src/java/org/apache/avalon/assembly/engine/service
                        StandardServiceManager.java
               assembly/src/java/org/apache/avalon/assembly/engine/type
                        StandardTypeManager.java
  Removed:     assembly/src/java/org/apache/avalon/assembly/appliance
                        Appliance.java ApplianceContext.java
                        ApplianceException.java ApplianceFactory.java
                        ApplianceRepository.java
                        ApplianceRuntimeException.java
                        ApplianceSelector.java DependencyGraph.java
                        DuplicateApplianceException.java
               assembly/src/java/org/apache/avalon/assembly/engine
                        Engine.java EngineException.java
                        EngineRuntimeException.java RepositoryManager.java
               assembly/src/java/org/apache/avalon/assembly/engine/model
                        Classpath.java ClasspathDescriptor.java
                        ClasspathRuntimeException.java
                        FilesetDescriptor.java IncludeDescriptor.java
                        LibraryDescriptor.java
               assembly/src/java/org/apache/avalon/assembly/engine/profile
                        DuplicateProfileException.java
                        ProfileException.java ProfileManager.java
                        ProfileSelector.java UnknownProfileException.java
               assembly/src/java/org/apache/avalon/assembly/engine/service
                        DuplicateServiceException.java
                        ServiceException.java ServiceRepository.java
                        ServiceRuntimeException.java
                        UnknownServiceException.java
               assembly/src/java/org/apache/avalon/assembly/engine/type
                        DuplicateTypeException.java TypeException.java
                        TypeManager.java TypeRuntimeException.java
                        UnknownTypeException.java
               assembly/src/java/org/apache/avalon/assembly/locator
                        Contextualizable.java Locator.java
                        LocatorException.java Reclaimable.java
                        Resolvable.java
               assembly/src/java/org/apache/avalon/assembly/logging
                        LoggerException.java LoggingDescriptor.java
                        LoggingManager.java TargetDescriptor.java
                        TargetProvider.java
  Log:
  Moving SPI interfaces and classes to assembly-spi package.
  
  Revision  Changes    Path
  1.21      +14 -3     avalon-sandbox/assembly/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/build.xml,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- build.xml	19 Feb 2003 19:44:39 -0000	1.20
  +++ build.xml	7 Mar 2003 07:48:41 -0000	1.21
  @@ -24,6 +24,7 @@
       <pathelement location="${avalon-framework.jar}"/>
       <pathelement location="${excalibur-i18n.jar}"/>
       <pathelement location="${avalon-meta.jar}"/>
  +    <pathelement location="${avalon-assembly-spi.jar}"/>
       <pathelement location="${avalon-lifecycle.jar}"/>
       <pathelement location="${excalibur-extension.jar}"/>
       <pathelement location="${excalibur-configuration.jar}"/>
  @@ -533,9 +534,19 @@
   
     <target name="patch">
       <replace dir="src" summary="true"
  -       token="-2002 The Apache Software Foundation"
  -       value="-2003 The Apache Software Foundation" >
  -     <include name="**/*.java"/>
  +       token="TypeManager"
  +       value="StandardTypeManager" >
  +     <include name="**/*.*"/>
  +    </replace>
  +    <replace dir="src" summary="true"
  +       token="ProfileManager"
  +       value="StandardProfileManager" >
  +     <include name="**/*.*"/>
  +    </replace>
  +    <replace dir="src" summary="true"
  +       token="ServiceRepository"
  +       value="StandardServiceManager" >
  +     <include name="**/*.*"/>
       </replace>
     </target>
   
  
  
  
  1.20      +5 -0      avalon-sandbox/assembly/default.properties
  
  Index: default.properties
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/default.properties,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- default.properties	19 Feb 2003 19:38:25 -0000	1.19
  +++ default.properties	7 Mar 2003 07:48:41 -0000	1.20
  @@ -88,6 +88,11 @@
   avalon-meta.lib=${avalon-meta.home}/build/lib
   avalon-meta.jar=${avalon-meta.lib}/avalon-meta-1.0.jar
   
  +# ----- Avalon Meta -----
  +avalon-assembly-spi.home=${avalon-sandbox.home}/assembly-spi
  +avalon-assembly-spi.lib=${avalon-assembly-spi.home}/build/lib
  +avalon-assembly-spi.jar=${avalon-assembly-spi.lib}/avalon-assembly-spi-1.0.jar
  +
   # ----- Avalon Lifecycle -----
   avalon-lifecycle.home=${avalon-sandbox.home}/lifecycle
   avalon-lifecycle.lib=${avalon-lifecycle.home}/build/lib
  
  
  
  1.7       +1 -2      avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/appliance/ContextBuilder.java
  
  Index: ContextBuilder.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/appliance/ContextBuilder.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ContextBuilder.java	27 Feb 2003 23:06:38 -0000	1.6
  +++ ContextBuilder.java	7 Mar 2003 07:48:42 -0000	1.7
  @@ -59,7 +59,6 @@
   import org.apache.avalon.framework.context.ContextException;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.avalon.framework.service.ServiceManager;
  -import org.apache.avalon.framework.service.DefaultServiceManager;
   import org.apache.avalon.framework.service.ServiceException;
   import org.apache.avalon.framework.service.Serviceable;
   import org.apache.avalon.assembly.appliance.Appliance;
  
  
  
  1.38      +18 -19    avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/appliance/DefaultAppliance.java
  
  Index: DefaultAppliance.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/appliance/DefaultAppliance.java,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- DefaultAppliance.java	6 Mar 2003 09:10:20 -0000	1.37
  +++ DefaultAppliance.java	7 Mar 2003 07:48:42 -0000	1.38
  @@ -74,7 +74,6 @@
   import org.apache.avalon.assembly.lifestyle.LifestyleService;
   import org.apache.avalon.assembly.lifestyle.LifestyleHandler;
   import org.apache.avalon.assembly.lifecycle.AssemblyService;
  -import org.apache.avalon.assembly.lifecycle.AssemblyException;
   import org.apache.avalon.assembly.locator.Locator;
   import org.apache.avalon.assembly.locator.Contextualizable;
   import org.apache.avalon.assembly.locator.LocatorException;
  @@ -117,8 +116,8 @@
    * 
    *    {@link Engine} engine = (Engine) Thread.currentThread().getContextClassLoader();
    *    {@link RepositoryManager} repository = engine.getRepository();
  - *    {@link Type} type = repository.getTypeManager().getType( "MyComponent" );
  - *    {@link Profile} profile = repository.getProfileManager().getProfile( type );
  + *    {@link Type} type = repository.getStandardTypeManager().getType( "MyComponent" );
  + *    {@link Profile} profile = repository.getStandardProfileManager().getProfile( type );
    *    {@link DefaultApplianceContext} context = new DefaultApplianceContext( profile );
    *    context.makeReadOnly();
    *
  @@ -361,7 +360,7 @@
               {
                   assemble();
               }
  -            catch( AssemblyException ae )
  +            catch( ApplianceException ae )
               {
                   final String error = 
                     "Unable to resolve service due to a self assembly failure in applaince: " + this;
  @@ -560,9 +559,9 @@
   
      /**
       * Assemble the appliance.
  -    * @exception AssemblyException if an error occurs during appliance assembly
  +    * @exception ApplianceException if an error occurs during appliance assembly
       */
  -    public void assemble() throws AssemblyException
  +    public void assemble() throws ApplianceException
       {
           assemble( new DependencyGraph() );
       }
  @@ -570,10 +569,10 @@
      /**
       * Assemble the appliance.
       * @param graph the dependency graph
  -    * @exception AssemblyException if an error occurs during appliance assembly
  +    * @exception ApplianceException if an error occurs during appliance assembly
       * @exception NullPointerException if the supplied graph is null
       */
  -    public void assemble( DependencyGraph graph ) throws AssemblyException
  +    public void assemble( DependencyGraph graph ) throws ApplianceException
       {
           if( m_assembled )
           {
  @@ -666,7 +665,7 @@
       * Build the context map.
       * @exception AssemblyException if an error occurs during context creation
       */
  -    private Map buildContextMap() throws AssemblyException
  +    private Map buildContextMap() throws ApplianceException
       {
           ContextDescriptor descriptor = getType().getContext();
   
  @@ -722,7 +721,7 @@
           {
               final String error = 
                 "Unexpected exception while preparing deployment context in appliance: " + this;
  -            throw new AssemblyException( error, e );
  +            throw new ApplianceException( error, e );
           }
   
           //
  @@ -742,7 +741,7 @@
           {
               final String error = 
                 "Unable to create context map in appliance: " + this;
  -            throw new AssemblyException( error, e );
  +            throw new ApplianceException( error, e );
           }
       }
   
  @@ -850,7 +849,7 @@
           m_handler.terminate();
       }
   
  -    private void executeAssembly( DependencyGraph graph ) throws AssemblyException
  +    private void executeAssembly( DependencyGraph graph ) throws ApplianceException
       {
           getLogger().debug( "assembly: " + this );
           m_visited.add( this );
  @@ -876,14 +875,14 @@
                   final String error =
                      "Unable to resolve a supplier for a context stage: " + ext
                      + " in appliance: " + this;
  -                throw new AssemblyException( error, e );
  +                throw new ApplianceException( error, e );
               }
               if( supplier == null )
               {
                   final String error =
                     "Unresolved context strategy handler: " + ext;
                   setEnabled( false );
  -                throw new AssemblyException( error );
  +                throw new ApplianceException( error );
               }
               else
               {
  @@ -926,7 +925,7 @@
                         "Unable to deploy a supplier for a service dependency." 
                         + "\n  appliance: " + this
                         + "\n  dependency: " + dependency;
  -                    throw new AssemblyException( error, e );
  +                    throw new ApplianceException( error, e );
                   }
   
                   if( supplier == null )
  @@ -937,7 +936,7 @@
                           + ", for the role: " + dependency.getRole();
   
                       setEnabled( false );
  -                    throw new AssemblyException( message );
  +                    throw new ApplianceException( message );
                   }
   
                   //
  @@ -974,7 +973,7 @@
                   {
                       final String error =
                         "Unable to resolve a supplier for a stage: " + stage;
  -                    throw new AssemblyException( error, e );
  +                    throw new ApplianceException( error, e );
                   }
   
                   if( supplier == null )
  @@ -982,7 +981,7 @@
                       final String message =
                         "Unresolved supplied for the stage: " + stage;
                       setEnabled( false );
  -                    throw new AssemblyException( message );
  +                    throw new ApplianceException( message );
                   }
   
                   //
  
  
  
  1.13      +24 -16    avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/appliance/DefaultApplianceFactory.java
  
  Index: DefaultApplianceFactory.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/appliance/DefaultApplianceFactory.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- DefaultApplianceFactory.java	28 Feb 2003 06:09:15 -0000	1.12
  +++ DefaultApplianceFactory.java	7 Mar 2003 07:48:42 -0000	1.13
  @@ -62,10 +62,9 @@
   import org.apache.avalon.framework.context.Context;
   import org.apache.avalon.framework.context.ContextException;
   import org.apache.avalon.framework.configuration.Configuration;
  -import org.apache.avalon.framework.service.DefaultServiceManager;
  -import org.apache.avalon.framework.service.DefaultServiceManager;
   import org.apache.avalon.assembly.lifestyle.LifestyleException;
   import org.apache.avalon.assembly.lifecycle.AssemblyException;
  +import org.apache.avalon.assembly.engine.Engine;
   import org.apache.avalon.assembly.engine.EngineClassLoader;
   import org.apache.avalon.assembly.lifestyle.LifestyleService;
   import org.apache.avalon.assembly.lifestyle.DefaultLifestyleService;
  @@ -132,7 +131,7 @@
       * @exception ApplianceException if a creation error occurs
       */
       public static ApplianceFactory createApplianceFactory( 
  -      EngineClassLoader loader, String classname, Logger logger, 
  +      Engine loader, String classname, Logger logger, 
         ApplianceRepository repository, Locator system ) 
         throws ApplianceException
       {
  @@ -172,9 +171,12 @@
             
           try
           {
  -            Type type = loader.getRepository().getTypeManager().getType( classname );
  -            Profile profile = loader.getRepository().getProfileManager().getProfile( type );
  -            DefaultApplianceContext context = new DefaultApplianceContext( profile );
  +            Type type = loader.getRepository().getTypeManager()
  +               .getType( classname );
  +            Profile profile = loader.getRepository().getProfileManager()
  +               .getProfile( type );
  +            DefaultApplianceContext context = 
  +               new DefaultApplianceContext( profile );
               context.put( "urn:assembly:appliance.repository", repository );
               context.put( "urn:assembly:logging", system.get( "urn:assembly:logging" ) );
               context.makeReadOnly();
  @@ -189,7 +191,7 @@
               {
                   final String error = 
                     "Supplied classname '" + classname 
  -                  + "' does not implement the Appliancefactory interface.";
  +                  + "' does not implement the ApplianceFactory interface.";
                   throw new ApplianceException( error );
               }
           }
  @@ -275,7 +277,7 @@
       * @return the appliance
       */
       public Appliance createAppliance( 
  -      Locator system, EngineClassLoader engine, ApplianceContext context, Logger logger ) 
  +      Locator system, Engine engine, ApplianceContext context, Logger logger ) 
         throws ApplianceException
       {
           if( engine == null )
  @@ -317,7 +319,8 @@
           }
   
           String classname = context.getApplianceClassname();
  -        if(( classname == null ) || ( classname.equals( DefaultAppliance.class.getName() ) ) )
  +        if(( classname == null ) 
  +          || ( classname.equals( DefaultAppliance.class.getName() ) ) )
           {
               //
               // bootstrap the appliance using DefaultAppliance
  @@ -348,9 +351,13 @@
               try
               {
                   Map map = context.getDeploymentContext();
  -                Type type = engine.getRepository().getTypeManager().getType( classname );
  -                Profile profile = engine.getRepository().getProfileManager().getProfile( type );
  -                DefaultApplianceContext cntx = new DefaultApplianceContext( profile, map );
  +                Type type = engine.getRepository()
  +                  .getTypeManager().getType( classname );
  +                Profile profile = 
  +                  engine.getRepository().getProfileManager()
  +                  .getProfile( type );
  +                DefaultApplianceContext cntx = 
  +                  new DefaultApplianceContext( profile, map );
                   cntx.put( "urn:assembly:engine", engine );
                   cntx.put( "urn:assembly:lifestyle.service", lifestyle );
                   cntx.put( "urn:assembly:appliance.context", context );
  @@ -388,7 +395,8 @@
       * @param context the appliance context
       * @return the new appliance instance
       */
  -    private Appliance getApplianceInstance( EngineClassLoader engine, ApplianceContext context )
  +    private Appliance getApplianceInstance( 
  +         EngineClassLoader engine, ApplianceContext context )
         throws ApplianceException
       {
           if( context.getApplianceClassname() == null )
  @@ -417,7 +425,8 @@
       * @param pool the pool manager
       * @return the lifestyle service
       */
  -    private LifestyleService createLifestyleService( EngineClassLoader engine, PoolManager pool ) throws ApplianceException
  +    private LifestyleService createLifestyleService( 
  +         Engine engine, PoolManager pool ) throws ApplianceException
       {
           try
           {
  @@ -462,5 +471,4 @@
               throw new ApplianceException( error, e );
           }
       }
  -
   }
  
  
  
  1.16      +32 -20    avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/engine/DefaultRepositoryManager.java
  
  Index: DefaultRepositoryManager.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/engine/DefaultRepositoryManager.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- DefaultRepositoryManager.java	6 Mar 2003 12:24:16 -0000	1.15
  +++ DefaultRepositoryManager.java	7 Mar 2003 07:48:42 -0000	1.16
  @@ -77,9 +77,13 @@
   import java.util.jar.JarFile;
   import java.util.zip.ZipEntry;
   import org.apache.avalon.assembly.engine.type.TypeManager;
  +import org.apache.avalon.assembly.engine.type.StandardTypeManager;
   import org.apache.avalon.assembly.engine.profile.ProfileManager;
  -import org.apache.avalon.assembly.engine.service.ServiceRepository;
  +import org.apache.avalon.assembly.engine.profile.StandardProfileManager;
  +import org.apache.avalon.assembly.engine.service.ServiceManager;
  +import org.apache.avalon.assembly.engine.service.StandardServiceManager;
   import org.apache.avalon.assembly.engine.model.*;
  +import org.apache.avalon.assembly.lifecycle.context.AvalonServiceManager;
   import org.apache.avalon.assembly.util.ExceptionHelper;
   import org.apache.avalon.excalibur.extension.Extension;
   import org.apache.avalon.excalibur.i18n.ResourceManager;
  @@ -140,7 +144,7 @@
       /**
        * The service registry.
        */
  -    private ServiceRepository m_services;
  +    private ServiceManager m_services;
   
       /**
        * The profile registry.
  @@ -204,28 +208,36 @@
       {
           if( getLogger() == null )
           {
  -           throw new IllegalStateException( "logging" );
  +            throw new IllegalStateException( "logging" );
           }
   
  -        ServiceRepository services = null;
  -        TypeManager types = null;
  -        ProfileManager profiles = null;
  +        StandardServiceManager services = null;
  +        StandardProfileManager profiles = null;
  +        StandardTypeManager types = null;
   
  -        if( m_parent != null )
  +        if( m_parent == null )
           {
  -            services = m_parent.getServiceManager();
  -            types = m_parent.getTypeManager();
  -            profiles = m_parent.getProfileManager();
  +            types = new StandardTypeManager( m_classloader );
  +            services = new StandardServiceManager( m_classloader );
  +            profiles = new StandardProfileManager( m_classloader );
  +        }
  +        else
  +        {
  +            types = new StandardTypeManager( 
  +              m_classloader, m_parent.getTypeManager() );
  +            services = new StandardServiceManager( 
  +              m_classloader, m_parent.getServiceManager() );
  +            profiles = new StandardProfileManager( 
  +              m_classloader, m_parent.getProfileManager() );
           }
   
  -        m_services = new ServiceRepository( m_classloader, services );
  -        m_services.enableLogging( getLogger().getChildLogger( "services" ) );
  -
  -        m_types = new TypeManager( m_classloader, types );
  -        m_types.enableLogging( getLogger().getChildLogger( "types" ) );
  -
  -        m_profiles = new ProfileManager( m_classloader, profiles );
  -        m_profiles.enableLogging( getLogger().getChildLogger( "profiles" ) );
  +        types.enableLogging( getLogger().getChildLogger( "types" ) );
  +        services.enableLogging( getLogger().getChildLogger( "services" ) );
  +        profiles.enableLogging( getLogger().getChildLogger( "profiles" ) );
  +
  +        m_types = types;
  +        m_services = services;
  +        m_profiles = profiles;
       }
   
       //=======================================================================
  @@ -237,7 +249,7 @@
           return m_types;
       }
   
  -    public ServiceRepository getServiceManager()
  +    public ServiceManager getServiceManager()
       {
           return m_services;
       }
  
  
  
  1.41      +3 -4      avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/engine/EngineClassLoader.java
  
  Index: EngineClassLoader.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/engine/EngineClassLoader.java,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- EngineClassLoader.java	6 Mar 2003 12:01:54 -0000	1.40
  +++ EngineClassLoader.java	7 Mar 2003 07:48:42 -0000	1.41
  @@ -66,7 +66,7 @@
   import java.util.jar.Attributes;
   import java.util.ArrayList;
   
  -import org.apache.avalon.assembly.engine.type.TypeManager;
  +import org.apache.avalon.assembly.engine.type.StandardTypeManager;
   import org.apache.avalon.assembly.engine.profile.ProfileManager;
   import org.apache.avalon.assembly.appliance.Appliance;
   import org.apache.avalon.assembly.appliance.ApplianceFactory;
  @@ -82,6 +82,7 @@
   import org.apache.avalon.assembly.engine.model.FilesetDescriptor;
   import org.apache.avalon.assembly.engine.model.IncludeDescriptor;
   import org.apache.avalon.assembly.engine.model.Classpath;
  +import org.apache.avalon.assembly.engine.type.TypeManager;
   import org.apache.avalon.assembly.locator.Contextualizable;
   import org.apache.avalon.assembly.logging.LoggingDescriptor;
   import org.apache.avalon.assembly.logging.DefaultLoggingManager;
  @@ -99,8 +100,6 @@
   import org.apache.avalon.framework.context.Context;
   import org.apache.avalon.framework.context.DefaultContext;
   import org.apache.avalon.framework.context.ContextException;
  -import org.apache.avalon.framework.service.ServiceManager;
  -import org.apache.avalon.framework.service.DefaultServiceManager;
   import org.apache.avalon.framework.service.ServiceException;
   import org.apache.avalon.framework.service.Serviceable;
   import org.apache.avalon.framework.parameters.Parameters;
  
  
  
  1.2       +1 -1      avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/engine/profile/package.html
  
  Index: package.html
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/engine/profile/package.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- package.html	23 Dec 2002 00:13:34 -0000	1.1
  +++ package.html	7 Mar 2003 07:48:43 -0000	1.2
  @@ -1,6 +1,6 @@
   
   <body>
   <p>
  -The <code>profile</code> package contains classes and interfaces for the {@link org.apache.avalon.assembly.engine.profile.ProfileManager} and related default implementations supporting the management of a repository of profiles.
  +The <code>profile</code> package contains classes and interfaces for the {@link org.apache.avalon.assembly.engine.profile.StandardProfileManager} and related default implementations supporting the management of a repository of profiles.
   </p>
   </body>
  
  
  
  1.3       +1 -1      avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/engine/service/package.html
  
  Index: package.html
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/engine/service/package.html,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- package.html	27 Dec 2002 16:17:03 -0000	1.2
  +++ package.html	7 Mar 2003 07:48:43 -0000	1.3
  @@ -1,6 +1,6 @@
   
   <body>
   <p>
  -The <code>service</code> package contains classes and interfaces for the {@link org.apache.avalon.assembly.engine.service.ServiceRepository} and related default implementations supporting the management of a repository of service defintions.
  +The <code>service</code> package contains classes and interfaces for the {@link org.apache.avalon.assembly.engine.service.StandardServiceManager} and related default implementations supporting the management of a repository of service defintions.
   </p>
   </body>
  
  
  
  1.1                  avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/engine/service/StandardServiceManager.java
  
  Index: StandardServiceManager.java
  ===================================================================
  /*
  
   ============================================================================
                     The Apache Software License, Version 1.1
   ============================================================================
  
   Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
  
   Redistribution and use in source and binary forms, with or without modifica-
   tion, are permitted provided that the following conditions are met:
  
   1. Redistributions of  source code must  retain the above copyright  notice,
      this list of conditions and the following disclaimer.
  
   2. Redistributions in binary form must reproduce the above copyright notice,
      this list of conditions and the following disclaimer in the documentation
      and/or other materials provided with the distribution.
  
   3. The end-user documentation included with the redistribution, if any, must
      include  the following  acknowledgment:  "This product includes  software
      developed  by the  Apache Software Foundation  (http://www.apache.org/)."
      Alternately, this  acknowledgment may  appear in the software itself,  if
      and wherever such third-party acknowledgments normally appear.
  
   4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and
      "Apache Software Foundation"  must not be used to endorse or promote
      products derived  from this  software without  prior written
      permission. For written permission, please contact apache@apache.org.
  
   5. Products  derived from this software may not  be called "Apache", nor may
      "Apache" appear  in their name,  without prior written permission  of the
      Apache Software Foundation.
  
   THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
   FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
   APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
   INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
   DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
   OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
   ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
   (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
   THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  
   This software  consists of voluntary contributions made  by many individuals
   on  behalf of the Apache Software  Foundation. For more  information on the
   Apache Software Foundation, please see <http://www.apache.org/>.
  
  */
  
  package org.apache.avalon.assembly.engine.service;
  
  import java.util.List;
  import java.util.ArrayList;
  import java.util.Iterator;
  
  import org.apache.avalon.framework.Version;
  import org.apache.avalon.framework.logger.AbstractLogEnabled;
  import org.apache.avalon.framework.activity.Initializable;
  import org.apache.avalon.meta.info.Service;
  import org.apache.avalon.meta.info.builder.ServiceBuilder;
  import org.apache.avalon.meta.info.ReferenceDescriptor;
  
  /**
   * A service repository provides support for the storage and retrival 
   * of service defintions.
   *
   * @author <a href="mailto:dev@avalon.apache.org">Avalon Development Team</a>
   * @version $Revision: 1.1 $ $Date: 2003/03/07 07:48:43 $
   */
  public class StandardServiceManager extends AbstractLogEnabled implements ServiceManager
  {
      //==============================================================
      // state
      //==============================================================
  
     /**
      * The classloader supplied to the manager.
      */
      private ClassLoader m_classloader;
  
     /**
      * The parent service manager (may be null)
      */
      private ServiceManager m_parent;
  
     /**
      * The service builder.
      */
      private static final ServiceBuilder DEFAULT_BUILDER = new ServiceBuilder();
  
      /**
       * List of service entries.
       */
      private List m_services = new ArrayList();
  
      //==============================================================
      // constructor
      //==============================================================
  
     /**
      * Creation of a new root service manager.
      * @param classloader the classloder to use
      * @exception NullPointerException if the classloader is null
      */
      public StandardServiceManager( ClassLoader classloader ) throws NullPointerException
      {
          this( classloader, null );
      }
  
     /**
      * Creation of a new service manager.
      * @param classloader the classloder to use
      * @param parent the parent type manager
      * @exception NullPointerException if the classloader is null
      */
      public StandardServiceManager( ClassLoader classloader, ServiceManager parent ) throws NullPointerException
      {
          if( classloader == null )
          {
              throw new NullPointerException("classloader");
          }
          m_classloader = classloader;
          m_parent = parent;
      }
  
      //==============================================================
      // implemetation
      //==============================================================
  
      /**
       * Create a services associated from a supplied path. 
       *
       * @param clazz the service class
       * @return the service defintions
       * @exception ServiceException if an error occurs during service creation
       */
      public Service createService( Class clazz ) throws ServiceException
      {
          if( clazz == null )
          {
              throw new NullPointerException("clazz");
          }
  
          try
          {
              return DEFAULT_BUILDER.build( clazz.getName(), clazz.getClassLoader() );
          }
          catch( Throwable e )
          {
              final String error = 
                 "Could not create a service relative to the path: " 
                 + clazz.getName() + " due to a service build error.";
              throw new ServiceException( error, e );
          }
      }
  
      /**
       * Create a service instance based on a supplied classname.
       *
       * @param classname the component implementation classname
       * @return the service defintion
       * @exception ServiceException if an error occurs during service creation
       */
      public Service createService( String classname ) throws ServiceException
      {
          if( classname == null )
          {
              throw new NullPointerException("classname");
          }
  
          try
          {
              Class clazz = m_classloader.loadClass( classname );
              return createService( clazz );
          }
          catch( Throwable e )
          {
              final String error = 
                "Unexpected error while attempting to build a service from the classname: " + classname;
              throw new ServiceException( error, e );
          }
      }
  
      /**
       * Locate a {@link Service} instances associated with the 
       * supplied classname and version. If a service defintion is not
       * found locally, the implementation redirects the request to 
       * the parent service manager.
       *
       * @param classname the service class name
       * @param version the service version
       * @return the service matching the supplied classname and version.
       * @exception UnknownServiceException if a matching service cannot be found
       */
      public Service getService( String classname, Version version ) throws UnknownServiceException
      {
          return getService( new ReferenceDescriptor( classname, version ) );
      }
  
      /**
       * Locate a {@link Service} instances associated with the 
       * supplied referecne descriptor. If a service defintion is not
       * found locally, the implementation redirects the request to 
       * the parent service manager.
       *
       * @param classname the service class name
       * @param reference the reference descriptor
       * @return the service matching the supplied descriptor.
       * @exception UnknownServiceException if a matching service cannot be found
       */
      public Service getService( ReferenceDescriptor reference ) throws UnknownServiceException
      {
          Service service = getLocalService( reference );
          if( service == null )
          {
              if( m_parent != null )
              {
                  return m_parent.getService( reference );
              }
              else
              {
                  final String error = "Unknown service defintion: " + reference;
                  throw new UnknownServiceException( error );
              }
          }
          return service;
      }
  
      private Service getLocalService( ReferenceDescriptor reference )
      {
          Iterator iterator = m_services.iterator();
          while( iterator.hasNext() )
          {
              Service service = (Service) iterator.next();
              if( service.equals( reference ) )
              {
                  return service;
              }
          }
          return null;
      }
  
      /**
       * Add a service to the manager.
       *
       * @param service the service defintion
       * @exception DuplicateServiceException if the service already exists
       * @exception ServiceException if the service definition is invalid
      */
      public void addService( Service service ) throws DuplicateServiceException, ServiceException
      {
          if( getLogger() == null )
          {
              throw new IllegalStateException("logging");
          }
  
          //
          // make sure that there is not already a local defintion for 
          // this service
          //
  
          try
          {
              getService( service.getReference() );
              throw new DuplicateServiceException( service.toString() );
          }
          catch( UnknownServiceException use )
          {
              // continue
          }
          
          //
          // make sure we are dealing with a service that is verified
          //
  
          verifyService( service );
  
          //
          // make sure that there is not already a local defintion for 
          // this service
          //
  
          m_services.add( service );
   
          if( getLogger().isDebugEnabled() )
          {
              StringBuffer buffer = new StringBuffer();
              buffer.append( "add: " + service.getClassname() );
              buffer.append( ":" + service.getVersion() );
              String[] names = service.getAttributeNames();
              buffer.append( ", entries: " + service.getEntries().length );
              buffer.append( ", attributes: " + service.getAttributeNames().length );
              getLogger().debug( buffer.toString() );
          }
      }
  
     /**
      * Verify that a class exists within the classloader representing the 
      * service type.
      * @param service the service to verify
      * @exception ServiceException if a verification error occurs
      */
      private void verifyService( Service service ) throws ServiceException
      {
          Class clazz;
          try
          {
              clazz = m_classloader.loadClass( service.getClassname() );
          }
          catch( Throwable e )
          {
              final String error = "Unresolvable service class.";
              throw new ServiceException( error, e );
          }
      }
  }
  
  
  
  1.2       +1 -1      avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/engine/type/package.html
  
  Index: package.html
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/engine/type/package.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- package.html	23 Dec 2002 00:13:34 -0000	1.1
  +++ package.html	7 Mar 2003 07:48:43 -0000	1.2
  @@ -1,6 +1,6 @@
   
   <body>
   <p>
  -The <code>type</code> package contains classes and interfaces for the {@link org.apache.avalon.assembly.engine.type.TypeManager} and related default implementations supporting the management of a repository of component types.
  +The <code>type</code> package contains classes and interfaces for the {@link org.apache.avalon.assembly.engine.type.StandardTypeManager} and related default implementations supporting the management of a repository of component types.
   </p>
   </body>
  
  
  
  1.1                  avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/engine/type/StandardTypeManager.java
  
  Index: StandardTypeManager.java
  ===================================================================
  /*
  
   ============================================================================
                     The Apache Software License, Version 1.1
   ============================================================================
  
   Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
  
   Redistribution and use in source and binary forms, with or without modifica-
   tion, are permitted provided that the following conditions are met:
  
   1. Redistributions of  source code must  retain the above copyright  notice,
      this list of conditions and the following disclaimer.
  
   2. Redistributions in binary form must reproduce the above copyright notice,
      this list of conditions and the following disclaimer in the documentation
      and/or other materials provided with the distribution.
  
   3. The end-user documentation included with the redistribution, if any, must
      include  the following  acknowledgment:  "This product includes  software
      developed  by the  Apache Software Foundation  (http://www.apache.org/)."
      Alternately, this  acknowledgment may  appear in the software itself,  if
      and wherever such third-party acknowledgments normally appear.
  
   4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and
      "Apache Software Foundation"  must not be used to endorse or promote
      products derived  from this  software without  prior written
      permission. For written permission, please contact apache@apache.org.
  
   5. Products  derived from this software may not  be called "Apache", nor may
      "Apache" appear  in their name,  without prior written permission  of the
      Apache Software Foundation.
  
   THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
   FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
   APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
   INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
   DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
   OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
   ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
   (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
   THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  
   This software  consists of voluntary contributions made  by many individuals
   on  behalf of the Apache Software  Foundation. For more  information on the
   Apache Software Foundation, please see <http://www.apache.org/>.
  
  */
  
  package org.apache.avalon.assembly.engine.type;
  
  import java.util.Hashtable;
  import java.util.Iterator;
  import java.util.Enumeration;
  import java.util.ArrayList;
  
  import org.apache.avalon.framework.logger.AbstractLogEnabled;
  import org.apache.avalon.meta.info.Type;
  import org.apache.avalon.meta.info.builder.TypeBuilder;
  import org.apache.avalon.meta.info.ReferenceDescriptor;
  import org.apache.avalon.meta.info.DependencyDescriptor;
  import org.apache.avalon.meta.info.ServiceDescriptor;
  import org.apache.avalon.meta.info.StageDescriptor;
  import org.apache.avalon.meta.verifier.ComponentVerifier;
  
  /**
   * A type manager implemetation provides support for the creation, 
   * storage and retrival of component types.
   *
   * @author <a href="mailto:dev@avalon.apache.org">Avalon Development Team</a>
   * @version $Revision: 1.1 $ $Date: 2003/03/07 07:48:43 $
   */
  public class StandardTypeManager extends AbstractLogEnabled implements TypeManager
  {
      //==============================================================
      // static
      //==============================================================
  
     /**
      * The type builder.
      */
      private static final TypeBuilder DEFAULT_BUILDER = new TypeBuilder();
  
      //==============================================================
      // state
      //==============================================================
  
     /**
      * The classloader supplied to the manager.
      */
      private ClassLoader m_classloader;
  
     /**
      * The parent type manager (may be null)
      */
      private TypeManager m_parent;
  
      /**
       * Table of component types keyed by implementation classname.
       */
      private final Hashtable m_types = new Hashtable();
  
      //==============================================================
      // constructor
      //==============================================================
  
     /**
      * Creation of a new root type manager.
      * @param classloader the classloder to use
      * @exception NullPointerException if the classloader is null
      */
      public StandardTypeManager( ClassLoader classloader ) throws NullPointerException
      {
          this( classloader, null );
      }
  
     /**
      * Creation of a new type manager.
      * @param classloader the classloder to use
      * @param parent the parent type manager
      * @exception NullPointerException if the classloader is null
      */
      public StandardTypeManager( ClassLoader classloader, TypeManager parent ) throws NullPointerException
      {
          if( classloader == null )
          {
              throw new NullPointerException("classloader");
          }
          m_classloader = classloader;
          m_parent = parent;
      }
  
      //==============================================================
      // StandardTypeManager
      //==============================================================
  
      /**
       * Create a new type instance.  The type instance returned is not 
       * registered with the manager.  To register the type the client 
       * must explicity declare the type using the {@link #addType} 
       * operation.
       *
       * @param clazz the component implementation class
       * @return the component type
       * @exception TypeException is a type creation error occurs
       * @see #addType
       */
      public Type createType( Class clazz ) throws TypeException
      {
          if( clazz == null )
          {
              throw new NullPointerException("clazz");
          }
  
          try
          {
              return DEFAULT_BUILDER.build( clazz.getName(), clazz.getClassLoader() );
          }
          catch( Throwable e )
          {
              final String error = 
                "Could not register a type relative to the path: " 
                + clazz.getName()
                + " due to a type build error.";
              throw new TypeException( error, e );
          }
      }
  
      /**
       * Create a type instance based on a supplied classname and classloader.
       *
       * @param classname the component implementation classname
       * @return the component type
       * @exception TypeException is a type creation error occurs
       */
      public Type createType( String classname ) throws TypeException
      {
          if( classname == null )
          {
              throw new NullPointerException("classname");
          }
  
          try
          {
              Class clazz = m_classloader.loadClass( classname );
              return createType( clazz );
          }
          catch( Throwable e )
          {
              final String error = 
                "Unexpected error while attempting to build a type from the classname: " + classname;
              throw new TypeException( error, e );
          }
      }
  
     /**
      * Add a type to the manager.
      * @param type the component type description.
      * @exception DuplicateTypeException if the supplied type is already registered
      * @exception TypeException if a type verification failure occurs
      * @see #createType
      */
      public void addType( Type type ) throws DuplicateTypeException, TypeException
      {
          if( type == null )
          {
              throw new NullPointerException("type");
          }
  
          if( getLogger() == null )
          {
              throw new IllegalStateException("logging");
          }
  
          final String classname = type.getInfo().getClassname();
  
          try
          {
              type = getType( classname );
              //throw new DuplicateTypeException( classname );
              return;
          }
          catch( UnknownTypeException ute )
          {
              try
              {
                  verify( type );
              }
              catch( Throwable e )
              {
                  final String error = 
                    "Could not register the type: " + classname
                    + " due to a verification failure.";
                  throw new TypeException( error, e );
              }
  
              if( getLogger().isDebugEnabled() )
              {
                  getLogger().debug("add: " + type );
              }
  
              m_types.put( classname, type );
          }
      }
  
      /**
       * Locate a {@link Type} instances associated with the 
       * supplied implementation classname.
       * @param clazz the component type implementation class.
       * @return the type matching the supplied implementation classname.
       * @exception UnknownTypeException if a matching type cannot be found
       */
      public Type getType( Class clazz ) throws UnknownTypeException
      {
          if( clazz == null )
          {
              throw new NullPointerException("clazz");
          }
  
          return getType( clazz.getName() );
      }
  
      /**
       * Locate a {@link Type} instances associated with the 
       * supplied implementation classname.
       * @param classname the component type implementation class name.
       * @return the type matching the supplied implementation classname.
       * @exception UnknownTypeException if a matching type cannot be found
       */
      public Type getType( String classname ) throws UnknownTypeException
      {
          if( classname == null )
          {
              throw new NullPointerException("classname");
          }
  
          Type type = (Type) m_types.get( classname );
          if( type == null )
          {
              if( m_parent != null )
              {
                  return m_parent.getType( classname );
              }
              else
              {
                  throw new UnknownTypeException( classname );
              }
          }
          return type;
      }
  
     /**
      * Locate the set of component types capable of services the supplied 
      * dependency.
      * @param dependency a service dependency descriptor
      * @return a set of types capable of servicing the supplied dependency
      */
      public Type[] getTypes( DependencyDescriptor dependency )
      {
          if( dependency == null )
          {
              throw new NullPointerException("dependency");
          }
  
          ArrayList list = new ArrayList();
          if( m_parent != null )
          {
              Type[] types = m_parent.getTypes( dependency );
              for( int i=0; i<types.length; i++ )
              {
                  list.add( types[i] );
              }
          }
  
          ReferenceDescriptor reference = dependency.getReference();
          Enumeration enum = m_types.elements();
          while( enum.hasMoreElements() )
          {
              Type type = (Type) enum.nextElement();
              Object service = type.getService( reference );
              if( service != null )
              {
                  list.add( type );
              }
          }
          return (Type[]) list.toArray( new Type[0] );
      }
  
     /**
      * Locate the set of component types that provide the supplied extension.
      * @param stage a stage descriptor
      * @return a set of types that support the supplied stage
      */
      public Type[] getTypes( StageDescriptor stage )
      {
          if( stage == null )
          {
              throw new NullPointerException("stage");
          }
  
          ArrayList list = new ArrayList();
          if( m_parent != null )
          {
              Type[] types = m_parent.getTypes( stage );
              for( int i=0; i<types.length; i++ )
              {
                  list.add( types[i] );
              }
          }
  
          Iterator iterator = m_types.entrySet().iterator();
          while( iterator.hasNext() )
          {
              Type type = (Type) iterator.next();
              if( type.getExtension( stage ) != null )
              {
                  list.add( type );
              }
          }
  
          return (Type[]) list.toArray( new Type[0] );
      }
  
     /**
      * Verify the intergrity of the supplied type.
      * @param type the type to verify
      * @exception Exception if an verification failure occurs
      */
      private void verify( Type type ) throws Exception
      {
          String name = type.getInfo().getName();
          Class clazz = getComponentClass( type );
          Class[] classes = getServiceClasses( type );
          ComponentVerifier verifier = new ComponentVerifier();
          verifier.verifyComponent( name, clazz, classes );
      }
  
      /**
       * Return the set of interface classes for a given type that are declared
       * or default to the "native" service access protocol and where the
       * service access model is undefined (i.e. native implementation).
       * access mode.
       *
       * @param type the component type
       * @return an array of classes represnting the type's service interfaces
       */
      private Class[] getServiceClasses( Type type )
      {
          ArrayList list = new ArrayList();
          ServiceDescriptor[] services = type.getServices();
          for( int i = 0; i < services.length; i++ )
          {
              ServiceDescriptor service = services[ i ];
              if( ( service.getAttribute( 
                "urn:avalon:service.protocol", "native" ).equals( "native" ) )
                && ( service.getAttribute( "urn:avalon:service.accessor", null ) == null ) )
              {
                  list.add( getServiceClass( services[ i ] ) );
              }
          }
          return ( Class[]) list.toArray( new Class[0] );
      }
  
      /**
       * Returns the component type implementation class.
       * @param type the component type descriptor
       * @return the class implementing the component type
       * @exception TypeException if a classloader error occurs
       */
      private Class getComponentClass( Type type ) throws TypeException
      {
          if( null == type )
          {
              throw new NullPointerException( "type" );
          }
  
          final String classname = type.getInfo().getClassname();
  
          try
          {
              return m_classloader.loadClass( classname );
          }
          catch( Throwable e )
          {
              final String error = 
                "Could not load implementation class for component type: "
                + classname;
              throw new TypeException( error, e );
          }
      }
  
      /**
       * Returns the service type implementation class.
       * @param service the service type descriptor
       * @return the class implementing the service type
       * @exception TypeRuntimeException if a classloader error occurs
       */
      private Class getServiceClass( ServiceDescriptor service ) throws TypeRuntimeException
      {
          final String classname = service.getReference().getClassname();
          try
          {
              return m_classloader.loadClass( classname );
          }
          catch( Throwable e )
          {
              final String error = 
                "Could not load implementation class for service type: "
                + classname;
              throw new TypeRuntimeException( error, e );
          }
      }
  }
  
  
  
  1.19      +1 -3      avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifecycle/DefaultDeploymentService.java
  
  Index: DefaultDeploymentService.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifecycle/DefaultDeploymentService.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- DefaultDeploymentService.java	7 Feb 2003 15:39:00 -0000	1.18
  +++ DefaultDeploymentService.java	7 Mar 2003 07:48:43 -0000	1.19
  @@ -55,8 +55,6 @@
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.configuration.Configurable;
   import org.apache.avalon.framework.context.ContextException;
  -import org.apache.avalon.framework.service.ServiceManager;
  -import org.apache.avalon.framework.service.DefaultServiceManager;
   import org.apache.avalon.framework.service.ServiceException;
   import org.apache.avalon.framework.service.Serviceable;
   import org.apache.avalon.framework.component.Composable;
  
  
  
  1.3       +3 -3      avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifecycle/context/DefaultCompositionService.java
  
  Index: DefaultCompositionService.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifecycle/context/DefaultCompositionService.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DefaultCompositionService.java	7 Feb 2003 15:39:11 -0000	1.2
  +++ DefaultCompositionService.java	7 Mar 2003 07:48:43 -0000	1.3
  @@ -91,7 +91,7 @@
                   final String message =  "servicing: " + appliance.toString();
                   getLogger().debug( message );
               }
  -            StandardServiceManager manager = new StandardServiceManager( appliance );
  +            AvalonServiceManager manager = new AvalonServiceManager( appliance );
               manager.enableLogging( getLogger().getChildLogger( "manager" ) );
               ((Serviceable)object).service( manager );
   
  @@ -103,7 +103,7 @@
                   final String message =  "composing: " + appliance.toString();
                   getLogger().debug( message );
               }
  -            StandardServiceManager manager = new StandardServiceManager( appliance );
  +            AvalonServiceManager manager = new AvalonServiceManager( appliance );
               manager.enableLogging( getLogger().getChildLogger( "manager" ) );
               ((Composable)object).compose( 
                     new WrapperComponentManager( manager ) );
  
  
  
  1.3       +4 -2      avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifecycle/context/WrapperComponentManager.java
  
  Index: WrapperComponentManager.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifecycle/context/WrapperComponentManager.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- WrapperComponentManager.java	7 Feb 2003 15:39:11 -0000	1.2
  +++ WrapperComponentManager.java	7 Mar 2003 07:48:43 -0000	1.3
  @@ -86,7 +86,9 @@
                           throw new ComponentException( key, error );
                       }
   
  -                    Type type = ((Engine)loader).getRepository().getTypeManager().getType( clazz );
  +                    Type type = 
  +                      ((Engine)loader).getRepository().getTypeManager()
  +                      .getType( clazz );
                       return new ComponentInvocationHandler( object, type ).getProxy();
                   }
               }
  
  
  
  1.9       +1 -5      avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifestyle/DefaultLifestyleService.java
  
  Index: DefaultLifestyleService.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifestyle/DefaultLifestyleService.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DefaultLifestyleService.java	7 Feb 2003 15:39:13 -0000	1.8
  +++ DefaultLifestyleService.java	7 Mar 2003 07:48:43 -0000	1.9
  @@ -60,10 +60,6 @@
   import org.apache.avalon.framework.configuration.Configurable;
   import org.apache.avalon.framework.context.Context;
   import org.apache.avalon.framework.context.ContextException;
  -import org.apache.avalon.framework.context.DefaultContext;
  -import org.apache.avalon.framework.service.ServiceManager;
  -import org.apache.avalon.framework.service.DefaultServiceManager;
  -import org.apache.avalon.framework.service.ServiceException;
   import org.apache.avalon.framework.service.Serviceable;
   import org.apache.avalon.assembly.appliance.Appliance;
   import org.apache.avalon.assembly.appliance.ApplianceHolder;
  
  
  
  1.3       +1 -1      avalon-sandbox/assembly/src/test/org/apache/avalon/assembly/TestBase.java
  
  Index: TestBase.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/test/org/apache/avalon/assembly/TestBase.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestBase.java	28 Feb 2003 03:46:03 -0000	1.2
  +++ TestBase.java	7 Mar 2003 07:48:44 -0000	1.3
  @@ -22,7 +22,7 @@
   import org.apache.avalon.meta.model.Category;
   
   /**
  - * A testcase for the @link{TypeManager}.
  + * A testcase for the @link{StandardTypeManager}.
    *
    * @author <a href="mailto:dev@avalon.apache.org">Avalon Development Team</a>
    */
  
  
  
  1.4       +3 -3      avalon-sandbox/assembly/src/test/org/apache/avalon/assembly/engine/ApplianceTestCase.java
  
  Index: ApplianceTestCase.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/test/org/apache/avalon/assembly/engine/ApplianceTestCase.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ApplianceTestCase.java	27 Feb 2003 23:17:49 -0000	1.3
  +++ ApplianceTestCase.java	7 Mar 2003 07:48:44 -0000	1.4
  @@ -19,7 +19,7 @@
   import org.apache.avalon.meta.model.*;
   import org.apache.avalon.assembly.TestBase;
   import org.apache.avalon.assembly.engine.Engine;
  -import org.apache.avalon.assembly.engine.type.TypeManager;
  +import org.apache.avalon.assembly.engine.type.StandardTypeManager;
   import org.apache.avalon.assembly.appliance.Appliance;
   import org.apache.avalon.assembly.appliance.ApplianceContext;
   import org.apache.avalon.assembly.appliance.DefaultApplianceContext;
  @@ -37,7 +37,7 @@
    */
   public class ApplianceTestCase extends TestBase
   {
  -    private TypeManager m_manager;
  +    private StandardTypeManager m_manager;
   
       protected EngineClassLoader m_engine;
   
  @@ -59,7 +59,7 @@
       {
           super.setUp();
   
  -        TypeManager manager = new TypeManager( m_loader );
  +        StandardTypeManager manager = new StandardTypeManager( m_loader );
           manager.enableLogging( getLogger().getChildLogger("types") );
           m_manager = manager;
   
  
  
  
  1.4       +9 -9      avalon-sandbox/assembly/src/test/org/apache/avalon/assembly/engine/profile/ProfileManagerTestCase.java
  
  Index: ProfileManagerTestCase.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/test/org/apache/avalon/assembly/engine/profile/ProfileManagerTestCase.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ProfileManagerTestCase.java	27 Feb 2003 23:17:50 -0000	1.3
  +++ ProfileManagerTestCase.java	7 Mar 2003 07:48:44 -0000	1.4
  @@ -21,15 +21,15 @@
   import org.apache.avalon.assembly.TestBase;
   
   /**
  - * A testcase for the @link{ProfileManager}.
  + * A testcase for the @link{StandardProfileManager}.
    *
    * @author <a href="mailto:dev@avalon.apache.org">Avalon Development Team</a>
    */
   public class ProfileManagerTestCase extends TestBase
   {
   
  -    private ProfileManager m_manager;
  -    private TypeManager m_types;
  +    private StandardProfileManager m_manager;
  +    private StandardTypeManager m_types;
       protected ClassLoader m_loader = Thread.currentThread().getContextClassLoader();
   
       public ProfileManagerTestCase()
  @@ -45,8 +45,8 @@
       protected void setUp() throws Exception
       {
           super.setUp();
  -        m_types = createTypeManager();
  -        m_manager = createProfileManager();
  +        m_types = createStandardTypeManager();
  +        m_manager = createStandardProfileManager();
       }
   
       public void testPackagedProfileImport()
  @@ -195,16 +195,16 @@
           m_types = null;
       }
   
  -    private TypeManager createTypeManager() throws Exception
  +    private StandardTypeManager createStandardTypeManager() throws Exception
       {
  -        TypeManager manager = new TypeManager( m_loader );
  +        StandardTypeManager manager = new StandardTypeManager( m_loader );
           manager.enableLogging( getLogger().getChildLogger("types") );
           return manager;
       }
   
  -    private ProfileManager createProfileManager() throws Exception
  +    private StandardProfileManager createStandardProfileManager() throws Exception
       {
  -        ProfileManager manager = new ProfileManager( m_loader );
  +        StandardProfileManager manager = new StandardProfileManager( m_loader );
           manager.enableLogging( getLogger().getChildLogger("profiles") );
           return manager;
       }
  
  
  
  1.5       +2 -2      avalon-sandbox/assembly/src/test/org/apache/avalon/assembly/engine/type/TypeManagerTestCase.java
  
  Index: TypeManagerTestCase.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/test/org/apache/avalon/assembly/engine/type/TypeManagerTestCase.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TypeManagerTestCase.java	27 Feb 2003 23:17:50 -0000	1.4
  +++ TypeManagerTestCase.java	7 Mar 2003 07:48:45 -0000	1.5
  @@ -19,7 +19,7 @@
   import org.apache.avalon.assembly.util.ExceptionHelper;
   
   /**
  - * A testcase for the @link{TypeManager}.
  + * A testcase for the @link{StandardTypeManager}.
    *
    * @author <a href="mailto:dev@avalon.apache.org">Avalon Development Team</a>
    */
  @@ -42,7 +42,7 @@
       protected void setUp() throws Exception
       {
           super.setUp();
  -        TypeManager manager = new TypeManager( m_loader );
  +        StandardTypeManager manager = new StandardTypeManager( m_loader );
           manager.enableLogging( getLogger().getChildLogger("types") );
           m_manager = manager;
       }
  
  
  
  1.3       +1 -1      avalon-sandbox/assembly/src/test/org/apache/avalon/playground/factory/CustomComponent.xinfo
  
  Index: CustomComponent.xinfo
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/test/org/apache/avalon/playground/factory/CustomComponent.xinfo,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CustomComponent.xinfo	28 Feb 2003 03:46:03 -0000	1.2
  +++ CustomComponent.xinfo	7 Mar 2003 07:48:45 -0000	1.3
  @@ -30,7 +30,7 @@
       <attributes>
   
         <!--
  -      Decalration of a custom appliance factory.
  +      Declaration of a custom appliance factory.
         -->
   
         <attribute key="urn:assembly:appliance.factory" 
  
  
  

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