public class RequestParameter extends HttpCondition implements Parameterized
Condition that inspects values returned by ServletRequest.getParameterMap()| Modifier and Type | Method and Description |
|---|---|
boolean |
evaluateHttp(HttpServletRewrite event,
EvaluationContext context) |
static RequestParameter |
exists(String name)
Create a
Condition that matches against the existence of a request parameter with a name matching the
given pattern. |
ParameterizedPatternParser |
getNameExpression()
Get the
ParameterizedPattern of the request parameter name. |
Set<String> |
getRequiredParameterNames() |
ParameterizedPatternParser |
getValueExpression()
Get the
ParameterizedPattern of the request parameter value. |
static RequestParameter |
matches(String name,
String value)
Create a
Condition that matches against both request parameter names and values. |
static RequestParameter |
matchesAll(String name,
String value) |
void |
setParameterStore(ParameterStore store) |
String |
toString() |
static RequestParameter |
valueExists(String value)
Create a
Condition that matches only against the existence of a request parameter value matching the given
pattern. |
evaluateand, andNot, or, orNotpublic static RequestParameter matches(String name, String value)
Condition that matches against both request parameter names and values.
Parameter name and value expressions may be parameterized:
RequestParameter.matches("username", "guest")
RequestParameter.matches("username", "{name}")
RequestParameter.matches("{anything}", "{value}")
name - ParameterizedPattern matching the request parameter name.value - ParameterizedPattern matching the request parameter value.{@link HttpServletRequest#getParameterMap()}public static RequestParameter matchesAll(String name, String value)
public static RequestParameter exists(String name)
Condition that matches against the existence of a request parameter with a name matching the
given pattern. The parameter value is ignored.
Parameter name expressions may be parameterized:
RequestParameter.exists("username")
RequestParameter.exists("{name}")
...
name - ParameterizedPattern matching the request parameter name.{@link HttpServletRequest#getParameterMap()}public static RequestParameter valueExists(String value)
Condition that matches only against the existence of a request parameter value matching the given
pattern. The parameter name is ignored.
Parameter value expressions may be parameterized:
RequestParameter.valueExists("guest")
RequestParameter.valueExists("{username}")
...
name - ParameterizedPattern matching the request parameter name.{@link HttpServletRequest#getParameterMap()}public boolean evaluateHttp(HttpServletRewrite event, EvaluationContext context)
evaluateHttp in class HttpConditionpublic ParameterizedPatternParser getNameExpression()
ParameterizedPattern of the request parameter name.public ParameterizedPatternParser getValueExpression()
ParameterizedPattern of the request parameter value.public Set<String> getRequiredParameterNames()
getRequiredParameterNames in interface Parameterizedpublic void setParameterStore(ParameterStore store)
setParameterStore in interface ParameterizedCopyright © 2013 OCPsoft. All Rights Reserved.