Interface IFormDataAdapter
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
ASaveFormData, FormDataAdapterWrapper, GenericSaveFormData
Interface for form data. The
IFormDataAdapter encapsulates the submitted form data and provides several
utility methods for accessing and manipulating that data. This adapter is created before workflow processing starts
and is passed on to the individual workflow actions.- Author:
- XIMA MEDIA GmbH
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidaddMultiValue(String fieldName, List<String[]> values) Adds the given values to the values of the form element.voidaddRequestValue(String fieldName, List<String> values) default voidaddSingleValue(String fieldName, String... value) Adds the given values to the values of the form element.default ObjectaliasValue(String alias) default StringasStringValue(String[] value) default StringasStringValue(List<String[]> value) buildDatatableValuesMap(ITableTemplate<? extends ITableColumn> template) default Map<String, IFormContainerMetaData> default Map<String, FormContainerMetaData> Deprecated.Deprecated.UsegetDynFieldSets().default FormFieldMetaDatagetFieldMetaData(String identifier, boolean asAlias) Deprecated.default Map<String, FormFieldMetaData> Deprecated.Deprecated.Field notes do not exist anymore.Deprecated.Field notes do not exist anymore.default EFormFieldTypgetFieldTyp(String identifier, boolean asAlias) getFieldValues(String fieldName) default IFieldMetaDatagetIFieldMetaData(String identifier, boolean asAlias) default StringgetNormName(String fieldName) For each element, a name is defined in the designer.default StringgetStringValue(String fieldName) Each form element may have multiple values.default booleandefault booleanERSTMAL: Lieferttrue, wenn das Formular ein Feld mit dem übergebenen Namen besitzt.default voidDeprecated.Useinit(Map, Map).default voidDeprecated.Useinit(Map, Map, List).default voidinit(Map<String, List<String>> dataMap, Map<String, List<org.apache.commons.fileupload.FileItem>> uploadMap) voidinit(Map<String, List<String>> dataMap, Map<String, List<org.apache.commons.fileupload.FileItem>> uploadMap, List<String> sendElements) default booleanisElementLooped(String elementName) A repeated form element (also called dynamic or looped) is a form element of which the user can create multiple copies of as they fill out the form.booleanisQuestionElement(String elementName) intA repeated form element (also called dynamic or looped) is a form element of which the user can create multiple copies of as they fill out the form.voidmergeRequestData(Map<String, List<String>> oldData) default String[]normalizeValue(String... value) default String[]normalizeValue(List<String> value) normalizeValues(List<String> stringList) default StringresolveAliasName(String alias) default StringresolveFieldAlias(String alias) default StringresolveFieldName(String fieldName) default EFormFieldTypresolveFieldType(String fieldName, boolean asAlias) default booleanvaluesMapHasValue(String fieldName)
-
Method Details
-
init
Deprecated.Useinit(Map, Map).- Parameters:
dataMap- Map with form values (non uploads).
-
init
-
init
Deprecated.Useinit(Map, Map, List).- Parameters:
dataMap- Map with form values (non uploads).sendElements- Elements that were rendered.
-
init
-
resolveFieldAlias
-
resolveFieldName
-
getFieldTyp
- Parameters:
identifier- The name of a form element.asAlias- Iftrue, interpret the given identifier as the alias name of the form element. Iffalse, interpret the given identifier as the name of the form element.- Returns:
- The form field type for the given element; or
nullwhen the given element does not exist.
-
getFieldAlias
-
getFieldMetaData
Deprecated.- Parameters:
identifier- Identifier, either a name or alias.asAlias- Whether the identifier is a field name or a field alias.- Returns:
- The metadata for the given field.
-
aliasValue
-
hasAlias
- Parameters:
alias- An alias name to check.- Returns:
trueif a form element with the given alias exists, orfalseotherwise.
-
resolveFieldType
-
getFieldAliasMap
-
getAliasFieldMap
-
getFieldMetaDataMap
Deprecated.- Returns:
- A map with the metadata for each element. The key is the field name, e.g.
tf1
-
getIFieldMetaDataMap
Map<String, IFieldMetaData> getIFieldMetaDataMap() -
getDynContainerMap
Deprecated. -
getIDynContainerMap
Map<String, IFormContainerMetaData> getIDynContainerMap() -
getDynFieldSet
Deprecated.UsegetDynFieldSets().- Returns:
- A set that consists of the names of all form elements which are repeated and that have a value.
- See Also:
-
getDynFieldSets
-
getFieldNotesRead
Deprecated.Field notes do not exist anymore.Gets a map with notes for form fields that were already read by a user. The key is the name of the field, e.g.tf1.- Returns:
- Am map with all read field notes.
-
getFieldNotesUnread
Deprecated.Field notes do not exist anymore.Gets a map with notes for form fields that were not yet read by a user. The key is the name of the field, e.g.tf1.- Returns:
- Am map with all unread field notes.
-
getNormName
For each element, a name is defined in the designer. When the element is marked as a repeated elements, the created elements get a name that consists of the original name and a suffix. This method takes a name that may contain such a suffix and returns the original form element name.- Parameters:
fieldName- A form element that may contain suffixes such as the suffix for repeated elements.- Returns:
- The given name, normalized to the form element name as defined in the designer.
-
getSendElements
-
valuesMapHasValue
-
getStringValue
-
getRequestDataMap
-
mergeRequestData
-
getFieldValues
-
hasField
ERSTMAL: Lieferttrue, wenn das Formular ein Feld mit dem übergebenen Namen besitzt.- Parameters:
fieldName- the field to check for- Returns:
- Liefert
true, wenn das Formular ein Feld mit dem übergebenen Namen besitzt
-
getFieldValuesMap
-
buildDatatableValuesMap
-
isElementLooped
A repeated form element (also called dynamic or looped) is a form element of which the user can create multiple copies of as they fill out the form. This method checks whether the given form element is repeated.- Parameters:
elementName- The name of a form element to check.- Returns:
trueif the form element is a repeated element,falseotherwise (or if the given element does not exist).
-
isQuestionElement
-
loopCount
A repeated form element (also called dynamic or looped) is a form element of which the user can create multiple copies of as they fill out the form. This method returns how many copies were created.- Parameters:
elementName- The name of a form element.- Returns:
- The number of repetitions of the given repeated form element, or
0in case the element is not a repeated element. - See Also:
-
getMetaDataMap
-
resolveAliasName
-
getIFieldMetaData
-
asStringValue
-
asStringValue
-
addSingleValue
Adds the given values to the values of the form element. If one or multiple values exist already for the given form element, they are preserved. Please note that the value of a form element is aListof arrays ofStrings, this adds the given values to the first entry in theListof values.- Parameters:
fieldName- The name of a form element.value- One or multiple values to add for the given element.- See Also:
-
addMultiValue
Adds the given values to the values of the form element. If one or multiple values exist already for the given form element, they are preserved.- Parameters:
fieldName- The name of a form element.values- AListof values to add to the form element.- See Also:
-
addRequestValue
-
getFields
-
normalizeValue
-
normalizeValue
-
normalizeValues
-
createCompleteDynContainerMap
- Returns:
- Similar to the
getDynContainerMap(), but also contains a value for each valuable element (not container elements etc.) in each repeated container.
-
getIDynContainerMap()