public abstract class AbstractRuleWithConditions extends AbstractRule
AbstractRule.RewriteRuleAdmin
Modifier | Constructor and Description |
---|---|
protected |
AbstractRuleWithConditions(RewriteDispatch rewriteDispatch) |
Modifier and Type | Method and Description |
---|---|
void |
addAnd(AndConditions condition)
Add a list of conditions that must pass for the rule to match.
|
void |
addNot(NotConditions condition)
Add a list of conditions that must not pass for the rule to match.
|
void |
addOr(OrConditions condition)
Add a list of conditions one of which must pass for the rule to match.
|
void |
addUnless(ConditionConfig condition)
Add a condition that must not pass for the rule to match.
|
void |
addWhen(ConditionConfig condition)
Add a condition that must pass for the rule to match.
|
void |
destroy() |
abstract FilterChain |
dispatch(java.lang.String targetUri,
java.lang.String queryString,
FilterChain accept,
FilterChainMapper next)
Returns the FilterChain to invoke if the rule is successful, null indicates
that the rule does not invoke a FilterChain.
|
java.util.regex.Pattern |
getFullUrlRegexp() |
java.util.regex.Pattern |
getRegexp() |
void |
init() |
FilterChain |
map(java.lang.String uri,
java.lang.String queryString,
FilterChain accept) |
FilterChain |
mapImpl(java.lang.String uri,
java.lang.String queryString,
FilterChain accept) |
protected void |
required(java.lang.Object value,
java.lang.String name)
Throws an exception if the passed value is null.
|
java.lang.String |
rewrite(java.lang.String uri,
java.util.regex.Matcher matcher)
Return a rewritten uri to use for the rest of the processing of
rewrite-dispatch.
|
void |
setFullUrlRegexp(java.util.regex.Pattern regexp)
Sets the regular expression pattern that must match the uri for the
rule to match, required.
|
void |
setRegexp(java.util.regex.Pattern regexp)
Sets the regular expression pattern that must match the uri for the
rule to match, required.
|
clearCache, createAdmin, getFailFilterChainMapper, getLogPrefix, getName, getPassFilterChainMapper, getRewriteDispatch, isEnabled, register, setDisableAt, setEnableAt, setEnabled, setFailFilterChainMapper, setLogPrefix, setName, setPassFilterChainMapper, unregister
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getTagName
protected AbstractRuleWithConditions(RewriteDispatch rewriteDispatch)
public void setRegexp(java.util.regex.Pattern regexp)
public java.util.regex.Pattern getRegexp()
public void setFullUrlRegexp(java.util.regex.Pattern regexp)
public java.util.regex.Pattern getFullUrlRegexp()
public void addAnd(AndConditions condition)
public void addOr(OrConditions condition)
public void addNot(NotConditions condition)
public void addWhen(ConditionConfig condition)
public void addUnless(ConditionConfig condition)
protected void required(java.lang.Object value, java.lang.String name) throws ConfigException
ConfigException
public void init() throws ConfigException
init
in class AbstractRule
ConfigException
public FilterChain map(java.lang.String uri, java.lang.String queryString, FilterChain accept) throws ServletException
ServletException
public FilterChain mapImpl(java.lang.String uri, java.lang.String queryString, FilterChain accept) throws ServletException
ServletException
public java.lang.String rewrite(java.lang.String uri, java.util.regex.Matcher matcher)
matcher
- a Matcher obtained from doing a regexp comparison, or null
if there was no regexp comparisonpublic abstract FilterChain dispatch(java.lang.String targetUri, java.lang.String queryString, FilterChain accept, FilterChainMapper next) throws ServletException
targetUri
- the target uri, possibly rewrittenaccept
- a FilterChain that stops evaluation of rewrite rules andnext
- ServletException
public void destroy()
destroy
in interface Rule
destroy
in class AbstractRule