com.caucho.rewrite
Class IfLocale
java.lang.Object
com.caucho.rewrite.IfLocale
- All Implemented Interfaces:
- RequestPredicate
@Configurable
public class IfLocale
- extends java.lang.Object
- implements RequestPredicate
Match if the request's locale matches an expression.
<resin:Allow url-pattern="/admin/*">
xmlns:resin="urn:java:com.caucho.resin">
<resin:IfLocale value="fr"/>
</resin:Allow>
RequestPredicates may be used for security and rewrite actions.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IfLocale
public IfLocale()
setValue
@Configurable
public void setValue(java.util.regex.Pattern regexp)
- The locale value to test against
init
@PostConstruct
public void init()
isMatch
public boolean isMatch(HttpServletRequest request)
- True if the predicate matches.
- Specified by:
isMatch
in interface RequestPredicate
- Parameters:
request
- the servlet request to test