Package com.avoka.fc.core.servlet
Class SubmissionTargetResolverImpl
- java.lang.Object
-
- com.avoka.fc.core.servlet.SubmissionTargetResolverImpl
-
- All Implemented Interfaces:
SubmissionTargetResolver
public class SubmissionTargetResolverImpl extends Object implements 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_ACTION_SIGNATURE, SUBMISSION_LINK_URL
-
-
Constructor Summary
Constructors Constructor Description SubmissionTargetResolverImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
handleOnlineSubmission(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.String
resolveErrorPath(HttpServletRequest request, SubmissionDataBean submissionData, Throwable error, ErrorLog errorLog)
Resolve an URL path if there is an error occurs during the form process.String
resolveFormExpiryPath(HttpServletRequest request, SubmissionDataBean submissionData)
Resolve an URL path if a form is expired.String
resolvePath(Submission submission)
Resolve a path given a http request and submission.String
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.
-
-
-
Method Detail
-
resolvePath
public String resolvePath(Submission submission)
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
public String resolvePath(HttpServletRequest request, Submission submission)
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:
SubmissionTargetResolver.resolvePath(HttpServletRequest, Submission)
-
resolveAction
public Map<String,String> resolveAction(HttpServletRequest request, Submission submission)
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:
SubmissionTargetResolver.resolveAction(javax.servlet.http.HttpServletRequest, com.avoka.fc.core.entity.Submission)
-
resolveFormExpiryPath
public String resolveFormExpiryPath(HttpServletRequest request, SubmissionDataBean submissionData)
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:
SubmissionTargetResolver.resolveFormExpiryPath(javax.servlet.http.HttpServletRequest, com.avoka.fc.core.service.SubmissionDataBean)
-
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:
SubmissionTargetResolver.resolveErrorPath(javax.servlet.http.HttpServletRequest, com.avoka.fc.core.service.SubmissionDataBean, java.lang.Throwable, com.avoka.fc.core.entity.ErrorLog)
-
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:
SubmissionTargetResolver.handleOnlineSubmission(Submission, HttpServletRequest, HttpServletResponse)
-
-