|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.livinglogic.struts.workflow.WorkflowRequestProcessorLogic
This class implements the workflow request processor logic. The logic is implemented separately in this class, because we want to be able to reuse it in multiple classes that are not derived from each other. See WorkflowRequestProcessor for an example how this class can be used.
Field Summary | |
protected Hashtable |
authClasses
The set of Authentication instances that have been created and initialized, keyed by the fully qualified Java class name of the Authentication class. |
static String |
AUTHENTICATION_VIOLATION_FORWARD
The name used to find an ActionForward instance if an authentication violation occurs |
protected static org.apache.commons.logging.Log |
log
Commons logging instance |
static String |
WORKFLOW_VIOLATION_FORWARD_PREFIX
The prefix used to find an ActionForward instance if a workflow violation occurs |
Method Summary | |
protected void |
logStates(WorkflowContainer workflowContainer)
Method that logs the current state information |
void |
process(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Process an HttpServletRequest and create the
corresponding HttpServletResponse . |
protected Authentication |
processAuthClassCreate(javax.servlet.http.HttpServletResponse response,
String className)
Return an Authentication instance that will be used to
check whether the requested action is allowed to be executed with the
current request. |
protected boolean |
processCheckAuthClass(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.apache.struts.action.ActionMapping mapping,
Authentication authClass)
If this action is protected by an authClass, do the necessary checks. |
protected boolean |
processCheckWorkflows(WorkflowMapping workflowMapping,
WorkflowContainer workflowContainer,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Checks whether the current action is allowed to be executed: If the previously executed action was part of a primary workflow and has defined one ore more nextState conditions,the current action must be part of the same workflow and must lead to one of the defined next states. |
protected void |
updateWorkflows(javax.servlet.http.HttpServletRequest request,
WorkflowMapping workflowMapping,
WorkflowContainer workflowContainer)
Updates the workflow data. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Hashtable authClasses
public static String WORKFLOW_VIOLATION_FORWARD_PREFIX
public static String AUTHENTICATION_VIOLATION_FORWARD
protected static org.apache.commons.logging.Log log
Method Detail |
protected void logStates(WorkflowContainer workflowContainer)
workflowContainer
- the WorkflowContainer associated with the user's sessionprotected boolean processCheckWorkflows(WorkflowMapping workflowMapping, WorkflowContainer workflowContainer, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException, javax.servlet.ServletException
Checks whether the current action is allowed to be executed:
workflowMapping
- the WorkflowMapping used to select this instanceworkflowContainer
- the WorkflowContainer associated with the user's sessionrequest
- The servlet request we are processingresponse
- The servlet response we are creating
IOException
javax.servlet.ServletException
protected void updateWorkflows(javax.servlet.http.HttpServletRequest request, WorkflowMapping workflowMapping, WorkflowContainer workflowContainer)
request
- The servlet request we are processingworkflowMapping
- the WorkflowMapping used to select this instanceworkflowContainer
- the WorkflowContainer associated with the user's sessionprotected Authentication processAuthClassCreate(javax.servlet.http.HttpServletResponse response, String className) throws IOException
Authentication
instance that will be used to
check whether the requested action is allowed to be executed with the
current request.
response
- The servlet response we are creating
IOException
- if an input/output error occursprotected boolean processCheckAuthClass(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.apache.struts.action.ActionMapping mapping, Authentication authClass) throws IOException, javax.servlet.ServletException
true
to continue normal processing, or false
if the check failed.
request
- The servlet request we are processingresponse
- The servlet response we are creatingmapping
- The mapping we are usingauthClass
- The Authentication instance to use for the checks
IOException
- if an input/output error occurs
javax.servlet.ServletException
- if a servlet exception occurspublic void process(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException, javax.servlet.ServletException
Process an HttpServletRequest
and create the
corresponding HttpServletResponse
.
request
- The servlet request we are processingresponse
- The servlet response we are creating
IOException
- if an input/output error occurs
javax.servlet.ServletException
- if a processing exception occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |