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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
handleOnlineSubmission
(Submission submission, HttpServletRequest request, HttpServletResponse response) Handle an online submission, redirecting the response to the next page.resolveAction
(HttpServletRequest request, Submission submission) Resolve a submission action given a http request, a submission and its associated submission data bean.resolveErrorPath
(HttpServletRequest request, SubmissionDataBean submissionData, Throwable error, ErrorLog errorLog) Resolve an URL path if there is an error occurs during the form process.resolveFormExpiryPath
(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
(HttpServletRequest request, Submission submission) Resolve a path given a http request, a submission and its associated submission data bean.void
resolvePathAndRedirect
(HttpServletRequest request, 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:
resolvePath
in interfaceSubmissionTargetResolver
- Parameters:
submission
- the submission- Returns:
- the url path
-
resolvePathAndRedirect
public void resolvePathAndRedirect(HttpServletRequest request, HttpServletResponse response, Submission submission) Resolve the next action path for the given submission and redirect to that target.- Specified by:
resolvePathAndRedirect
in 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:
resolvePath
in interfaceSubmissionTargetResolver
- Parameters:
request
- the http requestsubmission
- the submission- Returns:
- the url path
- See Also:
-
resolveAction
Resolve a submission action given a http request, a submission and its associated submission data bean.- Specified by:
resolveAction
in 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
Resolve an URL path if a form is expired.- Specified by:
resolveFormExpiryPath
in interfaceSubmissionTargetResolver
- Parameters:
request
- the http requestsubmissionData
- the submission data bean- Returns:
- the URL path
- See Also:
-
resolveErrorPath
public String resolveErrorPath(HttpServletRequest request, SubmissionDataBean submissionData, Throwable error, ErrorLog errorLog) Resolve an URL path if there is an error occurs during the form process.- Specified by:
resolveErrorPath
in 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, HttpServletRequest request, HttpServletResponse response) Handle an online submission, redirecting the response to the next page.- Specified by:
handleOnlineSubmission
in interfaceSubmissionTargetResolver
- Parameters:
submission
- the submissionrequest
- the HTTP servlet requestresponse
- the HTTP servlet response- See Also:
-