Package de.xima.fc.form.common.models
Class AXItemPropertiesData
- java.lang.Object
-
- de.xima.fc.form.common.models.AXItemPropertiesData
-
- All Implemented Interfaces:
IXItemPropertiesData
,Serializable
- Direct Known Subclasses:
XItem
,XItemRenderData
public class AXItemPropertiesData extends Object implements IXItemPropertiesData
Stores all the properties (XPropertyEnum
) of a form item and offers methods to access these properties.- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected String
className
protected Map<String,XPropertyValue>
propertyMap
protected com.alibaba.fastjson.JSONObject
version
-
Constructor Summary
Constructors Constructor Description AXItemPropertiesData(Map<String,XPropertyValue> propertyMap)
Deprecated.AXItemPropertiesData(Map<String,XPropertyValue> propertyMap, com.alibaba.fastjson.JSONObject version)
Deprecated.This is an internal method meant only for sub classes.
-
Method Summary
-
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.IXItemPropertiesData
getAttributesEntries, getAttributeValue, hasAttribute, isOfType, isRepeated, isUploadMultiple, removeAttribute, setAttributeValue
-
-
-
-
Field Detail
-
className
protected String className
-
propertyMap
protected Map<String,XPropertyValue> propertyMap
-
version
protected com.alibaba.fastjson.JSONObject version
-
-
Constructor Detail
-
AXItemPropertiesData
@Deprecated public AXItemPropertiesData(Map<String,XPropertyValue> propertyMap, com.alibaba.fastjson.JSONObject version)
Deprecated.This is an internal method meant only for sub classes. This will be changed toprotected
.Creates a new item properties wrapper for the given property map.- Parameters:
propertyMap
- map of propertiesversion
- Version data of the form to which this item belongs.
-
AXItemPropertiesData
@Deprecated public AXItemPropertiesData(Map<String,XPropertyValue> propertyMap)
Deprecated.Creates a new item properties wrapper for the given property map.- Parameters:
propertyMap
- Map of properties
-
-
Method Detail
-
getPropertyMap
public Map<String,XPropertyValue> getPropertyMap()
- Specified by:
getPropertyMap
in interfaceIXItemPropertiesData
-
getClassName
public String getClassName()
- Specified by:
getClassName
in interfaceIXItemPropertiesData
- Returns:
- the className of an item XTextField, XPage etc.
-
setClassName
@Deprecated public void setClassName(String className)
Deprecated.Set the class name when creating an instance, don't mutate existing instances.- Parameters:
className
- of the renderer to be for an item XTextField, XPage etc.
-
put
public void put(String property, XPropertyValue xProperty)
Description copied from interface:IXItemPropertiesData
Sets the given property to the given value. If the property does not exist, it is created. If the value is null, the property is removed.- Specified by:
put
in interfaceIXItemPropertiesData
- Parameters:
property
- The name of the property to set.xProperty
- The new value of the property. Null will remove the property.
-
get
public XPropertyValue get(XPropertyEnum xPropertyEnum)
- Specified by:
get
in interfaceIXItemPropertiesData
- Parameters:
xPropertyEnum
- - get a property by XPropertyEnum- Returns:
- - a new XProperty if not exist
-
get
public XPropertyValue get(String property)
- Specified by:
get
in interfaceIXItemPropertiesData
- Parameters:
property
- - get a property by name- Returns:
- - a new XProperty if not exist
-
set
public void set(XPropertyEnum xPropertyEnum, Object value)
sets a property by XPropertyEnum- Parameters:
xPropertyEnum
- the enum of the propertyvalue
- the value of the property
-
set
public void set(String xPropertyName, Object value)
sets a property by name- Parameters:
xPropertyName
- the name of the propertyvalue
- the value of the property
-
getVersion
public com.alibaba.fastjson.JSONObject getVersion()
- Returns:
- The version object of the form to which this item belongs.
-
getSemver
public com.vdurmont.semver4j.Semver getSemver()
- Returns:
- The parsed sem-version of the form to which this item belongs. May not exist for old forms, in which case
0.0.0
is returned.
-
contains
public boolean contains(String property)
- Specified by:
contains
in interfaceIXItemPropertiesData
- Parameters:
property
- the name of the property- Returns:
- true if property exist
-
contains
public boolean contains(XPropertyEnum xPropertyEnum)
- Specified by:
contains
in interfaceIXItemPropertiesData
- Parameters:
xPropertyEnum
- the enum of the property- Returns:
- true if property exist
-
getId
public String getId()
- Specified by:
getId
in interfaceIXItemPropertiesData
- Returns:
- the string value for the property id
-
getName
public String getName()
- Specified by:
getName
in interfaceIXItemPropertiesData
- Returns:
- The
name
of this item.
-
getAlias
public String getAlias()
- Specified by:
getAlias
in interfaceIXItemPropertiesData
- Returns:
- The
alias
of this item.
-
getResolvedAlias
public String getResolvedAlias()
- Specified by:
getResolvedAlias
in interfaceIXItemPropertiesData
- Returns:
- The effective alias of this item, either the alias when not empty, or the name otherwise.
-
getAttributes
public com.alibaba.fastjson.JSONArray getAttributes()
Description copied from interface:IXItemPropertiesData
Gets a list of custom HTML attributes that should be added to the form element. SeeXPropertyEnum.attributes
.- Specified by:
getAttributes
in interfaceIXItemPropertiesData
- Returns:
- A list of custom HTML attributes.
-
getParentId
public String getParentId()
- Specified by:
getParentId
in interfaceIXItemPropertiesData
- Returns:
- id of parent element
-
getOptions
public com.alibaba.fastjson.JSONArray getOptions()
- Specified by:
getOptions
in interfaceIXItemPropertiesData
- Returns:
- JSONArray of property Option
-
getRequiredgroup
public String getRequiredgroup()
- Specified by:
getRequiredgroup
in interfaceIXItemPropertiesData
-
getDatatype
public String getDatatype()
- Specified by:
getDatatype
in interfaceIXItemPropertiesData
-
getMinvalue
public String getMinvalue()
- Specified by:
getMinvalue
in interfaceIXItemPropertiesData
-
getMaxvalue
public String getMaxvalue()
- Specified by:
getMaxvalue
in interfaceIXItemPropertiesData
-
getVrule
public String getVrule()
- Specified by:
getVrule
in interfaceIXItemPropertiesData
-
getMaxfilesize
public String getMaxfilesize()
- Specified by:
getMaxfilesize
in interfaceIXItemPropertiesData
-
getFileextension
public String getFileextension()
- Specified by:
getFileextension
in interfaceIXItemPropertiesData
-
getEquals
public String getEquals()
- Specified by:
getEquals
in interfaceIXItemPropertiesData
-
getRequiredif
public String getRequiredif()
- Specified by:
getRequiredif
in interfaceIXItemPropertiesData
-
getReadonlyif
public String getReadonlyif()
- Specified by:
getReadonlyif
in interfaceIXItemPropertiesData
-
getHiddenif
public String getHiddenif()
- Specified by:
getHiddenif
in interfaceIXItemPropertiesData
-
getRequiredifcomp
public String getRequiredifcomp()
- Specified by:
getRequiredifcomp
in interfaceIXItemPropertiesData
-
getRequiredifvalue
public String getRequiredifvalue()
- Specified by:
getRequiredifvalue
in interfaceIXItemPropertiesData
-
getReadonlyifcomp
public String getReadonlyifcomp()
- Specified by:
getReadonlyifcomp
in interfaceIXItemPropertiesData
-
getReadonlyifvalue
public String getReadonlyifvalue()
- Specified by:
getReadonlyifvalue
in interfaceIXItemPropertiesData
-
getHiddenifcomp
public String getHiddenifcomp()
- Specified by:
getHiddenifcomp
in interfaceIXItemPropertiesData
-
getHiddenifclear
public String getHiddenifclear()
- Specified by:
getHiddenifclear
in interfaceIXItemPropertiesData
-
getReadonlyifclear
public String getReadonlyifclear()
- Specified by:
getReadonlyifclear
in interfaceIXItemPropertiesData
-
getHiddenifvalue
public String getHiddenifvalue()
- Specified by:
getHiddenifvalue
in interfaceIXItemPropertiesData
-
getRequired
public boolean getRequired()
- Specified by:
getRequired
in interfaceIXItemPropertiesData
- Returns:
- true required equals 1
-
isValidateOnServerSide
public boolean isValidateOnServerSide()
- Specified by:
isValidateOnServerSide
in interfaceIXItemPropertiesData
- Returns:
true
ifXPropertyEnum.servervalidate
is set to1
.
-
isStatusdependent
public boolean isStatusdependent()
- Specified by:
isStatusdependent
in interfaceIXItemPropertiesData
- Returns:
- the statusdependent
-
isUsergrouppendent
public boolean isUsergrouppendent()
- Specified by:
isUsergrouppendent
in interfaceIXItemPropertiesData
- Returns:
- the usergrouppendent
-
isReadonlyStatusdependent
public boolean isReadonlyStatusdependent()
- Specified by:
isReadonlyStatusdependent
in interfaceIXItemPropertiesData
- Returns:
- the readonly statusdependent
-
isReadonlyUsergrouppendant
public boolean isReadonlyUsergrouppendant()
- Specified by:
isReadonlyUsergrouppendant
in interfaceIXItemPropertiesData
- Returns:
- the readonly usergrouppendant
-
-