rewrite-config-servlet 2.0.0.Alpha6

org.ocpsoft.rewrite.servlet.config
Class Path

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

public class Path
extends HttpCondition
implements Parameterized

A Condition that inspects the value of org.ocpsoft.rewrite.servlet.http.event.HttpServletRewrite#getRequestPath()

Author:
Lincoln Baxter, III

Method Summary
static Path captureIn(String param)
          Capture the entire path portion of the inbound Address into the given parameter.
 boolean evaluateHttp(HttpServletRewrite event, EvaluationContext context)
           
 ParameterizedPatternParser getPathExpression()
          Get the underlying RegexParameterizedPatternBuilder for this Path
 Set<String> getRequiredParameterNames()
           
static Path matches(String pattern)
          Inspect the current request URL, comparing against the given pattern.
 void setParameterStore(ParameterStore store)
           
 String toString()
           
 Path withRequestBinding()
          Bind each path parameter to the corresponding request parameter by name.
 
Methods inherited from class org.ocpsoft.rewrite.servlet.config.HttpCondition
evaluate
 
Methods inherited from class org.ocpsoft.rewrite.config.DefaultConditionBuilder
and, andNot, create, or, orNot, wrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

matches

public static Path matches(String pattern)
Inspect the current request URL, comparing against the given pattern.

The given pattern may be parameterized using the following format:

/example/{param}
/example/{value}/sub/{value2}
... and so on

By default, matching parameter values are bound only to the EvaluationContext. See also #where(String)


captureIn

public static Path captureIn(String param)
Capture the entire path portion of the inbound Address into the given parameter.


withRequestBinding

public Path withRequestBinding()
Bind each path parameter to the corresponding request parameter by name. By default, matching values are bound only to the EvaluationContext.

See also #where(String)


evaluateHttp

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

getPathExpression

public ParameterizedPatternParser getPathExpression()
Get the underlying RegexParameterizedPatternBuilder for this Path

See also: #where(String)


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.Alpha6

Copyright © 2013 OCPsoft. All Rights Reserved.