Class FormResponseManager
java.lang.Object
fr.paris.lutece.plugins.forms.web.FormResponseManager
Class for breadcrumb management and responses history
-
Constructor Summary
ConstructorsConstructorDescriptionFormResponseManager(Form form) ConstructorFormResponseManager(FormResponse formResponse) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the specified stepvoidaddResponses(List<FormQuestionResponse> listFormQuestionResponse) Adds the specified responsesFinds all responsesfindResponsesFor(Step step) Finds the responses for the specified stepGives the current stepGives the form responseReturn the form Response update dateGive 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 responseGives a boolean indicating if the response is loaded from backupGives the validated stepsgoTo(int nStepIndex) Goes to the step of the specified indexpopStep()Pops the last stepvoidsetBackupResponseAlreadyInitiated(Boolean isBackupResponseAlreadyInitiated) voidsetFormResponseUpdateDate(Timestamp updateDate) voidsetIsResponseLoadedFromBackup(Boolean bIsResponseLoadedFromBackup) boolean
-
Constructor Details
-
FormResponseManager
Constructor- Parameters:
form- the form
-
FormResponseManager
Constructor- Parameters:
formResponse- the form response
-
-
Method Details
-
getCurrentStep
Gives the current step- Returns:
- the current step
-
getFormResponse
Gives the form response- Returns:
- the form response
-
getFormResponseUpdateDate
Return the form Response update date- Returns:
-
setFormResponseUpdateDate
-
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
-
getIsResponseLoadedFromBackup
Gives a boolean indicating if the response is loaded from backup- Returns:
- a boolean indicating if the response is loaded from backup
-
setIsResponseLoadedFromBackup
-
add
Adds the specified step- Parameters:
step- the step to add
-
goTo
Goes to the step of the specified index- Parameters:
nStepIndex- the step index- Returns:
- the Step
-
findResponsesFor
Finds the responses for the specified step- Parameters:
step- the step- Returns:
- the found responses
-
findAllResponses
Finds all responses- Returns:
- the found responses
-
addResponses
Adds the specified responses- Parameters:
listFormQuestionResponse- the responses to add
-
popStep
Pops the last step- Returns:
- the last step, or
nullif there no step to pop
-
getValidatedSteps
Gives the validated steps- Returns:
- the validated steps
-
validateFormResponses
public boolean validateFormResponses()- Returns:
- the form validation result
-