avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/meta/src/java/org/apache/excalibur/meta/model/verifier ProfileVerifier.java
Date Mon, 18 Nov 2002 13:01:04 GMT
mcconnell    2002/11/18 05:01:03

  Modified:    meta     build.xml
               meta/src/java/org/apache/excalibur/meta/info
                        InfoDescriptor.java ReferenceDescriptor.java
                        Type.java
               meta/src/java/org/apache/excalibur/meta/info/builder
                        SerializedServiceCreator.java ServiceBuilder.java
                        ServiceCreator.java XMLServiceCreator.java
               meta/src/java/org/apache/excalibur/meta/model Profile.java
               meta/src/java/org/apache/excalibur/meta/model/builder
                        ProfileBuilder.java
               meta/src/java/org/apache/excalibur/meta/model/verifier
                        ProfileVerifier.java
  Added:       meta/src/java/org/apache/excalibur/meta/info Service.java
  Removed:     meta/src/java/org/apache/excalibur/meta/info
                        ServiceDefinition.java
  Log:
  Normalizing naming conventions between the Type and Service meta
  classes and method signatures.
  
  Revision  Changes    Path
  1.10      +2 -2      jakarta-avalon-excalibur/meta/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/meta/build.xml,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- build.xml	18 Nov 2002 11:23:45 -0000	1.9
  +++ build.xml	18 Nov 2002 13:01:03 -0000	1.10
  @@ -332,8 +332,8 @@
   
     <target name="patch">
       <replace dir="src/java" summary="true"
  -       token="ComponentDescriptor"
  -       value="InfoDescriptor" >
  +       token="getImplementationClassName"
  +       value="getClassname" >
        <include name="**/*.*"/>
       </replace>
     </target>
  
  
  
  1.2       +2 -16     jakarta-avalon-excalibur/meta/src/java/org/apache/excalibur/meta/info/InfoDescriptor.java
  
  Index: InfoDescriptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/meta/src/java/org/apache/excalibur/meta/info/InfoDescriptor.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- InfoDescriptor.java	18 Nov 2002 11:23:45 -0000	1.1
  +++ InfoDescriptor.java	18 Nov 2002 13:01:03 -0000	1.2
  @@ -136,28 +136,14 @@
       }
   
       /**
  -     * Return the implementation key for component (usually classname).
  -     *
  -     * @return the implementation key for component (usually classname).
  -     * @depricated The notion of a implemetation key is undefined. This
  -     *    method is depricated in favour of the getImplementationClassName() 
  -     *    method
  -     */
  -    public String getImplementationKey()
  -    {
  -        return m_classname;
  -    }
  -
  -    /**
        * Return the implementation class name for the compoennt type.
        *
        * @return the implementation class name
        */
  -    public String getImplementationClassName()
  +    public String getClassname()
       {
           return m_classname;
       }
  -
   
       /**
        * Return the version of component.
  
  
  
  1.7       +4 -4      jakarta-avalon-excalibur/meta/src/java/org/apache/excalibur/meta/info/ReferenceDescriptor.java
  
  Index: ReferenceDescriptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/meta/src/java/org/apache/excalibur/meta/info/ReferenceDescriptor.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ReferenceDescriptor.java	23 Oct 2002 16:34:46 -0000	1.6
  +++ ReferenceDescriptor.java	18 Nov 2002 13:01:03 -0000	1.7
  @@ -179,13 +179,13 @@
           {
               match = ( (ReferenceDescriptor)other ).matches( this );
           }
  -        else if( other instanceof ServiceDefinition )
  +        else if( other instanceof Service )
           {
  -            match = ( (ServiceDefinition)other ).matches( this );
  +            match = ( (Service)other ).matches( this );
           }
           else if( other instanceof ServiceDescriptor )
           {
  -            match = ( (ServiceDefinition)other ).matches( this );
  +            match = ( (Service)other ).matches( this );
           }
   
           return match;
  
  
  
  1.12      +3 -3      jakarta-avalon-excalibur/meta/src/java/org/apache/excalibur/meta/info/Type.java
  
  Index: Type.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/meta/src/java/org/apache/excalibur/meta/info/Type.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Type.java	18 Nov 2002 11:23:45 -0000	1.11
  +++ Type.java	18 Nov 2002 13:01:03 -0000	1.12
  @@ -306,7 +306,7 @@
           }
   
           final String xconfig =
  -            getInfo().getImplementationClassName().replace( '.', '/' ) + ".xconfig";
  +            getInfo().getClassname().replace( '.', '/' ) + ".xconfig";
           final InputStream stream =
               loader.getResourceAsStream( xconfig );
           if( stream == null )
  @@ -382,6 +382,6 @@
       public String toString()
       {
           return "Type name: " + getInfo().getName()
  -            + " key: " + getInfo().getImplementationClassName();
  +            + " key: " + getInfo().getClassname();
       }
   }
  
  
  
  1.4       +138 -42   jakarta-avalon-excalibur/meta/src/java/org/apache/excalibur/meta/info/Service.java
  
  
  
  
  1.7       +5 -5      jakarta-avalon-excalibur/meta/src/java/org/apache/excalibur/meta/info/builder/SerializedServiceCreator.java
  
  Index: SerializedServiceCreator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/meta/src/java/org/apache/excalibur/meta/info/builder/SerializedServiceCreator.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SerializedServiceCreator.java	23 Oct 2002 16:34:47 -0000	1.6
  +++ SerializedServiceCreator.java	18 Nov 2002 13:01:03 -0000	1.7
  @@ -57,10 +57,10 @@
   
   import java.io.InputStream;
   import java.io.ObjectInputStream;
  -import org.apache.excalibur.meta.info.ServiceDefinition;
  +import org.apache.excalibur.meta.info.Service;
   
   /**
  - * Create {@link ServiceDefinition} from stream made up of a serialized object.
  + * Create {@link Service} from stream made up of a serialized object.
    *
    * @author <a href="mailto:mcconnell@apache.org">Stephen McConnell</a>
    * @version $Revision$ $Date$
  @@ -76,10 +76,10 @@
        * @return the meta-info instance that describes the component type
        * @exception Exception if an error occurs
        */
  -    public ServiceDefinition createService( final String key, final InputStream input )
  +    public Service createService( final String key, final InputStream input )
           throws Exception
       {
           final ObjectInputStream stream = new ObjectInputStream( input );
  -        return (ServiceDefinition)stream.readObject();
  +        return (Service)stream.readObject();
       }
   }
  
  
  
  1.7       +15 -15    jakarta-avalon-excalibur/meta/src/java/org/apache/excalibur/meta/info/builder/ServiceBuilder.java
  
  Index: ServiceBuilder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/meta/src/java/org/apache/excalibur/meta/info/builder/ServiceBuilder.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ServiceBuilder.java	23 Oct 2002 16:34:47 -0000	1.6
  +++ ServiceBuilder.java	18 Nov 2002 13:01:03 -0000	1.7
  @@ -60,10 +60,10 @@
   import org.apache.avalon.excalibur.i18n.Resources;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.avalon.framework.logger.Logger;
  -import org.apache.excalibur.meta.info.ServiceDefinition;
  +import org.apache.excalibur.meta.info.Service;
   
   /**
  - * A ServiceBuilder is responsible for building {@link ServiceDefinition}
  + * A ServiceBuilder is responsible for building {@link Service}
    * objects from Configuration objects.
    *
    * <p><b>UML</b></p>
  @@ -96,32 +96,32 @@
       }
   
       /**
  -     * Create a {@link ServiceDefinition} object for specified Class.
  +     * Create a {@link Service} object for specified Class.
        *
        * @param clazz The class of Component
        * @return the created Service
        * @throws Exception if an error occurs
        */
  -    public ServiceDefinition build( final Class clazz )
  +    public Service build( final Class clazz )
           throws Exception
       {
           return build( clazz.getName(), clazz.getClassLoader() );
       }
   
       /**
  -     * Create a {@link ServiceDefinition} object for specified
  +     * Create a {@link Service} object for specified
        * classname, in specified ClassLoader.
        *
        * @param classname The classname of Component
        * @param classLoader the ClassLoader to load info from
  -     * @return the created ServiceDefinition
  +     * @return the created Service
        * @throws Exception if an error occurs
        */
  -    public ServiceDefinition build( final String classname,
  +    public Service build( final String classname,
                                       final ClassLoader classLoader )
           throws Exception
       {
  -        final ServiceDefinition info = buildFromSerDescriptor( classname, classLoader );
  +        final Service info = buildFromSerDescriptor( classname, classLoader );
           if( null != info )
           {
               return info;
  @@ -133,14 +133,14 @@
       }
   
       /**
  -     * Build ServiceDefinition from the XML descriptor format.
  +     * Build Service from the XML descriptor format.
        *
        * @param classname The classname of Component
        * @param classLoader the ClassLoader to load info from
  -     * @return the created ServiceDefinition
  +     * @return the created Service
        * @throws Exception if an error occurs
        */
  -    private ServiceDefinition buildFromSerDescriptor( final String classname,
  +    private Service buildFromSerDescriptor( final String classname,
                                                         final ClassLoader classLoader )
           throws Exception
       {
  @@ -157,14 +157,14 @@
       }
   
       /**
  -     * Build ServiceDefinition from the XML descriptor format.
  +     * Build Service from the XML descriptor format.
        *
        * @param classname The classname of Component
        * @param classLoader the ClassLoader to load info from
  -     * @return the created ServiceDefinition
  +     * @return the created Service
        * @throws Exception if an error occurs
        */
  -    private ServiceDefinition buildFromXMLDescriptor( final String classname,
  +    private Service buildFromXMLDescriptor( final String classname,
                                                         final ClassLoader classLoader )
           throws Exception
       {
  
  
  
  1.6       +6 -6      jakarta-avalon-excalibur/meta/src/java/org/apache/excalibur/meta/info/builder/ServiceCreator.java
  
  Index: ServiceCreator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/meta/src/java/org/apache/excalibur/meta/info/builder/ServiceCreator.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ServiceCreator.java	23 Oct 2002 16:34:47 -0000	1.5
  +++ ServiceCreator.java	18 Nov 2002 13:01:03 -0000	1.6
  @@ -56,10 +56,10 @@
   package org.apache.excalibur.meta.info.builder;
   
   import java.io.InputStream;
  -import org.apache.excalibur.meta.info.ServiceDefinition;
  +import org.apache.excalibur.meta.info.Service;
   
   /**
  - * Interface used to create a {@link ServiceDefinition}
  + * Interface used to create a {@link Service}
    * from a stream.
    *
    * @author <a href="mailto:mcconnell@apache.org">Stephen McConnell</a>
  @@ -68,13 +68,13 @@
   public interface ServiceCreator
   {
       /**
  -     * Create a {@link ServiceDefinition} from stream
  +     * Create a {@link Service} from stream
        *
        * @param key the name of the service type
        * @param input the input stream that the resource is loaded from
  -     * @return the created {@link ServiceDefinition}
  +     * @return the created {@link Service}
        * @exception Exception if an error occurs
        */
  -    ServiceDefinition createService( String key, InputStream input )
  +    Service createService( String key, InputStream input )
           throws Exception;
   }
  
  
  
  1.9       +9 -9      jakarta-avalon-excalibur/meta/src/java/org/apache/excalibur/meta/info/builder/XMLServiceCreator.java
  
  Index: XMLServiceCreator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/meta/src/java/org/apache/excalibur/meta/info/builder/XMLServiceCreator.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- XMLServiceCreator.java	23 Oct 2002 16:34:47 -0000	1.8
  +++ XMLServiceCreator.java	18 Nov 2002 13:01:03 -0000	1.9
  @@ -64,12 +64,12 @@
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.excalibur.meta.ConfigurationBuilder;
  -import org.apache.excalibur.meta.info.ServiceDefinition;
  +import org.apache.excalibur.meta.info.Service;
   import org.xml.sax.InputSource;
   
   /**
    * Utility class the handles the internalization of an XML description
  - * of a service into a {@link ServiceDefinition} instance.
  + * of a service into a {@link Service} instance.
    *
    * @author <a href="mailto:mcconnell@apache.org">Stephen McConnell</a>
    * @version $Revision$ $Date$
  @@ -82,14 +82,14 @@
           ResourceManager.getPackageResources( XMLServiceCreator.class );
   
       /**
  -     * Create a {@link ServiceDefinition} from stream
  +     * Create a {@link Service} from stream
        *
        * @param key the name of the service type
        * @param input the input stream that the resource is loaded from
  -     * @return the created {@link ServiceDefinition}
  +     * @return the created {@link Service}
        * @exception Exception if an error occurs
        */
  -    public ServiceDefinition createService( String key, InputStream input )
  +    public Service createService( String key, InputStream input )
           throws Exception
       {
           if( input == null )
  @@ -103,7 +103,7 @@
       }
   
       /**
  -     * Create a {@link ServiceDefinition} object for a supplied classname from
  +     * Create a {@link Service} object for a supplied classname from
        * configuration data.
        *
        * @param classname the classname of the service
  @@ -111,7 +111,7 @@
        * @return the created Service
        * @throws Exception if an error occurs
        */
  -    private ServiceDefinition build( final String classname, final Configuration info )
  +    private Service build( final String classname, final Configuration info )
           throws Exception
       {
           if( getLogger().isDebugEnabled() )
  @@ -146,7 +146,7 @@
               getLogger().debug( message );
           }
   
  -        return new ServiceDefinition( classname, version, attributes );
  +        return new Service( classname, version, attributes );
       }
   
       /**
  
  
  
  1.4       +3 -3      jakarta-avalon-excalibur/meta/src/java/org/apache/excalibur/meta/model/Profile.java
  
  Index: Profile.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/meta/src/java/org/apache/excalibur/meta/model/Profile.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Profile.java	18 Nov 2002 11:23:46 -0000	1.3
  +++ Profile.java	18 Nov 2002 13:01:03 -0000	1.4
  @@ -376,7 +376,7 @@
           }
   
           final Class type = classloader.loadClass(
  -            getType().getInfo().getImplementationClassName() );
  +            getType().getInfo().getClassname() );
           if( !Configurable.class.isAssignableFrom( type ) )
           {
               return null;
  @@ -462,7 +462,7 @@
           buffer.append( "PROFILE REPORT\n" );
           buffer.append( "\n  name: " + getName() );
           buffer.append( "\n  base: " + getType().getInfo().getName() );
  -        buffer.append( "\n  key: " + getType().getInfo().getImplementationClassName() );
  +        buffer.append( "\n  key: " + getType().getInfo().getClassname() );
           buffer.append( "\n  context: " + getContext() );
           buffer.append( "\n  configuration:" );
           if( getConfiguration() != null )
  
  
  
  1.4       +2 -2      jakarta-avalon-excalibur/meta/src/java/org/apache/excalibur/meta/model/builder/ProfileBuilder.java
  
  Index: ProfileBuilder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/meta/src/java/org/apache/excalibur/meta/model/builder/ProfileBuilder.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ProfileBuilder.java	18 Nov 2002 11:23:46 -0000	1.3
  +++ ProfileBuilder.java	18 Nov 2002 13:01:03 -0000	1.4
  @@ -105,7 +105,7 @@
           throws Exception
       {
           final String xprofile =
  -            type.getInfo().getImplementationClassName().replace( '.', '/' ) + ".xprofile";
  +            type.getInfo().getClassname().replace( '.', '/' ) + ".xprofile";
           final InputStream inputStream =
               loader.getResourceAsStream( xprofile );
   
  
  
  
  1.3       +2 -2      jakarta-avalon-excalibur/meta/src/java/org/apache/excalibur/meta/model/verifier/ProfileVerifier.java
  
  Index: ProfileVerifier.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/meta/src/java/org/apache/excalibur/meta/model/verifier/ProfileVerifier.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ProfileVerifier.java	18 Nov 2002 11:23:46 -0000	1.2
  +++ ProfileVerifier.java	18 Nov 2002 13:01:03 -0000	1.3
  @@ -320,6 +320,6 @@
        */
       private String getClassname( final Profile profile )
       {
  -        return profile.getType().getInfo().getImplementationClassName();
  +        return profile.getType().getInfo().getClassname();
       }
   }
  
  
  

--
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