|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.j2ep.rules.BaseRule
net.sf.j2ep.rules.CompositeRule
public class CompositeRule
This rule consists of many other rules using the composite design pattern. The rule is matches if all the included rules are matched.
Constructor Summary | |
---|---|
CompositeRule()
Empty constructor, will only create the list of rules. |
Method Summary | |
---|---|
void |
addRule(Rule rule)
Used to add a rule to the list. |
boolean |
matches(HttpServletRequest request)
Iterates over all the rules in the list checking that they all match. |
java.lang.String |
process(java.lang.String uri)
Process all the rules in the list, allowing them all to change the URI. |
java.lang.String |
revert(java.lang.String uri)
Will do the opposite of process, that is revert all URIs to there default value. |
java.lang.String |
toString()
Returns a String representation of this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CompositeRule()
Method Detail |
---|
public void addRule(Rule rule)
rule
- The rule to be addedpublic boolean matches(HttpServletRequest request)
request
- The request
net.sf.j2ep.model.Rule#matches(javax.servlet.http.HttpServletRequest)
public java.lang.String process(java.lang.String uri)
process
in interface Rule
process
in class BaseRule
uri
- URI to be processed
Rule.process(java.lang.String)
public java.lang.String revert(java.lang.String uri)
revert
in interface Rule
revert
in class BaseRule
uri
- URI to be reverted
Rule.revert(java.lang.String)
public java.lang.String toString()
toString
in class BaseRule
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |