com.caucho.rewrite
Class Not

java.lang.Object
  extended by com.caucho.rewrite.Not
All Implemented Interfaces:
RequestPredicate

@Configurable
public class Not
extends java.lang.Object
implements RequestPredicate

True if the child predicate is false.

Complex tests can be built using <resin:Not>, <resin:And> and <resin:Or> on top of simpler primary predicates.

 <web-app xmlns:resin="urn:java:com.caucho.resin">

   <resin:Forbidden regexp="^/local/">
     <resin:Not>
       <resin:IfAddress value="192.168.1.10"/>
     </resin:Not>
   </resin:Forbidden>

 </web-app>
 

Predicates may be used for security and rewrite actions.


Constructor Summary
Not()
           
Not(RequestPredicate predicate)
           
 
Method Summary
 void add(RequestPredicate predicate)
          Add a child predicate.
 void init()
           
 boolean isMatch(HttpServletRequest request)
          True if the predicate matches.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Not

public Not()

Not

public Not(RequestPredicate predicate)
Method Detail

add

@Configurable
public void add(RequestPredicate predicate)
Add a child predicate. The child must fail for Not to pass.

Parameters:
predicate - the child predicate

init

@PostConstruct
public void init()

isMatch

public boolean isMatch(HttpServletRequest request)
True if the predicate matches.

Specified by:
isMatch in interface RequestPredicate
Parameters:
request - the servlet request to test

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object