Class ParameterSupport
- java.lang.Object
-
- org.apache.sling.engine.impl.parameters.ParameterSupport
-
public class ParameterSupport extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static StringMARKER_IS_SERVICE_PROCESSINGRequest attribute which is set if the current request is "started" by callingSlingRequestProcessor.processRequest(HttpServletRequest, HttpServletResponse, ResourceResolver)This marker is evaluated ingetRequestParameterMapInternal().static StringPARAMETER_FORMENCODINGThe name of the form encoding request parameter indicating the character encoding of submitted request parameters.static StringREQUEST_PARTS_ITERATOR_ATTRIBUTErequest attribute that stores the parts iterator when streamingstatic StringSLING_UPLOADMODE_HEADERname of the header used to identify an upload modestatic StringSTREAM_UPLOADvalue of upload mode header/parameter indicating streaming is requestedstatic StringUPLOADMODE_PARAMname of the parameter used to identify upload mode
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ParameterSupportgetInstance(javax.servlet.http.HttpServletRequest request)Returns theParameterSupportinstance supporting request parameter for the giverequest.StringgetParameter(String name)Map<String,String[]>getParameterMap()Enumeration<String>getParameterNames()static javax.servlet.http.HttpServletRequestWrappergetParameterSupportRequestWrapper(javax.servlet.http.HttpServletRequest request)Returns aHttpServletRequestWrapperwhich implements request parameter access backed by an instance of theParameterSupportclass.String[]getParameterValues(String name)ObjectgetPart(String name)Collection<?>getParts()org.apache.sling.api.request.RequestParametergetRequestParameter(String name)List<org.apache.sling.api.request.RequestParameter>getRequestParameterList()org.apache.sling.api.request.RequestParameterMapgetRequestParameterMap()org.apache.sling.api.request.RequestParameter[]getRequestParameters(String name)booleanrequestDataUsed()
-
-
-
Field Detail
-
PARAMETER_FORMENCODING
public static final String PARAMETER_FORMENCODING
The name of the form encoding request parameter indicating the character encoding of submitted request parameters. This request parameter overwrites any value of theServletRequest.getCharacterEncoding()method (which unfortunately happens to be returningnullmost of the time.- See Also:
- Constant Field Values
-
MARKER_IS_SERVICE_PROCESSING
public static final String MARKER_IS_SERVICE_PROCESSING
Request attribute which is set if the current request is "started" by callingSlingRequestProcessor.processRequest(HttpServletRequest, HttpServletResponse, ResourceResolver)This marker is evaluated ingetRequestParameterMapInternal().
-
SLING_UPLOADMODE_HEADER
public static final String SLING_UPLOADMODE_HEADER
name of the header used to identify an upload mode- See Also:
- Constant Field Values
-
UPLOADMODE_PARAM
public static final String UPLOADMODE_PARAM
name of the parameter used to identify upload mode- See Also:
- Constant Field Values
-
REQUEST_PARTS_ITERATOR_ATTRIBUTE
public static final String REQUEST_PARTS_ITERATOR_ATTRIBUTE
request attribute that stores the parts iterator when streaming- See Also:
- Constant Field Values
-
STREAM_UPLOAD
public static final String STREAM_UPLOAD
value of upload mode header/parameter indicating streaming is requested- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static ParameterSupport getInstance(javax.servlet.http.HttpServletRequest request)
Returns theParameterSupportinstance supporting request parameter for the giverequest. 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.- Parameters:
request- TheHttpServletRequestfor which to return request parameter support.- Returns:
- The
ParameterSupportfor the given request.
-
getParameterSupportRequestWrapper
public static javax.servlet.http.HttpServletRequestWrapper getParameterSupportRequestWrapper(javax.servlet.http.HttpServletRequest request)
Returns aHttpServletRequestWrapperwhich implements request parameter access backed by an instance of theParameterSupportclass.- Parameters:
request- TheHttpServletRequestto wrap- Returns:
- The wrapped
request
-
requestDataUsed
public boolean requestDataUsed()
-
getParameterNames
public Enumeration<String> getParameterNames()
-
getRequestParameter
public org.apache.sling.api.request.RequestParameter getRequestParameter(String name)
-
getRequestParameters
public org.apache.sling.api.request.RequestParameter[] getRequestParameters(String name)
-
getParts
public Collection<?> getParts()
-
getRequestParameterMap
public org.apache.sling.api.request.RequestParameterMap getRequestParameterMap()
-
getRequestParameterList
public List<org.apache.sling.api.request.RequestParameter> getRequestParameterList()
-
-