public interface RequestContainer
RequestContainer
conveniently wraps an ServletRequest
and simplifies the access to (possibly
multi-valued) request-parameters including FormUpload
s.Modifier and Type | Method and Description |
---|---|
Map<String,List<FormUpload>> |
getFormUploads()
Returns all
FormUpload s for the request as immutable map. |
List<FormUpload> |
getFormUploads(String name)
Returns an immutable
List of all FormUpload s for the parameter with the given name. |
String |
getHost()
Returns the host name for this request
|
String |
getParameter(String name)
Returns the value for the parameter with the given name.
Note that for a multi-valued parameter, any of the submitted values is returned. |
List<String> |
getParameterList(String name)
Returns a
List containing all the values for the parameter with the given name. |
Set<String> |
getParameterNames()
Returns an immutable
Set containing the names of all request parameters. |
Map<String,String> |
getParameters()
Returns an immutable
Map containing the name of each request-parameter as a key and a single parameter
value as the map's value.Note that for multi-valued parameters, the returned map contains any of the submitted values. |
Map<String,List<String>> |
getParametersList()
Returns an immutable
Map containing the name of each request-parameter as a key and the list of submitted
values as value. |
boolean |
hasParameter(String name)
Checks whether a parameter with the given name exists.
|
String getHost()
Map<String,List<String>> getParametersList()
Map
containing the name of each request-parameter as a key and the list of submitted
values as value.Map
containing the request parameters (including multi-valued ones)Map<String,String> getParameters()
Map
containing the name of each request-parameter as a key and a single parameter
value as the map's value.getParametersList()
instead if you want to deal with multi-valued parameters.Map
containing the request parametersString getParameter(String name)
getParameterList(String)
instead if you want to deal with a multi-valued parameter.name
- the name of the parameterSet<String> getParameterNames()
Set
containing the names of all request parameters.boolean hasParameter(String name)
name
- the name of the parametertrue
if such a parameter exists, false
otherwiseList<String> getParameterList(String name)
List
containing all the values for the parameter with the given name.name
- the name of the parameterList
(never null
, but may be empty) containing all the values for the given parameterMap<String,List<FormUpload>> getFormUploads()
FormUpload
s for the request as immutable map. Returns a Map
using the parameters name
as a key and a List
of FormUpload
s as the value.Map
containing the FileUpload
sList<FormUpload> getFormUploads(String name)
List
of all FormUpload
s for the parameter with the given name.name
- the name of the parametersFormUpload
s (never null
, but may be empty)Copyright © 2011–2023 aiticon GmbH. All rights reserved.