public class RequestHelper
extends java.lang.Object
RequestHelper
provides utility methods for request handling.Constructor and Description |
---|
RequestHelper() |
Modifier and Type | Method and Description |
---|---|
static long |
getDateParameter(HttpServletRequest request,
java.lang.String paramName,
long defaultValue)
Returns the date parameter with name
paramName . |
static long |
getLongParameter(HttpServletRequest request,
java.lang.String paramName,
long defaultValue)
Returns the long parameter with name
paramName . |
static java.lang.String |
getStringParameter(HttpServletRequest request,
java.lang.String paramName,
java.lang.String defaultValue)
Returns the String parameter with name
paramName . |
public static long getLongParameter(HttpServletRequest request, java.lang.String paramName, long defaultValue)
paramName
. This method
returns the defaultValue
if the parameter value is malformed
or missing.request
- the request.paramName
- the parameter name.defaultValue
- a default value.public static long getDateParameter(HttpServletRequest request, java.lang.String paramName, long defaultValue)
paramName
. This method
returns the defaultValue
if the parameter value is malformed
or missing.
The expected date pattern is: 'yyyyMMdd'.request
- the request.paramName
- the parameter name.defaultValue
- a default value.public static java.lang.String getStringParameter(HttpServletRequest request, java.lang.String paramName, java.lang.String defaultValue)
paramName
. This
method returns the defaultValue
if the parameter value is
missing.request
- the request.paramName
- the parameter name.defaultValue
- a default value."Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"