Package com.avoka.fc.core.servlet
Interface SubmissionTargetResolver
- All Known Implementing Classes:
SubmissionTargetResolverImpl
public interface SubmissionTargetResolver
Provides an interface for the submission target resolver. It contains some utility methods to resolve
various type of URL Path based on a submission.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The Constant SUBMISSION_ACTION.static final String
Implies that the next action is to review the saved formstatic final String
Implies that the next action is to add attachmentsstatic final String
Implies that the next action is to authenticatestatic final String
Implies that the next action is to view the confirmation pagestatic final String
Implies that the next action is to view an error pagestatic final String
Implies that the form has expired and cannot be submittedstatic final String
Implies that the next action is to make paymentstatic final String
Implies that the next action is to review the saved formstatic final String
The Constant SUBMISSION_LINK_URL. -
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 the next action path for the given 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.
-
Field Details
-
SUBMISSION_ACTION
The Constant SUBMISSION_ACTION.- See Also:
-
SUBMISSION_LINK_URL
The Constant SUBMISSION_LINK_URL.- See Also:
-
SUBMISSION_ACTION_ASSIGNED
Implies that the next action is to review the saved form- See Also:
-
SUBMISSION_ACTION_SAVED
Implies that the next action is to review the saved form- See Also:
-
SUBMISSION_ACTION_ATTACHMENT
Implies that the next action is to add attachments- See Also:
-
SUBMISSION_ACTION_PAYMENT
Implies that the next action is to make payment- See Also:
-
SUBMISSION_ACTION_AUTHENTICATION
Implies that the next action is to authenticate- See Also:
-
SUBMISSION_ACTION_COMPLETED
Implies that the next action is to view the confirmation page- See Also:
-
SUBMISSION_ACTION_EXPIRY
Implies that the form has expired and cannot be submitted- See Also:
-
SUBMISSION_ACTION_ERROR
Implies that the next action is to view an error page- See Also:
-
-
Method Details
-
resolvePath
Resolve the next action path for the given submission.- Parameters:
submission
- the submission- Returns:
- the url path
-
resolvePathAndRedirect
void resolvePathAndRedirect(HttpServletRequest request, HttpServletResponse response, Submission submission) Resolve the next action path for the given submission and redirect to that target.- 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.- Parameters:
request
- the http requestsubmission
- the submission- Returns:
- the url path
-
resolveAction
Resolve a submission action given a http request, a submission and its associated submission data bean. The submission action string returned is one of the action constants defined in SubmissionTargetResolver, e.g.SUBMISSION_ACTION_ATTACHMENT
- Parameters:
request
- the http requestsubmission
- the submission- Returns:
- a map containing entries for
SUBMISSION_ACTION
(the next action) andSUBMISSION_LINK_URL
(a URL to the next page)
-
resolveFormExpiryPath
Resolve an URL path if a form is expired.- Parameters:
request
- the http requestsubmissionData
- the submission data bean- Returns:
- the URL path
-
resolveErrorPath
String resolveErrorPath(HttpServletRequest request, SubmissionDataBean submissionData, Throwable error, ErrorLog errorLog) Resolve an URL path if there is an error occurs during the form process.- Parameters:
request
- the http requestsubmissionData
- the submission data beanerror
- the throwable errorerrorLog
- the associated error log- Returns:
- the URL path
-
handleOnlineSubmission
void handleOnlineSubmission(Submission submission, HttpServletRequest request, HttpServletResponse response) Handle an online submission, redirecting the response to the next page.- Parameters:
submission
- the submissionrequest
- the HTTP servlet requestresponse
- the HTTP servlet response
-