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 Details

    • SUBMISSION_ACTION

      static final String SUBMISSION_ACTION
      The Constant SUBMISSION_ACTION.
      See Also:
    • SUBMISSION_ACTION_ASSIGNED

      static final String SUBMISSION_ACTION_ASSIGNED
      Implies that the next action is to review the saved form
      See Also:
    • SUBMISSION_ACTION_SAVED

      static final String SUBMISSION_ACTION_SAVED
      Implies that the next action is to review the saved form
      See Also:
    • SUBMISSION_ACTION_ATTACHMENT

      static final String SUBMISSION_ACTION_ATTACHMENT
      Implies that the next action is to add attachments
      See Also:
    • SUBMISSION_ACTION_PAYMENT

      static final String SUBMISSION_ACTION_PAYMENT
      Implies that the next action is to make payment
      See Also:
    • SUBMISSION_ACTION_AUTHENTICATION

      static final String SUBMISSION_ACTION_AUTHENTICATION
      Implies that the next action is to authenticate
      See Also:
    • SUBMISSION_ACTION_COMPLETED

      static final String SUBMISSION_ACTION_COMPLETED
      Implies that the next action is to view the confirmation page
      See Also:
    • SUBMISSION_ACTION_EXPIRY

      static final String SUBMISSION_ACTION_EXPIRY
      Implies that the form has expired and cannot be submitted
      See Also:
    • SUBMISSION_ACTION_ERROR

      static final String SUBMISSION_ACTION_ERROR
      Implies that the next action is to view an error page
      See Also:
  • Method Details

    • 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(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.
      Parameters:
      request - the http request
      response - the http response
      submission - the submission
    • resolvePath

      String resolvePath(jakarta.servlet.http.HttpServletRequest request, Submission submission)
      Resolve a path given a http request, a submission and its associated submission data bean.
      Parameters:
      request - the http request
      submission - the submission
      Returns:
      the url path
    • resolveAction

      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. The submission action string returned is one of the action constants defined in SubmissionTargetResolver, e.g. SUBMISSION_ACTION_ATTACHMENT
      Parameters:
      request - the http request
      submission - the submission
      Returns:
      a map containing entries for SUBMISSION_ACTION (the next action) and SUBMISSION_LINK_URL (a URL to the next page)
    • resolveFormExpiryPath

      String resolveFormExpiryPath(jakarta.servlet.http.HttpServletRequest request, SubmissionDataBean submissionData)
      Resolve an URL path if a form is expired.
      Parameters:
      request - the http request
      submissionData - the submission data bean
      Returns:
      the URL path
    • resolveErrorPath

      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.
      Parameters:
      request - the http request
      submissionData - the submission data bean
      error - the throwable error
      errorLog - the associated error log
      Returns:
      the URL path
    • handleOnlineSubmission

      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.
      Parameters:
      submission - the submission
      request - the HTTP servlet request
      response - the HTTP servlet response