Package org.apache.catalina.valves.rewrite

## Class RewriteCond

- java.lang.Object
- - org.apache.catalina.valves.rewrite.RewriteCond

-     public class RewriteCond
      extends java.lang.Object

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `RewriteCond.Condition` |
    `static class` | `RewriteCond.LexicalCondition` |
    `static class` | `RewriteCond.PatternCondition` |
    `static class` | `RewriteCond.ResourceCondition` |

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected RewriteCond.Condition` | `condition` |
    `protected java.lang.String` | `condPattern` |
    `protected java.lang.String` | `flagsString` |
    `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.
    `boolean` | `ornext` | Use this to combine rule conditions with a local OR instead of the implicit AND.
    `protected boolean` | `positive` |
    `protected Substitution` | `test` |
    `protected java.lang.String` | `testString` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `RewriteCond()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `evaluate​(java.util.regex.Matcher rule, java.util.regex.Matcher cond, Resolver resolver)` | Evaluate the condition based on the context
    `java.lang.String` | `getCondPattern()` |
    `java.lang.String` | `getFlagsString()` |
    `java.util.regex.Matcher` | `getMatcher()` |
    `java.lang.String` | `getTestString()` |
    `boolean` | `isNocase()` |
    `boolean` | `isOrnext()` |
    `boolean` | `isPositive()` |
    `void` | `parse​(java.util.Map<java.lang.String,​RewriteMap> maps)` |
    `void` | `setCondPattern​(java.lang.String condPattern)` |
    `void` | `setFlagsString​(java.lang.String flagsString)` |
    `void` | `setNocase​(boolean nocase)` |
    `void` | `setOrnext​(boolean ornext)` |
    `void` | `setPositive​(boolean positive)` |
    `void` | `setTestString​(java.lang.String testString)` |
    `java.lang.String` | `toString()` | String representation.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### testString

          protected java.lang.String testString

    - #### condPattern

          protected java.lang.String condPattern

    - #### flagsString

          protected java.lang.String flagsString

    - #### positive

          protected boolean positive

    - #### test

          protected Substitution test

    - #### condition

          protected 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.

  - ### Constructor Detail

    - #### RewriteCond

          public RewriteCond()

  - ### Method Detail

    - #### getCondPattern

          public java.lang.String getCondPattern()

    - #### setCondPattern

          public void setCondPattern​(java.lang.String condPattern)

    - #### getTestString

          public java.lang.String getTestString()

    - #### setTestString

          public void setTestString​(java.lang.String testString)

    - #### getFlagsString

          public final java.lang.String getFlagsString()

    - #### setFlagsString

          public final void setFlagsString​(java.lang.String flagsString)

    - #### parse

          public void parse​(java.util.Map<java.lang.String,​RewriteMap> maps)

    - #### getMatcher

          public java.util.regex.Matcher getMatcher()

    - #### toString

          public java.lang.String toString()

      String representation.
      Overrides:
        `toString` in class `java.lang.Object`

    - #### evaluate

          public boolean evaluate​(java.util.regex.Matcher rule,
                                  java.util.regex.Matcher cond,
                                  Resolver resolver)

      Evaluate the condition based on the context
      Parameters:
        `rule` - corresponding matched rule
        `cond` - last matched condition
        `resolver` - Property resolver
      Returns:
        `true` if the condition matches

    - #### 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)