com.caucho.rewrite
Class NotOr
java.lang.Object
com.caucho.rewrite.NotOr
- All Implemented Interfaces:
- RequestPredicate
@Configurable
public class NotOr
- extends java.lang.Object
- implements RequestPredicate
Matches if none of the child predicates match.
The predicate may be used for security and rewrite conditions.
<resin:Allow url-pattern="/admin/*"
xmlns:resin="urn:java:com.caucho.resin">
<resin:NotOr>
<resin:IfNetwork value="192.168.1.10"/>
<resin:IfNetwork value="192.168.1.11"/>
</resin:NotOr>
</resin:Allow>
Constructor Summary |
NotOr()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
NotOr
public NotOr()
add
@Configurable
public void add(RequestPredicate predicate)
- Add a child predicate. Each child must fail for NotOr to pass.
- Parameters:
predicate
- the new 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