Interface LabelableElement
-
- All Superinterfaces:
SplittableElement
- All Known Implementing Classes:
Checkbox,DatePicker,PersonSelector,Radio,RoomSelector,Select,TextArea,TextField,TimePicker,TimezonePicker
public interface LabelableElement extends SplittableElement
Interface to add label to elements Simply implement it into the element when you want to add label support Beware: If the element implementing this interface overridesElement.buildAttribute(org.symphonyoss.symphony.messageml.MessageMLParser, org.w3c.dom.Node)and/orElement.asPresentationML(XmlPrintStream out, MessageMLContext context)without calling super, it is needed to manage manually LABEL attribute andSplittableElement.splittableAsPresentationML(XmlPrintStream out, MessageMLContext context)method- Author:
- enrico.molino (10/06/2020)
-
-
Field Summary
Fields Modifier and Type Field Description static StringLABELstatic StringLABEL_FORstatic intLABEL_MAX_LENGTHstatic StringLABEL_TOO_LONG_ERR-
Fields inherited from interface org.symphonyoss.symphony.messageml.elements.SplittableElement
PRESENTATIONML_DIV_FLAG
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default Map<String,String>getLabelAttribute(String id)Used internally, normally you dont need to override the default methoddefault StringgetPresentationMLLabelTag()default booleanisLabel()default booleanisLabelNode(Node item)Check if the PresentationML node is a labeldefault voidvalidateLabel()Validate label max length, if present-
Methods inherited from interface org.symphonyoss.symphony.messageml.elements.SplittableElement
fillAttributes, fillAttributes, getAttribute, getAttributes, getElementId, getStringAttribute, isSplittable, isSplittableNodeComponent, splittableAsPresentationML, splittableRemove, validateSplittable
-
-
-
-
Field Detail
-
LABEL
static final String LABEL
- See Also:
- Constant Field Values
-
LABEL_FOR
static final String LABEL_FOR
- See Also:
- Constant Field Values
-
LABEL_MAX_LENGTH
static final int LABEL_MAX_LENGTH
- See Also:
- Constant Field Values
-
LABEL_TOO_LONG_ERR
static final String LABEL_TOO_LONG_ERR
- See Also:
- Constant Field Values
-
-
Method Detail
-
getPresentationMLLabelTag
default String getPresentationMLLabelTag()
- Returns:
- label tag. Normally you dont need to override the default method
-
getLabelAttribute
default Map<String,String> getLabelAttribute(String id)
Used internally, normally you dont need to override the default method- Parameters:
id- used to generate the unique element id- Returns:
-
isLabel
default boolean isLabel()
- Returns:
- true if label exists Normally, you dont need to override the default method
-
isLabelNode
default boolean isLabelNode(Node item)
Check if the PresentationML node is a label
-
validateLabel
default void validateLabel() throws InvalidInputExceptionValidate label max length, if present- Throws:
InvalidInputException
-
-