haul        01/07/23 09:30:40

  Modified:    src/org/apache/cocoon/acting Tag: cocoon_20_branch
                        AbstractAction.java
  Log:
  moved configure method code to AbstractConfigurabeAction (sic!), subclassed it with
    ConfigurableComposableAction, moved some actions that used that configuration 
scheme
    to appropriate superclasses.
  
  extended actions that do take parameters but didn't support configuration of default
    values to use this scheme
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.2.2.3   +3 -27     xml-cocoon2/src/org/apache/cocoon/acting/AbstractAction.java
  
  Index: AbstractAction.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/acting/AbstractAction.java,v
  retrieving revision 1.2.2.2
  retrieving revision 1.2.2.3
  diff -u -r1.2.2.2 -r1.2.2.3
  --- AbstractAction.java       2001/07/20 08:42:24     1.2.2.2
  +++ AbstractAction.java       2001/07/23 16:30:40     1.2.2.3
  @@ -13,48 +13,24 @@
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.logger.AbstractLoggable;
   
  -import java.util.HashMap;
  -
   /**
    * AbstractAction gives you the infrastructure for easily deploying more
    * Actions.  In order to get at the Logger, use getLogger().
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Giacomo Pati</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Christian Haul</a>
  - * @version CVS $Revision: 1.2.2.2 $ $Date: 2001/07/20 08:42:24 $
  + * @version CVS $Revision: 1.2.2.3 $ $Date: 2001/07/23 16:30:40 $
    */
   public abstract class AbstractAction extends AbstractLoggable
   implements Action, Configurable, Disposable {
   
       /**
  -     * Stores (global) configuration parameters as <code>key</code> /
  -     * <code>value</code> pairs.
  -     */
  -    protected HashMap settings = null;
  -
  -    /**
        * Configures the Action.
        *
  -     * Takes the children from the <code>Configuration</code> and stores them
  -     * them as key (configuration name) and value (configuration value)
  -     * in <code>settings</code>.
  -     * <br/>
  -     * This automates parsing of flat string-only configurations.
  -     * For nested configurations, override this function in your action.
        */
       public void configure(Configuration conf) throws ConfigurationException {
  -        if (conf != null) {
  -         String key = null;
  -         String val = null;
  -         Configuration[] parameters = conf.getChildren();
  -         this.settings = new HashMap(parameters.length);
  -         for ( int i = 0; i < parameters.length; i++) {
  -                 key = parameters[i].getName();
  -                 val = parameters[i].getValue(null);
  -                 if ( key != null )
  -                     this.settings.put(key, val);
  -         }
  -     }
  +        // Purposely empty so that we don't need to implement it in every
  +        // class.
       }
   
       /**
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to