donaldp     2002/08/17 21:45:22

  Modified:    containerkit/src/java/org/apache/excalibur/containerkit/verifier
                        AssemblyVerifier.java
  Log:
  dont pass in componentFactory as it is no longer needed.
  
  Revision  Changes    Path
  1.32      +14 -34    
jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/verifier/AssemblyVerifier.java
  
  Index: AssemblyVerifier.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/verifier/AssemblyVerifier.java,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- AssemblyVerifier.java     18 Aug 2002 03:53:58 -0000      1.31
  +++ AssemblyVerifier.java     18 Aug 2002 04:45:22 -0000      1.32
  @@ -12,7 +12,6 @@
   import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.avalon.excalibur.i18n.Resources;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
  -import org.apache.excalibur.containerkit.factory.ComponentFactory;
   import org.apache.excalibur.containerkit.metadata.DependencyMetaData;
   import org.apache.excalibur.containerkit.kernel.ComponentEntry;
   import org.apache.avalon.framework.info.ComponentInfo;
  @@ -61,8 +60,7 @@
        * @param components the Components that make up assembly
        * @throws VerifyException if an error occurs
        */
  -    public void verifyAssembly( final ComponentEntry[] components,
  -                                final ComponentFactory factory )
  +    public void verifyAssembly( final ComponentEntry[] components )
           throws VerifyException
       {
           String message = null;
  @@ -77,11 +75,11 @@
   
           message = REZ.getString( "assembly.dependencies-mapping.notice" );
           getLogger().info( message );
  -        verifyValidDependencies( components, factory );
  +        verifyValidDependencies( components );
   
           message = REZ.getString( "assembly.dependency-references.notice" );
           getLogger().info( message );
  -        verifyDependencyReferences( components, factory );
  +        verifyDependencyReferences( components );
   
           message = REZ.getString( "assembly.nocircular-dependencies.notice" );
           getLogger().info( message );
  @@ -94,13 +92,12 @@
        * @param components the ComponentEntry objects for the components
        * @throws VerifyException if an error occurs
        */
  -    public void verifyValidDependencies( final ComponentEntry[] components,
  -                                         final ComponentFactory factory )
  +    public void verifyValidDependencies( final ComponentEntry[] components )
           throws VerifyException
       {
           for( int i = 0; i < components.length; i++ )
           {
  -            verifyDependenciesMap( components[ i ], factory );
  +            verifyDependenciesMap( components[ i ] );
           }
       }
   
  @@ -227,13 +224,12 @@
        * @param components the ComponentEntry objects for the components
        * @throws VerifyException if an error occurs
        */
  -    protected void verifyDependencyReferences( final ComponentEntry[] components,
  -                                               final ComponentFactory factory )
  +    protected void verifyDependencyReferences( final ComponentEntry[] components )
           throws VerifyException
       {
           for( int i = 0; i < components.length; i++ )
           {
  -            verifyDependencyReferences( components[ i ], components, factory );
  +            verifyDependencyReferences( components[ i ], components );
           }
       }
   
  @@ -245,11 +241,10 @@
        * @throws VerifyException if an error occurs
        */
       protected void verifyDependencyReferences( final ComponentEntry component,
  -                                               final ComponentEntry[] others,
  -                                               final ComponentFactory factory )
  +                                               final ComponentEntry[] others )
           throws VerifyException
       {
  -        final ComponentInfo info = getComponentInfo( component, factory );
  +        final ComponentInfo info = component.getInfo();
           final DependencyMetaData[] roles = 
component.getMetaData().getDependencies();
   
           for( int i = 0; i < roles.length; i++ )
  @@ -273,7 +268,7 @@
   
               //make sure that the component offers service
               //that user expects it to be providing
  -            final ComponentInfo providerInfo = getComponentInfo( provider, factory 
);
  +            final ComponentInfo providerInfo = provider.getInfo();
               final ServiceDescriptor[] services = providerInfo.getServices();
               if( !hasMatchingService( service, services ) )
               {
  @@ -287,20 +282,6 @@
           }
       }
   
  -    private ComponentInfo getComponentInfo( final ComponentEntry component, final 
ComponentFactory factory )
  -        throws VerifyException
  -    {
  -        final String impl = component.getMetaData().getImplementationKey();
  -        try
  -        {
  -            return factory.createInfo( impl );
  -        }
  -        catch( final Exception e )
  -        {
  -            throw new VerifyException( e.getMessage(), e );
  -        }
  -    }
  -
       /**
        * Get component with specified name from specified Component array.
        *
  @@ -417,8 +398,7 @@
        * @param component the ComponentEntry describing the component
        * @throws VerifyException if an error occurs
        */
  -    protected void verifyDependenciesMap( final ComponentEntry component,
  -                                          final ComponentFactory factory )
  +    protected void verifyDependenciesMap( final ComponentEntry component )
           throws VerifyException
       {
           //Make sure all role entries specified in config file are valid
  @@ -428,7 +408,7 @@
           for( int i = 0; i < dependencySet.length; i++ )
           {
               final String roleName = dependencySet[ i ].getRole();
  -            final ComponentInfo info = getComponentInfo( component, factory );
  +            final ComponentInfo info = component.getInfo();
               final DependencyDescriptor descriptor = info.getDependency( roleName );
   
               //If there is no dependency descriptor in ComponentInfo then
  @@ -445,7 +425,7 @@
           }
   
           //Make sure all dependencies in ComponentInfo file are satisfied
  -        final ComponentInfo info = getComponentInfo( component, factory );
  +        final ComponentInfo info = component.getInfo();
           final DependencyDescriptor[] dependencies = info.getDependencies();
           for( int i = 0; i < dependencies.length; i++ )
           {
  
  
  

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

Reply via email to