donaldp     2002/08/24 01:58:07

  Modified:    containerkit/src/java/org/apache/excalibur/containerkit/verifier
                        MetaDataVerifier.java
  Log:
  Move from ComponentEntry to ComponentProfile
  
  Revision  Changes    Path
  1.14      +25 -26    
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.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- MetaDataVerifier.java     24 Aug 2002 08:55:07 -0000      1.13
  +++ MetaDataVerifier.java     24 Aug 2002 08:58:07 -0000      1.14
  @@ -11,15 +11,15 @@
   import org.apache.avalon.excalibur.i18n.Resources;
   import org.apache.avalon.framework.component.Composable;
   import org.apache.avalon.framework.context.Contextualizable;
  -import org.apache.avalon.framework.logger.AbstractLogEnabled;
  -import org.apache.avalon.framework.logger.Logger;
  -import org.apache.avalon.framework.service.Serviceable;
  -import org.apache.excalibur.containerkit.metadata.ComponentMetaData;
   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.excalibur.containerkit.kernel.ComponentEntry;
  +import org.apache.avalon.framework.logger.AbstractLogEnabled;
  +import org.apache.avalon.framework.logger.Logger;
  +import org.apache.avalon.framework.service.Serviceable;
  +import org.apache.excalibur.containerkit.metadata.ComponentMetaData;
  +import org.apache.excalibur.containerkit.registry.ComponentProfile;
   
   /**
    * This Class verifies that an implementation is valid wrt the
  @@ -46,7 +46,6 @@
   {
       private static final Resources REZ =
           ResourceManager.getPackageResources( MetaDataVerifier.class );
  -
       /**
        * The verifier for components in assembly.
        */
  @@ -83,11 +82,11 @@
        * Verfiy that specified components designate classes that implement the
        * advertised interfaces. And confrorm to expectations of [EMAIL 
PROTECTED] ComponentMetaData}.
        *
  -     * @param component the [EMAIL PROTECTED] ComponentEntry} object for the 
components
  +     * @param component the [EMAIL PROTECTED] ComponentProfile} object for 
the components
        * @param classLoader the ClassLoader to load component from
        * @throws VerifyException if an error occurs
        */
  -    public void verifyType( final ComponentEntry component,
  +    public void verifyType( final ComponentProfile component,
                               final ClassLoader classLoader )
           throws VerifyException
       {
  @@ -97,17 +96,17 @@
   
       /**
        * Verfiy that specified components designate classes that implement the
  -     * advertised interfaces. And confrorm to expectations of [EMAIL 
PROTECTED] ComponentEntry}.
  +     * advertised interfaces. And confrorm to expectations of [EMAIL 
PROTECTED] ComponentProfile}.
        *
  -     * @param component the [EMAIL PROTECTED] ComponentEntry} object for the 
components
  +     * @param component the [EMAIL PROTECTED] ComponentProfile} object for 
the components
        * @throws VerifyException if an error occurs
        */
  -    public void verifyType( final ComponentEntry component,
  +    public void verifyType( final ComponentProfile component,
                               final Class clazz )
           throws VerifyException
       {
  -        final String name = component.getProfile().getMetaData().getName();
  -        final ComponentInfo info = component.getProfile().getInfo();
  +        final String name = component.getMetaData().getName();
  +        final ComponentInfo info = component.getInfo();
           final Class[] interfaces =
               getServiceClasses( name,
                                  info.getServices(),
  @@ -123,11 +122,11 @@
        * Verify that the if  the component is not Contextualizable that it
        * does not declare Context Entrys.
        *
  -     * @param component the [EMAIL PROTECTED] ComponentEntry}
  +     * @param component the [EMAIL PROTECTED] ComponentProfile}
        * @param clazz the class implementing component
        * @throws VerifyException if fails verification check
        */
  -    protected void verifyContextPresence( final ComponentEntry component,
  +    protected void verifyContextPresence( final ComponentProfile component,
                                             final ComponentInfo info,
                                             final Class clazz )
           throws VerifyException
  @@ -141,7 +140,7 @@
               {
                   final String message =
                       REZ.getString( "metadata.declare-uneeded-entrys.error",
  -                                   
component.getProfile().getMetaData().getName(),
  +                                   component.getMetaData().getName(),
                                      getClassname( component ) );
                   throw new VerifyException( message );
               }
  @@ -155,15 +154,15 @@
        * <p>or</p>
        * <p>Is Composable/Serviceable and does declare dependencys</p>
        *
  -     * @param component the [EMAIL PROTECTED] ComponentEntry}
  +     * @param component the [EMAIL PROTECTED] ComponentProfile}
        * @param clazz the class implementing component
        * @throws VerifyException if fails verification check
        */
  -    protected void verifyDependencyPresence( final ComponentEntry component,
  +    protected void verifyDependencyPresence( final ComponentProfile 
component,
                                                final Class clazz )
           throws VerifyException
       {
  -        final int count = 
component.getProfile().getMetaData().getDependencies().length;
  +        final int count = component.getMetaData().getDependencies().length;
           final boolean aquiresServices =
               Composable.class.isAssignableFrom( clazz ) ||
               Serviceable.class.isAssignableFrom( clazz );
  @@ -173,7 +172,7 @@
               {
                   final String message =
                       REZ.getString( "metadata.declare-uneeded-deps.error",
  -                                   
component.getProfile().getMetaData().getName(),
  +                                   component.getMetaData().getName(),
                                      getClassname( component ) );
                   throw new VerifyException( message );
               }
  @@ -220,7 +219,7 @@
       }
   
       /**
  -     * Load class object for specified [EMAIL PROTECTED] ComponentEntry}.
  +     * Load class object for specified [EMAIL PROTECTED] ComponentProfile}.
        *
        * @param classLoader the ClassLoader to use
        * @param component the meta data associate with component
  @@ -228,7 +227,7 @@
        * @throws VerifyException if unable to aquire class object
        */
       private Class getClass( final ClassLoader classLoader,
  -                            final ComponentEntry component )
  +                            final ComponentProfile component )
           throws VerifyException
       {
           Class clazz = null;
  @@ -240,7 +239,7 @@
           {
               final String message =
                   REZ.getString( "assembly.bad-class.error",
  -                               
component.getProfile().getMetaData().getName(),
  +                               component.getMetaData().getName(),
                                  getClassname( component ),
                                  e.toString() );
               throw new VerifyException( message );
  @@ -254,8 +253,8 @@
        * @param component the component
        * @return the classname for component
        */
  -    private String getClassname( final ComponentEntry component )
  +    private String getClassname( final ComponentProfile component )
       {
  -        return component.getProfile().getMetaData().getImplementationKey();
  +        return component.getMetaData().getImplementationKey();
       }
   }
  
  
  

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

Reply via email to