rewrite-config-servlet 2.0.0.Beta3

org.ocpsoft.rewrite.servlet.config
Class Domain

java.lang.Object
  extended by org.ocpsoft.rewrite.config.DefaultConditionBuilder
      extended by org.ocpsoft.rewrite.servlet.config.HttpCondition
          extended by org.ocpsoft.rewrite.servlet.config.Domain
All Implemented Interfaces:
Condition, ConditionBuilder, Parameterized

public class Domain
extends HttpCondition
implements Parameterized

A Condition that inspects the value of ServletRequest.getServerName()

Author:
Lincoln Baxter, III

Method Summary
 boolean evaluateHttp(HttpServletRewrite event, EvaluationContext context)
           
 ParameterizedPatternParser getExpression()
          Get the underlying ParameterizedPatternParser for this Domain
 Set<String> getRequiredParameterNames()
           
static Domain matches(String pattern)
          Create a Domain condition to inspect the current Address.getDomain().
 void setParameterStore(ParameterStore store)
           
 String toString()
           
 
Methods inherited from class org.ocpsoft.rewrite.servlet.config.HttpCondition
evaluate
 
Methods inherited from class org.ocpsoft.rewrite.config.DefaultConditionBuilder
and, andNot, or, orNot
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

matches

public static Domain matches(String pattern)
Create a Domain condition to inspect the current Address.getDomain().

The given pattern may be parameterized using the following format:

example.com {domain}.com
www.{domain}.{suffix}
... and so on

Parameters:
pattern - ParameterizedPattern matching the domain name.
See Also:
ConfigurationRuleParameterBuilder#where(String)} {@link HttpServletRequest#getServerName()}

evaluateHttp

public boolean evaluateHttp(HttpServletRewrite event,
                            EvaluationContext context)
Specified by:
evaluateHttp in class HttpCondition

getExpression

public ParameterizedPatternParser getExpression()
Get the underlying ParameterizedPatternParser for this Domain


toString

public String toString()
Overrides:
toString in class Object

getRequiredParameterNames

public Set<String> getRequiredParameterNames()
Specified by:
getRequiredParameterNames in interface Parameterized

setParameterStore

public void setParameterStore(ParameterStore store)
Specified by:
setParameterStore in interface Parameterized

rewrite-config-servlet 2.0.0.Beta3

Copyright © 2013 OCPsoft. All Rights Reserved.