Package com.avoka.fc.core.servlet
Interface SubmissionTargetResolver
-
- All Known Implementing Classes:
SubmissionTargetResolverImpl
public interface SubmissionTargetResolverProvides 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
Fields Modifier and Type Field Description static StringSUBMISSION_ACTIONThe Constant SUBMISSION_ACTION.static StringSUBMISSION_ACTION_ASSIGNEDImplies that the next action is to review the saved formstatic StringSUBMISSION_ACTION_ATTACHMENTImplies that the next action is to add attachmentsstatic StringSUBMISSION_ACTION_AUTHENTICATIONImplies that the next action is to authenticatestatic StringSUBMISSION_ACTION_COMPLETEDImplies that the next action is to view the confirmation pagestatic StringSUBMISSION_ACTION_ERRORImplies that the next action is to view an error pagestatic StringSUBMISSION_ACTION_EXPIRYImplies that the form has expired and cannot be submittedstatic StringSUBMISSION_ACTION_PAYMENTImplies that the next action is to make paymentstatic StringSUBMISSION_ACTION_SAVEDImplies that the next action is to review the saved formstatic StringSUBMISSION_ACTION_SIGNATUREImplies that the next action is to sign the formstatic StringSUBMISSION_LINK_URLThe Constant SUBMISSION_LINK_URL.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidhandleOnlineSubmission(Submission submission, HttpServletRequest request, HttpServletResponse response)Handle an online submission, redirecting the response to the next page.Map<String,String>resolveAction(HttpServletRequest request, Submission submission)Resolve a submission action given a http request, a submission and its associated submission data bean.StringresolveErrorPath(HttpServletRequest request, SubmissionDataBean submissionData, Throwable error, ErrorLog errorLog)Resolve an URL path if there is an error occurs during the form process.StringresolveFormExpiryPath(HttpServletRequest request, SubmissionDataBean submissionData)Resolve an URL path if a form is expired.StringresolvePath(Submission submission)Resolve the next action path for the given submission.StringresolvePath(HttpServletRequest request, Submission submission)Resolve a path given a http request, a submission and its associated submission data bean.voidresolvePathAndRedirect(HttpServletRequest request, HttpServletResponse response, Submission submission)Resolve the next action path for the given submission and redirect to that target.
-
-
-
Field Detail
-
SUBMISSION_ACTION
static final String SUBMISSION_ACTION
The Constant SUBMISSION_ACTION.- See Also:
- Constant Field Values
-
SUBMISSION_LINK_URL
static final String SUBMISSION_LINK_URL
The Constant SUBMISSION_LINK_URL.- See Also:
- Constant Field Values
-
SUBMISSION_ACTION_ASSIGNED
static final String SUBMISSION_ACTION_ASSIGNED
Implies that the next action is to review the saved form- See Also:
- Constant Field Values
-
SUBMISSION_ACTION_SAVED
static final String SUBMISSION_ACTION_SAVED
Implies that the next action is to review the saved form- See Also:
- Constant Field Values
-
SUBMISSION_ACTION_ATTACHMENT
static final String SUBMISSION_ACTION_ATTACHMENT
Implies that the next action is to add attachments- See Also:
- Constant Field Values
-
SUBMISSION_ACTION_PAYMENT
static final String SUBMISSION_ACTION_PAYMENT
Implies that the next action is to make payment- See Also:
- Constant Field Values
-
SUBMISSION_ACTION_SIGNATURE
static final String SUBMISSION_ACTION_SIGNATURE
Implies that the next action is to sign the form- See Also:
- Constant Field Values
-
SUBMISSION_ACTION_AUTHENTICATION
static final String SUBMISSION_ACTION_AUTHENTICATION
Implies that the next action is to authenticate- See Also:
- Constant Field Values
-
SUBMISSION_ACTION_COMPLETED
static final String SUBMISSION_ACTION_COMPLETED
Implies that the next action is to view the confirmation page- See Also:
- Constant Field Values
-
SUBMISSION_ACTION_EXPIRY
static final String SUBMISSION_ACTION_EXPIRY
Implies that the form has expired and cannot be submitted- See Also:
- Constant Field Values
-
SUBMISSION_ACTION_ERROR
static final String SUBMISSION_ACTION_ERROR
Implies that the next action is to view an error page- See Also:
- Constant Field Values
-
-
Method Detail
-
resolvePath
String resolvePath(Submission submission)
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
String resolvePath(HttpServletRequest request, Submission submission)
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
Map<String,String> resolveAction(HttpServletRequest request, Submission submission)
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
String resolveFormExpiryPath(HttpServletRequest request, SubmissionDataBean submissionData)
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
-
-