Package de.xima.fc.form.common.models
Interface IXItemPropertiesData
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
AXItemPropertiesData
,XItem
,XItemRenderData
public interface IXItemPropertiesData extends Serializable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description boolean
contains(XPropertyEnum xPropertyEnum)
boolean
contains(String property)
XPropertyValue
get(XPropertyEnum xPropertyEnum)
XPropertyValue
get(String property)
String
getAlias()
com.alibaba.fastjson.JSONArray
getAttributes()
Gets a list of custom HTML attributes that should be added to the form element.default Iterable<Map.Entry<String,String>>
getAttributesEntries()
Gets an iterable over the name and values of all custom attributes that should be added to the form element.default String
getAttributeValue(String name)
Gets the value of a custom attribute that should be added to the form element.String
getClassName()
String
getDatatype()
String
getEquals()
String
getFileextension()
String
getHiddenif()
String
getHiddenifclear()
String
getHiddenifcomp()
String
getHiddenifvalue()
String
getId()
String
getMaxfilesize()
String
getMaxvalue()
String
getMinvalue()
String
getName()
com.alibaba.fastjson.JSONArray
getOptions()
String
getParentId()
Map<String,XPropertyValue>
getPropertyMap()
String
getReadonlyif()
String
getReadonlyifclear()
String
getReadonlyifcomp()
String
getReadonlyifvalue()
boolean
getRequired()
String
getRequiredgroup()
String
getRequiredif()
String
getRequiredifcomp()
String
getRequiredifvalue()
String
getResolvedAlias()
String
getVrule()
default boolean
hasAttribute(String name)
Checks whether a custom HTML attribute with the given name exists, irrespective of its value.default boolean
isOfType(Class<? extends IXItemBasic> className)
Checks whether this item is of the given class.boolean
isReadonlyStatusdependent()
boolean
isReadonlyUsergrouppendant()
default boolean
isRepeated()
Checks whether this item is itself repeated, see alsoXPropertyEnum.dynamic
.boolean
isStatusdependent()
default boolean
isUploadMultiple()
Checks whether an upload allows multiple files for a single upload element.boolean
isUsergrouppendent()
boolean
isValidateOnServerSide()
default void
put(String property, XPropertyValue value)
Sets the given property to the given value.default String
removeAttribute(String name)
Removes a custom HTML attribute with the given name, irrespective of its value.default String
setAttributeValue(String name, String value)
sets the value of a custom attribute that should be added to the form element.
-
-
-
Method Detail
-
getPropertyMap
Map<String,XPropertyValue> getPropertyMap()
-
getClassName
String getClassName()
- Returns:
- the className of an item XTextField, XPage etc.
-
isOfType
default boolean isOfType(Class<? extends IXItemBasic> className)
Checks whether this item is of the given class. This is a convenience method that compares the class name of this item with the simple name of the given class.- Parameters:
className
- The class to compare this item to.- Returns:
- True if this item is an instance of the given element type, false otherwise.
-
get
XPropertyValue get(XPropertyEnum xPropertyEnum)
- Parameters:
xPropertyEnum
- - get a property by XPropertyEnum- Returns:
- - a new XProperty if not exist
-
get
XPropertyValue get(String property)
- Parameters:
property
- - get a property by name- Returns:
- - a new XProperty if not exist
-
contains
boolean contains(String property)
- Parameters:
property
- the name of the property- Returns:
- true if property exist
-
contains
boolean contains(XPropertyEnum xPropertyEnum)
- Parameters:
xPropertyEnum
- the enum of the property- Returns:
- true if property exist
-
getId
String getId()
- Returns:
- the string value for the property id
-
getResolvedAlias
String getResolvedAlias()
- Returns:
- The effective alias of this item, either the alias when not empty, or the name otherwise.
-
getAttributes
com.alibaba.fastjson.JSONArray getAttributes()
Gets a list of custom HTML attributes that should be added to the form element. SeeXPropertyEnum.attributes
.- Returns:
- A list of custom HTML attributes.
-
getAttributesEntries
default Iterable<Map.Entry<String,String>> getAttributesEntries()
Gets an iterable over the name and values of all custom attributes that should be added to the form element. SeeXPropertyEnum.attributes
. When an attribute exists, but has no or an empty value, the returned list contains an entry with the empty string as a value.- Returns:
- An iterable with name value pairs of all custom attributes, the key is the attribute name, the value is the attribute value.
-
getAttributeValue
default String getAttributeValue(String name)
Gets the value of a custom attribute that should be added to the form element. SeeXPropertyEnum.attributes
. Returns null when no such attribute was configured. Returns the empty string when an attribute with no value was configured.- Parameters:
name
- Name of the attribute to get.- Returns:
- Value of the attribute.
-
put
default void put(String property, XPropertyValue value)
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.- Parameters:
property
- The name of the property to set.value
- The new value of the property. Null will remove the property.
-
setAttributeValue
default String setAttributeValue(String name, String value)
sets the value of a custom attribute that should be added to the form element. SeeXPropertyEnum.attributes
. Passing null as the value is equivalent to callingremoveAttribute(String)
.- Parameters:
name
- Name of the attribute to set.value
- New value of the attribute. null will remove the attribute.- Returns:
- The old value of the attribute, same as if you had called
getAttributeValue(String)
beforehand.
-
removeAttribute
default String removeAttribute(String name)
Removes a custom HTML attribute with the given name, irrespective of its value. SeeXPropertyEnum.attributes
.- Parameters:
name
- Name of the attribute to remove.- Returns:
- The old value of the attribute, same as if you had called
getAttributeValue(String)
beforehand.
-
hasAttribute
default boolean hasAttribute(String name)
Checks whether a custom HTML attribute with the given name exists, irrespective of its value. SeeXPropertyEnum.attributes
. This method can be used e.g. for boolean attributes like "required", "readonly", or "multiple".- Parameters:
name
- Name of the attribute to check.- Returns:
- Whether an attribute with the given name exists.
-
isUploadMultiple
default boolean isUploadMultiple()
Checks whether an upload allows multiple files for a single upload element.- Returns:
- Whether the "multiple" attribute is set.
-
getParentId
String getParentId()
- Returns:
- id of parent element
-
getOptions
com.alibaba.fastjson.JSONArray getOptions()
- Returns:
- JSONArray of property Option
-
getRequiredgroup
String getRequiredgroup()
-
getDatatype
String getDatatype()
-
getMinvalue
String getMinvalue()
-
getMaxvalue
String getMaxvalue()
-
getVrule
String getVrule()
-
getMaxfilesize
String getMaxfilesize()
-
getFileextension
String getFileextension()
-
getEquals
String getEquals()
-
getRequiredif
String getRequiredif()
-
getReadonlyif
String getReadonlyif()
-
getHiddenif
String getHiddenif()
-
getRequiredifcomp
String getRequiredifcomp()
-
getRequiredifvalue
String getRequiredifvalue()
-
getReadonlyifcomp
String getReadonlyifcomp()
-
getReadonlyifvalue
String getReadonlyifvalue()
-
getHiddenifcomp
String getHiddenifcomp()
-
getHiddenifclear
String getHiddenifclear()
-
getReadonlyifclear
String getReadonlyifclear()
-
getHiddenifvalue
String getHiddenifvalue()
-
getRequired
boolean getRequired()
- Returns:
- true required equals 1
-
isValidateOnServerSide
boolean isValidateOnServerSide()
- Returns:
true
ifXPropertyEnum.servervalidate
is set to1
.
-
isStatusdependent
boolean isStatusdependent()
- Returns:
- the statusdependent
-
isUsergrouppendent
boolean isUsergrouppendent()
- Returns:
- the usergrouppendent
-
isRepeated
default boolean isRepeated()
Checks whether this item is itself repeated, see alsoXPropertyEnum.dynamic
. Note: This method only checks if the item is repeated, not whether it is inside a container that is repeated.- Returns:
- True if this item is repeated, false otherwise.
-
isReadonlyStatusdependent
boolean isReadonlyStatusdependent()
- Returns:
- the readonly statusdependent
-
isReadonlyUsergrouppendant
boolean isReadonlyUsergrouppendant()
- Returns:
- the readonly usergrouppendant
-
-