public class RewriteRule extends AbstractRuleWithConditions
AbstractRule.RewriteRuleAdmin
Modifier | Constructor and Description |
---|---|
protected |
RewriteRule(RewriteDispatch rewriteDispatch) |
Modifier and Type | Method and Description |
---|---|
FilterChain |
dispatch(java.lang.String uri,
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.lang.String |
getTagName() |
void |
init()
Init
|
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 |
setReplacement(java.lang.String replacement)
Sets the target.
|
void |
setTarget(java.lang.String target)
Sets the target.
|
addAnd, addNot, addOr, addUnless, addWhen, destroy, getFullUrlRegexp, getRegexp, map, mapImpl, required, setFullUrlRegexp, setRegexp
clearCache, createAdmin, getFailFilterChainMapper, getLogPrefix, getName, getPassFilterChainMapper, getRewriteDispatch, isEnabled, register, setDisableAt, setEnableAt, setEnabled, setFailFilterChainMapper, setLogPrefix, setName, setPassFilterChainMapper, unregister
protected RewriteRule(RewriteDispatch rewriteDispatch)
public java.lang.String getTagName()
public void setReplacement(java.lang.String replacement)
public void setTarget(java.lang.String target)
@PostConstruct public void init() throws ConfigException
init
in class AbstractRuleWithConditions
ConfigException
public java.lang.String rewrite(java.lang.String uri, java.util.regex.Matcher matcher)
AbstractRuleWithConditions
rewrite
in class AbstractRuleWithConditions
matcher
- a Matcher obtained from doing a regexp comparison, or null
if there was no regexp comparisonpublic FilterChain dispatch(java.lang.String uri, java.lang.String queryString, FilterChain accept, FilterChainMapper next) throws ServletException
AbstractRuleWithConditions
dispatch
in class AbstractRuleWithConditions
uri
- the target uri, possibly rewrittenaccept
- a FilterChain that stops evaluation of rewrite rules andServletException