Class EntryTypeDefaultDataService
- java.lang.Object
-
- fr.paris.lutece.plugins.forms.web.entrytype.EntryTypeDefaultDataService
-
- All Implemented Interfaces:
IEntryDataService
- Direct Known Subclasses:
EntryTypeFileDataService,EntryTypeIterableDataService
public class EntryTypeDefaultDataService extends java.lang.Object implements IEntryDataService
Default entry data service
-
-
Constructor Summary
Constructors Constructor Description EntryTypeDefaultDataService(java.lang.String strEntryServiceName)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FormQuestionResponsecreateResponseFromRequest(Question question, javax.servlet.http.HttpServletRequest request, boolean bValidateQuestion)Creates the response values from request for the given questionjava.lang.StringgetDataServiceName()booleanisResponseChanged(FormQuestionResponse responseReference, FormQuestionResponse responseNew)Tests if a response has changedvoidquestionMoved(javax.servlet.http.HttpServletRequest request, Question question, int nNewIterationNumber)Performs a treatment when the question is moved in front-officevoidquestionRemoved(javax.servlet.http.HttpServletRequest request, Question question)Performs a treatment when the question is removed in front-officejava.util.List<java.lang.String>responseToStrings(FormQuestionResponse formQuestionResponse)Extracts the responses from the specified form question response as a list ofStringobjectsvoidsave(FormQuestionResponse questionResponse)
-
-
-
Method Detail
-
getDataServiceName
public java.lang.String getDataServiceName()
- Specified by:
getDataServiceNamein interfaceIEntryDataService- Returns:
- the data service name
-
save
public void save(FormQuestionResponse questionResponse)
- Specified by:
savein interfaceIEntryDataService- Parameters:
questionResponse- the questionResponse to save
-
createResponseFromRequest
public FormQuestionResponse createResponseFromRequest(Question question, javax.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
public java.util.List<java.lang.String> responseToStrings(FormQuestionResponse formQuestionResponse)
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
public void questionRemoved(javax.servlet.http.HttpServletRequest request, Question question)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(javax.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
-
-