|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.jersey.server.impl.uri.rules.RightHandPathRule
public class RightHandPathRule
Adapter to an existing rule that accepts the rule using the last capturing group value as the URI path.
This rule assumes that the pattern used to match this rule has certain contraints. If a pattern contains one or more capturing groups then the last capturing group MUST occur at the end of the pattern and MUST be '(/.*)?' or '(/)?'.
If the source from which the pattern was derived ends in a '/' and the matched path does not end in a '/' then a temporary redirect response is returned with a path that is the matched path appened with '/'.
| Constructor Summary | |
|---|---|
RightHandPathRule(boolean redirect,
boolean patternEndsInSlash,
UriRule rule)
Public constructor. |
|
| Method Summary | |
|---|---|
boolean |
accept(java.lang.CharSequence path,
java.lang.Object resource,
UriRuleContext context)
Accept the rule. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RightHandPathRule(boolean redirect,
boolean patternEndsInSlash,
UriRule rule)
redirect - if true return a temporary redirect response if the
path does not end in '/' and the pattern ends in '/'.patternEndsInSlash - true if the pattern used to match with rule
end in a '/', otherwise false.rule - the URI rule that is adapted.| Method Detail |
|---|
public final boolean accept(java.lang.CharSequence path,
java.lang.Object resource,
UriRuleContext context)
accept in interface UriRulepath - the URI pathresource - the current resource instancecontext - the rule context
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||