Class Query
java.lang.Object
org.ocpsoft.rewrite.config.DefaultConditionBuilder
org.ocpsoft.rewrite.servlet.config.HttpCondition
org.ocpsoft.rewrite.servlet.config.Query
- All Implemented Interfaces:
Condition,ConditionBuilder,Parameterized
A
Condition that inspects the value of HttpServletRewrite#getRequestQueryString()- Author:
- Lincoln Baxter, III
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic QueryCreate aConditionmatching the currentAddress.getQuery().static QueryparameterExists(String name) Create aConditionasserting the existence of specific parameter names within the currentAddress.getQuery()static QueryvalueExists(String valuePattern) Create aConditionasserting the existence of specific parameter values within the currentAddress.getQuery().Methods inherited from class org.ocpsoft.rewrite.servlet.config.HttpCondition
evaluate, evaluateHttpMethods inherited from class org.ocpsoft.rewrite.config.DefaultConditionBuilder
and, andNot, or, orNotMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ocpsoft.rewrite.param.Parameterized
getRequiredParameterNames, setParameterStore
-
Constructor Details
-
Query
public Query()
-
-
Method Details
-
matches
Create aConditionmatching the currentAddress.getQuery().The given pattern may be parameterized:
?param=value
?param={param}
?param={param}&foo=bar
...- Parameters:
pattern-ParameterizedPatternmatching the query string of the currentAddress.- See Also:
-
parameterExists
Create aConditionasserting the existence of specific parameter names within the currentAddress.getQuery()The given parameter name is automatically parameterized:
Query.paramterExists("param")
...
Forward.to("/{param}/page.jsp")- Parameters:
pattern- name of theParametermatching query parameter names within the currentAddress.getQuery().- See Also:
-
valueExists
Create aConditionasserting the existence of specific parameter values within the currentAddress.getQuery().- Parameters:
pattern-ParameterizedPatternmatching query parameter values of the currentAddress.getQuery().- See Also:
-