Package com.avoka.fc.core.servlet
Class SubmissionTargetResolverImpl
java.lang.Object
com.avoka.fc.core.servlet.SubmissionTargetResolverImpl
- All Implemented Interfaces:
SubmissionTargetResolver
Provides an implementation for the submission target resolver.
-
Field Summary
Fields inherited from interface com.avoka.fc.core.servlet.SubmissionTargetResolver
SUBMISSION_ACTION, SUBMISSION_ACTION_ASSIGNED, SUBMISSION_ACTION_ATTACHMENT, SUBMISSION_ACTION_AUTHENTICATION, SUBMISSION_ACTION_COMPLETED, SUBMISSION_ACTION_ERROR, SUBMISSION_ACTION_EXPIRY, SUBMISSION_ACTION_PAYMENT, SUBMISSION_ACTION_SAVED, SUBMISSION_LINK_URL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidhandleOnlineSubmission(Submission submission, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Handle an online submission, redirecting the response to the next page.resolveAction(jakarta.servlet.http.HttpServletRequest request, Submission submission) Resolve a submission action given a http request, a submission and its associated submission data bean.resolveErrorPath(jakarta.servlet.http.HttpServletRequest request, SubmissionDataBean submissionData, Throwable error, ErrorLog errorLog) Resolve an URL path if there is an error occurs during the form process.resolveFormExpiryPath(jakarta.servlet.http.HttpServletRequest request, SubmissionDataBean submissionData) Resolve an URL path if a form is expired.resolvePath(Submission submission) Resolve a path given a http request and submission.resolvePath(jakarta.servlet.http.HttpServletRequest request, Submission submission) Resolve a path given a http request, a submission and its associated submission data bean.voidresolvePathAndRedirect(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Submission submission) Resolve the next action path for the given submission and redirect to that target.
-
Constructor Details
-
SubmissionTargetResolverImpl
public SubmissionTargetResolverImpl()
-
-
Method Details
-
resolvePath
Resolve a path given a http request and submission.- Specified by:
resolvePathin interfaceSubmissionTargetResolver- Parameters:
submission- the submission- Returns:
- the url path
-
resolvePathAndRedirect
public void resolvePathAndRedirect(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Submission submission) Resolve the next action path for the given submission and redirect to that target.- Specified by:
resolvePathAndRedirectin interfaceSubmissionTargetResolver- Parameters:
request- the http requestresponse- the http responsesubmission- the submission
-
resolvePath
Resolve a path given a http request, a submission and its associated submission data bean.- Specified by:
resolvePathin interfaceSubmissionTargetResolver- Parameters:
request- the http requestsubmission- the submission- Returns:
- the url path
- See Also:
-
resolveAction
public Map<String,String> resolveAction(jakarta.servlet.http.HttpServletRequest request, Submission submission) Resolve a submission action given a http request, a submission and its associated submission data bean.- Specified by:
resolveActionin interfaceSubmissionTargetResolver- Parameters:
request- the http requestsubmission- the submission- Returns:
- a map containing entries for
SubmissionTargetResolver.SUBMISSION_ACTION(the next action) andSubmissionTargetResolver.SUBMISSION_LINK_URL(a URL to the next page) - See Also:
-
resolveFormExpiryPath
public String resolveFormExpiryPath(jakarta.servlet.http.HttpServletRequest request, SubmissionDataBean submissionData) Resolve an URL path if a form is expired.- Specified by:
resolveFormExpiryPathin interfaceSubmissionTargetResolver- Parameters:
request- the http requestsubmissionData- the submission data bean- Returns:
- the URL path
- See Also:
-
resolveErrorPath
public String resolveErrorPath(jakarta.servlet.http.HttpServletRequest request, SubmissionDataBean submissionData, Throwable error, ErrorLog errorLog) Resolve an URL path if there is an error occurs during the form process.- Specified by:
resolveErrorPathin interfaceSubmissionTargetResolver- Parameters:
request- the http requestsubmissionData- the submission data beanerror- the throwable errorerrorLog- the associated error log- Returns:
- the URL path
- See Also:
-
handleOnlineSubmission
public void handleOnlineSubmission(Submission submission, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Handle an online submission, redirecting the response to the next page.- Specified by:
handleOnlineSubmissionin interfaceSubmissionTargetResolver- Parameters:
submission- the submissionrequest- the HTTP servlet requestresponse- the HTTP servlet response- See Also:
-