KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > displaytag > util > RequestHelper


1 /**
2  * Licensed under the Artistic License; you may not use this file
3  * except in compliance with the License.
4  * You may obtain a copy of the License at
5  *
6  * http://displaytag.sourceforge.net/license.html
7  *
8  * THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
9  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
10  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
11  */

12 package org.displaytag.util;
13
14 import java.util.Map JavaDoc;
15
16
17 /**
18  * A RequestHelper object is used to read parameters from the request. Main features are handling of numeric parameters
19  * and the ability to create Href objects from the current request.
20  * @author Fabrizio Giustina
21  * @version $Revision: 720 $ ($Author: fgiust $)
22  */

23 public interface RequestHelper
24 {
25
26     /**
27      * return the current Href for the request (base url and parameters).
28      * @return Href
29      */

30     Href getHref();
31
32     /**
33      * Reads a String parameter from the request.
34      * @param key String parameter name
35      * @return String parameter value
36      */

37     String JavaDoc getParameter(String JavaDoc key);
38
39     /**
40      * Reads an Integer parameter from the request.
41      * @param key String parameter name
42      * @return Integer parameter value or null if the parameter is not found or it can't be transformed to an Integer
43      */

44     Integer JavaDoc getIntParameter(String JavaDoc key);
45
46     /**
47      * Returns a Map containing all the parameters in the request.
48      * @return Map
49      */

50     Map JavaDoc getParameterMap();
51
52 }
53
Popular Tags