public abstract class ASaveFormData extends Object implements IFormDataAdapter
Modifier and Type | Field and Description |
---|---|
protected Map<String,String> |
aliasFieldMap
Reverses Mapping zwischen Alias und Feldname
|
protected Map<String,FormContainerMetaData> |
dynContainerMap |
protected HashSet<String> |
dynFieldSet
A collection that contains all form elements that are repeated elements (dynamic).
|
protected Map<String,String> |
fieldAliasMap |
protected Map<String,FormContainerMetaData> |
fieldContainerMap |
protected Map<String,FormFieldMetaData> |
fieldMetaDataMap |
protected Map<String,List<String>> |
fieldNotesRead |
protected Map<String,List<String>> |
fieldNotesUnread |
protected Map<String,List<String[]>> |
fieldValuesMap
Deprecated Veraltet, da dynamische Elemente nicht verarbeitet werden. |
protected Map<String,String> |
metaDataMap |
protected Map<String,List<String>> |
requestDataMap |
protected Set<String> |
sendElements |
Constructor and Description |
---|
ASaveFormData() |
Modifier and Type | Method and Description |
---|---|
void |
addMultiValue(String fieldName,
List<String[]> values)
Adds the given values to the values of the form element.
|
void |
addSingleValue(String fieldName,
String... value)
Adds the given values to the values of the form element.
|
Object |
aliasValue(String alias) |
String |
asStringValue(List<String[]> value) |
String |
asStringValue(String[] value) |
Map<String,String> |
getAliasFieldMap() |
Map<String,FormContainerMetaData> |
getDynContainerMap() |
HashSet<String> |
getDynFieldSet() |
Set<String> |
getFieldAlias() |
Map<String,String> |
getFieldAliasMap() |
FormFieldMetaData |
getFieldMetaData(String identifier,
boolean asAlias)
Ermittelt die MetaDaten eines Feldes
|
Map<String,FormFieldMetaData> |
getFieldMetaDataMap() |
Map<String,List<String>> |
getFieldNotesRead() |
Map<String,List<String>> |
getFieldNotesUnread() |
Set<String> |
getFields() |
EFormFieldTyp |
getFieldTyp(String identifier,
boolean asAlias) |
List<String[]> |
getFieldValues(String fieldName) |
Map<String,List<String[]>> |
getFieldValuesMap() |
IFieldMetaData |
getIFieldMetaData(String identifier,
boolean asAlias) |
Map<String,String> |
getMetaDataMap() |
String |
getNormName(String fieldName)
For each element, a name is defined in the designer.
|
Map<String,List<String>> |
getRequestDataMap() |
String |
getStringValue(String fieldName)
Each form element may have multiple values.
|
boolean |
hasAlias(String alias)
Ermittelt ob der Alias existiert
|
boolean |
hasField(String fieldName)
ERSTMAL: Liefert
true , wenn das Formular ein Feld mit dem übergebenen Namen besitzt. |
boolean |
isElementLooped(String elemName)
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.
|
int |
loopCount(String elemName)
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.
|
String[] |
normalizeValue(List<String> value) |
String[] |
normalizeValue(String... value) |
List<String[]> |
normalizeValues(List<String> stringList) |
String |
resolveAliasName(String alias) |
protected String |
resolveDynValueName(String fieldName,
Integer index) |
String |
resolveFieldAlias(String alias) |
String |
resolveFieldName(String fieldName) |
EFormFieldTyp |
resolveFieldType(String fieldName,
boolean asAlias) |
protected void |
updateContainerElements(FormContainerMetaData container) |
protected void |
updateValuesMap(FormContainerMetaData container,
String elementName,
List<String> value,
int index) |
boolean |
valuesMapHasValue(String fieldName) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addRequestValue, getSendElements, init, init, mergeRequestData
protected final Map<String,String> aliasFieldMap
protected final Map<String,FormFieldMetaData> fieldMetaDataMap
protected final Map<String,FormContainerMetaData> fieldContainerMap
protected final Map<String,List<String[]>> fieldValuesMap
Deprecated
Veraltet, da dynamische Elemente nicht verarbeitet werden. Nutze stattdessen die
fieldValuesMap
protected final Map<String,FormContainerMetaData> dynContainerMap
protected final HashSet<String> dynFieldSet
public boolean valuesMapHasValue(String fieldName)
valuesMapHasValue
in interface IFormDataAdapter
public String resolveFieldAlias(String alias)
resolveFieldAlias
in interface IFormDataAdapter
public String resolveFieldName(String fieldName)
resolveFieldName
in interface IFormDataAdapter
public EFormFieldTyp getFieldTyp(String identifier, boolean asAlias)
getFieldTyp
in interface IFormDataAdapter
identifier
- The name of a form element.asAlias
- If true
, interpret the given identifier as the alias name of the form element. If
false
, interpret the given identifier as the name of the form element.null
when the given element does not exist.public Set<String> getFieldAlias()
getFieldAlias
in interface IFormDataAdapter
Set
consisting of the alias names of all existing form elements.public FormFieldMetaData getFieldMetaData(String identifier, boolean asAlias)
getFieldMetaData
in interface IFormDataAdapter
identifier
- Feld-IdentifierasAlias
- Bestimmt, ob der FeldIdentifier ein Alias ist oder nichtFormFieldMetaData
public IFieldMetaData getIFieldMetaData(String identifier, boolean asAlias)
getIFieldMetaData
in interface IFormDataAdapter
public boolean isElementLooped(String elemName)
isElementLooped
in interface IFormDataAdapter
elemName
- The name of a form element to check.true
if the form element is a repeated element, false
otherwise (or if the given element
does not exist).public int loopCount(String elemName)
loopCount
in interface IFormDataAdapter
elemName
- The name of a form element.0
in case the element is not a
repeated element.IFormDataAdapter.isElementLooped(String)
public Object aliasValue(String alias)
aliasValue
in interface IFormDataAdapter
public boolean hasAlias(String alias)
hasAlias
in interface IFormDataAdapter
alias
- An alias name to check.true
oder false
public boolean hasField(String fieldName)
true
, wenn das Formular ein Feld mit dem übergebenen Namen besitzt.hasField
in interface IFormDataAdapter
fieldName
- the field to check fortrue
, wenn das Formular ein Feld mit dem übergebenen Namen besitztpublic Map<String,String> getMetaDataMap()
getMetaDataMap
in interface IFormDataAdapter
public Map<String,List<String[]>> getFieldValuesMap()
getFieldValuesMap
in interface IFormDataAdapter
Map
that maps from the name of a form element to its values.public EFormFieldTyp resolveFieldType(String fieldName, boolean asAlias)
resolveFieldType
in interface IFormDataAdapter
public Map<String,String> getFieldAliasMap()
getFieldAliasMap
in interface IFormDataAdapter
Map
that maps from the name of a form elements to its alias name.IFormDataAdapter.getAliasFieldMap()
public Map<String,String> getAliasFieldMap()
getAliasFieldMap
in interface IFormDataAdapter
Map
that maps from the alias name of a form elements to its name.IFormDataAdapter.getFieldAliasMap()
public Map<String,FormFieldMetaData> getFieldMetaDataMap()
getFieldMetaDataMap
in interface IFormDataAdapter
public Map<String,FormContainerMetaData> getDynContainerMap()
getDynContainerMap
in interface IFormDataAdapter
public HashSet<String> getDynFieldSet()
getDynFieldSet
in interface IFormDataAdapter
Set
that consists of the names of all form elements which are repeated containers (and are not
form elements).IFormDataAdapter.isElementLooped(String)
,
IFormDataAdapter.getDynContainerMap()
public List<String[]> getFieldValues(String fieldName)
getFieldValues
in interface IFormDataAdapter
fieldName
- The name of a form element.List
of all values for the given form element, or null
if the given form element does not
exist.public String resolveAliasName(String alias)
resolveAliasName
in interface IFormDataAdapter
alias
- The alias of a form element.IFormDataAdapter.hasAlias(String)
public String getStringValue(String fieldName)
IFormDataAdapter
getStringValue
in interface IFormDataAdapter
fieldName
- The name of a form element.public String[] normalizeValue(String... value)
normalizeValue
in interface IFormDataAdapter
value
- A list of values.null
was given.public String[] normalizeValue(List<String> value)
normalizeValue
in interface IFormDataAdapter
value
- A List
of values.null
was given.public List<String[]> normalizeValues(List<String> stringList)
normalizeValues
in interface IFormDataAdapter
stringList
- A list of values.List
with only a single entry, an array containing the given values.public Map<String,List<String>> getFieldNotesRead()
getFieldNotesRead
in interface IFormDataAdapter
public Map<String,List<String>> getFieldNotesUnread()
getFieldNotesUnread
in interface IFormDataAdapter
protected void updateValuesMap(FormContainerMetaData container, String elementName, List<String> value, int index)
protected void updateContainerElements(FormContainerMetaData container)
public String getNormName(String fieldName)
IFormDataAdapter
getNormName
in interface IFormDataAdapter
fieldName
- A form element that may contain suffixes such as the suffix for repeated elements.public String asStringValue(List<String[]> value)
asStringValue
in interface IFormDataAdapter
value
- A List
of values to be converted.null
or no values were given.public String asStringValue(String[] value)
asStringValue
in interface IFormDataAdapter
value
- An array of values to be converted.null
or no values were given.public Map<String,List<String>> getRequestDataMap()
getRequestDataMap
in interface IFormDataAdapter
public void addSingleValue(String fieldName, String... value)
IFormDataAdapter
List
of arrays of
String
s, this adds the given values to the first entry in the List
of values.addSingleValue
in interface IFormDataAdapter
fieldName
- The name of a form element.value
- One or multiple values to add for the given element.IFormDataAdapter.addMultiValue(String, List)
public void addMultiValue(String fieldName, List<String[]> values)
IFormDataAdapter
addMultiValue
in interface IFormDataAdapter
fieldName
- The name of a form element.values
- A List
of values to add to the form element.IFormDataAdapter.addSingleValue(String, String...)
public Set<String> getFields()
getFields
in interface IFormDataAdapter
Copyright © 2020 XIMA MEDIA GmbH. All rights reserved.