|
||||||||||
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 java.lang.String |
DEFAULT_MATCH_TYPE
|
protected java.util.List |
errors
|
protected java.lang.String |
from
|
protected int |
id
|
protected boolean |
initialised
|
static java.lang.String |
MATCH_TYPE_WILDCARD
|
protected java.lang.String |
name
|
protected java.util.List |
setAttributes
|
protected java.lang.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(java.lang.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. |
java.util.List |
getConditions()
Will get the List of conditions. |
java.lang.String |
getDisplayName()
|
java.util.List |
getErrors()
Will get the list of errors. |
java.lang.String |
getFrom()
Will get the contents of the from element. |
java.lang.String |
getFullDisplayName()
|
int |
getId()
Will get the rule's id. |
java.lang.String |
getMatchType()
|
java.lang.String |
getName()
|
java.lang.String |
getNote()
|
java.util.List |
getRuns()
|
java.util.List |
getSetAttributes()
|
java.lang.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(java.lang.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(java.lang.String from)
Will set from, usually called by Digester. |
void |
setFromCaseSensitive(boolean fromCaseSensitive)
|
void |
setId(int id)
|
void |
setMatchType(java.lang.String matchType)
|
void |
setName(java.lang.String name)
|
void |
setNote(java.lang.String note)
|
void |
setTo(java.lang.String to)
Will set the to, usually called by Digester. |
void |
setToLast(java.lang.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 java.lang.String name
protected java.lang.String from
protected java.lang.String to
protected final java.util.List errors
protected final java.util.List setAttributes
public static final java.lang.String MATCH_TYPE_WILDCARD
public static final java.lang.String DEFAULT_MATCH_TYPE
Constructor Detail |
---|
public RuleBase()
Method Detail |
---|
protected RuleExecutionOutput matchesBase(java.lang.String url, javax.servlet.http.HttpServletRequest hsRequest, javax.servlet.http.HttpServletResponse hsResponse, RuleChain chain) throws java.io.IOException, javax.servlet.ServletException, java.lang.reflect.InvocationTargetException
url
- hsRequest
-
java.io.IOException
javax.servlet.ServletException
java.lang.reflect.InvocationTargetException
public java.lang.String getDisplayName()
public boolean initialise(javax.servlet.ServletContext context)
public boolean isMatchTypeWildcard()
public boolean isToContainsBackReference()
public boolean isToContainsVariable()
public boolean isToContainsFunction()
public java.lang.String getFullDisplayName()
protected void addError(java.lang.String s)
public void destroy()
public java.lang.String getFrom()
public void setFrom(java.lang.String from)
from
- the url to match frompublic void setTo(java.lang.String to)
to
- url for redirecting/passing through topublic void setToLast(java.lang.String lastStr)
lastStr
- true or falsepublic boolean isLast()
public java.lang.String getTo()
public int getId()
public java.util.List getErrors()
public void addCondition(Condition condition)
condition
- The Condition object to addpublic void addRun(Run run)
addRun
in interface Runnable
run
- The Run object to addpublic void addSetAttribute(SetAttribute setAttribute)
setAttribute
- The SetAttribute object to addpublic java.util.List getSetAttributes()
public java.util.List getConditions()
public java.lang.String getName()
public void setName(java.lang.String name)
public java.lang.String getNote()
public void setNote(java.lang.String note)
public boolean isEnabled()
public void setEnabled(boolean enabled)
public void setId(int id)
public boolean isFromCaseSensitive()
public void setFromCaseSensitive(boolean fromCaseSensitive)
public java.util.List getRuns()
public boolean isValid()
public java.lang.String getMatchType()
public void setMatchType(java.lang.String matchType)
public boolean isFilter()
public boolean isNoSubstitution()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |