Class EntryTypeDefaultDataService
java.lang.Object
fr.paris.lutece.plugins.forms.web.entrytype.EntryTypeDefaultDataService
- All Implemented Interfaces:
IEntryDataService
- Direct Known Subclasses:
EntryTypeFileDataService,EntryTypeIterableDataService
Default entry data service
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateResponseFromRequest(Question question, jakarta.servlet.http.HttpServletRequest request, boolean bValidateQuestion) Creates the response values from request for the given questionbooleanisResponseChanged(FormQuestionResponse responseReference, FormQuestionResponse responseNew) Tests if a response has changedvoidquestionMoved(jakarta.servlet.http.HttpServletRequest request, Question question, int nNewIterationNumber) Performs a treatment when the question is moved in front-officevoidquestionRemoved(jakarta.servlet.http.HttpServletRequest request, Question question) Performs a treatment when the question is removed in front-officeresponseToStrings(FormQuestionResponse formQuestionResponse) Extracts the responses from the specified form question response as a list ofStringobjectsvoidsave(FormQuestionResponse questionResponse)
-
Constructor Details
-
EntryTypeDefaultDataService
Constructor- Parameters:
strEntryServiceName- the service name
-
-
Method Details
-
getDataServiceName
- Specified by:
getDataServiceNamein interfaceIEntryDataService- Returns:
- the data service name
-
save
- Specified by:
savein interfaceIEntryDataService- Parameters:
questionResponse- the questionResponse to save
-
createResponseFromRequest
public FormQuestionResponse createResponseFromRequest(Question question, jakarta.servlet.http.HttpServletRequest request, boolean bValidateQuestion) Creates the response values from request for the given question- Specified by:
createResponseFromRequestin interfaceIEntryDataService- Parameters:
question- the question torequest- The Http requestbValidateQuestion- the boolean to validate question- Returns:
- The response to the question
-
isResponseChanged
public boolean isResponseChanged(FormQuestionResponse responseReference, FormQuestionResponse responseNew) Tests if a response has changed- Specified by:
isResponseChangedin interfaceIEntryDataService- Parameters:
responseReference- the reference responseresponseNew- the new response- Returns:
trueif the response has changed,falseotherwise
-
responseToStrings
Extracts the responses from the specified form question response as a list ofStringobjects- Specified by:
responseToStringsin interfaceIEntryDataService- Parameters:
formQuestionResponse- the response to convert- Returns:
- the list of
Stringobjects
-
questionRemoved
Performs a treatment when the question is removed in front-office- Specified by:
questionRemovedin interfaceIEntryDataService- Parameters:
request- the requestquestion- the removed question
-
questionMoved
public void questionMoved(jakarta.servlet.http.HttpServletRequest request, Question question, int nNewIterationNumber) Performs a treatment when the question is moved in front-office- Specified by:
questionMovedin interfaceIEntryDataService- Parameters:
request- the requestquestion- the moved questionnNewIterationNumber- the new iteration number
-