rewrite-config-servlet 2.0.0.Alpha6

org.ocpsoft.rewrite.servlet.config.rule
Class Join

java.lang.Object
  extended by org.ocpsoft.rewrite.servlet.config.rule.Join
All Implemented Interfaces:
Condition, ConfigurationElement, Operation, Rule, Parameterized, JoinPath

public class Join
extends Object
implements Rule, JoinPath, Parameterized

Rule that creates a bi-directional rewrite rule between an externally facing URL and an internal server resource URL

Author:
Lincoln Baxter, III

Constructor Summary
protected Join(String pattern, boolean requestBinding)
           
 
Method Summary
 boolean evaluate(Rewrite event, EvaluationContext context)
           
static Join getCurrentJoin(javax.servlet.http.HttpServletRequest request)
          Retrieve the Join that was invoked on the current request; if no Join was invoked, return null.
 String getId()
           
 Set<String> getRequiredParameterNames()
           
static JoinPath path(String pattern)
          The client-facing URL path to which this Join will apply.
static JoinPath pathNonBinding(String pattern)
          The client-facing URL path to which this Join will apply.
 void perform(Rewrite event, EvaluationContext context)
           
 void setParameterStore(ParameterStore store)
           
 Join to(String resource)
          The internal server resource (real or virtual) to be served.
 String toString()
           
 Join withChaining()
          Enable the 'to' target of this Join to be intercepted by the 'path' of another Join.
 Join withInboundCorrection()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Join

protected Join(String pattern,
               boolean requestBinding)
Method Detail

path

public static JoinPath path(String pattern)
The client-facing URL path to which this Join will apply. Parameters of the form "{n}" will be bound by name to the request parameter map via Request.parameter(String), and subsequently used to build the outbound URL by extracting values from the query string "?n=value". To disable request parameter binding and outbound URL rewriting, instead use pathNonBinding(String)


pathNonBinding

public static JoinPath pathNonBinding(String pattern)
The client-facing URL path to which this Join will apply. Parameters will not be bound to the request parameter map. To enable request parameter binding and outbound URL rewriting, instead use path(String).


getCurrentJoin

public static Join getCurrentJoin(javax.servlet.http.HttpServletRequest request)
Retrieve the Join that was invoked on the current request; if no Join was invoked, return null.


to

public Join to(String resource)
Description copied from interface: JoinPath
The internal server resource (real or virtual) to be served.

Specified by:
to in interface JoinPath

withInboundCorrection

public Join withInboundCorrection()

withChaining

public Join withChaining()
Enable the 'to' target of this Join to be intercepted by the 'path' of another Join.


evaluate

public boolean evaluate(Rewrite event,
                        EvaluationContext context)
Specified by:
evaluate in interface Condition

perform

public void perform(Rewrite event,
                    EvaluationContext context)
Specified by:
perform in interface Operation

getId

public String getId()
Specified by:
getId in interface Rule

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.