public class QueryParameter extends HTTPParameter
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PARAMETER_DEFAULT_NAME
Recommended name for the Query parameter
|
Constructor and Description |
---|
QueryParameter() |
QueryParameter(java.lang.String queryString) |
Modifier and Type | Method and Description |
---|---|
void |
addQueryParameter(java.lang.String type,
java.lang.String value) |
java.util.Set<java.lang.String> |
getValue() |
static java.util.Set<java.lang.String> |
getValues(QueryParameter param,
java.lang.String typeName) |
boolean |
hasValues() |
void |
initialize(java.io.InputStream parameterValue)
Initialize this parameter based on input stream
Override this method if you want to accept HTTP Body data.
|
void |
initialize(java.util.List<java.lang.String> parameterValues)
Initialize this parameter based on the given parameter values
|
void |
initialize(java.lang.String parameterValue)
Initialize this parameter based on the given parameter value
|
void |
initializeRaw(java.util.List<java.lang.String> parameterValues)
Initialize the parameter by raw URL encoded string list.
|
void |
initializeRaw(java.lang.String parameterValue)
Initialize the parameter by raw URL encoded string.
|
getParameterName, setParameterName
public static final java.lang.String PARAMETER_DEFAULT_NAME
public QueryParameter()
public QueryParameter(java.lang.String queryString)
queryString
- URL decoded query stringpublic void initializeRaw(java.lang.String parameterValue) throws java.lang.IllegalArgumentException
HTTPParameter
initializeRaw
in class HTTPParameter
java.lang.IllegalArgumentException
public void initializeRaw(java.util.List<java.lang.String> parameterValues) throws java.lang.IllegalArgumentException
HTTPParameter
initializeRaw
in class HTTPParameter
java.lang.IllegalArgumentException
public void initialize(java.util.List<java.lang.String> parameterValues) throws java.lang.IllegalArgumentException
HTTPParameter
initialize
in class HTTPParameter
parameterValues
- list of URL decoded values, this will assume the whole string to be a single search term, WITHOUT typejava.lang.IllegalArgumentException
- on bad input datapublic void initialize(java.lang.String parameterValue) throws java.lang.IllegalArgumentException
HTTPParameter
initialize
in class HTTPParameter
parameterValue
- an URL decoded value, this will assume the whole string to be a single search term, WITHOUT typejava.lang.IllegalArgumentException
- on bad input datapublic void addQueryParameter(java.lang.String type, java.lang.String value)
type
- type of the query termvalue
- the query termpublic boolean hasValues()
hasValues
in class HTTPParameter
public java.util.Set<java.lang.String> getValue()
getValue
in class HTTPParameter
public static java.util.Set<java.lang.String> getValues(QueryParameter param, java.lang.String typeName)
param
- typeName
- public void initialize(java.io.InputStream parameterValue) throws java.lang.IllegalArgumentException
HTTPParameter
initialize
in class HTTPParameter
parameterValue
- can be nulljava.lang.IllegalArgumentException
- on bad input dataCopyright © 2015 Tampere University of Technology, Pori Department.