Interface SplittableElement
-
- All Known Subinterfaces:
LabelableElement,TooltipableElement
- All Known Implementing Classes:
Checkbox,DatePicker,PersonSelector,Radio,Select,TextArea,TextField,TimePicker,TimezonePicker
public interface SplittableElement- Author:
- enrico.molino (24/06/2020)
This interface is used internally by the extending ones
LabelableElementTooltipableElementIt is used by all element interfaces that require, during the conversion MessageML to PresentationML, to generate multiple elements starting by a single one. BEWARE: dont implement this interface, instead implement children interfaces E.g.:value to:1 value
-
-
Field Summary
Fields Modifier and Type Field Description static StringPRESENTATIONML_DIV_FLAG
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidfillAttributes(MessageMLParser parser, Node item)Fill thisElementmap attributes, used internally during parsing Normally, you dont need to override the default methoddefault voidfillAttributes(MessageMLParser parser, Node item, Map<String,String> attributes)Fill map attributes passed as parameter, used internally during parsing Normally, you dont need to override the default methodStringgetAttribute(String attr)Normally implemented by the rootElementimplementing this interfaceMap<String,String>getAttributes()Normally implemented by the rootElementimplementing this interfacedefault StringgetElementId()StringgetStringAttribute(Node attribute)Normally implemented by the rootElementimplementing this interfacedefault booleanisSplittable()default booleanisSplittableNodeComponent(Node item)Check if the current PresentationML node is part of SplittableElement Normally, you dont need to override the default methoddefault StringsplittableAsPresentationML(XmlPrintStream out, MessageMLContext context)Convert the splittable elements (MessageML -> PresentationML).default Set<String>splittableRemove()default voidvalidateSplittable()Validate all splittable elements present Normally, you dont need to override the default method
-
-
-
Field Detail
-
PRESENTATIONML_DIV_FLAG
static final String PRESENTATIONML_DIV_FLAG
- See Also:
- Constant Field Values
-
-
Method Detail
-
splittableAsPresentationML
default String splittableAsPresentationML(XmlPrintStream out, MessageMLContext context)
Convert the splittable elements (MessageML -> PresentationML). It opens also ablock, don't forget to close it by callingXmlPrintStream.closeElement()Normally, you dont need to override the default method- Returns:
- the unique id generated
-
splittableRemove
default Set<String> splittableRemove()
- Returns:
- attributes that should not present in PresentationML main element Normally, you dont need to override the default method
-
isSplittableNodeComponent
default boolean isSplittableNodeComponent(Node item)
Check if the current PresentationML node is part of SplittableElement Normally, you dont need to override the default method
-
validateSplittable
default void validateSplittable() throws InvalidInputExceptionValidate all splittable elements present Normally, you dont need to override the default method- Throws:
InvalidInputException
-
isSplittable
default boolean isSplittable()
- Returns:
- true if any splittable element exists Normally, you dont need to override the default method
-
getElementId
default String getElementId()
- Returns:
- the name used to build unique element id
-
fillAttributes
default void fillAttributes(MessageMLParser parser, Node item, Map<String,String> attributes) throws InvalidInputException
Fill map attributes passed as parameter, used internally during parsing Normally, you dont need to override the default method- Throws:
InvalidInputException
-
fillAttributes
default void fillAttributes(MessageMLParser parser, Node item) throws InvalidInputException
Fill thisElementmap attributes, used internally during parsing Normally, you dont need to override the default method- Throws:
InvalidInputException
-
getAttribute
String getAttribute(String attr)
Normally implemented by the rootElementimplementing this interface
-
getAttributes
Map<String,String> getAttributes()
Normally implemented by the rootElementimplementing this interface
-
-