cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject cvs commit: xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/output AbstractOutputModule.java OutputModule.java RequestAttributeOutputModule.java SessionAttributeOutputModule.java
Date Sun, 11 Aug 2002 18:08:51 GMT
haul        2002/08/11 11:08:51

  Modified:    src/scratchpad/src/org/apache/cocoon/components/modules Tag:
                        cocoon_2_0_3_branch modules.xconf
               src/scratchpad/src/org/apache/cocoon/components/modules/database
                        Tag: cocoon_2_0_3_branch
                        AbstractAutoIncrementModule.java
                        AutoIncrementModule.java
                        HsqlIdentityAutoIncrementModule.java
                        IfxSerialAutoIncrementModule.java
                        ManualAutoIncrementModule.java
                        MysqlAutoIncrementModule.java
               src/scratchpad/src/org/apache/cocoon/components/modules/input
                        Tag: cocoon_2_0_3_branch AbstractInputModule.java
                        CollectionMetaModule.java DateInputModule.java
                        DigestMetaModule.java HeaderAttributeModule.java
                        InputModule.java NullInputModule.java
                        RandomNumberModule.java RequestAttributeModule.java
                        RequestParameterModule.java RequestURIModule.java
                        SessionAttributeModule.java
                        StringConstantModule.java
               src/scratchpad/src/org/apache/cocoon/components/modules/output
                        Tag: cocoon_2_0_3_branch AbstractOutputModule.java
                        OutputModule.java RequestAttributeOutputModule.java
                        SessionAttributeOutputModule.java
  Added:       src/scratchpad/src/org/apache/cocoon/components/modules/input
                        Tag: cocoon_2_0_3_branch DefaultsMetaModule.java
                        EnumerationHelper.java MapMetaModule.java
                        XMLMetaModule.java
  Log:
    <action dev="CH" type="update">
     Sync modules and related components with HEAD.
    </action>
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.2   +31 -22    xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/Attic/modules.xconf
  
  Index: modules.xconf
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/Attic/modules.xconf,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- modules.xconf	28 Apr 2002 20:09:26 -0000	1.1.2.1
  +++ modules.xconf	11 Aug 2002 18:08:49 -0000	1.1.2.2
  @@ -1,38 +1,47 @@
   <?xml version="1.0"?>
   
   <xconf xpath="/cocoon" unless="input-modules">
  -<!-- =============== Sitemap In/Out/Database Modules ==================== -->
  -
  -   <input-modules logger="core.modules.input">
  -      <component-instance name="request"   	class="org.apache.cocoon.components.modules.input.RequestParameterModule"/>
  -      <component-instance name="attribute" 	class="org.apache.cocoon.components.modules.input.RequestAttributeModule"/>
  -      <component-instance name="URI"       	class="org.apache.cocoon.components.modules.input.RequestURIModule"/>
  -      <component-instance name="header"    	class="org.apache.cocoon.components.modules.input.HeaderAttributeModule"/>
  -      <component-instance name="session"   	class="org.apache.cocoon.components.modules.input.SessionAttributeModule"/>
  -      <component-instance name="constant"  	class="org.apache.cocoon.components.modules.input.StringConstantModule"/>
  -      <component-instance name="random"    	class="org.apache.cocoon.components.modules.input.RandomNumberModule"/>
  -      <component-instance name="collection" class="org.apache.cocoon.components.modules.input.CollectionMetaModule"/>
  -      <component-instance name="digest"     class="org.apache.cocoon.components.modules.input.DigestMetaModule"/>
  -      <component-instance name="date"       class="org.apache.cocoon.components.modules.input.DateInputModule"/>
  -      <component-instance name="nullinput"  class="org.apache.cocoon.components.modules.input.NullInputModule"/>
  +   <!-- =============== Sitemap In/Out/Database Modules ==================== -->
  +   
  +   <input-modules>
  +	  <component-instance logger="core.modules.input" name="request"   	class="org.apache.cocoon.components.modules.input.RequestParameterModule"/>
  +	  <component-instance logger="core.modules.input" name="attribute" 	class="org.apache.cocoon.components.modules.input.RequestAttributeModule"/>
  +	  <component-instance logger="core.modules.input" name="URI"       	class="org.apache.cocoon.components.modules.input.RequestURIModule"/>
  +	  <component-instance logger="core.modules.input" name="header"    	class="org.apache.cocoon.components.modules.input.HeaderAttributeModule"/>
  +	  <component-instance logger="core.modules.input" name="session"   	class="org.apache.cocoon.components.modules.input.SessionAttributeModule"/>
  +	  <component-instance logger="core.modules.input" name="constant"  	class="org.apache.cocoon.components.modules.input.StringConstantModule"/>
  +	  <component-instance logger="core.modules.input" name="random"    	class="org.apache.cocoon.components.modules.input.RandomNumberModule"/>
  +      <component-instance logger="core.modules.input" name="digest"     class="org.apache.cocoon.components.modules.input.DigestMetaModule"/>
  +      <component-instance logger="core.modules.input" name="date"       class="org.apache.cocoon.components.modules.input.DateInputModule"/>
  +      <component-instance logger="core.modules.input" name="nullinput"  class="org.apache.cocoon.components.modules.input.NullInputModule"/>
  +      <component-instance logger="core.modules.input" name="collection" class="org.apache.cocoon.components.modules.input.CollectionMetaModule"/>
  +      <component-instance logger="core.modules.input" name="xmlmeta"    class="org.apache.cocoon.components.modules.input.XMLMetaModule"/>
  +      <component-instance logger="core.modules.input" name="mapmeta"    class="org.apache.cocoon.components.modules.input.MapMetaModule"/>
  +      <component-instance logger="core.modules.input" name="defaults"   class="org.apache.cocoon.components.modules.input.DefaultsMetaModule">
  +		 <input-module name="request"/>
  +		 <values>
  +			<skin>defaultSkin</skin>
  +			<base-url>http://localhost:8080/cocoon</base-url>
  +		 </values>
  +	  </component-instance>
      </input-modules>
   
  -   <output-modules logger="core.modules.output">
  -      <component-instance name="attribute" class="org.apache.cocoon.components.modules.output.RequestAttributeOutputModule"/>
  -      <component-instance name="session"   class="org.apache.cocoon.components.modules.output.SessionAttributeOutputModule"/>
  +   <output-modules>
  +      <component-instance logger="core.modules.output" name="attribute" class="org.apache.cocoon.components.modules.output.RequestAttributeOutputModule"/>
  +      <component-instance logger="core.modules.output" name="session"   class="org.apache.cocoon.components.modules.output.SessionAttributeOutputModule"/>
      </output-modules>
   
  -   <autoincrement-modules logger="core.modules.auto">
  -      <component-instance name="auto" class="org.apache.cocoon.components.modules.database.HsqlIdentityAutoIncrementModule"/>
  +   <autoincrement-modules>
  +      <component-instance logger="core.modules.auto" name="auto" class="org.apache.cocoon.components.modules.database.HsqlIdentityAutoIncrementModule"/>
   <!--
         Choose the one suitable for your DBMS. You *can* have more than
         one at a time, but they need to have different names. You then
         need to specify explicitly, which one to use in your descriptor
         file.
   
  -      <component-instance name="auto" class="org.apache.cocoon.components.modules.database.ManualAutoIncrementModule"/>
  -      <component-instance name="auto" class="org.apache.cocoon.components.modules.database.IfxSerialAutoIncrementModule"/>
  -      <component-instance name="auto" class="org.apache.cocoon.components.modules.database.MysqlAutoIncrementModule"/>
  +      <component-instance logger="core.modules.auto" name="auto" class="org.apache.cocoon.components.modules.database.ManualAutoIncrementModule"/>
  +      <component-instance logger="core.modules.auto" name="auto" class="org.apache.cocoon.components.modules.database.IfxSerialAutoIncrementModule"/>
  +      <component-instance logger="core.modules.auto" name="auto" class="org.apache.cocoon.components.modules.database.MysqlAutoIncrementModule"/>
   -->
      </autoincrement-modules>
   </xconf>
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +3 -3      xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/database/Attic/AbstractAutoIncrementModule.java
  
  Index: AbstractAutoIncrementModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/database/Attic/AbstractAutoIncrementModule.java,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  --- AbstractAutoIncrementModule.java	15 Mar 2002 15:15:08 -0000	1.1
  +++ AbstractAutoIncrementModule.java	11 Aug 2002 18:08:49 -0000	1.1.2.1
  @@ -55,7 +55,7 @@
   import org.apache.avalon.framework.configuration.Configurable;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  -import org.apache.avalon.framework.logger.AbstractLoggable;
  +import org.apache.avalon.framework.logger.AbstractLogEnabled;
   
   import org.apache.cocoon.util.HashMap;
   
  @@ -67,7 +67,7 @@
    * @author <a href="mailto:haul@apache.org">Christian Haul</a>
    * @version CVS $Id$
    */
  -public abstract class AbstractAutoIncrementModule extends AbstractLoggable
  +public abstract class AbstractAutoIncrementModule extends AbstractLogEnabled
       implements AutoIncrementModule, Configurable, Disposable {
   
       /**
  
  
  
  1.1.2.1   +4 -4      xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/database/Attic/AutoIncrementModule.java
  
  Index: AutoIncrementModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/database/Attic/AutoIncrementModule.java,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  --- AutoIncrementModule.java	15 Mar 2002 15:15:08 -0000	1.1
  +++ AutoIncrementModule.java	11 Aug 2002 18:08:49 -0000	1.1.2.1
  @@ -54,7 +54,7 @@
   import java.sql.Connection;
   import java.sql.Statement;
   import java.sql.SQLException;
  -import org.apache.cocoon.environment.Request;
  +import java.util.Map;
   import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  @@ -87,7 +87,7 @@
        * @return value representing the last key value value.
        * */
       Object getPostValue( Configuration tableConf, Configuration columnConf, Configuration modeConf,
  -                         Connection conn, Statement stmt, Request request ) throws SQLException, ConfigurationException;
  +                         Connection conn, Statement stmt, Map objectModel ) throws SQLException, ConfigurationException;
   
   
       /**
  @@ -125,7 +125,7 @@
        * @return exact value for key attribute column
        * */
       Object getPreValue( Configuration tableConf, Configuration columnConf, Configuration modeConf,
  -                        Connection conn, Request request ) throws SQLException, ConfigurationException;
  +                        Connection conn, Map objectModel ) throws SQLException, ConfigurationException;
   
   
       /**
  
  
  
  1.1.2.1   +5 -6      xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/database/Attic/HsqlIdentityAutoIncrementModule.java
  
  Index: HsqlIdentityAutoIncrementModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/database/Attic/HsqlIdentityAutoIncrementModule.java,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  --- HsqlIdentityAutoIncrementModule.java	15 Mar 2002 15:15:08 -0000	1.1
  +++ HsqlIdentityAutoIncrementModule.java	11 Aug 2002 18:08:49 -0000	1.1.2.1
  @@ -53,6 +53,7 @@
   
   import java.lang.Integer;
   import java.util.SortedSet;
  +import java.util.Map;
   import java.sql.CallableStatement;
   import java.sql.PreparedStatement;
   import java.sql.Connection;
  @@ -60,7 +61,6 @@
   import java.sql.Statement;
   import java.sql.Types;
   import java.sql.SQLException;
  -import org.apache.cocoon.environment.Request;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.thread.ThreadSafe;
  @@ -68,8 +68,7 @@
   /**
    * Abstraction layer to encapsulate different DBMS behaviour for autoincrement columns.
    *
  - * Here: HSQLDB 1.6 IDENTITY columns
  - * {@link http://hsqldb.sourceforge.net}
  + * Here: {@link <a href="http://hsqldb.sourceforge.net">HSQLDB</a>} 1.6 IDENTITY columns
    *
    * @author <a href="mailto:haul@apache.org">Christian Haul</a>
    * @version CVS $Id$
  @@ -77,7 +76,7 @@
   public class HsqlIdentityAutoIncrementModule implements AutoIncrementModule, ThreadSafe {
   
       public Object getPostValue( Configuration tableConf, Configuration columnConf, Configuration modeConf,
  -                                Connection conn, Statement stmt, Request request )  throws SQLException, ConfigurationException {
  +                                Connection conn, Statement stmt, Map objectModel )  throws SQLException, ConfigurationException {
   
           Integer id = null;
           /*
  @@ -106,7 +105,7 @@
   
   
       public Object getPreValue( Configuration tableConf, Configuration columnConf, Configuration modeConf,
  -                               Connection conn, Request request ) throws SQLException, ConfigurationException {
  +                               Connection conn, Map objectModel ) throws SQLException, ConfigurationException {
   
           return null;
       }
  
  
  
  1.1.2.2   +4 -4      xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/database/Attic/IfxSerialAutoIncrementModule.java
  
  Index: IfxSerialAutoIncrementModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/database/Attic/IfxSerialAutoIncrementModule.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- IfxSerialAutoIncrementModule.java	28 Apr 2002 20:10:17 -0000	1.1.2.1
  +++ IfxSerialAutoIncrementModule.java	11 Aug 2002 18:08:49 -0000	1.1.2.2
  @@ -53,10 +53,10 @@
   
   import java.lang.Integer;
   import java.util.SortedSet;
  +import java.util.Map;
   import java.sql.Connection;
   import java.sql.Statement;
   import java.sql.SQLException;
  -import org.apache.cocoon.environment.Request;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.thread.ThreadSafe;
  @@ -74,7 +74,7 @@
   public class IfxSerialAutoIncrementModule implements AutoIncrementModule, ThreadSafe {
   
       public Object getPostValue( Configuration tableConf, Configuration columnConf, Configuration modeConf,
  -                                Connection conn, Statement stmt, Request request )
  +                                Connection conn, Statement stmt, Map objectModel )
           throws SQLException, ConfigurationException {
   
           return new Integer(((com.informix.jdbc.IfxStatement) stmt).getSerial());
  @@ -88,7 +88,7 @@
   
   
       public Object getPreValue( Configuration tableConf, Configuration columnConf, Configuration modeConf,
  -                               Connection conn, Request request ) throws SQLException, ConfigurationException {
  +                               Connection conn, Map objectModel ) throws SQLException, ConfigurationException {
   
           return null;
       };
  
  
  
  1.1.2.1   +3 -4      xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/database/Attic/ManualAutoIncrementModule.java
  
  Index: ManualAutoIncrementModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/database/Attic/ManualAutoIncrementModule.java,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  --- ManualAutoIncrementModule.java	15 Mar 2002 15:15:08 -0000	1.1
  +++ ManualAutoIncrementModule.java	11 Aug 2002 18:08:49 -0000	1.1.2.1
  @@ -56,7 +56,6 @@
   import java.sql.PreparedStatement;
   import java.sql.ResultSet;
   import java.sql.SQLException;
  -import org.apache.cocoon.environment.Request;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.thread.ThreadSafe;
  @@ -86,7 +85,7 @@
   
   
       public Object getPostValue( Configuration tableConf, Configuration columnConf, Configuration modenConf,
  -                                Connection conn, Statement stmt, Request request )
  +                                Connection conn, Statement stmt, Map objectModel )
           throws SQLException, ConfigurationException {
   
           return null;
  @@ -99,7 +98,7 @@
   
   
       public Object getPreValue( Configuration tableConf, Configuration columnConf, Configuration modeConf,
  -                               Connection conn, Request request )
  +                               Connection conn, Map objectModel )
           throws SQLException, ConfigurationException {
   
           /** Set the key value using SELECT MAX(keyname)+1 **/
  
  
  
  1.1.2.1   +5 -7      xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/database/Attic/MysqlAutoIncrementModule.java
  
  Index: MysqlAutoIncrementModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/database/Attic/MysqlAutoIncrementModule.java,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  --- MysqlAutoIncrementModule.java	15 Mar 2002 15:15:08 -0000	1.1
  +++ MysqlAutoIncrementModule.java	11 Aug 2002 18:08:49 -0000	1.1.2.1
  @@ -57,7 +57,7 @@
   import java.sql.ResultSet;
   import java.sql.Statement;
   import java.sql.SQLException;
  -import org.apache.cocoon.environment.Request;
  +import java.util.Map;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.thread.ThreadSafe;
  @@ -65,8 +65,7 @@
   /**
    * Abstraction layer to encapsulate different DBMS behaviour for autoincrement columns.
    *
  - * Here: MYSQL AUTO_INCREMENT columns
  - * {@link http://www.mysql.com}
  + * Here: {@link <a href="http://www.mysql.com">MYSQL</a>} AUTO_INCREMENT columns
    *
    * @author <a href="mailto:phantom@stserv.hcf.jhu.edu">Tim Myers</a>
    * @version CVS $Id$
  @@ -74,7 +73,7 @@
   public class MysqlAutoIncrementModule implements AutoIncrementModule, ThreadSafe {
   
       public Object getPostValue( Configuration tableConf, Configuration columnConf, Configuration modeConf,
  -                                Connection conn, Statement stmt, Request request )  throws SQLException, ConfigurationException {
  +                                Connection conn, Statement stmt, Map objectModel )  throws SQLException, ConfigurationException {
   
           Integer id = null;
           /*
  @@ -103,11 +102,10 @@
   
   
       public Object getPreValue( Configuration tableConf, Configuration columnConf, Configuration modeConf,
  -                               Connection conn, Request request ) throws SQLException, ConfigurationException {
  +                               Connection conn, Map objectModel ) throws SQLException, ConfigurationException {
   
           return null;
       }
  -
   
       public String getSubquery( Configuration tableConf, Configuration columnConf, Configuration modeConf )
           throws ConfigurationException {
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +3 -3      xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/input/Attic/AbstractInputModule.java
  
  Index: AbstractInputModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/input/Attic/AbstractInputModule.java,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  --- AbstractInputModule.java	15 Mar 2002 15:15:08 -0000	1.1
  +++ AbstractInputModule.java	11 Aug 2002 18:08:49 -0000	1.1.2.1
  @@ -55,7 +55,7 @@
   import org.apache.avalon.framework.configuration.Configurable;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  -import org.apache.avalon.framework.logger.AbstractLoggable;
  +import org.apache.avalon.framework.logger.AbstractLogEnabled;
   
   import org.apache.cocoon.util.HashMap;
   
  @@ -67,7 +67,7 @@
    * @author <a href="mailto:haul@apache.org">Christian Haul</a>
    * @version CVS $Id$
    */
  -public abstract class AbstractInputModule extends AbstractLoggable
  +public abstract class AbstractInputModule extends AbstractLogEnabled
       implements InputModule, Configurable, Disposable {
   
       /**
  
  
  
  1.1.2.2   +14 -53    xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/input/Attic/CollectionMetaModule.java
  
  Index: CollectionMetaModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/input/Attic/CollectionMetaModule.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- CollectionMetaModule.java	28 Apr 2002 20:12:49 -0000	1.1.2.1
  +++ CollectionMetaModule.java	11 Aug 2002 18:08:49 -0000	1.1.2.2
  @@ -60,21 +60,18 @@
   import org.apache.avalon.framework.component.ComponentException;
   import org.apache.avalon.framework.component.ComponentManager;
   import org.apache.avalon.framework.component.Composable;
  -import org.apache.avalon.framework.logger.AbstractLoggable;
  +import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.avalon.framework.thread.ThreadSafe;
   
  -import org.apache.cocoon.environment.ObjectModelHelper;
  -import org.apache.cocoon.environment.Request;
  -
   import org.apache.cocoon.components.modules.input.InputModule;
  +import org.apache.cocoon.util.JDBCTypeConversions;
   
   import org.apache.cocoon.matching.AbstractWildcardMatcher;
   
   import java.util.ArrayList;
   import java.util.Map;
   import java.util.Enumeration;
  -import java.util.Iterator;
   import java.util.SortedSet;
   import java.util.TreeSet;
   
  @@ -98,7 +95,7 @@
    * @author <a href="mailto:haul@informatik.tu-darmstadt.de">Christian Haul</a>
    * @version CVS $Id$
    */
  -public class CollectionMetaModule extends AbstractLoggable
  +public class CollectionMetaModule extends AbstractLogEnabled
       implements InputModule, Configurable, Initializable, Composable, Disposable {
   
       /** The component manager instance */
  @@ -186,7 +183,7 @@
   
       
   
  -    public Object getAttribute( String name, Configuration modeConf, Request request ) 
  +    public Object getAttribute( String name, Configuration modeConf, Map objectModel ) 
           throws ConfigurationException {
   
           if (!this.initialized) {
  @@ -239,7 +236,7 @@
                   // thus we still have a reference to it
                   // and
                   // no other module is configured dynamically
  -                values = input.getAttributeValues(pName,this.inputConf,request);
  +                values = input.getAttributeValues(pName,this.inputConf,objectModel);
               } else {
                   // input was not thread safe
                   // or
  @@ -262,7 +259,7 @@
                           iput = (InputModule) iputSelector.select(inputName);
                       }
                       if (iput != null) {
  -                        values = iput.getAttributeValues(pName, inputConfig, request);
  +                        values = iput.getAttributeValues(pName, inputConfig, objectModel);
                       }           
                   } catch (Exception e) {
                       if (getLogger().isWarnEnabled()) 
  @@ -289,36 +286,7 @@
                   // FIXME: should put this into helper class
                   for (int i = 0; i<values.length; i++) {
                       Object value = values[i];
  -                    if (jType.equalsIgnoreCase("string")) {
  -                        if (value instanceof String) {
  -                            objects[i] = value;
  -                        } else {
  -                            objects[i] = value.toString();
  -                        }
  -                    } else if (jType.equalsIgnoreCase("int")) {
  -                        if (value instanceof String) {
  -                            objects[i] = Integer.decode((String)value);
  -                        } else if (value instanceof Integer) {
  -                            objects[i] = value;
  -                        } else {
  -                            if (getLogger().isErrorEnabled())
  -                                getLogger().error("don't know how to cast");
  -                        }
  -                    } else if (jType.equalsIgnoreCase("long")) {
  -                        if (value instanceof String) {
  -                            objects[i] = Long.decode((String)value);
  -                        } else if (value instanceof Long) {
  -                            objects[i] = value;
  -                        } else {
  -                            if (getLogger().isErrorEnabled())
  -                                getLogger().error("don't know how to cast");
  -                        }
  -                    } else {
  -                        // other types need parsing & creation
  -                        if (getLogger().isErrorEnabled())
  -                            getLogger().error("don't know how to cast");
  -                    }
  -                    
  +                    objects[i] = JDBCTypeConversions.convert(value, jType);
                   }
                   return objects;
               }
  @@ -334,7 +302,7 @@
   
   
   
  -    public Enumeration getAttributeNames( Configuration modeConf, Request request ) 
  +    public Enumeration getAttributeNames( Configuration modeConf, Map objectModel ) 
           throws ConfigurationException {
   
           if (!this.initialized) {
  @@ -372,7 +340,7 @@
                   // thus we still have a reference to it
                   // and
                   // no other module is configured dynamically
  -                names = input.getAttributeNames(this.inputConf,request);
  +                names = input.getAttributeNames(this.inputConf,objectModel);
               } else {
                   // input was not thread safe
                   // or
  @@ -395,7 +363,7 @@
                           iput = (InputModule) iputSelector.select(inputName);
                       }
                       if (iput != null) {
  -                        names = iput.getAttributeNames(inputConfig, request);
  +                        names = iput.getAttributeNames(inputConfig, objectModel);
                       }           
                   } catch (Exception e) {
                       if (getLogger().isWarnEnabled()) 
  @@ -464,24 +432,17 @@
   
   
   
  -    public Object[] getAttributeValues( String name, Configuration modeConf, Request request ) 
  +    public Object[] getAttributeValues( String name, Configuration modeConf, Map objectModel ) 
           throws ConfigurationException {
   
  -        Enumeration names = this.getAttributeNames( modeConf, request );
  +        Enumeration names = this.getAttributeNames( modeConf, objectModel );
           ArrayList values = new ArrayList();
           while (names.hasMoreElements()) {
  -            values.add(this.getAttribute((String) names.nextElement(),modeConf,request));
  +            values.add(this.getAttribute((String) names.nextElement(),modeConf,objectModel));
           }
   
           return values.toArray();
   
       }
   
  -}
  -
  -class EnumerationHelper implements Enumeration {
  -    Iterator iter = null;
  -    public EnumerationHelper( Iterator i ) { this.iter = i; }
  -    public boolean hasMoreElements() { return this.iter.hasNext(); }
  -    public Object nextElement() { return this.iter.next(); }
   }
  
  
  
  1.1.2.2   +10 -9     xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/input/Attic/DateInputModule.java
  
  Index: DateInputModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/input/Attic/DateInputModule.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- DateInputModule.java	28 Apr 2002 20:12:49 -0000	1.1.2.1
  +++ DateInputModule.java	11 Aug 2002 18:08:50 -0000	1.1.2.2
  @@ -56,16 +56,17 @@
   import java.util.LinkedList;
   import java.util.StringTokenizer;
   import java.util.Date;
  +import java.util.Map;
   import java.text.SimpleDateFormat;
  -import org.apache.cocoon.environment.Request;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.thread.ThreadSafe;
   
  +
   /**
  - * DateInputModule returns current data as a string, optionally
  - * formated. Format given through attribute "format" of configuration
  + * DateInputModule returns current date, optionally formated as
  + * string. Format given through attribute "format" of configuration
    * root node.
    *
    * @author <a href="mailto:haul@apache.org">Christian Haul</a>
  @@ -76,9 +77,9 @@
   
       final static Enumeration returnNames = new StringTokenizer("stringConstant");
   
  -    public Object getAttribute( String name, Configuration modeConf, Request request ) throws ConfigurationException {
  +    public Object getAttribute( String name, Configuration modeConf, Map objectModel ) throws ConfigurationException {
           
  -        String format = modeConf.getAttribute("format",null);
  +        String format = (modeConf != null? modeConf.getAttribute("format",null) : null);
   
           if (format==null) {
               return new Date();
  @@ -88,17 +89,17 @@
       }
   
   
  -    public Enumeration getAttributeNames( Configuration modeConf, Request request ) throws ConfigurationException {
  +    public Enumeration getAttributeNames( Configuration modeConf, Map objectModel ) throws ConfigurationException {
   
           return DateInputModule.returnNames;
       }
   
   
  -    public Object[] getAttributeValues( String name, Configuration modeConf, Request request )
  +    public Object[] getAttributeValues( String name, Configuration modeConf, Map objectModel )
           throws ConfigurationException {
   
               List values = new LinkedList();
  -            values.add( this.getAttribute(name, modeConf, request) );
  +            values.add( this.getAttribute(name, modeConf, objectModel) );
   
               return values.toArray();
               
  
  
  
  1.1.2.2   +12 -21    xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/input/Attic/DigestMetaModule.java
  
  Index: DigestMetaModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/input/Attic/DigestMetaModule.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- DigestMetaModule.java	28 Apr 2002 20:12:49 -0000	1.1.2.1
  +++ DigestMetaModule.java	11 Aug 2002 18:08:50 -0000	1.1.2.2
  @@ -48,12 +48,6 @@
    Software Foundation, please see <http://www.apache.org/>.
   
   */
  -/*
  -  <mode name="CollectionMeta">
  -     <member name="foo_*" type="int"/>
  -  </mode>
  -
  - */
   package org.apache.cocoon.components.modules.input;
   
   
  @@ -66,13 +60,10 @@
   import org.apache.avalon.framework.component.ComponentException;
   import org.apache.avalon.framework.component.ComponentManager;
   import org.apache.avalon.framework.component.Composable;
  -import org.apache.avalon.framework.logger.AbstractLoggable;
  +import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.avalon.framework.thread.ThreadSafe;
   
  -import org.apache.cocoon.environment.ObjectModelHelper;
  -import org.apache.cocoon.environment.Request;
  -
   import org.apache.cocoon.components.modules.input.InputModule;
   
   import org.apache.cocoon.matching.AbstractWildcardMatcher;
  @@ -100,7 +91,7 @@
    * @author <a href="mailto:haul@informatik.tu-darmstadt.de">Christian Haul</a>
    * @version CVS $Id$
    */
  -public class DigestMetaModule extends AbstractLoggable
  +public class DigestMetaModule extends AbstractLogEnabled
       implements InputModule, Configurable, Initializable, Composable, Disposable {
   
       /** The component manager instance */
  @@ -192,7 +183,7 @@
   
       
   
  -    public Object getAttribute( String name, Configuration modeConf, Request request ) 
  +    public Object getAttribute( String name, Configuration modeConf, Map objectModel ) 
           throws ConfigurationException {
   
           if (!this.initialized) {
  @@ -233,7 +224,7 @@
                   // thus we still have a reference to it
                   // and
                   // no other module is configured dynamically
  -                value = input.getAttribute(name,this.inputConf,request);
  +                value = input.getAttribute(name,this.inputConf,objectModel);
               } else {
                   // input was not thread safe
                   // or
  @@ -256,7 +247,7 @@
                           iput = (InputModule) iputSelector.select(inputName);
                       }
                       if (iput != null) {
  -                        value = iput.getAttribute(name, inputConfig, request);
  +                        value = iput.getAttribute(name, inputConfig, objectModel);
                       }           
                   } catch (Exception e) {
                       if (getLogger().isWarnEnabled()) 
  @@ -306,7 +297,7 @@
   
   
   
  -    public Enumeration getAttributeNames( Configuration modeConf, Request request ) 
  +    public Enumeration getAttributeNames( Configuration modeConf, Map objectModel ) 
           throws ConfigurationException {
   
            if (!this.initialized) {
  @@ -343,7 +334,7 @@
                   // thus we still have a reference to it
                   // and
                   // no other module is configured dynamically
  -                names = input.getAttributeNames(this.inputConf,request);
  +                names = input.getAttributeNames(this.inputConf,objectModel);
               } else {
                   // input was not thread safe
                   // or
  @@ -366,7 +357,7 @@
                           iput = (InputModule) iputSelector.select(inputName);
                       }
                       if (iput != null) {
  -                        names = iput.getAttributeNames(inputConfig, request);
  +                        names = iput.getAttributeNames(inputConfig, objectModel);
                       }           
                   } catch (Exception e) {
                       if (getLogger().isWarnEnabled()) 
  @@ -398,7 +389,7 @@
   
   
   
  -    public Object[] getAttributeValues( String name, Configuration modeConf, Request request ) 
  +    public Object[] getAttributeValues( String name, Configuration modeConf, Map objectModel ) 
           throws ConfigurationException {
   
           if (!this.initialized) {
  @@ -439,7 +430,7 @@
                   // thus we still have a reference to it
                   // and
                   // no other module is configured dynamically
  -                values = input.getAttributeValues(name,this.inputConf,request);
  +                values = input.getAttributeValues(name,this.inputConf,objectModel);
               } else {
                   // input was not thread safe
                   // or
  @@ -462,7 +453,7 @@
                           iput = (InputModule) iputSelector.select(inputName);
                       }
                       if (iput != null) {
  -                        values = iput.getAttributeValues(name, inputConfig, request);
  +                        values = iput.getAttributeValues(name, inputConfig, objectModel);
                       }           
                   } catch (Exception e) {
                       if (getLogger().isWarnEnabled()) 
  
  
  
  1.1.2.1   +9 -6      xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/input/Attic/HeaderAttributeModule.java
  
  Index: HeaderAttributeModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/input/Attic/HeaderAttributeModule.java,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  --- HeaderAttributeModule.java	15 Mar 2002 15:15:08 -0000	1.1
  +++ HeaderAttributeModule.java	11 Aug 2002 18:08:50 -0000	1.1.2.1
  @@ -54,7 +54,9 @@
   import java.util.Enumeration;
   import java.util.List;
   import java.util.LinkedList;
  +import java.util.Map;
   import org.apache.cocoon.environment.Request;
  +import org.apache.cocoon.environment.ObjectModelHelper;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.component.Component;
  @@ -71,27 +73,28 @@
    * @version CVS $Id$ */
   public class HeaderAttributeModule extends AbstractInputModule implements ThreadSafe {
       
  -    public Object getAttribute( String name, Configuration modeConf, Request request )
  +    public Object getAttribute( String name, Configuration modeConf, Map objectModel )
           throws ConfigurationException {
   
           String pname = name;
           if ( modeConf != null ) {
               pname = modeConf.getAttribute( "parameter", pname );
           }
  -        return request.getHeader( pname );
  +        return ObjectModelHelper.getRequest(objectModel).getHeader( pname );
       }
   
   
  -    public Enumeration getAttributeNames( Configuration modeConf, Request request )
  +    public Enumeration getAttributeNames( Configuration modeConf, Map objectModel )
           throws ConfigurationException {
   
  -        return request.getHeaderNames();
  +        return ObjectModelHelper.getRequest(objectModel).getHeaderNames();
       }
   
   
  -    public Object[] getAttributeValues( String name, Configuration modeConf, Request request )
  +    public Object[] getAttributeValues( String name, Configuration modeConf, Map objectModel )
           throws ConfigurationException {
   
  +        Request request = ObjectModelHelper.getRequest(objectModel);
           String wildcard = name;
           if ( modeConf != null ) {
               wildcard = modeConf.getAttribute( "parameter", wildcard );
  
  
  
  1.1.2.2   +14 -12    xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/input/Attic/InputModule.java
  
  Index: InputModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/input/Attic/InputModule.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- InputModule.java	28 Apr 2002 20:12:49 -0000	1.1.2.1
  +++ InputModule.java	11 Aug 2002 18:08:50 -0000	1.1.2.2
  @@ -53,8 +53,8 @@
   
   import java.util.SortedSet;
   import java.util.Enumeration;
  +import java.util.Map;
   
  -import org.apache.cocoon.environment.Request;
   import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  @@ -76,16 +76,17 @@
        * Standard access to an attribute's value. If more than one value
        * exists, the first is returned. If the value does not exist,
        * null is returned. To get all values, use {@link
  -     * getAttributeValues} or {@link getAttributeSet} and {@link
  -     * getValue} to get them one by one.
  +     * #getAttributeValues getAttributeSet} or {@link
  +     * #getAttributeNames getAttributeNames} and {@link #getAttribute
  +     * getAttribute} to get them one by one.
        * @param name a String that specifies what the caller thinks
        * would identify an attribute. This is mainly a fallback if no
        * modeConf is present.
        * @param modeConf column's mode configuration from resource
        * description. This argument is optional.
  -     * @param request the request object
  +     * @param objectModel
        */
  -    Object getAttribute( String name, Configuration modeConf, Request request ) throws ConfigurationException;
  +    Object getAttribute( String name, Configuration modeConf, Map objectModel ) throws ConfigurationException;
   
   
       /**
  @@ -94,23 +95,24 @@
        * the method returns an empty Enumeration.
        * @param modeConf column's mode configuration from resource
        * description. This argument is optional.
  -     * @param request the request object
  +     * @param objectModel
        */
  -    Enumeration getAttributeNames( Configuration modeConf, Request request ) throws ConfigurationException;
  +    Enumeration getAttributeNames( Configuration modeConf, Map objectModel ) throws ConfigurationException;
   
   
       /**
        * Returns an array of String objects containing all of the values
        * the given attribute has, or null if the attribute does not
  -     * exist. As an alternative, {@link getAttributeSet} together with
  -     * {@link getValue} can be used to get the values one by one.
  +     * exist. As an alternative, {@link #getAttributeNames
  +     * getAttributeNames} together with {@link #getAttribute
  +     * getAttribute} can be used to get the values one by one.
        * @param name a String that specifies what the caller thinks
        * would identify an attributes. This is mainly a fallback
        * if no modeConf is present.
        * @param modeConf column's mode configuration from resource
        * description. This argument is optional.
  -     * @param request the request object
  +     * @param objectModel
        */
  -    Object[] getAttributeValues( String name, Configuration modeConf, Request request ) throws ConfigurationException;
  +    Object[] getAttributeValues( String name, Configuration modeConf, Map objectModel ) throws ConfigurationException;
   
   }
  
  
  
  1.1.2.2   +5 -5      xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/input/Attic/NullInputModule.java
  
  Index: NullInputModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/input/Attic/NullInputModule.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- NullInputModule.java	28 Apr 2002 20:12:49 -0000	1.1.2.1
  +++ NullInputModule.java	11 Aug 2002 18:08:50 -0000	1.1.2.2
  @@ -55,7 +55,7 @@
   import java.util.List;
   import java.util.LinkedList;
   import java.util.StringTokenizer;
  -import org.apache.cocoon.environment.Request;
  +import java.util.Map;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.component.Component;
  @@ -73,19 +73,19 @@
    */
   public class NullInputModule extends AbstractInputModule implements ThreadSafe {
   
  -    public Object getAttribute( String name, Configuration modeConf, Request request ) throws ConfigurationException {
  +    public Object getAttribute( String name, Configuration modeConf, Map objectModel ) throws ConfigurationException {
           
           return null;
       }
   
   
  -    public Enumeration getAttributeNames( Configuration modeConf, Request request ) throws ConfigurationException {
  +    public Enumeration getAttributeNames( Configuration modeConf, Map objectModel ) throws ConfigurationException {
   
           return null;
       }
   
   
  -    public Object[] getAttributeValues( String name, Configuration modeConf, Request request )
  +    public Object[] getAttributeValues( String name, Configuration modeConf, Map objectModel )
           throws ConfigurationException {
   
           return null;
  
  
  
  1.1.2.2   +6 -6      xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/input/Attic/RandomNumberModule.java
  
  Index: RandomNumberModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/input/Attic/RandomNumberModule.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- RandomNumberModule.java	28 Apr 2002 20:12:49 -0000	1.1.2.1
  +++ RandomNumberModule.java	11 Aug 2002 18:08:50 -0000	1.1.2.2
  @@ -55,7 +55,7 @@
   import java.util.List;
   import java.util.LinkedList;
   import java.util.StringTokenizer;
  -import org.apache.cocoon.environment.Request;
  +import java.util.Map;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.component.Component;
  @@ -74,7 +74,7 @@
   
       final static Enumeration returnNames = new StringTokenizer("stringConstant");
   
  -    public Object getAttribute( String name, Configuration modeConf, Request request ) throws ConfigurationException {
  +    public Object getAttribute( String name, Configuration modeConf, Map objectModel ) throws ConfigurationException {
           
           long min = Long.parseLong(modeConf.getAttribute("min","0"));
           long max = Long.parseLong(modeConf.getAttribute("max","9999999999"));
  @@ -84,17 +84,17 @@
       }
   
   
  -    public Enumeration getAttributeNames( Configuration modeConf, Request request ) throws ConfigurationException {
  +    public Enumeration getAttributeNames( Configuration modeConf, Map objectModel ) throws ConfigurationException {
   
           return RandomNumberModule.returnNames;
       }
   
   
  -    public Object[] getAttributeValues( String name, Configuration modeConf, Request request )
  +    public Object[] getAttributeValues( String name, Configuration modeConf, Map objectModel )
           throws ConfigurationException {
   
               List values = new LinkedList();
  -            values.add( this.getAttribute(name, modeConf, request) );
  +            values.add( this.getAttribute(name, modeConf, objectModel ) );
   
               return values.toArray();
               
  
  
  
  1.1.2.1   +9 -6      xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/input/Attic/RequestAttributeModule.java
  
  Index: RequestAttributeModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/input/Attic/RequestAttributeModule.java,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  --- RequestAttributeModule.java	15 Mar 2002 15:15:08 -0000	1.1
  +++ RequestAttributeModule.java	11 Aug 2002 18:08:50 -0000	1.1.2.1
  @@ -54,7 +54,9 @@
   import java.util.Enumeration;
   import java.util.List;
   import java.util.LinkedList;
  +import java.util.Map;
   import org.apache.cocoon.environment.Request;
  +import org.apache.cocoon.environment.ObjectModelHelper;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.component.Component;
  @@ -72,27 +74,28 @@
    */
   public class RequestAttributeModule extends AbstractInputModule implements ThreadSafe {
   
  -    public Object getAttribute( String name, Configuration modeConf, Request request )
  +    public Object getAttribute( String name, Configuration modeConf, Map objectModel )
           throws ConfigurationException {
   
           String pname = name;
           if ( modeConf != null ) {
               pname = modeConf.getAttribute( "parameter", pname );
           }
  -        return request.getAttribute( pname );
  +        return ObjectModelHelper.getRequest(objectModel).getAttribute( pname );
       }
   
   
  -    public Enumeration getAttributeNames( Configuration modeConf, Request request )
  +    public Enumeration getAttributeNames( Configuration modeConf, Map objectModel )
           throws ConfigurationException {
   
  -        return request.getAttributeNames();
  +        return ObjectModelHelper.getRequest(objectModel).getAttributeNames();
       }
   
   
  -    public Object[] getAttributeValues( String name, Configuration modeConf, Request request )
  +    public Object[] getAttributeValues( String name, Configuration modeConf, Map objectModel )
           throws ConfigurationException {
   
  +        Request request = ObjectModelHelper.getRequest(objectModel);
           String wildcard = name;
           if ( modeConf != null ) {
               wildcard = modeConf.getAttribute( "parameter", wildcard );
  
  
  
  1.1.2.1   +9 -6      xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/input/Attic/RequestParameterModule.java
  
  Index: RequestParameterModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/input/Attic/RequestParameterModule.java,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  --- RequestParameterModule.java	15 Mar 2002 15:15:08 -0000	1.1
  +++ RequestParameterModule.java	11 Aug 2002 18:08:50 -0000	1.1.2.1
  @@ -54,7 +54,9 @@
   import java.util.Enumeration;
   import java.util.List;
   import java.util.LinkedList;
  +import java.util.Map;
   import org.apache.cocoon.environment.Request;
  +import org.apache.cocoon.environment.ObjectModelHelper;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.component.Component;
  @@ -74,25 +76,26 @@
    */
   public class RequestParameterModule extends AbstractInputModule implements ThreadSafe {
   
  -    public Object getAttribute( String name, Configuration modeConf, Request request ) throws ConfigurationException {
  +    public Object getAttribute( String name, Configuration modeConf, Map objectModel ) throws ConfigurationException {
   
           String pname = name;
           if ( modeConf != null ) {
               pname = modeConf.getAttribute( "parameter", pname );
           }
  -        return request.getParameter( pname );
  +        return ObjectModelHelper.getRequest(objectModel).getParameter( pname );
       }
   
   
  -    public Enumeration getAttributeNames( Configuration modeConf, Request request ) throws ConfigurationException {
  +    public Enumeration getAttributeNames( Configuration modeConf, Map objectModel ) throws ConfigurationException {
   
  -        return request.getParameterNames();
  +        return ObjectModelHelper.getRequest(objectModel).getParameterNames();
       }
   
   
  -    public Object[] getAttributeValues( String name, Configuration modeConf, Request request )
  +    public Object[] getAttributeValues( String name, Configuration modeConf, Map objectModel )
           throws ConfigurationException {
   
  +        Request request = ObjectModelHelper.getRequest(objectModel);
           String wildcard = name;
           if ( modeConf != null ) {
               wildcard = modeConf.getAttribute( "parameter", wildcard );
  
  
  
  1.1.2.1   +8 -6      xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/input/Attic/RequestURIModule.java
  
  Index: RequestURIModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/input/Attic/RequestURIModule.java,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  --- RequestURIModule.java	15 Mar 2002 15:15:08 -0000	1.1
  +++ RequestURIModule.java	11 Aug 2002 18:08:50 -0000	1.1.2.1
  @@ -55,7 +55,9 @@
   import java.util.List;
   import java.util.LinkedList;
   import java.util.StringTokenizer;
  +import java.util.Map;
   import org.apache.cocoon.environment.Request;
  +import org.apache.cocoon.environment.ObjectModelHelper;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.component.Component;
  @@ -71,9 +73,9 @@
   
       final static Enumeration returnNames = new StringTokenizer("requestURI");
   
  -    public Object getAttribute( String name, Configuration modeConf, Request request ) throws ConfigurationException {
  +    public Object getAttribute( String name, Configuration modeConf, Map objectModel ) throws ConfigurationException {
   
  -        String uri = request.getSitemapURI();
  +        String uri = ObjectModelHelper.getRequest(objectModel).getSitemapURI();
   
           if (uri.startsWith("/")) {
               uri = uri.substring(1);
  @@ -83,17 +85,17 @@
       }
   
   
  -    public Enumeration getAttributeNames( Configuration modeConf, Request request ) throws ConfigurationException {
  +    public Enumeration getAttributeNames( Configuration modeConf, Map objectModel ) throws ConfigurationException {
   
           return RequestURIModule.returnNames;
       }
   
   
  -    public Object[] getAttributeValues( String name, Configuration modeConf, Request request )
  +    public Object[] getAttributeValues( String name, Configuration modeConf, Map objectModel )
           throws ConfigurationException {
   
               List values = new LinkedList();
  -            values.add( this.getAttribute(name, modeConf, request) );
  +            values.add( this.getAttribute(name, modeConf, objectModel) );
   
               return values.toArray();
               
  
  
  
  1.1.2.1   +9 -6      xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/input/Attic/SessionAttributeModule.java
  
  Index: SessionAttributeModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/input/Attic/SessionAttributeModule.java,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  --- SessionAttributeModule.java	15 Mar 2002 15:15:08 -0000	1.1
  +++ SessionAttributeModule.java	11 Aug 2002 18:08:50 -0000	1.1.2.1
  @@ -54,7 +54,9 @@
   import java.util.Enumeration;
   import java.util.List;
   import java.util.LinkedList;
  +import java.util.Map;
   import org.apache.cocoon.environment.Request;
  +import org.apache.cocoon.environment.ObjectModelHelper;
   import org.apache.cocoon.environment.Session;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  @@ -73,27 +75,28 @@
    */
   public class SessionAttributeModule extends AbstractInputModule implements ThreadSafe {
   
  -    public Object getAttribute( String name, Configuration modeConf, Request request )
  +    public Object getAttribute( String name, Configuration modeConf, Map objectModel )
           throws ConfigurationException {
   
           String pname = name;
           if ( modeConf != null ) {
               pname = modeConf.getAttribute( "parameter", pname );
           }
  -        return request.getSession().getAttribute( pname );
  +        return ObjectModelHelper.getRequest(objectModel).getSession().getAttribute( pname );
       }
   
   
  -    public Enumeration getAttributeNames( Configuration modeConf, Request request )
  +    public Enumeration getAttributeNames( Configuration modeConf, Map objectModel )
           throws ConfigurationException {
   
  -        return request.getSession().getAttributeNames();
  +        return ObjectModelHelper.getRequest(objectModel).getSession().getAttributeNames();
       }
   
   
  -    public Object[] getAttributeValues( String name, Configuration modeConf, Request request )
  +    public Object[] getAttributeValues( String name, Configuration modeConf, Map objectModel )
           throws ConfigurationException {
   
  +        Request request = ObjectModelHelper.getRequest(objectModel);
           String wildcard = name;
           if ( modeConf != null ) {
               wildcard = modeConf.getAttribute( "parameter", wildcard );
  
  
  
  1.1.2.2   +6 -6      xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/input/Attic/StringConstantModule.java
  
  Index: StringConstantModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/input/Attic/StringConstantModule.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- StringConstantModule.java	28 Apr 2002 20:12:49 -0000	1.1.2.1
  +++ StringConstantModule.java	11 Aug 2002 18:08:50 -0000	1.1.2.2
  @@ -55,7 +55,7 @@
   import java.util.List;
   import java.util.LinkedList;
   import java.util.StringTokenizer;
  -import org.apache.cocoon.environment.Request;
  +import java.util.Map;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.component.Component;
  @@ -72,7 +72,7 @@
   
       final static Enumeration returnNames = new StringTokenizer("stringConstant");
   
  -    public Object getAttribute( String name, Configuration modeConf, Request request ) throws ConfigurationException {
  +    public Object getAttribute( String name, Configuration modeConf, Map objectModel ) throws ConfigurationException {
           
           if (modeConf == null) {
               return null;
  @@ -82,17 +82,17 @@
       }
   
   
  -    public Enumeration getAttributeNames( Configuration modeConf, Request request ) throws ConfigurationException {
  +    public Enumeration getAttributeNames( Configuration modeConf, Map objectModel ) throws ConfigurationException {
   
           return StringConstantModule.returnNames;
       }
   
   
  -    public Object[] getAttributeValues( String name, Configuration modeConf, Request request )
  +    public Object[] getAttributeValues( String name, Configuration modeConf, Map objectModel )
           throws ConfigurationException {
   
               List values = new LinkedList();
  -            values.add( this.getAttribute(name, modeConf, request) );
  +            values.add( this.getAttribute(name, modeConf, objectModel) );
   
               return values.toArray();
               
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +318 -0    xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/input/Attic/DefaultsMetaModule.java
  
  
  
  
  1.1.2.1   +65 -0     xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/input/Attic/EnumerationHelper.java
  
  
  
  
  1.1.2.1   +350 -0    xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/input/Attic/MapMetaModule.java
  
  
  
  
  1.1.2.1   +361 -0    xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/input/Attic/XMLMetaModule.java
  
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +3 -3      xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/output/Attic/AbstractOutputModule.java
  
  Index: AbstractOutputModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/output/Attic/AbstractOutputModule.java,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  --- AbstractOutputModule.java	15 Mar 2002 15:15:08 -0000	1.1
  +++ AbstractOutputModule.java	11 Aug 2002 18:08:50 -0000	1.1.2.1
  @@ -55,7 +55,7 @@
   import org.apache.avalon.framework.configuration.Configurable;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  -import org.apache.avalon.framework.logger.AbstractLoggable;
  +import org.apache.avalon.framework.logger.AbstractLogEnabled;
   
   import org.apache.cocoon.util.HashMap;
   
  @@ -67,7 +67,7 @@
    * @author <a href="mailto:haul@apache.org">Christian Haul</a>
    * @version CVS $Id$
    */
  -public abstract class AbstractOutputModule extends AbstractLoggable
  +public abstract class AbstractOutputModule extends AbstractLogEnabled
       implements OutputModule, Configurable, Disposable {
   
       /**
  
  
  
  1.1.2.2   +7 -7      xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/output/Attic/OutputModule.java
  
  Index: OutputModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/output/Attic/OutputModule.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- OutputModule.java	2 Aug 2002 03:16:04 -0000	1.1.2.1
  +++ OutputModule.java	11 Aug 2002 18:08:50 -0000	1.1.2.2
  @@ -51,9 +51,9 @@
   
   package org.apache.cocoon.components.modules.output;
   
  -import org.apache.cocoon.environment.Request;
   import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.configuration.Configuration;
  +import java.util.Map;
   
   /**
    * Communicate results to other components. This could be done via
  @@ -73,13 +73,13 @@
        * communicate an attribute value to further processing logic.
        * @param modeConf column's mode configuration from resource
        * description. This argument is optional.
  -     * @param request The request object
  +     * @param objectModel The objectModel
        * @param name The attribute's label, consisting of "table.column"
        * or "table.column[index]" in case of multiple attributes of the
        * same spec.
        * @param value The attriute's value.
        * */
  -    void setAttribute( Configuration modeConf, Request request, String name, Object value );
  +    void setAttribute( Configuration modeConf, Map objectModel, String name, Object value );
   
   
       /**
  @@ -91,14 +91,14 @@
        * your data straight to some beans or other entities could result
        * in data corruption!</em>
        * */
  -    void rollback( Configuration modeConf, Request request, Exception e );
  +    void rollback( Configuration modeConf, Map objectModel, Exception e );
   
   
       /**
        * Signal that the database transaction completed
  -     * successfully. See notes on @link{rollback}.
  +     * successfully. See notes on {@link #rollback rollback}.
        * */
  -    void commit( Configuration modeConf, Request request );
  +    void commit( Configuration modeConf, Map objectModel );
   
   
   }
  
  
  
  1.1.2.1   +18 -11    xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/output/Attic/RequestAttributeOutputModule.java
  
  Index: RequestAttributeOutputModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/output/Attic/RequestAttributeOutputModule.java,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  --- RequestAttributeOutputModule.java	15 Mar 2002 15:15:08 -0000	1.1
  +++ RequestAttributeOutputModule.java	11 Aug 2002 18:08:50 -0000	1.1.2.1
  @@ -52,8 +52,9 @@
   package org.apache.cocoon.components.modules.output;
   
   import java.util.Enumeration;
  +import java.util.Map;
   import org.apache.cocoon.environment.Request;
  -import org.apache.avalon.framework.logger.AbstractLoggable;
  +import org.apache.cocoon.environment.ObjectModelHelper;
   import org.apache.avalon.framework.configuration.Configuration;
   
   /**
  @@ -76,11 +77,14 @@
        * same spec.
        * @param value The attriute's value.
        * */
  -    public void setAttribute( Configuration modeConf, Request request, String name, Object value ) {
  +    public void setAttribute( Configuration modeConf, Map objectModel, String name, Object value ) {
   
  -        request.setAttribute( ( (String) this.settings.get("key-prefix",
  -                                                           "org.apache.cocoon.components.modules.output.OutputModule" ) )
  -                              + ":" + name, value);
  +        String prefix = (String) this.settings.get("key-prefix", "org.apache.cocoon.components.modules.output.OutputModule" );
  +        if (prefix != "") {
  +            ObjectModelHelper.getRequest(objectModel).setAttribute(prefix+":"+name, value);
  +        } else {
  +            ObjectModelHelper.getRequest(objectModel).setAttribute(name, value);
  +        }
       }
   
   
  @@ -93,7 +97,7 @@
        * your data straight to some beans or other entities could result
        * in data corruption!</em>
        * */
  -    public void rollback( Configuration modeConf, Request request, Exception e ) {
  +    public void rollback( Configuration modeConf, Map objectModel, Exception e ) {
           /*
             Enumeration attributes = request.getAttributeNames();
             while ( attributes.hasMoreElements() ) {
  @@ -103,9 +107,12 @@
                 }
             }
           */
  -        request.setAttribute( ( (String) this.settings.get("key-prefix",
  -                                                           "org.apache.cocoon.components.modules.output.OutputModule" ) ) + ":",
  -                              e.getMessage());
  +        String prefix = (String) this.settings.get("key-prefix", "org.apache.cocoon.components.modules.output.OutputModule" );
  +        if (prefix!="") {
  +            ObjectModelHelper.getRequest(objectModel).setAttribute(prefix+":",e.getMessage());
  +        } else {
  +            ObjectModelHelper.getRequest(objectModel).setAttribute("errorMessage",e.getMessage());
  +        }
       }
   
   
  @@ -113,7 +120,7 @@
        * Signal that the database transaction completed
        * successfully. See notes on @link{rollback}.
        * */
  -    public void commit( Configuration modeConf, Request request )
  +    public void commit( Configuration modeConf, Map objectModel )
       {
           // empty method
       }
  
  
  
  1.1.2.1   +30 -16    xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/output/Attic/SessionAttributeOutputModule.java
  
  Index: SessionAttributeOutputModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/modules/output/Attic/SessionAttributeOutputModule.java,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  --- SessionAttributeOutputModule.java	15 Mar 2002 15:15:08 -0000	1.1
  +++ SessionAttributeOutputModule.java	11 Aug 2002 18:08:50 -0000	1.1.2.1
  @@ -52,8 +52,10 @@
   package org.apache.cocoon.components.modules.output;
   
   import java.util.Enumeration;
  +import java.util.Map;
   import org.apache.cocoon.environment.Request;
  -import org.apache.avalon.framework.logger.AbstractLoggable;
  +import org.apache.cocoon.environment.Session;
  +import org.apache.cocoon.environment.ObjectModelHelper;
   import org.apache.avalon.framework.configuration.Configuration;
   
   /**
  @@ -76,13 +78,17 @@
        * same spec.
        * @param value The attriute's value.
        * */
  -    public void setAttribute( Configuration modeConf, Request request, String name, Object value ) {
  +    public void setAttribute( Configuration modeConf, Map objectModel, String name, Object value ) {
   
  -        request
  -            .getSession()
  -            .setAttribute(((String) this.settings.get("key-prefix",
  -                                                      "org.apache.cocoon.components.modules.output.OutputModule"))
  -                          + ":" + name, value);
  +        String prefix = (String) this.settings.get("key-prefix", "org.apache.cocoon.components.modules.output.OutputModule" );
  +        Request req = ObjectModelHelper.getRequest(objectModel);
  +        Session ses = req.getSession();
  +        if (ses == null || !req.isRequestedSessionIdValid()) ses = req.getSession(true);
  +        if (prefix!="") {
  +            ses.setAttribute(prefix + ":" + name, value);
  +        } else {
  +            ses.setAttribute(name, value);
  +        }
       }
   
   
  @@ -95,19 +101,27 @@
        * your data straight to some beans or other entities could result
        * in data corruption!</em>
        * */
  -    public void rollback( Configuration modeConf, Request request, Exception e ) {
  +    public void rollback( Configuration modeConf, Map objectModel, Exception e ) {
  +
  +        Request request = ObjectModelHelper.getRequest(objectModel);
           Enumeration attributes = request.getSession().getAttributeNames();
  +        String prefix = (String) this.settings.get("key-prefix",
  +                                                   "org.apache.cocoon.components.modules.output.OutputModule");
           while ( attributes.hasMoreElements() ) {
               String name = (String) attributes.nextElement();
  -            if ( name.startsWith("org.apache.cocoon.acting.ModularDatabaseAccess.OutputModule:") ) {
  +            if ( name.startsWith(prefix) ) {
                   request.getSession().removeAttribute(name);
               }
           }
  -        request
  -            .getSession()
  -            .setAttribute(((String) this.settings.get("key-prefix",
  -                                                      "org.apache.cocoon.components.modules.output.OutputModule")) 
  -                          + ":", e.getMessage());
  +        if (prefix!="") {
  +            request
  +                .getSession()
  +                .setAttribute(prefix + ":", e.getMessage());
  +        } else {
  +            request
  +                .getSession()
  +                .setAttribute("errorMessage", e.getMessage());
  +        }
       }
   
   
  @@ -115,7 +129,7 @@
        * Signal that the database transaction completed
        * successfully. See notes on @link{rollback}.
        * */
  -    public void commit( Configuration modeConf, Request request )
  +    public void commit( Configuration modeConf, Map objectModel )
       {
           // empty method
       }
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message