public class RuleContainer extends Rule
Rule.ApplyURI
Modifier and Type | Field and Description |
---|---|
protected String |
_originalPathAttribute |
protected String |
_originalQueryStringAttribute |
protected boolean |
_rewritePathInfo |
protected boolean |
_rewriteRequestURI |
protected Rule[] |
_rules |
static String |
ORIGINAL_QUERYSTRING_ATTRIBUTE_SUFFIX |
_handling, _terminating
Constructor and Description |
---|
RuleContainer() |
Modifier and Type | Method and Description |
---|---|
void |
addRule(Rule rule)
Add a Rule
|
protected String |
apply(String target,
HttpServletRequest request,
HttpServletResponse response)
Process the contained rules (called by matchAndApply)
|
String |
getOriginalPathAttribute() |
Rule[] |
getRules()
Returns the list of rules.
|
boolean |
isRewritePathInfo() |
boolean |
isRewriteRequestURI() |
String |
matchAndApply(String target,
HttpServletRequest request,
HttpServletResponse response)
Process the contained rules
|
void |
setOriginalPathAttribute(String originalPathAttribte) |
void |
setRewritePathInfo(boolean rewritePathInfo) |
void |
setRewriteRequestURI(boolean rewriteRequestURI) |
void |
setRules(Rule[] rules)
Assigns the rules to process.
|
isHandling, isTerminating, setHandling, setTerminating, toString
public static final String ORIGINAL_QUERYSTRING_ATTRIBUTE_SUFFIX
protected Rule[] _rules
protected String _originalPathAttribute
protected String _originalQueryStringAttribute
protected boolean _rewriteRequestURI
protected boolean _rewritePathInfo
public void setRules(Rule[] rules)
rules
- an array of Rule
.public void addRule(Rule rule)
rule
- The rule to add to the end of the rules arraypublic boolean isRewriteRequestURI()
HttpServletRequest.getRequestURI()
.public void setRewriteRequestURI(boolean rewriteRequestURI)
rewriteRequestURI
- true if this handler will rewrite the value
returned by HttpServletRequest.getRequestURI()
.public boolean isRewritePathInfo()
HttpServletRequest.getPathInfo()
.public void setRewritePathInfo(boolean rewritePathInfo)
rewritePathInfo
- true if this handler will rewrite the value
returned by HttpServletRequest.getPathInfo()
.public String getOriginalPathAttribute()
public void setOriginalPathAttribute(String originalPathAttribte)
originalPathAttribte
- If non null, this string will be used
as the attribute name to store the original request path.public String matchAndApply(String target, HttpServletRequest request, HttpServletResponse response) throws IOException
matchAndApply
in class Rule
target
- target field to pass on to the contained rulesrequest
- request object to pass on to the contained rulesresponse
- response object to pass on to the contained rulesIOException
- if unable to match the ruleprotected String apply(String target, HttpServletRequest request, HttpServletResponse response) throws IOException
target
- target field to pass on to the contained rulesrequest
- request object to pass on to the contained rulesresponse
- response object to pass on to the contained rulesIOException
- if unable to apply the ruleCopyright © 1995-2016 Webtide. All Rights Reserved.