Class RewriteCond
- java.lang.Object
-
- io.undertow.servlet.compat.rewrite.RewriteCond
-
public class RewriteCond extends Object
- Author:
- Remy Maucherat
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRewriteCond.Conditionstatic classRewriteCond.LexicalConditionstatic classRewriteCond.PatternConditionstatic classRewriteCond.ResourceCondition
-
Field Summary
Fields Modifier and Type Field Description protected ThreadLocal<RewriteCond.Condition>conditionprotected StringcondPatternbooleannocaseThis makes the test case-insensitive, i.e., there is no difference between 'A-Z' and 'a-z' both in the expanded TestString and the CondPattern.booleanornextUse this to combine rule conditions with a local OR instead of the implicit AND.protected booleanpositiveprotected Substitutiontestprotected StringtestString
-
Constructor Summary
Constructors Constructor Description RewriteCond()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanevaluate(Matcher rule, Matcher cond, Resolver resolver)Evaluate the condition based on the contextStringgetCondPattern()MatchergetMatcher()StringgetTestString()booleanisNocase()booleanisOrnext()booleanisPositive()voidparse(Map<String,RewriteMap> maps)voidsetCondPattern(String condPattern)voidsetNocase(boolean nocase)voidsetOrnext(boolean ornext)voidsetPositive(boolean positive)voidsetTestString(String testString)StringtoString()String representation.
-
-
-
Field Detail
-
testString
protected String testString
-
condPattern
protected String condPattern
-
positive
protected boolean positive
-
test
protected Substitution test
-
condition
protected ThreadLocal<RewriteCond.Condition> condition
-
nocase
public boolean nocase
This makes the test case-insensitive, i.e., there is no difference between 'A-Z' and 'a-z' both in the expanded TestString and the CondPattern. This flag is effective only for comparisons between TestString and CondPattern. It has no effect on filesystem and subrequest checks.
-
ornext
public boolean ornext
Use this to combine rule conditions with a local OR instead of the implicit AND.
-
-
Method Detail
-
getCondPattern
public String getCondPattern()
-
setCondPattern
public void setCondPattern(String condPattern)
-
getTestString
public String getTestString()
-
setTestString
public void setTestString(String testString)
-
parse
public void parse(Map<String,RewriteMap> maps)
-
getMatcher
public Matcher getMatcher()
-
evaluate
public boolean evaluate(Matcher rule, Matcher cond, Resolver resolver)
Evaluate the condition based on the context- Parameters:
rule- corresponding matched rulecond- last matched condition- Returns:
-
isNocase
public boolean isNocase()
-
setNocase
public void setNocase(boolean nocase)
-
isOrnext
public boolean isOrnext()
-
setOrnext
public void setOrnext(boolean ornext)
-
isPositive
public boolean isPositive()
-
setPositive
public void setPositive(boolean positive)
-
-