avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/verifier AssemblyVerifier.java MetaDataVerifier.java
Date Sun, 08 Sep 2002 04:45:52 GMT
donaldp     2002/09/07 21:45:52

  Modified:    containerkit/src/java/org/apache/excalibur/containerkit/processor
                        DependencyMap.java
               containerkit/src/java/org/apache/excalibur/containerkit/verifier
                        AssemblyVerifier.java MetaDataVerifier.java
  Log:
  Update to reflect latest changes in info
  
  Revision  Changes    Path
  1.6       +2 -2      jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/processor/DependencyMap.java
  
  Index: DependencyMap.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/processor/DependencyMap.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DependencyMap.java	25 Aug 2002 02:29:06 -0000	1.5
  +++ DependencyMap.java	8 Sep 2002 04:45:52 -0000	1.6
  @@ -183,7 +183,7 @@
           for( int i = 0; i < descriptors.length; i++ )
           {
               final DependencyMetaData dependency =
  -                metaData.getDependency( descriptors[ i ].getRole() );
  +                metaData.getDependency( descriptors[ i ].getKey() );
   
               // added != null clause to catch cases where an optional
               // dependency exists and the dependecy has not been bound
  
  
  
  1.35      +11 -12    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.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- AssemblyVerifier.java	24 Aug 2002 09:00:32 -0000	1.34
  +++ AssemblyVerifier.java	8 Sep 2002 04:45:52 -0000	1.35
  @@ -17,7 +17,6 @@
   import org.apache.avalon.framework.info.ComponentInfo;
   import org.apache.avalon.framework.info.DependencyDescriptor;
   import org.apache.avalon.framework.info.ServiceDescriptor;
  -import org.apache.avalon.framework.info.ServiceDesignator;
   
   /**
    * This Class verifies that Sars are valid. It performs a number
  @@ -251,8 +250,7 @@
           {
               final String providerName = roles[ i ].getProviderName();
               final String roleName = roles[ i ].getRole();
  -            final ServiceDesignator service =
  -                info.getDependency( roleName ).getService();
  +            final String implementationKey = info.getDependency( roleName ).getImplementationKey();
   
               //Get the other component that is providing service
               final ComponentProfile provider = getComponentProfile( providerName, others
);
  @@ -270,12 +268,12 @@
               //that user expects it to be providing
               final ComponentInfo providerInfo = provider.getInfo();
               final ServiceDescriptor[] services = providerInfo.getServices();
  -            if( !hasMatchingService( service, services ) )
  +            if( !hasMatchingService( implementationKey, services ) )
               {
                   final String message =
                       REZ.getString( "assembly.dependency-missing-service.error",
                                      providerName,
  -                                   service,
  +                                   implementationKey,
                                      component.getMetaData().getName() );
                   throw new VerifyException( message );
               }
  @@ -435,7 +433,7 @@
           {
               final DependencyDescriptor dependency = dependencies[ i ];
               final DependencyMetaData role =
  -                component.getMetaData().getDependency( dependency.getRole() );
  +                component.getMetaData().getDependency( dependency.getKey() );
   
               //If there is no Role then the user has failed
               //to specify a needed dependency.
  @@ -443,7 +441,7 @@
               {
                   final String message =
                       REZ.getString( "assembly.unspecified-dependency.error",
  -                                   dependency.getRole(),
  +                                   dependency.getKey(),
                                      component.getMetaData().getName() );
                   throw new VerifyException( message );
               }
  @@ -454,18 +452,19 @@
        * Return true if specified service reference matches any of the
        * candidate services.
        *
  -     * @param service the service descriptor reference
  +     * @param implementationKey the service implementationKey
        * @param candidates an array of candidate services
        * @return true if candidate services contains a service that matches
        *         specified service, false otherwise
        */
  -    protected boolean hasMatchingService( final ServiceDesignator service,
  +    protected boolean hasMatchingService( final String implementationKey,
                                             final ServiceDescriptor[] candidates )
       {
           for( int i = 0; i < candidates.length; i++ )
           {
  -            final ServiceDesignator other = candidates[ i ].getServiceDesignator();
  -            if( service.matches( other ) )
  +            final String otherClassname =
  +                candidates[ i ].getImplementationKey();
  +            if( otherClassname.equals( implementationKey ) )
               {
                   return true;
               }
  
  
  
  1.16      +2 -4      jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/verifier/MetaDataVerifier.java
  
  Index: MetaDataVerifier.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/verifier/MetaDataVerifier.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- MetaDataVerifier.java	25 Aug 2002 03:12:59 -0000	1.15
  +++ MetaDataVerifier.java	8 Sep 2002 04:45:52 -0000	1.16
  @@ -14,7 +14,6 @@
   import org.apache.avalon.framework.info.ComponentInfo;
   import org.apache.avalon.framework.info.ContextDescriptor;
   import org.apache.avalon.framework.info.ServiceDescriptor;
  -import org.apache.avalon.framework.info.ServiceDesignator;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.avalon.framework.logger.Logger;
   import org.apache.avalon.framework.service.Serviceable;
  @@ -200,8 +199,7 @@
           final Class[] classes = new Class[ services.length ];
           for( int i = 0; i < services.length; i++ )
           {
  -            final ServiceDesignator service = services[ i ].getServiceDesignator();
  -            final String classname = service.getClassname();
  +            final String classname = services[ i ].getImplementationKey();
               try
               {
                   classes[ i ] = classLoader.loadClass( classname );
  
  
  

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


Mime
View raw message