|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tuckey.web.filters.urlrewrite.RuleBase
public class RuleBase
Defines a rule that can be run against an incoming request.
| Field Summary | |
|---|---|
static String |
DEFAULT_MATCH_TYPE
|
protected List |
errors
|
protected String |
from
|
protected int |
id
|
protected boolean |
initialised
|
static String |
MATCH_TYPE_WILDCARD
|
protected String |
name
|
protected List |
setAttributes
|
protected String |
to
|
protected boolean |
valid
|
| Constructor Summary | |
|---|---|
RuleBase()
Constructor. |
|
| Method Summary | |
|---|---|
void |
addCondition(Condition condition)
Will add the condition to the List. |
protected void |
addError(String s)
|
void |
addRun(Run run)
Will add the run to the List. |
void |
addSetAttribute(SetAttribute setAttribute)
Will add the SetAttribute to the List. |
void |
destroy()
Destroy the rule gracefully. |
List |
getConditions()
Will get the List of conditions. |
String |
getDisplayName()
|
List |
getErrors()
Will get the list of errors. |
String |
getFrom()
Will get the contents of the from element. |
String |
getFullDisplayName()
|
int |
getId()
Will get the rule's id. |
String |
getMatchType()
|
String |
getName()
|
String |
getNote()
|
List |
getRuns()
|
javax.servlet.ServletContext |
getServletContext()
|
List |
getSetAttributes()
|
String |
getTo()
Get to. |
boolean |
initialise(javax.servlet.ServletContext context)
Will initialise the rule. |
boolean |
isEnabled()
|
boolean |
isFilter()
|
boolean |
isFromCaseSensitive()
|
boolean |
isLast()
Is this rule last?. |
boolean |
isMatchTypeWildcard()
|
boolean |
isNoSubstitution()
|
boolean |
isToContainsBackReference()
|
boolean |
isToContainsFunction()
|
boolean |
isToContainsVariable()
|
boolean |
isValid()
|
protected RuleExecutionOutput |
matchesBase(String url,
javax.servlet.http.HttpServletRequest hsRequest,
javax.servlet.http.HttpServletResponse hsResponse,
RuleChain chain)
Will run the rule against the uri and perform action required will return false is not matched otherwise true. |
void |
setEnabled(boolean enabled)
|
void |
setFrom(String from)
Will set from, usually called by Digester. |
void |
setFromCaseSensitive(boolean fromCaseSensitive)
|
void |
setId(int id)
|
void |
setMatchType(String matchType)
|
void |
setName(String name)
|
void |
setNote(String note)
|
void |
setTo(String to)
Will set the to, usually called by Digester. |
void |
setToLast(String lastStr)
Set to type. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int id
protected boolean initialised
protected boolean valid
protected String name
protected String from
protected String to
protected final List errors
protected final List setAttributes
public static final String MATCH_TYPE_WILDCARD
public static final String DEFAULT_MATCH_TYPE
| Constructor Detail |
|---|
public RuleBase()
| Method Detail |
|---|
protected RuleExecutionOutput matchesBase(String url,
javax.servlet.http.HttpServletRequest hsRequest,
javax.servlet.http.HttpServletResponse hsResponse,
RuleChain chain)
throws IOException,
javax.servlet.ServletException,
InvocationTargetException
url - hsRequest -
IOException
javax.servlet.ServletException
InvocationTargetExceptionpublic String getDisplayName()
public boolean initialise(javax.servlet.ServletContext context)
public boolean isMatchTypeWildcard()
public boolean isToContainsBackReference()
public boolean isToContainsVariable()
public boolean isToContainsFunction()
public String getFullDisplayName()
protected void addError(String s)
public void destroy()
public String getFrom()
public void setFrom(String from)
from - the url to match frompublic void setTo(String to)
to - url for redirecting/passing through topublic void setToLast(String lastStr)
lastStr - true or falsepublic boolean isLast()
public String getTo()
public int getId()
public List getErrors()
public void addCondition(Condition condition)
condition - The Condition object to addpublic void addRun(Run run)
addRun in interface Runnablerun - The Run object to addpublic void addSetAttribute(SetAttribute setAttribute)
setAttribute - The SetAttribute object to addpublic List getSetAttributes()
public List getConditions()
public String getName()
public void setName(String name)
public String getNote()
public void setNote(String note)
public boolean isEnabled()
public void setEnabled(boolean enabled)
public void setId(int id)
public boolean isFromCaseSensitive()
public void setFromCaseSensitive(boolean fromCaseSensitive)
public List getRuns()
public boolean isValid()
public String getMatchType()
public void setMatchType(String matchType)
public boolean isFilter()
public boolean isNoSubstitution()
public javax.servlet.ServletContext getServletContext()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||