com.caucho.rewrite
Class IfLocale

java.lang.Object
  extended by 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.


Constructor Summary
IfLocale()
           
 
Method Summary
 void init()
           
 boolean isMatch(HttpServletRequest request)
          True if the predicate matches.
 void setValue(java.util.regex.Pattern regexp)
          The locale value to test against
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IfLocale

public IfLocale()
Method Detail

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