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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract booleanValidates the form request context, ie. if the user is allowed to perform the requested action.protected abstract IExtendedFormRequestContextcreateFormRequestContext(UserContext uc, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) protected voiddoGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) protected voiddoOptions(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) protected voiddoPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) protected booleanexec(IExtendedFormRequestContext requestCtx) protected voidprocess(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) protected booleanprocessHttp(IExtendedFormRequestContext requestCtx) protected booleanstartVorgang(IExtendedFormRequestContext requestCtx, IXForm xform) Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doPut, doTrace, getLastModified, service, serviceMethods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
-
Constructor Details
-
AFormProcessingServlet
public AFormProcessingServlet()
-
-
Method Details
-
doGet
protected void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException - Overrides:
doGetin classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionIOException
-
doPost
protected void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException - Overrides:
doPostin classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionIOException
-
doOptions
protected void doOptions(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException - Overrides:
doOptionsin classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionIOException
-
process
protected void process(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws UnsupportedEncodingException - Throws:
UnsupportedEncodingException
-
exec
-
processHttp
-
startVorgang
-
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
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.
-