org.ocpsoft.rewrite.servlet.config
Class Substitute
java.lang.Object
org.ocpsoft.rewrite.config.OperationBuilder
org.ocpsoft.rewrite.servlet.config.HttpOperation
org.ocpsoft.rewrite.servlet.config.Substitute
- All Implemented Interfaces:
- Operation, Parameterized<OperationParameterBuilder<RegexOperationParameterBuilder,java.lang.String>,java.lang.String>, ParameterizedOperation<OperationParameterBuilder<RegexOperationParameterBuilder,java.lang.String>,java.lang.String>
public class Substitute
- extends HttpOperation
- implements ParameterizedOperation<OperationParameterBuilder<RegexOperationParameterBuilder,java.lang.String>,java.lang.String>
Responsible for substituting inbound/outbound URLs with a replacement. For InboundRewrite events, this
Operation calls InboundServletRewrite.forward(String), and for OutboundRewrite events,
this method calls HttpOutboundServletRewrite.setOutboundURL(String)
- Author:
- Lincoln Baxter, III
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
with
public static Substitute with(java.lang.String location)
- Substitute the current URL with the given location.
The given location may be parameterized using the following format:
/example/{param}
/example/{value}/sub/{value2}
... and so on
Parameters may be bound. By default, matching parameter values are extracted from bindings in the
EvaluationContext.
See also where(String)
performHttp
public void performHttp(HttpServletRewrite event,
EvaluationContext context)
- Specified by:
performHttp in class HttpOperation
where
public RegexOperationParameterBuilder where(java.lang.String param)
- Specified by:
where in interface Parameterized<OperationParameterBuilder<RegexOperationParameterBuilder,java.lang.String>,java.lang.String>
where
public RegexOperationParameterBuilder where(java.lang.String param,
java.lang.String pattern)
- Specified by:
where in interface Parameterized<OperationParameterBuilder<RegexOperationParameterBuilder,java.lang.String>,java.lang.String>
where
public RegexOperationParameterBuilder where(java.lang.String param,
java.lang.String pattern,
Binding binding)
- Specified by:
where in interface Parameterized<OperationParameterBuilder<RegexOperationParameterBuilder,java.lang.String>,java.lang.String>
where
public RegexOperationParameterBuilder where(java.lang.String param,
Binding binding)
- Specified by:
where in interface Parameterized<OperationParameterBuilder<RegexOperationParameterBuilder,java.lang.String>,java.lang.String>
Copyright © 2012 OCPsoft. All Rights Reserved.