public class Redirect extends HttpOperation implements Parameterized
Operation that performs redirects via HttpInboundServletRewrite.redirectPermanent(String) and
HttpInboundServletRewrite.redirectTemporary(String)DefaultOperationBuilder.NoOp| Modifier and Type | Method and Description |
|---|---|
Set<String> |
getRequiredParameterNames() |
RegexParameterizedPatternBuilder |
getTargetExpression() |
void |
performHttp(HttpServletRewrite event,
EvaluationContext context) |
static Redirect |
permanent(String location)
Issue a permanent redirect ( 301
HttpServletResponse.SC_MOVED_PERMANENTLY ) to the given location. |
void |
setParameterStore(ParameterStore store) |
static Redirect |
temporary(String location)
Issue a temporary redirect ( 302
HttpServletResponse.SC_MOVED_TEMPORARILY ) to the given location. |
String |
toString() |
performand, create, wrappublic void performHttp(HttpServletRewrite event, EvaluationContext context)
performHttp in class HttpOperationpublic static Redirect permanent(String location)
HttpServletResponse.SC_MOVED_PERMANENTLY ) to the given location. If the
given location is not the same as HttpServletRewrite.getAddress(), this will change the browser
URL and result in a new request. Note that in order to redirect within the ServletContext, you
must prepend the ServletContext.getContextPath() manually.
The given location may be parameterized using the following format:
/example/{param}
/example/{value}/sub/{value2}
... and so on
By default, matching parameter values are bound to the EvaluationContext.
See also #where(String)
public static Redirect temporary(String location)
HttpServletResponse.SC_MOVED_TEMPORARILY ) to the given location. If the
given location is not the same as HttpServletRewrite.getAddress(), this will change the browser
URL and result in a new request. Note that in order to redirect within the ServletContext, you
must prepend the ServletContext.getContextPath() manually.
The given location may be parameterized using the following format:
/example/{param}
/example/{value}/sub/{value2}
... and so on
By default, matching parameter values are bound to the EvaluationContext.
See also #where(String)
public RegexParameterizedPatternBuilder getTargetExpression()
public Set<String> getRequiredParameterNames()
getRequiredParameterNames in interface Parameterizedpublic void setParameterStore(ParameterStore store)
setParameterStore in interface ParameterizedCopyright © 2013 OCPsoft. All Rights Reserved.