Class DataCollectionTableToSelectionNodeConverter
java.lang.Object
overit.geocallapp.wfm.core.bl.datacollection.converter.template.structure.node.DataCollectionNodeConverter
overit.geocallapp.wfm.core.bl.datacollection.converter.template.structure.node.DataCollectionComboboxToSelectionNodeConverter
overit.geocallapp.wfm.core.bl.datacollection.converter.template.structure.node.DataCollectionTableToSelectionNodeConverter
public class DataCollectionTableToSelectionNodeConverter
extends DataCollectionComboboxToSelectionNodeConverter
Convert an old Table node into a new Selection node.
- Since:
- 13.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected DataCollectionNodeConversionResultconvertBody(overit.geocallapp.wfm.survey.template.TemplateTree currentNode, DataCollectionNodeConversionResult conversionResult) Contains the logic to convert in Table node into aDataCollectionNodeSelection.protected List<DataCollectionNodeSelectionOption> getDataCollectionNodeSelectionOptions(overit.geocallapp.wfm.survey.template.TemplateTree currentNode) Reads all values in configured static view and create a list of “Option Group” where the static view key is the code and the static view format is the description.protected Map<String, LocalizedString> getOptionMap(StaticView svTable, String[] format, String staticViewFieldsSeparator) Returns a map containing for any StaticView key aLocalizedStringwith the corresponding value.Methods inherited from class overit.geocallapp.wfm.core.bl.datacollection.converter.template.structure.node.DataCollectionComboboxToSelectionNodeConverter
getDescriptionLangMap, getNodeType, setInitialValueMethods inherited from class overit.geocallapp.wfm.core.bl.datacollection.converter.template.structure.node.DataCollectionNodeConverter
convert, getDataCollectionNodeConversionResult, getLocalizedField, getLocalizedField, getStackTrace, initNode, loadDefaultFields
-
Constructor Details
-
DataCollectionTableToSelectionNodeConverter
public DataCollectionTableToSelectionNodeConverter()
-
-
Method Details
-
convertBody
protected DataCollectionNodeConversionResult convertBody(overit.geocallapp.wfm.survey.template.TemplateTree currentNode, DataCollectionNodeConversionResult conversionResult) throws DataCollectionInitialValueException Contains the logic to convert in Table node into aDataCollectionNodeSelection.- Overrides:
convertBodyin classDataCollectionComboboxToSelectionNodeConverter- Parameters:
currentNode- the old nodeconversionResult- theDataCollectionNodeConversionResultto populate- Returns:
- the conversion result
DataCollectionNodeConversionResult - Throws:
DataCollectionInitialValueException
-
getDataCollectionNodeSelectionOptions
protected List<DataCollectionNodeSelectionOption> getDataCollectionNodeSelectionOptions(overit.geocallapp.wfm.survey.template.TemplateTree currentNode) Reads all values in configured static view and create a list of “Option Group” where the static view key is the code and the static view format is the description.- Overrides:
getDataCollectionNodeSelectionOptionsin classDataCollectionComboboxToSelectionNodeConverter- Parameters:
currentNode- the old node- Returns:
- he List of
DataCollectionNodeSelectionOption
-
getOptionMap
protected Map<String,LocalizedString> getOptionMap(StaticView svTable, String[] format, String staticViewFieldsSeparator) Returns a map containing for any StaticView key aLocalizedStringwith the corresponding value.- Parameters:
svTable- theStaticViewformat- the StaticView keysstaticViewFieldsSeparator- the label separator- Returns:
- the mapping between key-LocalizedString value
-