KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > springframework > web > context > request > WebRequest


1 /*
2  * Copyright 2002-2006 the original author or authors.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.springframework.web.context.request;
18
19 import java.util.Locale JavaDoc;
20 import java.util.Map JavaDoc;
21
22 /**
23  * Generic interface for a web request. Mainly intended for generic web
24  * request interceptors, giving them access to general request metadata,
25  * not for actual handling of the request.
26  *
27  * @author Juergen Hoeller
28  * @since 2.0
29  * @see WebRequestInterceptor
30  */

31 public interface WebRequest extends RequestAttributes {
32
33     /**
34      * Return the request parameter of the given name, or <code>null</code> if none.
35      * <p>Retrieves the first parameter value in case of a multi-value parameter.
36      */

37     String JavaDoc getParameter(String JavaDoc paramName);
38
39     /**
40      * Return the request parameter values for the given parameter name,
41      * or <code>null</code> if none.
42      * <p>A single-value parameter will be exposed as an array with a single element.
43      */

44     String JavaDoc[] getParameterValues(String JavaDoc paramName);
45
46     /**
47      * Return a immutable Map of the request parameters, with parameter names as map keys
48      * and parameter values as map values. The map values will be of type String array.
49      * <p>A single-value parameter will be exposed as an array with a single element.
50      */

51     Map JavaDoc getParameterMap();
52
53     /**
54      * Return the primary Locale for this request.
55      */

56     Locale JavaDoc getLocale();
57
58 }
59
Popular Tags