Package de.xima.fc.form.common.models
Class XValidationParams
- java.lang.Object
-
- de.xima.fc.form.common.models.XValidationParams
-
- All Implemented Interfaces:
IXBaseValidationParams
,IXValidationParams
,Serializable
public class XValidationParams extends Object implements IXValidationParams
Simple POJO implementation ofIXValidationParams
.- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description XValidationParams(List<String[]> values, Map<String,List<String[]>> valuesMap, IXItemPropertiesData xItemPropertiesData, IXFormRenderConfig formRenderConfig, Map<Serializable,Serializable> frqSessionAttributes, long clientId)
Creates a new params object with the given data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getClientId()
Map<String,List<String[]>>
getFieldValuesMap()
IXFormRenderConfig
getFormRenderConfig()
Map<Serializable,Serializable>
getFRQSessionAttributes()
String
getI18nValue(String i18nKey)
List<String[]>
getValues()
List<String[]>
getValues(String key)
IXItemPropertiesData
getXItemPropertiesData()
boolean
isValuesEmpty(List<String[]> values)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.xima.fc.form.common.models.IXBaseValidationParams
getClientId, getFieldValuesMap, getFormRenderConfig, getFRQSessionAttributes, getI18nValue, getLocale, getValues, isValuesEmpty
-
-
-
-
Constructor Detail
-
XValidationParams
public XValidationParams(List<String[]> values, Map<String,List<String[]>> valuesMap, IXItemPropertiesData xItemPropertiesData, IXFormRenderConfig formRenderConfig, Map<Serializable,Serializable> frqSessionAttributes, long clientId)
Creates a new params object with the given data.- Parameters:
values
- The value forIXValidationParams.getValues()
.valuesMap
- The value forIXBaseValidationParams.getFieldValuesMap()
.xItemPropertiesData
- The value forIXValidationParams.getXItemPropertiesData()
.formRenderConfig
- The value forIXBaseValidationParams.getFormRenderConfig()
.frqSessionAttributes
- The value forIXBaseValidationParams.getFRQSessionAttributes()
.clientId
- The value forIXBaseValidationParams.getClientId()
.
-
-
Method Detail
-
getValues
public List<String[]> getValues()
- Specified by:
getValues
in interfaceIXValidationParams
- Returns:
- The values that were submitted for this form item.
-
getXItemPropertiesData
public IXItemPropertiesData getXItemPropertiesData()
- Specified by:
getXItemPropertiesData
in interfaceIXValidationParams
- Returns:
- A wrapper object for accessing the properties (
XPropertyEnum
) of the form item to validate.
-
getI18nValue
public String getI18nValue(String i18nKey)
- Specified by:
getI18nValue
in interfaceIXBaseValidationParams
- Parameters:
i18nKey
- I18n key for the localized message.- Returns:
- The localized message for the given key, retrieved from the built-in resource bundle. Plugin resource bundles are not considered.
-
getClientId
public long getClientId()
- Specified by:
getClientId
in interfaceIXBaseValidationParams
- Returns:
- The ID of the current client to which the form belongs.
-
getFieldValuesMap
public Map<String,List<String[]>> getFieldValuesMap()
- Specified by:
getFieldValuesMap
in interfaceIXBaseValidationParams
- Returns:
- A map with all values that were submitted. The key is the name of a form field.
-
getFormRenderConfig
public IXFormRenderConfig getFormRenderConfig()
- Specified by:
getFormRenderConfig
in interfaceIXBaseValidationParams
- Returns:
- The current form render config for accessing the global configuration of the validation process.
-
getValues
public List<String[]> getValues(String key)
- Specified by:
getValues
in interfaceIXBaseValidationParams
-
getFRQSessionAttributes
public Map<Serializable,Serializable> getFRQSessionAttributes()
- Specified by:
getFRQSessionAttributes
in interfaceIXBaseValidationParams
- Returns:
- All attributes from the current form request session.
-
isValuesEmpty
public boolean isValuesEmpty(List<String[]> values)
- Specified by:
isValuesEmpty
in interfaceIXBaseValidationParams
- Parameters:
values
- List of values of a form field.- Returns:
true
if the values are all empty, orfalse
otherwise.
-
-