org.ocpsoft.rewrite.servlet.config
Class RequestParameter
java.lang.Object
org.ocpsoft.rewrite.config.DefaultConditionBuilder
org.ocpsoft.rewrite.servlet.config.HttpCondition
org.ocpsoft.rewrite.servlet.config.RequestParameter
- All Implemented Interfaces:
- Condition, ConditionBuilder, ConfigurationElement, Parameterized<IRequestParameter,IRequestParameter.RequestParameterParameter,String>, IRequestParameter
- Direct Known Subclasses:
- RequestParameter.AllRequestParameters
public class RequestParameter
- extends HttpCondition
- implements IRequestParameter
A Condition that inspects values returned by ServletRequest.getParameterMap()
- Author:
- Lincoln Baxter, III
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
matches
public static RequestParameter matches(String name,
String value)
- Return a
Header condition that matches against both header name and values.
See also: HttpServletRequest.getHeader(String)
- Parameters:
name - Regular expression matching the header namevalue - Regular expression matching the header value
matchesAll
public static RequestParameter matchesAll(String name,
String value)
exists
public static RequestParameter exists(String name)
- Return a
Header condition that matches only against the existence of a header with a name matching the
given pattern. The header value is ignored.
See also: HttpServletRequest.getHeader(String)
- Parameters:
name - Regular expression matching the header name
valueExists
public static RequestParameter valueExists(String value)
- Return a
Header condition that matches only against the existence of a header with value matching the
given pattern. The header name is ignored.
- Parameters:
value - Regular expression matching the header value
evaluateHttp
public boolean evaluateHttp(HttpServletRewrite event,
EvaluationContext context)
- Specified by:
evaluateHttp in class HttpCondition
where
public IRequestParameter.RequestParameterParameter where(String param)
- Specified by:
where in interface Parameterized<IRequestParameter,IRequestParameter.RequestParameterParameter,String>
where
public IRequestParameter.RequestParameterParameter where(String param,
Binding binding)
- Specified by:
where in interface Parameterized<IRequestParameter,IRequestParameter.RequestParameterParameter,String>
getNameExpression
public ParameterizedPattern getNameExpression()
getValueExpression
public ParameterizedPattern getValueExpression()
Copyright © 2012 OCPsoft. All Rights Reserved.