public class ParameterSupport extends Object
Modifier and Type | Field and Description |
---|---|
static String |
MARKER_IS_SERVICE_PROCESSING
Request attribute which is set if the current request is "started"
by calling
SlingRequestProcessor.processRequest(HttpServletRequest, HttpServletResponse, ResourceResolver)
This marker is evaluated in getRequestParameterMapInternal() . |
static String |
PARAMETER_FORMENCODING
The name of the form encoding request parameter indicating the character
encoding of submitted request parameters.
|
Modifier and Type | Method and Description |
---|---|
static ParameterSupport |
getInstance(javax.servlet.http.HttpServletRequest request)
Returns the
ParameterSupport instance supporting request
parameter for the give request . |
String |
getParameter(String name) |
Map<String,String[]> |
getParameterMap() |
Enumeration<String> |
getParameterNames() |
static javax.servlet.http.HttpServletRequestWrapper |
getParameterSupportRequestWrapper(javax.servlet.http.HttpServletRequest request)
Returns a
HttpServletRequestWrapper which implements request
parameter access backed by an instance of the ParameterSupport
class. |
String[] |
getParameterValues(String name) |
Object |
getPart(String name) |
Collection<?> |
getParts() |
org.apache.sling.api.request.RequestParameter |
getRequestParameter(String name) |
List<org.apache.sling.api.request.RequestParameter> |
getRequestParameterList() |
org.apache.sling.api.request.RequestParameterMap |
getRequestParameterMap() |
org.apache.sling.api.request.RequestParameter[] |
getRequestParameters(String name) |
boolean |
requestDataUsed() |
public static final String PARAMETER_FORMENCODING
ServletRequest.getCharacterEncoding()
method (which unfortunately happens to be returning null
most of
the time.public static final String MARKER_IS_SERVICE_PROCESSING
SlingRequestProcessor.processRequest(HttpServletRequest, HttpServletResponse, ResourceResolver)
This marker is evaluated in getRequestParameterMapInternal()
.public static ParameterSupport getInstance(javax.servlet.http.HttpServletRequest request)
ParameterSupport
instance supporting request
parameter for the give request
. For a single request only a
single instance is actually used. This single instance is cached as a
request attribute. If such an attribute already exists which is not an
instance of this class, the request parameter is replaced.request
- The HttpServletRequest
for which to return request
parameter support.ParameterSupport
for the given request.public static javax.servlet.http.HttpServletRequestWrapper getParameterSupportRequestWrapper(javax.servlet.http.HttpServletRequest request)
HttpServletRequestWrapper
which implements request
parameter access backed by an instance of the ParameterSupport
class.
request
- The HttpServletRequest
to wraprequest
public boolean requestDataUsed()
public Enumeration<String> getParameterNames()
public org.apache.sling.api.request.RequestParameter getRequestParameter(String name)
public org.apache.sling.api.request.RequestParameter[] getRequestParameters(String name)
public Collection<?> getParts()
public org.apache.sling.api.request.RequestParameterMap getRequestParameterMap()
public List<org.apache.sling.api.request.RequestParameter> getRequestParameterList()
Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.