org.tuckey.web.filters.urlrewrite
Class ClassRule
java.lang.Object
org.tuckey.web.filters.urlrewrite.ClassRule
- All Implemented Interfaces:
- Rule
public class ClassRule
- extends java.lang.Object
- implements Rule
|
Method Summary |
void |
destroy()
|
java.lang.String |
getClassStr()
|
java.lang.String |
getDisplayName()
|
java.util.List |
getErrors()
List of strings for all errors. |
int |
getId()
|
java.lang.String |
getName()
|
boolean |
initialise(javax.servlet.ServletContext context)
Will initialise the rule. |
boolean |
isEnabled()
|
boolean |
isFilter()
|
boolean |
isLast()
|
boolean |
isValid()
|
RewrittenUrl |
matches(java.lang.String url,
javax.servlet.http.HttpServletRequest hsRequest,
javax.servlet.http.HttpServletResponse hsResponse)
|
RewrittenUrl |
matches(java.lang.String url,
javax.servlet.http.HttpServletRequest hsRequest,
javax.servlet.http.HttpServletResponse hsResponse,
org.tuckey.web.filters.urlrewrite.RuleChain chain)
Will run the rule against the uri and perform action required will return false is not matched
otherwise true. |
void |
setClassStr(java.lang.String classStr)
|
void |
setEnabled(boolean enabled)
|
void |
setId(int i)
|
void |
setLast(boolean last)
|
void |
setMethodStr(java.lang.String methodStr)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClassRule
public ClassRule()
matches
public RewrittenUrl matches(java.lang.String url,
javax.servlet.http.HttpServletRequest hsRequest,
javax.servlet.http.HttpServletResponse hsResponse,
org.tuckey.web.filters.urlrewrite.RuleChain chain)
throws java.io.IOException,
javax.servlet.ServletException
- Description copied from interface:
Rule
- Will run the rule against the uri and perform action required will return false is not matched
otherwise true.
- Specified by:
matches in interface Rule
- Returns:
- String of the rewritten url or the same as the url passed in if no match was made
- Throws:
java.io.IOException
javax.servlet.ServletException
matches
public RewrittenUrl matches(java.lang.String url,
javax.servlet.http.HttpServletRequest hsRequest,
javax.servlet.http.HttpServletResponse hsResponse)
throws javax.servlet.ServletException,
java.io.IOException
- Specified by:
matches in interface Rule
- Throws:
javax.servlet.ServletException
java.io.IOException
initialise
public boolean initialise(javax.servlet.ServletContext context)
- Description copied from interface:
Rule
- Will initialise the rule.
- Specified by:
initialise in interface Rule
- Returns:
- true on success
destroy
public void destroy()
- Specified by:
destroy in interface Rule
getName
public java.lang.String getName()
- Specified by:
getName in interface Rule
getDisplayName
public java.lang.String getDisplayName()
- Specified by:
getDisplayName in interface Rule
isLast
public boolean isLast()
- Specified by:
isLast in interface Rule
setLast
public void setLast(boolean last)
setClassStr
public void setClassStr(java.lang.String classStr)
getClassStr
public java.lang.String getClassStr()
setMethodStr
public void setMethodStr(java.lang.String methodStr)
isEnabled
public boolean isEnabled()
setEnabled
public void setEnabled(boolean enabled)
setId
public void setId(int i)
- Specified by:
setId in interface Rule
getId
public int getId()
- Specified by:
getId in interface Rule
isValid
public boolean isValid()
- Specified by:
isValid in interface Rule
isFilter
public boolean isFilter()
- Specified by:
isFilter in interface Rule
getErrors
public java.util.List getErrors()
- Description copied from interface:
Rule
- List of strings for all errors.
- Specified by:
getErrors in interface Rule