You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by ni...@apache.org on 2004/02/07 07:06:30 UTC

cvs commit: avalon/merlin/facilities/http/impl/src/java/org/apache/avalon/http/impl DefaultModelListener.java

niclas      2004/02/06 22:06:30

  Modified:    merlin   INSTALL.TXT
               merlin/activation/impl/src/java/org/apache/avalon/activation/appliance/impl
                        AbstractBlock.java
               merlin/composition/api/src/java/org/apache/avalon/composition/event
                        CompositionEvent.java
               merlin/composition/api/src/java/org/apache/avalon/composition/model
                        ContainmentModel.java
               merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl
                        DefaultContainmentModel.java
               merlin/facilities/http/impl/src/java/org/apache/avalon/http/impl
                        DefaultModelListener.java
  Added:       merlin/composition/api/src/java/org/apache/avalon/composition/event
                        CompositionListener.java
  Removed:     merlin/composition/api/src/java/org/apache/avalon/composition/event
                        CompositionEventListener.java ContainmentEvent.java
                        ModelEvent.java
  Log:
  Change the CompositionEventListener to CompositionListener, in accordance with JavaBeans conventions. Also removed super classes of the event that has no meaning.
  
  Revision  Changes    Path
  1.11      +99 -99    avalon/merlin/INSTALL.TXT
  
  Index: INSTALL.TXT
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/INSTALL.TXT,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- INSTALL.TXT	5 Feb 2004 03:17:44 -0000	1.10
  +++ INSTALL.TXT	7 Feb 2004 06:06:30 -0000	1.11
  @@ -1,99 +1,99 @@
  -
  -PROJECT: Merlin @VERSION@
  -====================================================================
  -
  -DESCRIPTION: 
  -------------
  -
  -This directory contains the merlin system installation and related 
  -resources.
  -
  -  /merlin
  -    /bin
  -    /config
  -    /system
  -    README.TXT
  -    LICENSE.TXT
  -    INSTALL.TXT
  -  /plugins
  -    @META_PLUGIN_JAR@
  -    @MERLIN_PLUGIN_JAR@
  -
  -
  -Installing Merlin.
  -------------------
  -
  -To use Merlin command line support or the Merlin NT Service
  -you will need to define the MERLIN_HOME environment
  -variable for your system and include MERLIN_HOME/bin in
  -your system path.  The MERLIN_HOME environment variable
  -should point to the merlin directory.
  -
  -Under Windows you can set environment variables by selecting the 
  -Environment Tab from the System Control Panel.
  -
  -Under Lunix you can do this as follows:
  -
  -  $ echo '
  -  > # set location of merlin
  -  > export MERLIN_HOME=/opt/merlin
  -  > # include it in the path
  -  > export PATH=$PATH:$MERLIN_HOME/bin
  -  > ' >> ~/.bash_profile
  -  $ source ~/.bash_profile
  -
  -Versions of Merlin prior to the 3.2-dev 20031210 build maintained 
  -a local repository of jar files under the %MERLIN_HOME%/repository
  -directory.  As of the 20031210 build the repository is maintained 
  -under AVALON_HOME which defaults to ${user.home}/.avalon.  To 
  -override this behaviour you can either define a AVALON_HOME 
  -environment variable or you can add a merlin.properties file to 
  -${user.home} containing the "merlin.repository" property key and 
  -a value point to you preferred repository location.
  -
  -To confirm that your environment variables are correct, you
  -should open a new command window and invoke the Merlin
  -CLI application.
  -
  -Under DOS:
  -
  -  $ merlin -version
  -
  -Under Lunix:
  -
  -  $ merlin.sh -version
  -
  -The installation of Merlin is now complete, however, two plugins are
  -provided with the installation supporting merlin development under the 
  -Maven platform.  These plugins should be placed in the Maven plugin 
  -directory (${maven.home.local}\plugins).
  -
  -  [YOUR-MAVEN-HOME]\plugins\@META_PLUGIN_JAR@
  -  [YOUR-MAVEN-HOME]\plugins\@MERLIN_PLUGIN_JAR@
  -
  -Please note that if you are upgrading an existing installation you must
  -delete the following two directories:
  -
  -  [YOUR-MAVEN-HOME]\plugins\avalon-meta-plugin-*
  -  [YOUR-MAVEN-HOME]\plugins\merlin-plugin-* 
  -
  -Replace the existing avalon-meta and merlin plugin jar files with the supplied
  -versions.  Finally, delete all *.cache files in the Maven plugin directory.
  -
  -You now have everything in place to start using the Merlin Tutorial or 
  -building you own components.  If you have any problems, please subscribe
  -and post a message to users@avalon.apache.org.
  -
  -Special Note for JRE 1.3 and earlier.
  --------------------------------------
  -
  -Some applications assume that XML parsing classes are available withing
  -the JRE.  This is not the case with JDK 1.3 and earlier.  To resolve this
  -you can copy the following files to the JAVAHOME/lib/ext directory or 
  -declare an alternative directory as a JVM argument under the 
  -MERLIN_JVM_OPTS environment variable, i.e. -Djava.ext.dir=someDirectory
  -
  -  system/xml-apis/jars/xml-apis-2.0.2.jar
  -  system/xml-apis/jars/xmlParserAPIs-2.0.2.jar
  -  system/xerces/jars/xerces-2.4.0.jar
  -
  +
  +PROJECT: Merlin @VERSION@
  +====================================================================
  +
  +DESCRIPTION: 
  +------------
  +
  +This directory contains the merlin system installation and related 
  +resources.
  +
  +  /merlin
  +    /bin
  +    /config
  +    /system
  +    README.TXT
  +    LICENSE.TXT
  +    INSTALL.TXT
  +  /plugins
  +    @META_PLUGIN_JAR@
  +    @MERLIN_PLUGIN_JAR@
  +
  +
  +Installing Merlin.
  +------------------
  +
  +To use Merlin command line support or the Merlin NT Service
  +you will need to define the MERLIN_HOME environment
  +variable for your system and include MERLIN_HOME/bin in
  +your system path.  The MERLIN_HOME environment variable
  +should point to the merlin directory.
  +
  +Under Windows you can set environment variables by selecting the 
  +Environment Tab from the System Control Panel.
  +
  +Under Lunix you can do this as follows:
  +
  +  $ echo '
  +  > # set location of merlin
  +  > export MERLIN_HOME=/opt/merlin
  +  > # include it in the path
  +  > export PATH=$PATH:$MERLIN_HOME/bin
  +  > ' >> ~/.bash_profile
  +  $ source ~/.bash_profile
  +
  +Versions of Merlin prior to the 3.2-dev 20031210 build maintained 
  +a local repository of jar files under the %MERLIN_HOME%/repository
  +directory.  As of the 20031210 build the repository is maintained 
  +under AVALON_HOME which defaults to ${user.home}/.avalon.  To 
  +override this behaviour you can either define a AVALON_HOME 
  +environment variable or you can add a merlin.properties file to 
  +${user.home} containing the "merlin.repository" property key and 
  +a value point to you preferred repository location.
  +
  +To confirm that your environment variables are correct, you
  +should open a new command window and invoke the Merlin
  +CLI application.
  +
  +Under DOS:
  +
  +  $ merlin -version
  +
  +Under Lunix:
  +
  +  $ merlin.sh -version
  +
  +The installation of Merlin is now complete, however, two plugins are
  +provided with the installation supporting merlin development under the 
  +Maven platform.  These plugins should be placed in the Maven plugin 
  +directory (${maven.home.local}\plugins).
  +
  +  [YOUR-MAVEN-HOME]\plugins\@META_PLUGIN_JAR@
  +  [YOUR-MAVEN-HOME]\plugins\@MERLIN_PLUGIN_JAR@
  +
  +Please note that if you are upgrading an existing installation you must
  +delete the following two directories:
  +
  +  [YOUR-MAVEN-HOME]\plugins\avalon-meta-plugin-*
  +  [YOUR-MAVEN-HOME]\plugins\merlin-plugin-* 
  +
  +Replace the existing avalon-meta and merlin plugin jar files with the supplied
  +versions.  Finally, delete all *.cache files in the Maven plugin directory.
  +
  +You now have everything in place to start using the Merlin Tutorial or 
  +building you own components.  If you have any problems, please subscribe
  +and post a message to users@avalon.apache.org.
  +
  +Special Note for JRE 1.3 and earlier.
  +-------------------------------------
  +
  +Some applications assume that XML parsing classes are available withing
  +the JRE.  This is not the case with JDK 1.3 and earlier.  To resolve this
  +you can copy the following files to the JAVAHOME/lib/ext directory or 
  +declare an alternative directory as a JVM argument under the 
  +MERLIN_JVM_OPTS environment variable, i.e. -Djava.ext.dir=someDirectory
  +
  +  system/xml-apis/jars/xml-apis-2.0.2.jar
  +  system/xml-apis/jars/xmlParserAPIs-2.0.2.jar
  +  system/xerces/jars/xerces-2.4.0.jar
  +
  
  
  
  1.20      +4 -4      avalon/merlin/activation/impl/src/java/org/apache/avalon/activation/appliance/impl/AbstractBlock.java
  
  Index: AbstractBlock.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/activation/impl/src/java/org/apache/avalon/activation/appliance/impl/AbstractBlock.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- AbstractBlock.java	6 Feb 2004 15:27:13 -0000	1.19
  +++ AbstractBlock.java	7 Feb 2004 06:06:30 -0000	1.20
  @@ -39,7 +39,7 @@
   import org.apache.avalon.activation.appliance.NoProviderDefinitionException;
   
   import org.apache.avalon.composition.event.CompositionEvent;
  -import org.apache.avalon.composition.event.CompositionEventListener;
  +import org.apache.avalon.composition.event.CompositionListener;
   import org.apache.avalon.composition.model.SystemContext;
   import org.apache.avalon.composition.model.ContainmentModel;
   import org.apache.avalon.composition.model.ClassLoaderModel;
  @@ -69,7 +69,7 @@
    * @version $Revision$ $Date$
    */
   public abstract class AbstractBlock extends AbstractAppliance 
  -  implements Block, CompositionEventListener
  +  implements Block, CompositionListener, Commissionable
   {
       //-------------------------------------------------------------------
       // static
  @@ -158,7 +158,7 @@
       }
   
       //-------------------------------------------------------------------
  -    // CompositionEventListener
  +    // CompositionListener
       //-------------------------------------------------------------------
   
       /**
  
  
  
  1.6       +12 -2     avalon/merlin/composition/api/src/java/org/apache/avalon/composition/event/CompositionEvent.java
  
  Index: CompositionEvent.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/composition/api/src/java/org/apache/avalon/composition/event/CompositionEvent.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- CompositionEvent.java	24 Jan 2004 23:25:24 -0000	1.5
  +++ CompositionEvent.java	7 Feb 2004 06:06:30 -0000	1.6
  @@ -28,7 +28,7 @@
    * @author <a href="mailto:mcconnell@apache.org">Stephen McConnell</a>
    * @version $Revision$ $Date$
    */
  -public class CompositionEvent extends ContainmentEvent
  +public class CompositionEvent extends java.util.EventObject
   {
       /**
        * The model added or removed from the containment model.
  @@ -58,6 +58,16 @@
           return m_child;
       }
   
  +    /**
  +     * Return the the containment model that generated the event.
  +     *
  +     * @return the source containment model
  +     */
  +    public ContainmentModel getContainmentModel()
  +    {
  +        return (ContainmentModel) getSource();
  +    }
  +    
       public String toString()
       {
           return "composition-event: [source: " 
  
  
  
  1.1                  avalon/merlin/composition/api/src/java/org/apache/avalon/composition/event/CompositionListener.java
  
  Index: CompositionListener.java
  ===================================================================
  /* 
   * Copyright 2004 Apache Software Foundation
   * Licensed  under the  Apache License,  Version 2.0  (the "License");
   * you may not use  this file  except in  compliance with the License.
   * You may obtain a copy of the License at 
   * 
   *   http://www.apache.org/licenses/LICENSE-2.0
   * 
   * Unless required by applicable law or agreed to in writing, software
   * distributed  under the  License is distributed on an "AS IS" BASIS,
   * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or
   * implied.
   * 
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  
  package org.apache.avalon.composition.event;
  
  import java.util.EventListener;
  
  
  /**
   * A listener for model composition changes.
   *
   * @author <a href="mailto:mcconnell@apache.org">Stephen McConnell</a>
   * @version $Revision: 1.1 $ $Date: 2004/02/07 06:06:30 $
   */
  public interface CompositionListener extends EventListener
  {
      /**
       * Notify the listener that a model has been added to 
       * a source containment model.
       *
       * @param event the containment event raised by the 
       *    source containment model
       */
      void modelAdded( CompositionEvent event );
  
      /**
       * Notify the listener that a model has been removed from 
       * a source containment model.
       *
       * @param event the containment event raised by the 
       *    source containment model
       */
      void modelRemoved( CompositionEvent event );
  
  
  }
  
  
  
  1.15      +4 -4      avalon/merlin/composition/api/src/java/org/apache/avalon/composition/model/ContainmentModel.java
  
  Index: ContainmentModel.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/composition/api/src/java/org/apache/avalon/composition/model/ContainmentModel.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- ContainmentModel.java	6 Feb 2004 15:27:14 -0000	1.14
  +++ ContainmentModel.java	7 Feb 2004 06:06:30 -0000	1.15
  @@ -23,7 +23,7 @@
   import org.apache.avalon.composition.data.ServiceDirective;
   import org.apache.avalon.logging.data.CategoriesDirective;
   import org.apache.avalon.composition.data.TargetDirective;
  -import org.apache.avalon.composition.event.CompositionEventListener;
  +import org.apache.avalon.composition.event.CompositionListener;
   import org.apache.avalon.meta.info.DependencyDescriptor;
   import org.apache.avalon.meta.info.StageDescriptor;
   
  @@ -180,11 +180,11 @@
       * Add a composition listener to the model.
       * @param listener the composition listener
       */
  -    void addCompositionListener( CompositionEventListener listener );
  +    void addCompositionListener( CompositionListener listener );
   
      /**
       * Remove a composition listener from the model.
       * @param listener the composition listener
       */
  -    void removeCompositionListener( CompositionEventListener listener );
  +    void removeCompositionListener( CompositionListener listener );
   }
  
  
  
  1.25      +8 -8      avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultContainmentModel.java
  
  Index: DefaultContainmentModel.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultContainmentModel.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- DefaultContainmentModel.java	24 Jan 2004 23:25:27 -0000	1.24
  +++ DefaultContainmentModel.java	7 Feb 2004 06:06:30 -0000	1.25
  @@ -43,7 +43,7 @@
   import org.apache.avalon.composition.data.builder.ContainmentProfileBuilder;
   import org.apache.avalon.composition.data.builder.XMLContainmentProfileCreator;
   import org.apache.avalon.composition.event.CompositionEvent;
  -import org.apache.avalon.composition.event.CompositionEventListener;
  +import org.apache.avalon.composition.event.CompositionListener;
   import org.apache.avalon.composition.model.AssemblyException;
   import org.apache.avalon.composition.model.ClassLoaderContext;
   import org.apache.avalon.composition.model.ClassLoaderModel;
  @@ -715,7 +715,7 @@
       * Add a composition listener to the model.
       * @param listener the composition listener
       */
  -    public void addCompositionListener( CompositionEventListener listener )
  +    public void addCompositionListener( CompositionListener listener )
       {
           synchronized( m_compositionListeners )
           {
  @@ -727,7 +727,7 @@
       * Remove a composition listener from the model.
       * @param listener the composition listener
       */
  -    public void removeCompositionListener( CompositionEventListener listener )
  +    public void removeCompositionListener( CompositionListener listener )
       {
           synchronized( m_compositionListeners )
           {
  @@ -888,8 +888,8 @@
           Iterator iterator = m_compositionListeners.iterator();
           while( iterator.hasNext() )
           {
  -            final CompositionEventListener listener = 
  -              (CompositionEventListener) iterator.next();
  +            final CompositionListener listener = 
  +              (CompositionListener) iterator.next();
               try
               {
                   listener.modelAdded( event );
  @@ -941,8 +941,8 @@
           Iterator iterator = m_compositionListeners.iterator();
           while( iterator.hasNext() )
           {
  -            final CompositionEventListener listener = 
  -              (CompositionEventListener) iterator.next();
  +            final CompositionListener listener = 
  +              (CompositionListener) iterator.next();
               try
               {
                   listener.modelRemoved( event );
  
  
  
  1.2       +4 -4      avalon/merlin/facilities/http/impl/src/java/org/apache/avalon/http/impl/DefaultModelListener.java
  
  Index: DefaultModelListener.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/facilities/http/impl/src/java/org/apache/avalon/http/impl/DefaultModelListener.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultModelListener.java	6 Feb 2004 15:27:14 -0000	1.1
  +++ DefaultModelListener.java	7 Feb 2004 06:06:30 -0000	1.2
  @@ -20,7 +20,7 @@
   import javax.servlet.Servlet;
   
   import org.apache.avalon.composition.event.CompositionEvent;
  -import org.apache.avalon.composition.event.CompositionEventListener;
  +import org.apache.avalon.composition.event.CompositionListener;
   import org.apache.avalon.composition.model.ContainmentModel;
   import org.apache.avalon.composition.model.ComponentModel;
   import org.apache.avalon.composition.model.DeploymentModel;
  @@ -45,12 +45,12 @@
    * components.
    *
    * @avalon.component name="listener" lifestyle="singleton"
  - * @avalon.service type="org.apache.avalon.composition.event.CompositionEventListener"
  + * @avalon.service type="org.apache.avalon.composition.event.CompositionListener"
    * @author  <a href="mailto:mcconnell@apache.org">Stephen McConnell</a>
    */
   public class DefaultModelListener extends AbstractLogEnabled 
     implements Contextualizable, Serviceable, Initializable, 
  -  CompositionEventListener
  +  CompositionListener
   {
      //---------------------------------------------------------
      // state
  @@ -167,7 +167,7 @@
       }
   
      //---------------------------------------------------------
  -   // CompositionEventListener
  +   // CompositionListener
      //---------------------------------------------------------
   
      /**
  
  
  

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