java.lang.Object | |
↳ | org.springframework.web.portlet.bind.PortletRequestUtils |
Parameter extraction methods, for an approach distinct from data binding, in which parameters of specific types are required.
This approach is very useful for simple submissions, where binding request parameters to a command object would be overkill.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Get a boolean parameter, with a fallback value.
| |||||||||||
Get a Boolean parameter, or
null if not present. | |||||||||||
Get an array of boolean parameters, return an empty array if not found.
| |||||||||||
Get a Double parameter, or
null if not present. | |||||||||||
Get a double parameter, with a fallback value.
| |||||||||||
Get an array of double parameters, return an empty array if not found.
| |||||||||||
Get a float parameter, with a fallback value.
| |||||||||||
Get a Float parameter, or
null if not present. | |||||||||||
Get an array of float parameters, return an empty array if not found.
| |||||||||||
Get an int parameter, with a fallback value.
| |||||||||||
Get an Integer parameter, or
null if not present. | |||||||||||
Get an array of int parameters, return an empty array if not found.
| |||||||||||
Get a long parameter, with a fallback value.
| |||||||||||
Get a Long parameter, or
null if not present. | |||||||||||
Get an array of long parameters, return an empty array if not found.
| |||||||||||
Get a boolean parameter, throwing an exception if it isn't found
or isn't a boolean.
| |||||||||||
Get an array of boolean parameters, throwing an exception if not found
or one isn't a boolean.
| |||||||||||
Get a double parameter, throwing an exception if it isn't found or isn't a number.
| |||||||||||
Get an array of double parameters, throwing an exception if not found or one is not a number.
| |||||||||||
Get a float parameter, throwing an exception if it isn't found or isn't a number.
| |||||||||||
Get an array of float parameters, throwing an exception if not found or one is not a number.
| |||||||||||
Get an int parameter, throwing an exception if it isn't found or isn't a number.
| |||||||||||
Get an array of int parameters, throwing an exception if not found or one is not a number..
| |||||||||||
Get a long parameter, throwing an exception if it isn't found or isn't a number.
| |||||||||||
Get an array of long parameters, throwing an exception if not found or one is not a number.
| |||||||||||
Get a String parameter, throwing an exception if it isn't found or is empty.
| |||||||||||
Get an array of String parameters, throwing an exception if not found or one is empty.
| |||||||||||
Get a String parameter, or
null if not present. | |||||||||||
Get a String parameter, with a fallback value.
| |||||||||||
Get an array of String parameters, return an empty array if not found.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Get a boolean parameter, with a fallback value. Never throws an exception. Can pass a distinguished value as default to enable checks of whether it was supplied.
Accepts "true", "on", "yes" (any case) and "1" as values for true; treats every other non-empty value as false (i.e. parses leniently).
request | current portlet request |
---|---|
name | the name of the parameter |
defaultVal | the default value to use as fallback |
Get a Boolean parameter, or null
if not present.
Throws an exception if it the parameter value isn't a boolean.
Accepts "true", "on", "yes" (any case) and "1" as values for true; treats every other non-empty value as false (i.e. parses leniently).
request | current portlet request |
---|---|
name | the name of the parameter |
null
if not presentPortletRequestBindingException | a subclass of PortletException, so it doesn't need to be caught |
---|
Get an array of boolean parameters, return an empty array if not found.
Accepts "true", "on", "yes" (any case) and "1" as values for true; treats every other non-empty value as false (i.e. parses leniently).
request | current portlet request |
---|---|
name | the name of the parameter with multiple possible values |
Get a Double parameter, or null
if not present.
Throws an exception if it the parameter value isn't a number.
request | current portlet request |
---|---|
name | the name of the parameter |
null
if not presentPortletRequestBindingException | a subclass of PortletException, so it doesn't need to be caught |
---|
Get a double parameter, with a fallback value. Never throws an exception. Can pass a distinguished value as default to enable checks of whether it was supplied.
request | current portlet request |
---|---|
name | the name of the parameter |
defaultVal | the default value to use as fallback |
Get an array of double parameters, return an empty array if not found.
request | current portlet request |
---|---|
name | the name of the parameter with multiple possible values |
Get a float parameter, with a fallback value. Never throws an exception. Can pass a distinguished value as default to enable checks of whether it was supplied.
request | current portlet request |
---|---|
name | the name of the parameter |
defaultVal | the default value to use as fallback |
Get a Float parameter, or null
if not present.
Throws an exception if it the parameter value isn't a number.
request | current portlet request |
---|---|
name | the name of the parameter |
null
if not presentPortletRequestBindingException | a subclass of PortletException, so it doesn't need to be caught |
---|
Get an array of float parameters, return an empty array if not found.
request | current portlet request |
---|---|
name | the name of the parameter with multiple possible values |
Get an int parameter, with a fallback value. Never throws an exception. Can pass a distinguished value as default to enable checks of whether it was supplied.
request | current portlet request |
---|---|
name | the name of the parameter |
defaultVal | the default value to use as fallback |
Get an Integer parameter, or null
if not present.
Throws an exception if it the parameter value isn't a number.
request | current portlet request |
---|---|
name | the name of the parameter |
null
if not presentPortletRequestBindingException | a subclass of PortletException, so it doesn't need to be caught |
---|
Get an array of int parameters, return an empty array if not found.
request | current portlet request |
---|---|
name | the name of the parameter with multiple possible values |
Get a long parameter, with a fallback value. Never throws an exception. Can pass a distinguished value as default to enable checks of whether it was supplied.
request | current portlet request |
---|---|
name | the name of the parameter |
defaultVal | the default value to use as fallback |
Get a Long parameter, or null
if not present.
Throws an exception if it the parameter value isn't a number.
request | current portlet request |
---|---|
name | the name of the parameter |
null
if not presentPortletRequestBindingException | a subclass of PortletException, so it doesn't need to be caught |
---|
Get an array of long parameters, return an empty array if not found.
request | current portlet request |
---|---|
name | the name of the parameter with multiple possible values |
Get a boolean parameter, throwing an exception if it isn't found or isn't a boolean.
Accepts "true", "on", "yes" (any case) and "1" as values for true; treats every other non-empty value as false (i.e. parses leniently).
request | current portlet request |
---|---|
name | the name of the parameter |
PortletRequestBindingException | a subclass of PortletException, so it doesn't need to be caught |
---|
Get an array of boolean parameters, throwing an exception if not found or one isn't a boolean.
Accepts "true", "on", "yes" (any case) and "1" as values for true; treats every other non-empty value as false (i.e. parses leniently).
request | current portlet request |
---|---|
name | the name of the parameter |
PortletRequestBindingException | a subclass of PortletException, so it doesn't need to be caught |
---|
Get a double parameter, throwing an exception if it isn't found or isn't a number.
request | current portlet request |
---|---|
name | the name of the parameter |
PortletRequestBindingException | a subclass of PortletException, so it doesn't need to be caught |
---|
Get an array of double parameters, throwing an exception if not found or one is not a number.
request | current portlet request |
---|---|
name | the name of the parameter with multiple possible values |
PortletRequestBindingException | a subclass of PortletException, so it doesn't need to be caught |
---|
Get a float parameter, throwing an exception if it isn't found or isn't a number.
request | current portlet request |
---|---|
name | the name of the parameter |
PortletRequestBindingException | a subclass of PortletException, so it doesn't need to be caught |
---|
Get an array of float parameters, throwing an exception if not found or one is not a number.
request | current portlet request |
---|---|
name | the name of the parameter with multiple possible values |
PortletRequestBindingException | a subclass of PortletException, so it doesn't need to be caught |
---|
Get an int parameter, throwing an exception if it isn't found or isn't a number.
request | current portlet request |
---|---|
name | the name of the parameter |
PortletRequestBindingException | a subclass of PortletException, so it doesn't need to be caught |
---|
Get an array of int parameters, throwing an exception if not found or one is not a number..
request | current portlet request |
---|---|
name | the name of the parameter with multiple possible values |
PortletRequestBindingException | a subclass of PortletException, so it doesn't need to be caught |
---|
Get a long parameter, throwing an exception if it isn't found or isn't a number.
request | current portlet request |
---|---|
name | the name of the parameter |
PortletRequestBindingException | a subclass of PortletException, so it doesn't need to be caught |
---|
Get an array of long parameters, throwing an exception if not found or one is not a number.
request | current portlet request |
---|---|
name | the name of the parameter with multiple possible values |
PortletRequestBindingException | a subclass of PortletException, so it doesn't need to be caught |
---|
Get a String parameter, throwing an exception if it isn't found or is empty.
request | current portlet request |
---|---|
name | the name of the parameter |
PortletRequestBindingException | a subclass of PortletException, so it doesn't need to be caught |
---|
Get an array of String parameters, throwing an exception if not found or one is empty.
request | current portlet request |
---|---|
name | the name of the parameter |
PortletRequestBindingException | a subclass of PortletException, so it doesn't need to be caught |
---|
Get a String parameter, or null
if not present.
Throws an exception if it the parameter value is empty.
request | current portlet request |
---|---|
name | the name of the parameter |
null
if not presentPortletRequestBindingException | a subclass of PortletException, so it doesn't need to be caught |
---|
Get a String parameter, with a fallback value. Never throws an exception. Can pass a distinguished value to default to enable checks of whether it was supplied.
request | current portlet request |
---|---|
name | the name of the parameter |
defaultVal | the default value to use as fallback |
Get an array of String parameters, return an empty array if not found.
request | current portlet request |
---|---|
name | the name of the parameter with multiple possible values |