public class LegacyRule extends Rule
Rule.ApplyURI
_handling, _terminating
Constructor and Description |
---|
LegacyRule() |
Modifier and Type | Method and Description |
---|---|
void |
addRewriteRule(java.lang.String pattern,
java.lang.String prefix)
Add a path rewriting rule
|
PathMap |
getRewrite()
Returns the map of rewriting rules.
|
java.lang.String |
matchAndApply(java.lang.String target,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
This method calls tests the rule against the request/response pair and if the Rule
applies, then the rule's action is triggered.
|
void |
setRewrite(PathMap rewrite)
Sets the map of rewriting rules.
|
isHandling, isTerminating, setHandling, setTerminating, toString
public java.lang.String matchAndApply(java.lang.String target, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
Rule
matchAndApply
in class Rule
target
- The target of the requestjava.io.IOException
- TODOpublic PathMap getRewrite()
PathMap
of the rewriting rules.public void setRewrite(PathMap rewrite)
rewrite
- A PathMap
of the rewriting rules. Only
prefix paths should be included.public void addRewriteRule(java.lang.String pattern, java.lang.String prefix)
pattern
- The path pattern to match. The pattern must start with / and may use
a trailing /* as a wildcard.prefix
- The path prefix which will replace the matching part of the path.Copyright © 2012. All Rights Reserved.