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/metadata ComponentMetaData.java
Date Tue, 25 Jun 2002 04:24:39 GMT
donaldp     2002/06/24 21:24:39

  Modified:    containerkit/src/java/org/apache/excalibur/containerkit/kernel
                        ComponentEntry.java
               containerkit/src/java/org/apache/excalibur/containerkit/metadata
                        ComponentMetaData.java
  Log:
  ComponentMetaData now holds configuration/parameters values for component
  
  Revision  Changes    Path
  1.6       +24 -52    jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/kernel/ComponentEntry.java
  
  Index: ComponentEntry.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/kernel/ComponentEntry.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ComponentEntry.java	23 Jun 2002 23:14:36 -0000	1.5
  +++ ComponentEntry.java	25 Jun 2002 04:24:39 -0000	1.6
  @@ -7,7 +7,6 @@
    */
   package org.apache.excalibur.containerkit.kernel;
   
  -import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.excalibur.containerkit.metadata.ComponentMetaData;
   
   /**
  @@ -32,82 +31,55 @@
       private Object m_object;
   
       /**
  -     * The configuration for component.
  -     * Should be null if component does not implement Configurable.
  +     * Creation of a new <code>ComponentEntry</code> instance.
  +     * @param metaData the {@link ComponentMetaData} instance defining the component.
        */
  -    private Configuration m_configuration;
  -
  -
  -   /**
  -    * Creation of a new <code>ComponentEntry</code> instance.
  -    * @param metaData the {@link ComponentMetaData} instance defining the component.
  -    */
       public ComponentEntry( final ComponentMetaData metaData )
       {
           m_metaData = metaData;
       }
   
  -   /**
  -    * Returns the componet entry name.  The implementation returns the 
  -    * name of the underlying {@link ComponentMetaData} instance.
  -    * @return the entry name
  -    */
  +    /**
  +     * Returns the componet entry name.  The implementation returns the
  +     * name of the underlying {@link ComponentMetaData} instance.
  +     * @return the entry name
  +     */
       public String getName()
       {
           return getMetaData().getName();
       }
   
  -   /**
  -    * Returns the underlying {@link ComponentMetaData} instance.
  -    * @return the component meta data instance
  -    */
  +    /**
  +     * Returns the underlying {@link ComponentMetaData} instance.
  +     * @return the component meta data instance
  +     */
       public ComponentMetaData getMetaData()
       {
           return m_metaData;
       }
   
  -   /**
  -    * Returns the {@link org.apache.avalon.framework.configuration.Configuration} instance
  -    * for this entry.
  -    * @return the entry configuration
  -    */
  -    public Configuration getConfiguration()
  -    {
  -        return m_configuration;
  -    }
  -
  -   /**
  -    * Set the {@link org.apache.avalon.framework.configuration.Configuration} instance
  -    * for this entry.
  -    * @param configuration the entry configuration
  -    */
  -    public void setConfiguration( final Configuration configuration )
  -    {
  -        m_configuration = configuration;
  -    }
  -
  -   /**
  -    * Returns the the object associated with this entry.
  -    * @return the entry object
  -    */
  +    /**
  +     * Returns the the object associated with this entry.
  +     * @return the entry object
  +     */
       public Object getObject()
       {
           return m_object;
       }
   
  -   /**
  -    * Set the object assoaiated to this entry.
  -    * @param object the object to associate with the entry
  -    */
  +    /**
  +     * Set the object assoaiated to this entry.
  +     * @param object the object to associate with the entry
  +     */
       public void setObject( final Object object )
       {
           m_object = object;
       }
   
  -   /**
  -    * Returns TRUE is the object for this entry has been set.
  -    * @return the active status of this entry
  -    */
  +    /**
  +     * Returns TRUE is the object for this entry has been set.
  +     * @return the active status of this entry
  +     */
       public boolean isActive()
       {
           return ( null != getObject() );
  
  
  
  1.5       +44 -8     jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/metadata/ComponentMetaData.java
  
  Index: ComponentMetaData.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/metadata/ComponentMetaData.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ComponentMetaData.java	24 Jun 2002 18:05:18 -0000	1.4
  +++ ComponentMetaData.java	25 Jun 2002 04:24:39 -0000	1.5
  @@ -8,6 +8,8 @@
   package org.apache.excalibur.containerkit.metadata;
   
   import org.apache.excalibur.containerkit.metainfo.ComponentInfo;
  +import org.apache.avalon.framework.parameters.Parameters;
  +import org.apache.avalon.framework.configuration.Configuration;
   
   /**
    * Each component declared in the application is represented by
  @@ -38,18 +40,30 @@
       /**
        * The info object for component type.
        */
  -    private final ComponentInfo m_info;
  +    private final ComponentInfo m_componentInfo;
  +
  +    /**
  +     * The parameters for component (if any).
  +     */
  +    private final Parameters m_parameters;
  +
  +    /**
  +     * The configuration for component (if any).
  +     */
  +    private final Configuration m_configuration;
   
       /**
        * Create a ComponentMetaData.
        *
        * @param name the abstract name of component meta data instance
        * @param dependencies the meta data for any dependencies
  -     * @param info the component info desribing the component type
  +     * @param componentInfo the component componentInfo desribing the component type
        */
       public ComponentMetaData( final String name,
                                 final DependencyMetaData[] dependencies,
  -                              final ComponentInfo info )
  +                              final Parameters parameters,
  +                              final Configuration configuration,
  +                              final ComponentInfo componentInfo )
       {
           if( null == name )
           {
  @@ -59,14 +73,16 @@
           {
               throw new NullPointerException( "dependencies" );
           }
  -        if( null == info )
  +        if( null == componentInfo )
           {
  -            throw new NullPointerException( "info" );
  +            throw new NullPointerException( "componentInfo" );
           }
   
           m_name = name;
           m_dependencies = dependencies;
  -        m_info = info;
  +        m_parameters = parameters;
  +        m_configuration = configuration;
  +        m_componentInfo = componentInfo;
       }
   
       /**
  @@ -98,7 +114,7 @@
        */
       public ComponentInfo getComponentInfo()
       {
  -        return m_info;
  +        return m_componentInfo;
       }
   
       /**
  @@ -109,6 +125,26 @@
       public DependencyMetaData[] getDependencies()
       {
           return m_dependencies;
  +    }
  +
  +    /**
  +     * Return the Parameters for Component (if any).
  +     *
  +     * @return the Parameters for Component (if any).
  +     */
  +    public Parameters getParameters()
  +    {
  +        return m_parameters;
  +    }
  +
  +    /**
  +     * Return the Configuration for Component (if any).
  +     *
  +     * @return the Configuration for Component (if any).
  +     */
  +    public Configuration getConfiguration()
  +    {
  +        return m_configuration;
       }
   
       /**
  
  
  

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