Interface FormProcessorInterface

All Known Implementing Classes:
FormEmailVerificationProcessor

public interface FormProcessorInterface
Defines the contract for custom processing hooks used by multistep forms. Implementations can validate data for individual steps, run post-step interceptors (e.g., send verification codes), and customize the final save process of the form.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    handleFormSave(String formName, FormSettingsEntity formSettings, Integer iLastDocId, javax.servlet.http.HttpServletRequest request)
    Performs custom final save logic for the form.
    void
    runStepInterceptor(String formName, FormStepEntity stepEntity, org.json.JSONObject stepData, javax.servlet.http.HttpServletRequest request, Map<String,String> errors)
    Executes an optional interceptor after a step is submitted, for example sending a verification code to email or SMS.
    void
    validateStep(String formName, FormStepEntity stepEntity, org.json.JSONObject stepData, javax.servlet.http.HttpServletRequest request, Map<String,String> errors)
    Validates user-submitted data for a specific step of a multistep form.
  • Method Details

    • validateStep

      void validateStep(String formName, FormStepEntity stepEntity, org.json.JSONObject stepData, javax.servlet.http.HttpServletRequest request, Map<String,String> errors) throws SaveFormException
      Validates user-submitted data for a specific step of a multistep form.
      Parameters:
      formName - logical identifier of the form
      currentStepId - ID of the step being validated
      stepData - JSON payload containing the step fields and values
      request - current HTTP request for context and additional data
      errors - mutable map to collect field or general error messages (key → message)
      Throws:
      SaveFormException - when validation fails in a way that should stop processing
    • runStepInterceptor

      void runStepInterceptor(String formName, FormStepEntity stepEntity, org.json.JSONObject stepData, javax.servlet.http.HttpServletRequest request, Map<String,String> errors) throws SaveFormException
      Executes an optional interceptor after a step is submitted, for example sending a verification code to email or SMS.
      Parameters:
      formName - logical identifier of the form
      currentStepId - ID of the step that was submitted
      stepData - JSON payload containing the step fields and values
      request - current HTTP request for context and additional data
      errors - mutable map to collect error messages produced by the interceptor
      Throws:
      SaveFormException - to abort the flow when the interceptor detects blocking issues
    • handleFormSave

      boolean handleFormSave(String formName, FormSettingsEntity formSettings, Integer iLastDocId, javax.servlet.http.HttpServletRequest request) throws SaveFormException, IOException
      Performs custom final save logic for the form. The return value controls whether the default WebJET save mechanism is executed.
      Parameters:
      formName - logical identifier of the form
      formSettings - configuration of the form used during saving
      iLastDocId - last document ID (if any) associated with the submission
      request - current HTTP request for context and additional data
      Returns:
      true to continue with the default WebJET save; false to skip it
      Throws:
      SaveFormException - for functional errors during save
      IOException - for I/O related problems that occur during save