Class PathAndQuery
java.lang.Object
org.ocpsoft.rewrite.config.DefaultConditionBuilder
org.ocpsoft.rewrite.servlet.config.HttpCondition
org.ocpsoft.rewrite.servlet.config.PathAndQuery
- All Implemented Interfaces:
Condition,ConditionBuilder,Parameterized
A
Condition that inspects the value of HttpServletRewrite.getAddress() path and query string.- Author:
- Lincoln Baxter, III
-
Method Summary
Modifier and TypeMethodDescriptionstatic PathAndQueryCapture the entire path portion of theAddressinto the givenParameter.booleanevaluateHttp(HttpServletRewrite event, EvaluationContext context) Get the underlyingParameterizedPatternfor thisPathAndQuerystatic PathAndQueryCreate aConditionthat compares the currentAddress.getPathAndQuery()to the given pattern.voidsetParameterStore(ParameterStore store) Bind each pathParameterto the corresponding request parameter by name.Methods inherited from class org.ocpsoft.rewrite.servlet.config.HttpCondition
evaluateMethods inherited from class org.ocpsoft.rewrite.config.DefaultConditionBuilder
and, andNot, or, orNot
-
Method Details
-
matches
Create aConditionthat compares the currentAddress.getPathAndQuery()to the given pattern.The given pattern may be parameterized:
/example?{param}=foo
/example/{param1}?bar={param2}&p=q
...- Parameters:
pattern-ParameterizedPatternmatching the path and query.- See Also:
-
captureIn
Capture the entire path portion of theAddressinto the givenParameter.- Parameters:
param- the name of theParameterto which the entire path portion of theAddresswill be bound.
-
withRequestBinding
Bind each pathParameterto the corresponding request parameter by name. -
evaluateHttp
- Specified by:
evaluateHttpin classHttpCondition
-
getExpression
Get the underlyingParameterizedPatternfor thisPathAndQuery -
getRequiredParameterNames
- Specified by:
getRequiredParameterNamesin interfaceParameterized
-
setParameterStore
- Specified by:
setParameterStorein interfaceParameterized
-