Package de.xima.fc.mdl.savedata
Class ASaveFormData
- java.lang.Object
- 
- de.xima.fc.mdl.savedata.ASaveFormData
 
- 
- All Implemented Interfaces:
- IFormDataAdapter,- Serializable
 - Direct Known Subclasses:
- GenericSaveFormData
 
 public abstract class ASaveFormData extends Object implements IFormDataAdapter - Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected Map<String,String>aliasFieldMapReverses Mapping zwischen Alias und Feldnameprotected Map<String,FormContainerMetaData>dynContainerMapprotected HashSet<String>dynFieldSetA collection that contains all form elements that are repeated elements (dynamic).protected Map<String,String>fieldAliasMapprotected Map<String,FormContainerMetaData>fieldContainerMapprotected Map<String,FormFieldMetaData>fieldMetaDataMapprotected Map<String,List<String>>fieldNotesReadDeprecated.protected Map<String,List<String>>fieldNotesUnreadDeprecated.protected Map<String,List<String[]>>fieldValuesMapprotected Map<String,String>metaDataMapprotected Map<String,List<String>>requestDataMapprotected Set<String>sendElements
 - 
Constructor SummaryConstructors Constructor Description ASaveFormData()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddMultiValue(String fieldName, List<String[]> values)Adds the given values to the values of the form element.voidaddSingleValue(String fieldName, String... value)Adds the given values to the values of the form element.ObjectaliasValue(String alias)StringasStringValue(String[] value)StringasStringValue(List<String[]> value)Map<String,String>getAliasFieldMap()Map<String,FormContainerMetaData>getDynContainerMap()HashSet<String>getDynFieldSet()Set<String>getFieldAlias()Map<String,String>getFieldAliasMap()FormFieldMetaDatagetFieldMetaData(String identifier, boolean asAlias)Map<String,FormFieldMetaData>getFieldMetaDataMap()Map<String,List<String>>getFieldNotesRead()Deprecated.Map<String,List<String>>getFieldNotesUnread()Deprecated.Set<String>getFields()EFormFieldTypgetFieldTyp(String identifier, boolean asAlias)List<String[]>getFieldValues(String fieldName)Map<String,List<String[]>>getFieldValuesMap()IFieldMetaDatagetIFieldMetaData(String identifier, boolean asAlias)Map<String,String>getMetaDataMap()StringgetNormName(String fieldName)For each element, a name is defined in the designer.Map<String,List<String>>getRequestDataMap()StringgetStringValue(String fieldName)Each form element may have multiple values.booleanhasAlias(String alias)booleanhasField(String fieldName)ERSTMAL: Lieferttrue, wenn das Formular ein Feld mit dem übergebenen Namen besitzt.booleanisElementLooped(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.intloopCount(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(String... value)String[]normalizeValue(List<String> value)List<String[]>normalizeValues(List<String> stringList)StringresolveAliasName(String alias)protected StringresolveDynValueName(String fieldName, Integer index)StringresolveFieldAlias(String alias)StringresolveFieldName(String fieldName)EFormFieldTypresolveFieldType(String fieldName, boolean asAlias)protected voidupdateContainerElements(FormContainerMetaData container)protected voidupdateValuesMap(FormContainerMetaData container, String elementName, List<String> value, int index)booleanvaluesMapHasValue(String fieldName)- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface de.xima.fc.interfaces.form.IFormDataAdapteraddRequestValue, createCompleteDynContainerMap, getSendElements, init, init, init, init, mergeRequestData
 
- 
 
- 
- 
- 
Field Detail- 
aliasFieldMapprotected final Map<String,String> aliasFieldMap Reverses Mapping zwischen Alias und Feldname
 - 
fieldMetaDataMapprotected final Map<String,FormFieldMetaData> fieldMetaDataMap 
 - 
fieldContainerMapprotected final Map<String,FormContainerMetaData> fieldContainerMap 
 - 
dynContainerMapprotected final Map<String,FormContainerMetaData> dynContainerMap 
 - 
dynFieldSetprotected final HashSet<String> dynFieldSet A collection that contains all form elements that are repeated elements (dynamic).
 - 
fieldNotesRead@Deprecated protected final Map<String,List<String>> fieldNotesRead Deprecated.
 - 
fieldNotesUnread@Deprecated protected final Map<String,List<String>> fieldNotesUnread Deprecated.
 
- 
 - 
Method Detail- 
valuesMapHasValuepublic boolean valuesMapHasValue(String fieldName) - Specified by:
- valuesMapHasValuein interface- IFormDataAdapter
 
 - 
resolveFieldAliaspublic String resolveFieldAlias(String alias) - Specified by:
- resolveFieldAliasin interface- IFormDataAdapter
 
 - 
resolveFieldNamepublic String resolveFieldName(String fieldName) - Specified by:
- resolveFieldNamein interface- IFormDataAdapter
 
 - 
getFieldTyppublic EFormFieldTyp getFieldTyp(String identifier, boolean asAlias) - Specified by:
- getFieldTypin interface- IFormDataAdapter
- Parameters:
- 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.
- Returns:
- The form field type for the given element; or nullwhen the given element does not exist.
 
 - 
getFieldAliaspublic Set<String> getFieldAlias() - Specified by:
- getFieldAliasin interface- IFormDataAdapter
- Returns:
- A Setconsisting of the alias names of all existing form elements.
 
 - 
getFieldMetaDatapublic FormFieldMetaData getFieldMetaData(String identifier, boolean asAlias) - Specified by:
- getFieldMetaDatain interface- IFormDataAdapter
 
 - 
getIFieldMetaDatapublic IFieldMetaData getIFieldMetaData(String identifier, boolean asAlias) - Specified by:
- getIFieldMetaDatain interface- IFormDataAdapter
 
 - 
isElementLoopedpublic boolean isElementLooped(String elemName) Description copied from interface:IFormDataAdapterA 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.- Specified by:
- isElementLoopedin interface- IFormDataAdapter
- Parameters:
- elemName- 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).
 
 - 
loopCountpublic int loopCount(String elemName) Description copied from interface:IFormDataAdapterA 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.- Specified by:
- loopCountin interface- IFormDataAdapter
- Parameters:
- elemName- 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:
- IFormDataAdapter.isElementLooped(String)
 
 - 
aliasValuepublic Object aliasValue(String alias) - Specified by:
- aliasValuein interface- IFormDataAdapter
 
 - 
hasAliaspublic boolean hasAlias(String alias) - Specified by:
- hasAliasin interface- IFormDataAdapter
- Parameters:
- alias- An alias name to check.
- Returns:
- trueif a form element with the given alias exists, or- falseotherwise.
 
 - 
hasFieldpublic boolean hasField(String fieldName) Description copied from interface:IFormDataAdapterERSTMAL: Lieferttrue, wenn das Formular ein Feld mit dem übergebenen Namen besitzt.- Specified by:
- hasFieldin interface- IFormDataAdapter
- Parameters:
- fieldName- the field to check for
- Returns:
- Liefert true, wenn das Formular ein Feld mit dem übergebenen Namen besitzt
 
 - 
getMetaDataMappublic Map<String,String> getMetaDataMap() - Specified by:
- getMetaDataMapin interface- IFormDataAdapter
 
 - 
getFieldValuesMappublic Map<String,List<String[]>> getFieldValuesMap() - Specified by:
- getFieldValuesMapin interface- IFormDataAdapter
- Returns:
- A Mapthat maps from the name of a form element to its values.
 
 - 
resolveFieldTypepublic EFormFieldTyp resolveFieldType(String fieldName, boolean asAlias) - Specified by:
- resolveFieldTypein interface- IFormDataAdapter
 
 - 
getFieldAliasMappublic Map<String,String> getFieldAliasMap() - Specified by:
- getFieldAliasMapin interface- IFormDataAdapter
- Returns:
- A Mapthat maps from the name of a form elements to its alias name.
- See Also:
- IFormDataAdapter.getAliasFieldMap()
 
 - 
getAliasFieldMappublic Map<String,String> getAliasFieldMap() - Specified by:
- getAliasFieldMapin interface- IFormDataAdapter
- Returns:
- A Mapthat maps from the alias name of a form elements to its name.
- See Also:
- IFormDataAdapter.getFieldAliasMap()
 
 - 
getFieldMetaDataMappublic Map<String,FormFieldMetaData> getFieldMetaDataMap() - Specified by:
- getFieldMetaDataMapin interface- IFormDataAdapter
 
 - 
getDynContainerMappublic Map<String,FormContainerMetaData> getDynContainerMap() - Specified by:
- getDynContainerMapin interface- IFormDataAdapter
 
 - 
getDynFieldSetpublic HashSet<String> getDynFieldSet() - Specified by:
- getDynFieldSetin interface- IFormDataAdapter
- Returns:
- A Setthat consists of the names of all form elements which are repeated containers (and are not form elements).
- See Also:
- IFormDataAdapter.isElementLooped(String),- IFormDataAdapter.getDynContainerMap()
 
 - 
getFieldValuespublic List<String[]> getFieldValues(String fieldName) - Specified by:
- getFieldValuesin interface- IFormDataAdapter
- Parameters:
- fieldName- The name of a form element.
- Returns:
- A Listof all values for the given form element, ornullif the given form element does not exist.
 
 - 
resolveAliasNamepublic String resolveAliasName(String alias) - Specified by:
- resolveAliasNamein interface- IFormDataAdapter
- Parameters:
- alias- The alias of a form element.
- Returns:
- The resolved alias, ie. the name of the form element with the given alias. Returns the given alias in case no form element with the given alias exists.
- See Also:
- IFormDataAdapter.hasAlias(String)
 
 - 
getStringValuepublic String getStringValue(String fieldName) Description copied from interface:IFormDataAdapterEach form element may have multiple values. This returns the first value.- Specified by:
- getStringValuein interface- IFormDataAdapter
- Parameters:
- fieldName- The name of a form element.
- Returns:
- The first value for the given form element, or the empty string when no value or the form element does not exist.
 
 - 
normalizeValuepublic String[] normalizeValue(String... value) - Specified by:
- normalizeValuein interface- IFormDataAdapter
- Parameters:
- value- A list of values.
- Returns:
- The given list of values, or an empty array in case nullwas given.
 
 - 
normalizeValuepublic String[] normalizeValue(List<String> value) - Specified by:
- normalizeValuein interface- IFormDataAdapter
- Parameters:
- value- A- Listof values.
- Returns:
- An array with the given values, or an empty array in case nullwas given.
 
 - 
normalizeValuespublic List<String[]> normalizeValues(List<String> stringList) - Specified by:
- normalizeValuesin interface- IFormDataAdapter
- Parameters:
- stringList- A list of values.
- Returns:
- A Listwith only a single entry, an array containing the given values.
 
 - 
getFieldNotesRead@Deprecated public Map<String,List<String>> getFieldNotesRead() Deprecated.- Specified by:
- getFieldNotesReadin interface- IFormDataAdapter
 
 - 
getFieldNotesUnread@Deprecated public Map<String,List<String>> getFieldNotesUnread() Deprecated.- Specified by:
- getFieldNotesUnreadin interface- IFormDataAdapter
 
 - 
updateValuesMapprotected void updateValuesMap(FormContainerMetaData container, String elementName, List<String> value, int index) 
 - 
updateContainerElementsprotected void updateContainerElements(FormContainerMetaData container) 
 - 
getNormNamepublic String getNormName(String fieldName) Description copied from interface:IFormDataAdapterFor 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.- Specified by:
- getNormNamein interface- IFormDataAdapter
- 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.
 
 - 
asStringValuepublic String asStringValue(List<String[]> value) - Specified by:
- asStringValuein interface- IFormDataAdapter
- Parameters:
- value- A- Listof values to be converted.
- Returns:
- The given values, joined with a comma; or the empty string in case nullor no values were given.
 
 - 
asStringValuepublic String asStringValue(String[] value) - Specified by:
- asStringValuein interface- IFormDataAdapter
- Parameters:
- value- An array of values to be converted.
- Returns:
- The given values, joined with a comma; or the empty string in case nullor no values were given.
 
 - 
getRequestDataMappublic Map<String,List<String>> getRequestDataMap() - Specified by:
- getRequestDataMapin interface- IFormDataAdapter
 
 - 
addSingleValuepublic void addSingleValue(String fieldName, String... value) Description copied from interface:IFormDataAdapterAdds 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.- Specified by:
- addSingleValuein interface- IFormDataAdapter
- Parameters:
- fieldName- The name of a form element.
- value- One or multiple values to add for the given element.
- See Also:
- IFormDataAdapter.addMultiValue(String, List)
 
 - 
addMultiValuepublic void addMultiValue(String fieldName, List<String[]> values) Description copied from interface:IFormDataAdapterAdds 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.- Specified by:
- addMultiValuein interface- IFormDataAdapter
- Parameters:
- fieldName- The name of a form element.
- values- A- Listof values to add to the form element.
- See Also:
- IFormDataAdapter.addSingleValue(String, String...)
 
 - 
getFieldspublic Set<String> getFields() - Specified by:
- getFieldsin interface- IFormDataAdapter
 
 
- 
 
-