Package de.xima.fc.servlet
Class AFormProcessingServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- de.xima.fc.servlet.AFormProcessingServlet
-
- All Implemented Interfaces:
Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
- Direct Known Subclasses:
FormProcessServlet
,FormVerifyServlet
,InboxWorkflowServlet
public abstract class AFormProcessingServlet extends javax.servlet.http.HttpServlet
Base class for workflow-servtes. They both need to initiate the workflow, with the main difference being that the former allows skipping workflow actions and setting a different state on the form. This requires special permissions. To make it easier to check for the appropriate permissions, these two servlet were separated.- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AFormProcessingServlet()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract boolean
checkProcessCtx(IExtendedFormRequestContext ctx)
Validates the form request context, ie. if the user is allowed to perform the requested action.protected abstract IExtendedFormRequestContext
createFormRequestContext(UserContext uc, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
protected void
doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
protected void
doOptions(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
protected void
doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
protected boolean
exec(IExtendedFormRequestContext requestCtx)
protected void
process(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
protected boolean
processHttp(IExtendedFormRequestContext requestCtx)
protected abstract void
respondWorkflowAfterSubmit(IFormProcessContext processCtx, IExtendedFormRequestContext requestCtx)
protected boolean
startVorgang(IExtendedFormRequestContext requestCtx, IXForm xform)
-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doPut, doTrace, getLastModified, service, service
-
-
-
-
Method Detail
-
doGet
protected void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException
- Overrides:
doGet
in classjavax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
IOException
-
doPost
protected void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException
- Overrides:
doPost
in classjavax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
IOException
-
doOptions
protected void doOptions(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException
- Overrides:
doOptions
in classjavax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
IOException
-
process
protected void process(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
-
exec
protected boolean exec(IExtendedFormRequestContext requestCtx)
-
processHttp
protected boolean processHttp(IExtendedFormRequestContext requestCtx)
-
startVorgang
protected boolean startVorgang(IExtendedFormRequestContext requestCtx, IXForm xform)
-
respondWorkflowAfterSubmit
protected abstract void respondWorkflowAfterSubmit(IFormProcessContext processCtx, IExtendedFormRequestContext requestCtx) throws IOException
- Throws:
IOException
-
createFormRequestContext
protected abstract IExtendedFormRequestContext createFormRequestContext(UserContext uc, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws ContextBuilderException
- Parameters:
uc
- Current user context.req
- Current HTTP request.resp
- Current HTTP response.- Returns:
- The processing context that is to be used for this request.
- Throws:
ContextBuilderException
- Allowed to be thrown when the processing context could not be built.
-
checkProcessCtx
protected abstract boolean checkProcessCtx(IExtendedFormRequestContext ctx)
Validates the form request context, ie. if the user is allowed to perform the requested action.- Parameters:
ctx
- Current request context.- Returns:
- Whether the request is allowed.
-
-