Package de.xima.fc.web.common.respond
Class FormResponder
- java.lang.Object
-
- de.xima.fc.web.common.respond.ServletResponder
-
- de.xima.fc.web.common.respond.FormResponder
-
public class FormResponder extends ServletResponder
-
-
Constructor Summary
Constructors Constructor Description FormResponder()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static void
appendCSSFolderIncludes(com.hp.gagawa.java.FertileNode rootNode, String includeURL, File includesDir, IExtendedFormRequestContext ctx, boolean inline)
Deprecated.static void
appendCSSFolderIncludes(com.hp.gagawa.java.FertileNode rootNode, String includeURL, String includesDir, IExtendedFormRequestContext ctx, boolean inline)
static void
appendJSFolderIncludes(com.hp.gagawa.java.FertileNode rootNode, String includeURL, File includesDir, IExtendedFormRequestContext ctx, boolean inline)
Deprecated.static void
appendJSFolderIncludes(com.hp.gagawa.java.FertileNode rootNode, String includeURL, String includesDir, IExtendedFormRequestContext ctx, boolean inline)
static void
authenticationCallback(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
static void
authenticationSelection(IExtendedFormRequestContext requestCtx, IFormAuthContext authCtx)
static void
authenticationSelection(IExtendedFormRequestContext requestCtx, IFormAuthContext authCtx, boolean xfcSessionLogin)
static void
authenticationSelection(IExtendedFormRequestContext requestCtx, IFormAuthContext authCtx, boolean xfcSessionLogin, ProjectAuthenticatorConfig... authConfig)
Deprecated.static void
authenticationSelection(IExtendedFormRequestContext requestCtx, IFormAuthContext authCtx, boolean xfcSessionLogin, Collection<ProjectAuthenticatorConfig> authConfigs)
Deprecated.static void
botDetected(IExtendedFormRequestContext ctx)
static void
botDetected(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, Mandant client)
static boolean
checkRenderParam(String value, boolean defaultValue)
static void
commonError(IExtendedFormRequestContext ctx)
static void
commonError(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, Mandant client)
static void
cookieRequired(IExtendedFormRequestContext ctx)
static void
cookieRequired(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, Mandant client)
static void
formNotFound(IExtendedFormRequestContext ctx)
static void
formNotFound(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, Mandant client)
static void
formRecordLimitReached(IExtendedFormRequestContext ctx)
static void
formVersionNotActive(IExtendedFormRequestContext ctx)
static void
formVersionNotActive(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, Mandant client)
static com.alibaba.fastjson.JSONObject
getFormAuthCallbackData(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
static void
identityTokenError(IExtendedFormRequestContext ctx)
static void
identityTokenError(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, Mandant client)
Deprecated.static void
internalError(IExtendedFormRequestContext ctx)
static void
internalError(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, Mandant client)
static void
invalidCall(IExtendedFormRequestContext ctx)
static void
invalidDoublePost(IExtendedFormRequestContext ctx)
static void
invalidDoublePost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse respond, Locale locale, UserContext uc, Mandant man)
static void
invalidSession(IExtendedFormRequestContext ctx)
static void
invalidSession(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, Mandant client)
static void
logout(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
static void
notAuthorizedCall(IExtendedFormRequestContext ctx, Set<EUserAuthorizationType> authorizationType)
Deprecated.static void
notGroupAuthorized(IExtendedFormRequestContext ctx)
Deprecated.static String
prepareMsg(Mandant man, Locale loc, UserContext uc, ETextbausteinMsgCode msgCode)
static String
prepareMsg(IExtendedFormRequestContext ctx, ETextbausteinMsgCode msgCode)
static String
prepareMsg(String context, Mandant man, Locale loc, UserContext uc, ETextbausteinMsgCode msgCode)
Deprecated.static String
prepareMsg(javax.servlet.http.HttpServletRequest request, Mandant man, Locale loc, UserContext uc, ETextbausteinMsgCode msgCode)
static boolean
processParamRedirect(IExtendedFormRequestContext ctx, javax.servlet.http.HttpServletResponse resp, boolean success)
static boolean
processParamRedirect(ValueParameters rps, javax.servlet.http.HttpServletResponse resp, boolean success)
static boolean
processParamRedirect(String successUrl, String errorUrl, javax.servlet.http.HttpServletResponse resp, boolean success)
static boolean
processParamRedirect(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse resp, boolean success)
static void
projektNotOnline(IExtendedFormRequestContext ctx)
static void
projektNotOnline(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, Mandant client)
static void
redirect(String redirectURL, ValueParameters rp, javax.servlet.http.HttpServletResponse resp, boolean success)
static void
respond(IExtendedFormContext ctx, EMime mime, IServletResponse wfr)
static void
respond(IExtendedFormContext ctx, EMime mime, String msg)
static void
respond(IExtendedFormRequestContext ctx, ETextbausteinMsgCode msgCode, boolean success)
Deprecated.static void
respond(IExtendedFormRequestContext ctx, ETextbausteinMsgCode msgCode, boolean success, boolean withRedirect)
static void
respond(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse respond, ValueParameters values, Mandant man, ETextbausteinMsgCode msgCode, boolean success)
Deprecated.static void
respond(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse respond, Locale locale, UserContext uc, Mandant man, ETextbausteinMsgCode code, boolean success)
static void
respond(javax.servlet.http.HttpServletResponse response, EMime mime, String msg)
static void
respondDefaultTemplate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse respond, ETextbausteinMsgCode msgCode, boolean success)
static void
respondDefaultTemplateForContextException(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, ContextBuilderException e)
static void
respondHTML(IExtendedFormRequestContext ctx, IWorkflowResponse wfr)
Deprecated.static void
respondHTML(IExtendedFormRequestContext ctx, IWorkflowResponse wfr, Vorgang v)
static void
respondHTML(IExtendedFormRequestContext ctx, IServletResponse wfr, boolean success)
static void
respondTemplate(IExtendedFormRequestContext ctx, Vorgang formRecord, String message, boolean success)
static void
respondTemplate(IExtendedFormRequestContext ctx, IWorkflowResponse wfr)
Deprecated.static void
respondTemplate(IExtendedFormRequestContext ctx, IWorkflowResponse wfr, Vorgang v)
static void
respondTemplate(IExtendedFormRequestContext ctx, IRemoteEventExecutionResult res)
static void
respondTemplate(ValueParameters rps, Locale locale, javax.servlet.http.HttpServletResponse resp, String textbaustein, boolean success)
static void
respondTemplate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse respond, Locale locale, String templateText, boolean success)
static void
respondTemplate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse respond, Locale locale, String templateText, boolean success, ETextbausteinMsgCode msgCode)
static void
respondTemplateByCtx(IExtendedFormRequestContext ctx, ETextbausteinMsgCode msgCode, boolean success, boolean withRedirect)
static void
respondTemplateByCtx(IExtendedFormRequestContext ctx, String textbaustein, boolean success, boolean withRedirect)
static void
respondTemplateByServlet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse respond, Mandant client, ETextbausteinMsgCode msgCode, boolean success, boolean withRedirect)
static void
respondVerifyOk(IExtendedFormRequestContext ctx, IDoiVerificationResult eventResult)
When the double opt-in was verified successfully: Responds to the HTTP request with the proper answer.static void
respondWorkflow(IExtendedFormRequestContext ctx, IWorkflowResponse resp)
Deprecated.Use the new workflow engine:respondWorkflow(IExtendedFormRequestContext, IRemoteEventExecutionResult)
static void
respondWorkflow(IExtendedFormRequestContext ctx, IWorkflowResponse resp, Vorgang v)
static void
respondWorkflow(IExtendedFormRequestContext ctx, IRemoteEventExecutionResult executionResult)
Responses to the HTTP request after a workflow was executed.static void
sendFormDataFailed(IExtendedFormRequestContext ctx)
static void
sendFormDataFailed(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, Mandant client)
static void
sendFormDataSucceeded(IExtendedFormRequestContext ctx)
static void
sendFormDataSucceeded(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, Mandant client)
static void
validationError(IExtendedFormRequestContext ctx)
static void
validationError(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, Mandant client)
-
Methods inherited from class de.xima.fc.web.common.respond.ServletResponder
addDispositionHeader, buildTemplateHTML, buildTemplateHTML, redirect, respond, respond, respond, respondContent, respondContent, respondFile, respondFile, respondFile, respondFile, respondFile, respondFile, respondFile, respondHTML, respondHTML, respondJavaScript, respondJSON, respondJSON, respondJSON, respondJSON, respondJSON, respondJSONError, respondJSONMessage, respondJSONPath, respondJSONPath, respondPlainText, respondStream, respondStream, respondTemplate, respondXML, respondXML, writeHeader, writeSessionParameters, writeStatusCode
-
-
-
-
Method Detail
-
invalidCall
public static void invalidCall(IExtendedFormRequestContext ctx)
-
invalidDoublePost
public static void invalidDoublePost(IExtendedFormRequestContext ctx)
-
invalidDoublePost
public static void invalidDoublePost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse respond, Locale locale, UserContext uc, Mandant man)
-
checkRenderParam
public static boolean checkRenderParam(String value, boolean defaultValue)
-
authenticationSelection
public static void authenticationSelection(IExtendedFormRequestContext requestCtx, IFormAuthContext authCtx)
-
authenticationSelection
public static void authenticationSelection(IExtendedFormRequestContext requestCtx, IFormAuthContext authCtx, boolean xfcSessionLogin)
-
authenticationCallback
public static void authenticationCallback(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
-
getFormAuthCallbackData
public static com.alibaba.fastjson.JSONObject getFormAuthCallbackData(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
-
logout
public static void logout(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
-
cookieRequired
public static void cookieRequired(IExtendedFormRequestContext ctx)
-
cookieRequired
public static void cookieRequired(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, Mandant client)
-
invalidSession
public static void invalidSession(IExtendedFormRequestContext ctx)
-
invalidSession
public static void invalidSession(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, Mandant client)
-
validationError
public static void validationError(IExtendedFormRequestContext ctx)
-
validationError
public static void validationError(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, Mandant client)
-
projektNotOnline
public static void projektNotOnline(IExtendedFormRequestContext ctx)
-
formRecordLimitReached
public static void formRecordLimitReached(IExtendedFormRequestContext ctx)
-
projektNotOnline
public static void projektNotOnline(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, Mandant client)
-
internalError
public static void internalError(IExtendedFormRequestContext ctx)
-
internalError
public static void internalError(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, Mandant client)
-
commonError
public static void commonError(IExtendedFormRequestContext ctx)
-
commonError
public static void commonError(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, Mandant client)
-
identityTokenError
public static void identityTokenError(IExtendedFormRequestContext ctx)
-
formVersionNotActive
public static void formVersionNotActive(IExtendedFormRequestContext ctx)
-
formVersionNotActive
public static void formVersionNotActive(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, Mandant client)
-
sendFormDataFailed
public static void sendFormDataFailed(IExtendedFormRequestContext ctx)
-
sendFormDataFailed
public static void sendFormDataFailed(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, Mandant client)
-
botDetected
public static void botDetected(IExtendedFormRequestContext ctx)
-
botDetected
public static void botDetected(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, Mandant client)
-
sendFormDataSucceeded
public static void sendFormDataSucceeded(IExtendedFormRequestContext ctx)
-
sendFormDataSucceeded
public static void sendFormDataSucceeded(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, Mandant client)
-
formNotFound
public static void formNotFound(IExtendedFormRequestContext ctx)
-
formNotFound
public static void formNotFound(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, Mandant client)
-
respond
public static void respond(IExtendedFormRequestContext ctx, ETextbausteinMsgCode msgCode, boolean success, boolean withRedirect)
-
respondDefaultTemplate
public static void respondDefaultTemplate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse respond, ETextbausteinMsgCode msgCode, boolean success)
-
respondTemplateByServlet
public static void respondTemplateByServlet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse respond, Mandant client, ETextbausteinMsgCode msgCode, boolean success, boolean withRedirect)
-
respondDefaultTemplateForContextException
public static void respondDefaultTemplateForContextException(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, ContextBuilderException e)
-
respond
public static void respond(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse respond, Locale locale, UserContext uc, Mandant man, ETextbausteinMsgCode code, boolean success)
-
processParamRedirect
public static boolean processParamRedirect(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse resp, boolean success)
-
processParamRedirect
public static boolean processParamRedirect(ValueParameters rps, javax.servlet.http.HttpServletResponse resp, boolean success)
-
processParamRedirect
public static boolean processParamRedirect(IExtendedFormRequestContext ctx, javax.servlet.http.HttpServletResponse resp, boolean success)
-
processParamRedirect
public static boolean processParamRedirect(String successUrl, String errorUrl, javax.servlet.http.HttpServletResponse resp, boolean success)
-
redirect
public static void redirect(String redirectURL, ValueParameters rp, javax.servlet.http.HttpServletResponse resp, boolean success)
-
respondTemplateByCtx
public static void respondTemplateByCtx(IExtendedFormRequestContext ctx, ETextbausteinMsgCode msgCode, boolean success, boolean withRedirect)
-
respondTemplateByCtx
public static void respondTemplateByCtx(IExtendedFormRequestContext ctx, String textbaustein, boolean success, boolean withRedirect)
-
respondTemplate
public static void respondTemplate(ValueParameters rps, Locale locale, javax.servlet.http.HttpServletResponse resp, String textbaustein, boolean success)
-
respondTemplate
public static void respondTemplate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse respond, Locale locale, String templateText, boolean success)
-
respondTemplate
public static void respondTemplate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse respond, Locale locale, String templateText, boolean success, ETextbausteinMsgCode msgCode)
-
prepareMsg
public static String prepareMsg(IExtendedFormRequestContext ctx, ETextbausteinMsgCode msgCode)
-
prepareMsg
public static String prepareMsg(javax.servlet.http.HttpServletRequest request, Mandant man, Locale loc, UserContext uc, ETextbausteinMsgCode msgCode)
-
prepareMsg
public static String prepareMsg(Mandant man, Locale loc, UserContext uc, ETextbausteinMsgCode msgCode)
-
respondTemplate
@Deprecated public static void respondTemplate(IExtendedFormRequestContext ctx, IWorkflowResponse wfr)
Deprecated.
-
respondTemplate
public static void respondTemplate(IExtendedFormRequestContext ctx, IRemoteEventExecutionResult res)
-
respondTemplate
public static void respondTemplate(IExtendedFormRequestContext ctx, Vorgang formRecord, String message, boolean success)
-
respondHTML
@Deprecated public static void respondHTML(IExtendedFormRequestContext ctx, IWorkflowResponse wfr)
Deprecated.
-
respondHTML
public static void respondHTML(IExtendedFormRequestContext ctx, IServletResponse wfr, boolean success)
-
respond
public static void respond(IExtendedFormContext ctx, EMime mime, IServletResponse wfr)
-
respond
public static void respond(IExtendedFormContext ctx, EMime mime, String msg)
-
respond
public static void respond(javax.servlet.http.HttpServletResponse response, EMime mime, String msg)
-
appendJSFolderIncludes
public static void appendJSFolderIncludes(com.hp.gagawa.java.FertileNode rootNode, String includeURL, String includesDir, IExtendedFormRequestContext ctx, boolean inline)
-
appendCSSFolderIncludes
public static void appendCSSFolderIncludes(com.hp.gagawa.java.FertileNode rootNode, String includeURL, String includesDir, IExtendedFormRequestContext ctx, boolean inline)
-
respondVerifyOk
public static void respondVerifyOk(IExtendedFormRequestContext ctx, IDoiVerificationResult eventResult)
When the double opt-in was verified successfully: Responds to the HTTP request with the proper answer.When
xfc-pp-success-url
orxfc-pp-error-url
was set, redirect to that URL. Otherwise, respond with theIDoiVerificationResult.getServletResponse()
. For template respones, session value placeholders are replaced.- Parameters:
ctx
- Current form request context.eventResult
- Result of the double opt-in verification.
-
respondWorkflow
public static void respondWorkflow(IExtendedFormRequestContext ctx, IRemoteEventExecutionResult executionResult) throws IOException
Responses to the HTTP request after a workflow was executed.- Parameters:
ctx
- Request context for the HTTP request that was made.executionResult
- Result of running the workflow.- Throws:
IOException
- When the response could not be written.
-
respondWorkflow
@Deprecated public static void respondWorkflow(IExtendedFormRequestContext ctx, IWorkflowResponse resp) throws IOException
Deprecated.Use the new workflow engine:respondWorkflow(IExtendedFormRequestContext, IRemoteEventExecutionResult)
Returns the response from the workflow to the client.- Parameters:
ctx
- Current form request context that triggered the workflow.resp
- Response from the workflow.- Throws:
IOException
- When the response could not be sent.
-
identityTokenError
@Deprecated public static void identityTokenError(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, Mandant client)
Deprecated.- Parameters:
req
- Current HTTP request.resp
- Current HTTP response.client
- Client who owns the project for which the identity check failed.
-
respond
@Deprecated public static void respond(IExtendedFormRequestContext ctx, ETextbausteinMsgCode msgCode, boolean success)
Deprecated.
-
respond
@Deprecated public static void respond(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse respond, ValueParameters values, Mandant man, ETextbausteinMsgCode msgCode, boolean success)
Deprecated.
-
respondWorkflow
@Deprecated public static void respondWorkflow(IExtendedFormRequestContext ctx, IWorkflowResponse resp, Vorgang v) throws IOException
Deprecated.- Throws:
IOException
-
appendCSSFolderIncludes
@Deprecated public static void appendCSSFolderIncludes(com.hp.gagawa.java.FertileNode rootNode, String includeURL, File includesDir, IExtendedFormRequestContext ctx, boolean inline)
Deprecated.
-
appendJSFolderIncludes
@Deprecated public static void appendJSFolderIncludes(com.hp.gagawa.java.FertileNode rootNode, String includeURL, File includesDir, IExtendedFormRequestContext ctx, boolean inline)
Deprecated.
-
respondHTML
@Deprecated public static void respondHTML(IExtendedFormRequestContext ctx, IWorkflowResponse wfr, Vorgang v)
-
respondTemplate
@Deprecated public static void respondTemplate(IExtendedFormRequestContext ctx, IWorkflowResponse wfr, Vorgang v)
-
prepareMsg
@Deprecated public static String prepareMsg(String context, Mandant man, Locale loc, UserContext uc, ETextbausteinMsgCode msgCode)
Deprecated.
-
authenticationSelection
@Deprecated public static void authenticationSelection(IExtendedFormRequestContext requestCtx, IFormAuthContext authCtx, boolean xfcSessionLogin, ProjectAuthenticatorConfig... authConfig)
Deprecated.
-
authenticationSelection
@Deprecated public static void authenticationSelection(IExtendedFormRequestContext requestCtx, IFormAuthContext authCtx, boolean xfcSessionLogin, Collection<ProjectAuthenticatorConfig> authConfigs)
Deprecated.
-
notAuthorizedCall
@Deprecated public static void notAuthorizedCall(IExtendedFormRequestContext ctx, Set<EUserAuthorizationType> authorizationType)
Deprecated.
-
notGroupAuthorized
@Deprecated public static void notGroupAuthorized(IExtendedFormRequestContext ctx)
Deprecated.
-
-