Class RequestArrayParameter
java.lang.Object
com.invirgance.convirgance.web.parameter.RequestArrayParameter
- All Implemented Interfaces:
Parameter
Allows returning the parameters values of a
HttpRequest
as an array.
Use this parameter type when you need to: - Access multiple values for the same parameter name - Handle repeated query parameters - Process multi-select form fields
- Author:
- jbanes
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()
Gets the name of this parameter.Returns the parameter name.getValue
(HttpRequest request) Gets the parameter's values as aJSONArray
.void
Sets the name of the parameter to retrieve.void
setUrlParameterName
(String urlParamName) Sets the URL parameter name to retrieve.
-
Constructor Details
-
RequestArrayParameter
public RequestArrayParameter()
-
-
Method Details
-
getName
Gets the name of this parameter. Returns the internal name if set, otherwise falls back to the request parameter name. -
setName
Sets the name of the parameter to retrieve.- Parameters:
name
- Parameter name.
-
getUrlParameterName
Returns the parameter name.- Returns:
- The name.
-
setUrlParameterName
Sets the URL parameter name to retrieve.- Parameters:
urlParamName
- The name.
-
getValue
Gets the parameter's values as aJSONArray
.
-