rewrite-config-servlet 2.0.0.Beta3

org.ocpsoft.rewrite.servlet.config
Class ServletMapping

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.ServletMapping
All Implemented Interfaces:
Condition, ConditionBuilder, Parameterized

public class ServletMapping
extends HttpCondition
implements Parameterized

A Condition responsible for comparing the current Address to Servlet Mappings defined in the current ServletContext.

Author:
Lincoln Baxter, III

Method Summary
 boolean evaluateHttp(HttpServletRewrite event, EvaluationContext context)
           
 Set<String> getRequiredParameterNames()
           
 ParameterizedPatternBuilder getResourceExpression()
          Return the underlying ParameterizedPatternBuilder for this ServletMapping.
static ServletMapping includes(String resource)
          Create a Condition that returns true if the given resource is mapped by any Servlet instances registered within the current application, and returns false if no Servlet will handle the specified resource pattern.
 void setParameterStore(ParameterStore store)
           
 
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, toString, wait, wait, wait
 

Method Detail

includes

public static ServletMapping includes(String resource)
Create a Condition that returns true if the given resource is mapped by any Servlet instances registered within the current application, and returns false if no Servlet will handle the specified resource pattern.

The given resource path may be parameterized:

/example/{param}.html
/css/{value}.css
...

Parameters:
location - ParameterizedPattern specifying the Address of the internal resource.
See Also:
ConfigurationRuleParameterBuilder#where(String)}

evaluateHttp

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

getResourceExpression

public ParameterizedPatternBuilder getResourceExpression()
Return the underlying ParameterizedPatternBuilder for this ServletMapping.


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.