|
Spring Web Flow | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.webflow.context.servlet.DefaultFlowUrlHandler
public class DefaultFlowUrlHandler
The default FlowUrlHandler implementation for Spring Web Flow.
Expects URLs to launch flow to be of this pattern:
http://<host>/[app context path]/[app servlet path]/<flow path>As an example, the URL
http://localhost/springtravel/app/booking
would map to flow "booking", while the
URL http://localhost/springtravel/app/hotels/booking
would map to flow "hotels/booking". In both these
examples, /springtravel is the context path and /app is the servlet path. The flow id is treated as the path info
component of the request URL string.
If the path info is null, the servletPath will be used as the flow id. Also, if the servlet path ends in an extension
it will be stripped when calculating the flow id. For example, a URL of
http://localhost/springtravel/hotels/booking.htm
would still map to flow id "hotels/booking", assuming a
context path of /springtravel, a servlet path of /hotels/booking.htm (likely mapped with a servlet-mapping of *.htm),
and a path info of null.
Expects URLs to resume flows to be of this pattern:
http://<host>/[app context path]/[app servlet path]/<flow path>?execution=<flow execution key>As an example, the URL http://localhost/springtravel/app/hotels/booking?execution=e1s1 would attempt to resume execution "e1s1" of the "hotels/booking" flow.
Constructor Summary | |
---|---|
DefaultFlowUrlHandler()
|
Method Summary | ||
---|---|---|
protected
|
appendQueryParameters(java.lang.StringBuilder url,
java.util.Map<java.lang.String,T> parameters,
java.lang.String encodingScheme)
|
|
java.lang.String |
createFlowDefinitionUrl(java.lang.String flowId,
AttributeMap<?> input,
javax.servlet.http.HttpServletRequest request)
The flow definition URL for the given flow id will be built by appending the flow id to the base app context and servlet paths. |
|
java.lang.String |
createFlowExecutionUrl(java.lang.String flowId,
java.lang.String flowExecutionKey,
javax.servlet.http.HttpServletRequest request)
Create a URL that when addressed will resume an existing execution of a flow. |
|
protected java.lang.String |
getEncodingScheme(javax.servlet.http.HttpServletRequest request)
|
|
java.lang.String |
getFlowExecutionKey(javax.servlet.http.HttpServletRequest request)
Extract the flow execution from the request. |
|
java.lang.String |
getFlowId(javax.servlet.http.HttpServletRequest request)
Extract the flow id from the request. |
|
void |
setEncodingScheme(java.lang.String encodingScheme)
Set the character encoding scheme for flow urls. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultFlowUrlHandler()
Method Detail |
---|
public void setEncodingScheme(java.lang.String encodingScheme)
public java.lang.String getFlowExecutionKey(javax.servlet.http.HttpServletRequest request)
FlowUrlHandler
getFlowExecutionKey
in interface FlowUrlHandler
request
- the request
public java.lang.String getFlowId(javax.servlet.http.HttpServletRequest request)
FlowUrlHandler
getFlowId
in interface FlowUrlHandler
request
- the request
public java.lang.String createFlowExecutionUrl(java.lang.String flowId, java.lang.String flowExecutionKey, javax.servlet.http.HttpServletRequest request)
FlowUrlHandler
createFlowExecutionUrl
in interface FlowUrlHandler
flowExecutionKey
- the flow execution key that is paused and waiting to be resumedrequest
- the current request
public java.lang.String createFlowDefinitionUrl(java.lang.String flowId, AttributeMap<?> input, javax.servlet.http.HttpServletRequest request)
Example - given a request originating at:
http://someHost/someApp/someServlet/nestedPath/fooand a request for the flow id "nestedPath/bar", the new flow definition URL would be:
http://someHost/someApp/someServlet/nestedPath/bar
createFlowDefinitionUrl
in interface FlowUrlHandler
flowId
- the id of the flow definitioninput
- the input to pass the new flow executionrequest
- the current request
protected java.lang.String getEncodingScheme(javax.servlet.http.HttpServletRequest request)
protected <T> void appendQueryParameters(java.lang.StringBuilder url, java.util.Map<java.lang.String,T> parameters, java.lang.String encodingScheme)
|
Spring Web Flow | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |