Class AbstractRequest
java.lang.Object
com.aspectran.core.activity.request.AbstractRequest
- Direct Known Subclasses:
AbstractRequestAdapter
The Class AbstractRequest.
- Since:
- 2011. 3. 12.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add the given single header value to the current list of values for the given header.boolean
containsHeader
(String name) Returns a boolean indicating whether the named response header has already been set.void
extractAttributes
(Map<String, Object> targetMap) void
extractParameters
(Map<String, Object> targetMap) Returns all parameters as a mutableMap<String, Object>
.<T> T
getAttribute
(String name) Returns a map of the request attributes that can be modified.getBody()
<T extends Parameters>
TgetBodyAsParameters
(Class<T> requiredType) getFileParameter
(String name) getFileParameterValues
(String name) Returns the value of the response header with the given name.Returns a map of the request headers that can be modified.Returns the names of the headers of this response.getHeaderValues
(String name) Returns the values of the response header with the given name.long
getParameter
(String name) Returns a map of the request parameters that can be modified.<T extends Parameters>
TgetParameters
(Class<T> requiredType) String[]
getParameterValues
(String name) Gets the time zone.boolean
boolean
boolean
boolean
void
putAllAttributes
(Map<String, Object> attributes) void
putAllFileParameters
(MultiValueMap<String, FileParameter> fileParameterMap) void
putAllParameters
(ParameterMap parameterMap) void
putAllParameters
(MultiValueMap<String, String> multiValueMap) void
removeAttribute
(String name) void
removeFileParameter
(String name) void
setAttribute
(String name, Object value) void
setAttributeMap
(Map<String, Object> attributeMap) void
void
setEncoding
(String encoding) void
setFileParameter
(String name, FileParameter fileParameter) void
setFileParameter
(String name, FileParameter[] fileParameters) void
Set the given single header value under the given header name.void
setHeaderMap
(MultiValueMap<String, String> headers) void
Sets the locale.void
setMaxRequestSize
(long maxRequestSize) void
setParameter
(String name, String value) void
setParameter
(String name, String[] values) void
setParameterMap
(ParameterMap parameterMap) void
setTimeZone
(TimeZone timeZone) Sets the time zone.
-
Constructor Details
-
AbstractRequest
-
-
Method Details
-
getRequestMethod
-
getHeader
Returns the value of the response header with the given name.If a response header with the given name exists and contains multiple values, the value that was added first will be returned.
- Parameters:
name
- the name of the response header whose value to return- Returns:
- the value of the response header with the given name,
or
null
if no header with the given name has been set on this response
-
getHeaderValues
Returns the values of the response header with the given name.- Parameters:
name
- the name of the response header whose values to return- Returns:
- a (possibly empty)
Collection
of the values of the response header with the given name
-
getHeaderNames
Returns the names of the headers of this response.- Returns:
- a (possibly empty)
Collection
of the names of the headers of this response
-
containsHeader
Returns a boolean indicating whether the named response header has already been set.- Parameters:
name
- the header name- Returns:
true
if the named response header has already been set;false
otherwise
-
setHeader
Set the given single header value under the given header name.- Parameters:
name
- the header namevalue
- the header value to set
-
addHeader
Add the given single header value to the current list of values for the given header.- Parameters:
name
- the header namevalue
- the header value to be added
-
getHeaderMap
Returns a map of the request headers that can be modified. If not yet instantiated then create a new one.- Returns:
- an
MultiValueMap
object, may not benull
-
setHeaderMap
-
hasHeaders
public boolean hasHeaders() -
getAttribute
-
setAttribute
-
getAttributeNames
-
removeAttribute
-
putAllAttributes
-
extractAttributes
-
getAttributeMap
Returns a map of the request attributes that can be modified. If not yet instantiated then create a new one.- Returns:
- an
Map<String, Object>
object, may not benull
-
setAttributeMap
-
hasAttributes
public boolean hasAttributes() -
getParameter
-
getParameterValues
-
getParameterNames
-
setParameter
-
setParameter
-
getAllParameters
Returns all parameters as a mutableMap<String, Object>
.- Returns:
- an
Map<String, Object>
object, must not benull
-
putAllParameters
-
putAllParameters
-
extractParameters
-
getParameterMap
Returns a map of the request parameters that can be modified. If not yet instantiated then create a new one.- Returns:
- a
ParameterMap
object, may not benull
-
setParameterMap
-
hasParameters
public boolean hasParameters() -
getFileParameter
-
getFileParameterValues
-
getFileParameterNames
-
setFileParameter
-
setFileParameter
-
removeFileParameter
-
getFileParameterMap
-
putAllFileParameters
-
hasFileParameters
public boolean hasFileParameters() -
getEncoding
-
setEncoding
- Throws:
UnsupportedEncodingException
-
getLocale
-
setLocale
Sets the locale.- Parameters:
locale
- the locale
-
getTimeZone
Gets the time zone.- Returns:
- the time zone
-
setTimeZone
Sets the time zone.- Parameters:
timeZone
- the time zone
-
getMaxRequestSize
public long getMaxRequestSize() -
setMaxRequestSize
public void setMaxRequestSize(long maxRequestSize) -
getInputStream
- Throws:
IOException
-
getBody
-
setBody
-
getBodyAsParameters
- Throws:
RequestParseException
-
getBodyAsParameters
public <T extends Parameters> T getBodyAsParameters(Class<T> requiredType) throws RequestParseException - Throws:
RequestParseException
-
getParameters
-
getParameters
-