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/java/org/apache/cocoon/components/modules/output OutputModule.java RequestAttributeOutputModule.java SessionAttributeOutputModule.java
Date Tue, 28 May 2002 13:41:29 GMT
haul        02/05/28 06:41:29

  Modified:    src/java/org/apache/cocoon/components/modules/database
                        AutoIncrementModule.java
                        HsqlIdentityAutoIncrementModule.java
                        IfxSerialAutoIncrementModule.java
                        ManualAutoIncrementModule.java
                        MysqlAutoIncrementModule.java
               src/java/org/apache/cocoon/components/modules/input
                        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/java/org/apache/cocoon/components/modules/output
                        OutputModule.java RequestAttributeOutputModule.java
                        SessionAttributeOutputModule.java
  Log:
  Changed modules from using the request object to using objectModel instead. This
  entails some larger modifications to the modular database actions as they used
  to inherit the setColumn method which doesn't work anymore. Some code has been put
  to a utility class and the modular datbase action are now no subclass of the
  original ones anymore.
  
  Revision  Changes    Path
  1.2       +4 -4      xml-cocoon2/src/java/org/apache/cocoon/components/modules/database/AutoIncrementModule.java
  
  Index: AutoIncrementModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/database/AutoIncrementModule.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AutoIncrementModule.java	15 Mar 2002 15:15:08 -0000	1.1
  +++ AutoIncrementModule.java	28 May 2002 13:41:28 -0000	1.2
  @@ -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;
  @@ -64,7 +64,7 @@
    * attribute columns.
    *
    * @author <a href="mailto:haul@apache.org">Christian Haul</a>
  - * @version CVS $Id: AutoIncrementModule.java,v 1.1 2002/03/15 15:15:08 haul Exp $
  + * @version CVS $Id: AutoIncrementModule.java,v 1.2 2002/05/28 13:41:28 haul Exp $
    * */
   public interface AutoIncrementModule extends Component {
   
  @@ -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.2       +4 -4      xml-cocoon2/src/java/org/apache/cocoon/components/modules/database/HsqlIdentityAutoIncrementModule.java
  
  Index: HsqlIdentityAutoIncrementModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/database/HsqlIdentityAutoIncrementModule.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- HsqlIdentityAutoIncrementModule.java	15 Mar 2002 15:15:08 -0000	1.1
  +++ HsqlIdentityAutoIncrementModule.java	28 May 2002 13:41:28 -0000	1.2
  @@ -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;
  @@ -72,12 +72,12 @@
    * {@link http://hsqldb.sourceforge.net}
    *
    * @author <a href="mailto:haul@apache.org">Christian Haul</a>
  - * @version CVS $Id: HsqlIdentityAutoIncrementModule.java,v 1.1 2002/03/15 15:15:08 haul Exp $
  + * @version CVS $Id: HsqlIdentityAutoIncrementModule.java,v 1.2 2002/05/28 13:41:28 haul Exp $
    */
   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 +106,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.4       +4 -4      xml-cocoon2/src/java/org/apache/cocoon/components/modules/database/IfxSerialAutoIncrementModule.java
  
  Index: IfxSerialAutoIncrementModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/database/IfxSerialAutoIncrementModule.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- IfxSerialAutoIncrementModule.java	28 Apr 2002 19:31:43 -0000	1.3
  +++ IfxSerialAutoIncrementModule.java	28 May 2002 13:41:28 -0000	1.4
  @@ -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;
  @@ -69,12 +69,12 @@
    * (need another one for SERIAL8 ones!)
    *
    * @author <a href="mailto:haul@apache.org">Christian Haul</a>
  - * @version CVS $Id: IfxSerialAutoIncrementModule.java,v 1.3 2002/04/28 19:31:43 haul Exp $
  + * @version CVS $Id: IfxSerialAutoIncrementModule.java,v 1.4 2002/05/28 13:41:28 haul Exp $
    */
   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.2       +3 -4      xml-cocoon2/src/java/org/apache/cocoon/components/modules/database/ManualAutoIncrementModule.java
  
  Index: ManualAutoIncrementModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/database/ManualAutoIncrementModule.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ManualAutoIncrementModule.java	15 Mar 2002 15:15:08 -0000	1.1
  +++ ManualAutoIncrementModule.java	28 May 2002 13:41:28 -0000	1.2
  @@ -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;
  @@ -78,7 +77,7 @@
    * requires only shared locks. C.f. "Phantom Problem"
    *
    * @author <a href="mailto:haul@apache.org">Christian Haul</a>
  - * @version CVS $Id: ManualAutoIncrementModule.java,v 1.1 2002/03/15 15:15:08 haul Exp $
  + * @version CVS $Id: ManualAutoIncrementModule.java,v 1.2 2002/05/28 13:41:28 haul Exp $
    */
   public class ManualAutoIncrementModule extends AbstractAutoIncrementModule implements 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.2       +4 -5      xml-cocoon2/src/java/org/apache/cocoon/components/modules/database/MysqlAutoIncrementModule.java
  
  Index: MysqlAutoIncrementModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/database/MysqlAutoIncrementModule.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MysqlAutoIncrementModule.java	15 Mar 2002 15:15:08 -0000	1.1
  +++ MysqlAutoIncrementModule.java	28 May 2002 13:41:28 -0000	1.2
  @@ -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;
  @@ -69,12 +69,12 @@
    * {@link http://www.mysql.com}
    *
    * @author <a href="mailto:phantom@stserv.hcf.jhu.edu">Tim Myers</a>
  - * @version CVS $Id: MysqlAutoIncrementModule.java,v 1.1 2002/03/15 15:15:08 haul Exp $
  + * @version CVS $Id: MysqlAutoIncrementModule.java,v 1.2 2002/05/28 13:41:28 haul Exp $
    */
   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 +103,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 {
  
  
  
  1.2       +12 -43    xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/CollectionMetaModule.java
  
  Index: CollectionMetaModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/CollectionMetaModule.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CollectionMetaModule.java	28 Apr 2002 19:22:02 -0000	1.1
  +++ CollectionMetaModule.java	28 May 2002 13:41:28 -0000	1.2
  @@ -64,10 +64,8 @@
   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;
   
  @@ -96,7 +94,7 @@
    * </table>
    *
    * @author <a href="mailto:haul@informatik.tu-darmstadt.de">Christian Haul</a>
  - * @version CVS $Id: CollectionMetaModule.java,v 1.1 2002/04/28 19:22:02 haul Exp $
  + * @version CVS $Id: CollectionMetaModule.java,v 1.2 2002/05/28 13:41:28 haul Exp $
    */
   public class CollectionMetaModule extends AbstractLoggable
       implements InputModule, Configurable, Initializable, Composable, Disposable {
  @@ -186,7 +184,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 +237,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 +260,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 +287,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 +303,7 @@
   
   
   
  -    public Enumeration getAttributeNames( Configuration modeConf, Request request ) 
  +    public Enumeration getAttributeNames( Configuration modeConf, Map objectModel ) 
           throws ConfigurationException {
   
           if (!this.initialized) {
  @@ -372,7 +341,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 +364,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,13 +433,13 @@
   
   
   
  -    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();
  
  
  
  1.2       +6 -6      xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/DateInputModule.java
  
  Index: DateInputModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/DateInputModule.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DateInputModule.java	28 Apr 2002 19:22:02 -0000	1.1
  +++ DateInputModule.java	28 May 2002 13:41:28 -0000	1.2
  @@ -56,8 +56,8 @@
   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;
  @@ -69,14 +69,14 @@
    * root node.
    *
    * @author <a href="mailto:haul@apache.org">Christian Haul</a>
  - * @version CVS $Id: DateInputModule.java,v 1.1 2002/04/28 19:22:02 haul Exp $
  + * @version CVS $Id: DateInputModule.java,v 1.2 2002/05/28 13:41:28 haul Exp $
    * @see java.text.SimpleDateFormat
    */
   public class DateInputModule extends AbstractInputModule implements ThreadSafe {
   
       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);
   
  @@ -88,17 +88,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.2       +10 -13    xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/DigestMetaModule.java
  
  Index: DigestMetaModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/DigestMetaModule.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DigestMetaModule.java	28 Apr 2002 19:22:02 -0000	1.1
  +++ DigestMetaModule.java	28 May 2002 13:41:28 -0000	1.2
  @@ -70,9 +70,6 @@
   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;
  @@ -98,7 +95,7 @@
    * element. Defaults are "sha", null, "salt", and "false".
    *
    * @author <a href="mailto:haul@informatik.tu-darmstadt.de">Christian Haul</a>
  - * @version CVS $Id: DigestMetaModule.java,v 1.1 2002/04/28 19:22:02 haul Exp $
  + * @version CVS $Id: DigestMetaModule.java,v 1.2 2002/05/28 13:41:28 haul Exp $
    */
   public class DigestMetaModule extends AbstractLoggable
       implements InputModule, Configurable, Initializable, Composable, Disposable {
  @@ -192,7 +189,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 +230,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 +253,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 +303,7 @@
   
   
   
  -    public Enumeration getAttributeNames( Configuration modeConf, Request request ) 
  +    public Enumeration getAttributeNames( Configuration modeConf, Map objectModel ) 
           throws ConfigurationException {
   
            if (!this.initialized) {
  @@ -343,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
  @@ -366,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()) 
  @@ -398,7 +395,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 +436,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 +459,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.2       +9 -6      xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/HeaderAttributeModule.java
  
  Index: HeaderAttributeModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/HeaderAttributeModule.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- HeaderAttributeModule.java	15 Mar 2002 15:15:08 -0000	1.1
  +++ HeaderAttributeModule.java	28 May 2002 13:41:28 -0000	1.2
  @@ -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;
  @@ -68,30 +70,31 @@
    * getAttributeValues. Only one "*" is allowed.
    *
    * @author <a href="mailto:haul@apache.org">Christian Haul</a>
  - * @version CVS $Id: HeaderAttributeModule.java,v 1.1 2002/03/15 15:15:08 haul Exp $ */
  + * @version CVS $Id: HeaderAttributeModule.java,v 1.2 2002/05/28 13:41:28 haul Exp $ */
   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.3       +8 -8      xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/InputModule.java
  
  Index: InputModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/InputModule.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- InputModule.java	28 Apr 2002 19:22:02 -0000	1.2
  +++ InputModule.java	28 May 2002 13:41:28 -0000	1.3
  @@ -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;
  @@ -65,7 +65,7 @@
    * attributes, session attributes &c.
    *
    * @author <a href="mailto:haul@apache.org">Christian Haul</a>
  - * @version CVS $Id: InputModule.java,v 1.2 2002/04/28 19:22:02 haul Exp $
  + * @version CVS $Id: InputModule.java,v 1.3 2002/05/28 13:41:28 haul Exp $
    */
   public interface InputModule extends Component {
   
  @@ -83,9 +83,9 @@
        * 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,9 +94,9 @@
        * 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;
   
   
       /**
  @@ -109,8 +109,8 @@
        * 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.2       +5 -5      xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/NullInputModule.java
  
  Index: NullInputModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/NullInputModule.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- NullInputModule.java	28 Apr 2002 19:22:02 -0000	1.1
  +++ NullInputModule.java	28 May 2002 13:41:28 -0000	1.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;
  @@ -69,23 +69,23 @@
    * manually.
    *
    * @author <a href="mailto:haul@apache.org">Christian Haul</a>
  - * @version CVS $Id: NullInputModule.java,v 1.1 2002/04/28 19:22:02 haul Exp $
  + * @version CVS $Id: NullInputModule.java,v 1.2 2002/05/28 13:41:28 haul Exp $
    */
   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.2       +6 -6      xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/RandomNumberModule.java
  
  Index: RandomNumberModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/RandomNumberModule.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RandomNumberModule.java	28 Apr 2002 19:22:02 -0000	1.1
  +++ RandomNumberModule.java	28 May 2002 13:41:28 -0000	1.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;
  @@ -68,13 +68,13 @@
    * respectively.
    *
    * @author <a href="mailto:haul@apache.org">Christian Haul</a>
  - * @version CVS $Id: RandomNumberModule.java,v 1.1 2002/04/28 19:22:02 haul Exp $
  + * @version CVS $Id: RandomNumberModule.java,v 1.2 2002/05/28 13:41:28 haul Exp $
    */
   public class RandomNumberModule extends AbstractInputModule implements ThreadSafe {
   
       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.2       +9 -6      xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/RequestAttributeModule.java
  
  Index: RequestAttributeModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/RequestAttributeModule.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RequestAttributeModule.java	15 Mar 2002 15:15:08 -0000	1.1
  +++ RequestAttributeModule.java	28 May 2002 13:41:28 -0000	1.2
  @@ -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;
  @@ -68,31 +70,32 @@
    * getAttributeValues. Only one "*" is allowed.
    *
    * @author <a href="mailto:haul@apache.org">Christian Haul</a>
  - * @version CVS $Id: RequestAttributeModule.java,v 1.1 2002/03/15 15:15:08 haul Exp $
  + * @version CVS $Id: RequestAttributeModule.java,v 1.2 2002/05/28 13:41:28 haul Exp $
    */
   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.2       +9 -6      xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/RequestParameterModule.java
  
  Index: RequestParameterModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/RequestParameterModule.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RequestParameterModule.java	15 Mar 2002 15:15:08 -0000	1.1
  +++ RequestParameterModule.java	28 May 2002 13:41:28 -0000	1.2
  @@ -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;
  @@ -70,29 +72,30 @@
    * such array is returned.
    *
    * @author <a href="mailto:haul@apache.org">Christian Haul</a>
  - * @version CVS $Id: RequestParameterModule.java,v 1.1 2002/03/15 15:15:08 haul Exp $
  + * @version CVS $Id: RequestParameterModule.java,v 1.2 2002/05/28 13:41:28 haul Exp $
    */
   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.2       +8 -6      xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/RequestURIModule.java
  
  Index: RequestURIModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/RequestURIModule.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RequestURIModule.java	15 Mar 2002 15:15:08 -0000	1.1
  +++ RequestURIModule.java	28 May 2002 13:41:28 -0000	1.2
  @@ -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;
  @@ -65,15 +67,15 @@
    * RequestURIModule accesses the request URI. If the
    *
    * @author <a href="mailto:haul@apache.org">Christian Haul</a>
  - * @version CVS $Id: RequestURIModule.java,v 1.1 2002/03/15 15:15:08 haul Exp $
  + * @version CVS $Id: RequestURIModule.java,v 1.2 2002/05/28 13:41:28 haul Exp $
    */
   public class RequestURIModule extends AbstractInputModule implements ThreadSafe {
   
       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.2       +9 -6      xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/SessionAttributeModule.java
  
  Index: SessionAttributeModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/SessionAttributeModule.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SessionAttributeModule.java	15 Mar 2002 15:15:08 -0000	1.1
  +++ SessionAttributeModule.java	28 May 2002 13:41:28 -0000	1.2
  @@ -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;
  @@ -69,31 +71,32 @@
    * getAttributeValues. Only one "*" is allowed.
    *
    * @author <a href="mailto:haul@apache.org">Christian Haul</a>
  - * @version CVS $Id: SessionAttributeModule.java,v 1.1 2002/03/15 15:15:08 haul Exp $
  + * @version CVS $Id: SessionAttributeModule.java,v 1.2 2002/05/28 13:41:28 haul Exp $
    */
   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.2       +6 -6      xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/StringConstantModule.java
  
  Index: StringConstantModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/StringConstantModule.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StringConstantModule.java	28 Apr 2002 19:22:02 -0000	1.1
  +++ StringConstantModule.java	28 May 2002 13:41:28 -0000	1.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;
  @@ -66,13 +66,13 @@
    * Constant must be the only content of the configuration object.
    *
    * @author <a href="mailto:haul@apache.org">Christian Haul</a>
  - * @version CVS $Id: StringConstantModule.java,v 1.1 2002/04/28 19:22:02 haul Exp $
  + * @version CVS $Id: StringConstantModule.java,v 1.2 2002/05/28 13:41:28 haul Exp $
    */
   public class StringConstantModule extends AbstractInputModule implements ThreadSafe {
   
       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();
               
  
  
  
  1.2       +6 -6      xml-cocoon2/src/java/org/apache/cocoon/components/modules/output/OutputModule.java
  
  Index: OutputModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/output/OutputModule.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- OutputModule.java	15 Mar 2002 15:15:08 -0000	1.1
  +++ OutputModule.java	28 May 2002 13:41:29 -0000	1.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
  @@ -63,7 +63,7 @@
    * the transaction completes successfully.
    *
    * @author <a href="mailto:haul@apache.org">Christian Haul</a>
  - * @version CVS $Id: OutputModule.java,v 1.1 2002/03/15 15:15:08 haul Exp $
  + * @version CVS $Id: OutputModule.java,v 1.2 2002/05/28 13:41:29 haul Exp $
    */
   public interface OutputModule extends Component {
   
  @@ -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}.
        * */
  -    void commit( Configuration modeConf, Request request );
  +    void commit( Configuration modeConf, Map objectModel );
   
   
   }
  
  
  
  1.2       +14 -10    xml-cocoon2/src/java/org/apache/cocoon/components/modules/output/RequestAttributeOutputModule.java
  
  Index: RequestAttributeOutputModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/output/RequestAttributeOutputModule.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RequestAttributeOutputModule.java	15 Mar 2002 15:15:08 -0000	1.1
  +++ RequestAttributeOutputModule.java	28 May 2002 13:41:29 -0000	1.2
  @@ -52,7 +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.cocoon.environment.ObjectModelHelper;
   import org.apache.avalon.framework.logger.AbstractLoggable;
   import org.apache.avalon.framework.configuration.Configuration;
   
  @@ -62,7 +64,7 @@
    * "org.apache.cocoon.components.modules.output.OutputModule"+":"
    *
    * @author <a href="mailto:haul@apache.org">Christian Haul</a>
  - * @version CVS $Id: RequestAttributeOutputModule.java,v 1.1 2002/03/15 15:15:08 haul Exp $
  + * @version CVS $Id: RequestAttributeOutputModule.java,v 1.2 2002/05/28 13:41:29 haul Exp $
    */
   public class RequestAttributeOutputModule extends AbstractOutputModule implements OutputModule {
   
  @@ -76,11 +78,12 @@
        * 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);
  +        ObjectModelHelper.getRequest(objectModel)
  +            .setAttribute( ( (String) this.settings.get("key-prefix",
  +                                                        "org.apache.cocoon.components.modules.output.OutputModule" ) )
  +                           + ":" + name, value);
       }
   
   
  @@ -93,7 +96,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 +106,10 @@
                 }
             }
           */
  -        request.setAttribute( ( (String) this.settings.get("key-prefix",
  -                                                           "org.apache.cocoon.components.modules.output.OutputModule" ) ) + ":",
  -                              e.getMessage());
  +        ObjectModelHelper.getRequest(objectModel)
  +            .setAttribute( ( (String) this.settings.get("key-prefix",
  +                                                        "org.apache.cocoon.components.modules.output.OutputModule" ) ) + ":",
  +                           e.getMessage());
       }
   
   
  @@ -113,7 +117,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.2       +9 -5      xml-cocoon2/src/java/org/apache/cocoon/components/modules/output/SessionAttributeOutputModule.java
  
  Index: SessionAttributeOutputModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/output/SessionAttributeOutputModule.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SessionAttributeOutputModule.java	15 Mar 2002 15:15:08 -0000	1.1
  +++ SessionAttributeOutputModule.java	28 May 2002 13:41:29 -0000	1.2
  @@ -52,7 +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.cocoon.environment.ObjectModelHelper;
   import org.apache.avalon.framework.logger.AbstractLoggable;
   import org.apache.avalon.framework.configuration.Configuration;
   
  @@ -62,7 +64,7 @@
    * "org.apache.cocoon.components.modules.output.OutputModule"+":"
    *
    * @author <a href="mailto:haul@apache.org">Christian Haul</a>
  - * @version CVS $Id: SessionAttributeOutputModule.java,v 1.1 2002/03/15 15:15:08 haul Exp $
  + * @version CVS $Id: SessionAttributeOutputModule.java,v 1.2 2002/05/28 13:41:29 haul Exp $
    * */
   public class SessionAttributeOutputModule extends AbstractOutputModule implements OutputModule {
       
  @@ -76,9 +78,9 @@
        * 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
  +        ObjectModelHelper.getRequest(objectModel)
               .getSession()
               .setAttribute(((String) this.settings.get("key-prefix",
                                                         "org.apache.cocoon.components.modules.output.OutputModule"))
  @@ -95,7 +97,9 @@
        * 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();
           while ( attributes.hasMoreElements() ) {
               String name = (String) attributes.nextElement();
  @@ -115,7 +119,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