Class SessionSafeFunctionHandler
- java.lang.Object
-
- org.silverpeas.processmanager.servlets.SessionSafeFunctionHandler
-
- All Implemented Interfaces:
FunctionHandler
public abstract class SessionSafeFunctionHandler extends Object implements FunctionHandler
A SessionSafeFunctionHandler must be used to prevent conflicts in HTTP Session when user navigate using several windows sharing the same session.- Author:
- Ludovic Bertin
-
-
Constructor Summary
Constructors Constructor Description SessionSafeFunctionHandler()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract String
computeDestination(String function, ProcessManagerSessionController session, javax.servlet.http.HttpServletRequest request, List<org.apache.commons.fileupload.FileItem> items)
Main scenario to be implemented by handler.protected void
generateTokenId(ProcessManagerSessionController session, javax.servlet.http.HttpServletRequest request)
Generate random UUID and store it in request as attribute and in process manager session controllerString
getDestination(String function, ProcessManagerSessionController session, javax.servlet.http.HttpServletRequest req)
Process the request and returns the response url.protected void
resetTokenId(ProcessManagerSessionController session, javax.servlet.http.HttpServletRequest request)
Reset token Id.
-
-
-
Method Detail
-
getDestination
public final String getDestination(String function, ProcessManagerSessionController session, javax.servlet.http.HttpServletRequest req) throws ProcessManagerException
Description copied from interface:FunctionHandler
Process the request and returns the response url.- Specified by:
getDestination
in interfaceFunctionHandler
- Parameters:
function
- the user request namesession
- the user request contextreq
- the user request params- Throws:
ProcessManagerException
-
generateTokenId
protected void generateTokenId(ProcessManagerSessionController session, javax.servlet.http.HttpServletRequest request)
Generate random UUID and store it in request as attribute and in process manager session controller- Parameters:
session
- the process manager session controllerrequest
- the http servlet request
-
resetTokenId
protected void resetTokenId(ProcessManagerSessionController session, javax.servlet.http.HttpServletRequest request)
Reset token Id.- Parameters:
session
- the process manager session controllerrequest
- the http servlet request
-
computeDestination
protected abstract String computeDestination(String function, ProcessManagerSessionController session, javax.servlet.http.HttpServletRequest request, List<org.apache.commons.fileupload.FileItem> items) throws ProcessManagerException
Main scenario to be implemented by handler.- Parameters:
function
- the name of use case to realizesession
- the process manager session controllerrequest
- the http servlet requestitems
- eventual submitted items- Returns:
- the JSP servlet to be forwarded to.
- Throws:
ProcessManagerException
- if an error occurs while computing the next destination of the user navigation in the workflow.
-
-