Class FormResponseManager

java.lang.Object
fr.paris.lutece.plugins.forms.web.FormResponseManager

public class FormResponseManager extends Object
Class for breadcrumb management and responses history
  • Constructor Details

    • FormResponseManager

      public FormResponseManager(Form form)
      Constructor
      Parameters:
      form - the form
    • FormResponseManager

      public FormResponseManager(FormResponse formResponse)
      Constructor
      Parameters:
      formResponse - the form response
  • Method Details

    • getCurrentStep

      public Step getCurrentStep()
      Gives the current step
      Returns:
      the current step
    • getFormResponse

      public FormResponse getFormResponse()
      Gives the form response
      Returns:
      the form response
    • getFormResponseUpdateDate

      public Timestamp getFormResponseUpdateDate()
      Return the form Response update date
      Returns:
    • setFormResponseUpdateDate

      public void setFormResponseUpdateDate(Timestamp updateDate)
    • getIsBackupResponseAlreadyInitiated

      public Boolean getIsBackupResponseAlreadyInitiated()
      Give a boolean indicating that indicates if view (getViewStep) has been initialized from backup So with _isBackupResponseAlreadyInitiated and _bIsResponseLoadedFromBackup we can deduce if it's the first time the getViewStep is loaded with the backup response
      Returns:
      a boolean indicating that indicates if view has been initialized from backup
    • setBackupResponseAlreadyInitiated

      public void setBackupResponseAlreadyInitiated(Boolean isBackupResponseAlreadyInitiated)
    • getIsResponseLoadedFromBackup

      public Boolean getIsResponseLoadedFromBackup()
      Gives a boolean indicating if the response is loaded from backup
      Returns:
      a boolean indicating if the response is loaded from backup
    • setIsResponseLoadedFromBackup

      public void setIsResponseLoadedFromBackup(Boolean bIsResponseLoadedFromBackup)
    • add

      public void add(Step step)
      Adds the specified step
      Parameters:
      step - the step to add
    • goTo

      public Step goTo(int nStepIndex)
      Goes to the step of the specified index
      Parameters:
      nStepIndex - the step index
      Returns:
      the Step
    • findResponsesFor

      public List<FormQuestionResponse> findResponsesFor(Step step)
      Finds the responses for the specified step
      Parameters:
      step - the step
      Returns:
      the found responses
    • findAllResponses

      public List<FormQuestionResponse> findAllResponses()
      Finds all responses
      Returns:
      the found responses
    • addResponses

      public void addResponses(List<FormQuestionResponse> listFormQuestionResponse)
      Adds the specified responses
      Parameters:
      listFormQuestionResponse - the responses to add
    • popStep

      public Step popStep()
      Pops the last step
      Returns:
      the last step, or null if there no step to pop
    • getValidatedSteps

      public List<Step> getValidatedSteps()
      Gives the validated steps
      Returns:
      the validated steps
    • validateFormResponses

      public boolean validateFormResponses()
      Returns:
      the form validation result