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 StringclassNameprotected Map<String,XPropertyValue>propertyMapprotected com.alibaba.fastjson.JSONObjectversion
-
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:
getPropertyMapin interfaceIXItemPropertiesData
-
getClassName
public String getClassName()
- Specified by:
getClassNamein 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:IXItemPropertiesDataSets 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:
putin 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:
getin interfaceIXItemPropertiesData- Parameters:
xPropertyEnum- - get a property by XPropertyEnum- Returns:
- - a new XProperty if not exist
-
get
public XPropertyValue get(String property)
- Specified by:
getin 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.0is returned.
-
contains
public boolean contains(String property)
- Specified by:
containsin interfaceIXItemPropertiesData- Parameters:
property- the name of the property- Returns:
- true if property exist
-
contains
public boolean contains(XPropertyEnum xPropertyEnum)
- Specified by:
containsin interfaceIXItemPropertiesData- Parameters:
xPropertyEnum- the enum of the property- Returns:
- true if property exist
-
getId
public String getId()
- Specified by:
getIdin interfaceIXItemPropertiesData- Returns:
- the string value for the property id
-
getName
public String getName()
- Specified by:
getNamein interfaceIXItemPropertiesData- Returns:
- The
nameof this item.
-
getAlias
public String getAlias()
- Specified by:
getAliasin interfaceIXItemPropertiesData- Returns:
- The
aliasof this item.
-
getResolvedAlias
public String getResolvedAlias()
- Specified by:
getResolvedAliasin 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:IXItemPropertiesDataGets a list of custom HTML attributes that should be added to the form element. SeeXPropertyEnum.attributes.- Specified by:
getAttributesin interfaceIXItemPropertiesData- Returns:
- A list of custom HTML attributes.
-
getParentId
public String getParentId()
- Specified by:
getParentIdin interfaceIXItemPropertiesData- Returns:
- id of parent element
-
getOptions
public com.alibaba.fastjson.JSONArray getOptions()
- Specified by:
getOptionsin interfaceIXItemPropertiesData- Returns:
- JSONArray of property Option
-
getRequiredgroup
public String getRequiredgroup()
- Specified by:
getRequiredgroupin interfaceIXItemPropertiesData
-
getDatatype
public String getDatatype()
- Specified by:
getDatatypein interfaceIXItemPropertiesData
-
getMinvalue
public String getMinvalue()
- Specified by:
getMinvaluein interfaceIXItemPropertiesData
-
getMaxvalue
public String getMaxvalue()
- Specified by:
getMaxvaluein interfaceIXItemPropertiesData
-
getVrule
public String getVrule()
- Specified by:
getVrulein interfaceIXItemPropertiesData
-
getMaxfilesize
public String getMaxfilesize()
- Specified by:
getMaxfilesizein interfaceIXItemPropertiesData
-
getFileextension
public String getFileextension()
- Specified by:
getFileextensionin interfaceIXItemPropertiesData
-
getEquals
public String getEquals()
- Specified by:
getEqualsin interfaceIXItemPropertiesData
-
getRequiredif
public String getRequiredif()
- Specified by:
getRequiredifin interfaceIXItemPropertiesData
-
getReadonlyif
public String getReadonlyif()
- Specified by:
getReadonlyifin interfaceIXItemPropertiesData
-
getHiddenif
public String getHiddenif()
- Specified by:
getHiddenifin interfaceIXItemPropertiesData
-
getRequiredifcomp
public String getRequiredifcomp()
- Specified by:
getRequiredifcompin interfaceIXItemPropertiesData
-
getRequiredifvalue
public String getRequiredifvalue()
- Specified by:
getRequiredifvaluein interfaceIXItemPropertiesData
-
getReadonlyifcomp
public String getReadonlyifcomp()
- Specified by:
getReadonlyifcompin interfaceIXItemPropertiesData
-
getReadonlyifvalue
public String getReadonlyifvalue()
- Specified by:
getReadonlyifvaluein interfaceIXItemPropertiesData
-
getHiddenifcomp
public String getHiddenifcomp()
- Specified by:
getHiddenifcompin interfaceIXItemPropertiesData
-
getHiddenifclear
public String getHiddenifclear()
- Specified by:
getHiddenifclearin interfaceIXItemPropertiesData
-
getReadonlyifclear
public String getReadonlyifclear()
- Specified by:
getReadonlyifclearin interfaceIXItemPropertiesData
-
getHiddenifvalue
public String getHiddenifvalue()
- Specified by:
getHiddenifvaluein interfaceIXItemPropertiesData
-
getRequired
public boolean getRequired()
- Specified by:
getRequiredin interfaceIXItemPropertiesData- Returns:
- true required equals 1
-
isValidateOnServerSide
public boolean isValidateOnServerSide()
- Specified by:
isValidateOnServerSidein interfaceIXItemPropertiesData- Returns:
trueifXPropertyEnum.servervalidateis set to1.
-
isStatusdependent
public boolean isStatusdependent()
- Specified by:
isStatusdependentin interfaceIXItemPropertiesData- Returns:
- the statusdependent
-
isUsergrouppendent
public boolean isUsergrouppendent()
- Specified by:
isUsergrouppendentin interfaceIXItemPropertiesData- Returns:
- the usergrouppendent
-
isReadonlyStatusdependent
public boolean isReadonlyStatusdependent()
- Specified by:
isReadonlyStatusdependentin interfaceIXItemPropertiesData- Returns:
- the readonly statusdependent
-
isReadonlyUsergrouppendant
public boolean isReadonlyUsergrouppendant()
- Specified by:
isReadonlyUsergrouppendantin interfaceIXItemPropertiesData- Returns:
- the readonly usergrouppendant
-
-