KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sapia > soto > state > cocoon > ReqParamScope


1 package org.sapia.soto.state.cocoon;
2
3 import org.apache.cocoon.environment.Request;
4
5 import org.sapia.soto.state.Scope;
6
7
8 /**
9  * Implements the <code>Scope</code> interface over request parameters.
10  *
11  * @author Yanick Duchesne
12  * <dl>
13  * <dt><b>Copyright:</b><dd>Copyright &#169; 2002-2003 <a HREF="http://www.sapia-oss.org">Sapia Open Source Software</a>. All Rights Reserved.</dd></dt>
14  * <dt><b>License:</b><dd>Read the license.txt file of the jar or visit the
15  * <a HREF="http://www.sapia-oss.org/license.html">license page</a> at the Sapia OSS web site</dd></dt>
16  * </dl>
17  */

18 public class ReqParamScope implements Scope {
19   private Request _req;
20
21   public ReqParamScope(Request req) {
22     _req = req;
23   }
24
25   /**
26    * @see org.sapia.soto.state.Scope#putVal(java.lang.Object, java.lang.Object)
27    */

28   public void putVal(Object JavaDoc key, Object JavaDoc value) {
29   }
30
31   /**
32    * @see org.sapia.soto.state.Scope#getVal(java.lang.Object)
33    */

34   public Object JavaDoc getVal(Object JavaDoc key) {
35     return _req.getParameter(key.toString());
36   }
37
38   /**
39    * @return the <code>Request</code> that this instance wraps.
40    */

41   public Request getRequest() {
42     return _req;
43   }
44 }
45
Popular Tags