Class Dialog
- java.lang.Object
-
- org.symphonyoss.symphony.messageml.elements.Element
-
- org.symphonyoss.symphony.messageml.elements.Dialog
-
public class Dialog extends Element
This class represents the Symphony Element Dialog which is represented with tag name "dialog". The messageML representation of the dialog element can contain the following attributes:- id (required) -> used to identify the dialog
- width -> used to specify dialog width, must be among values "small", "medium", "large", "full-width". Default value is medium
- state -> used to specify dialog state, must be among values "open", "close". Default value is "close"
- title (required) -> used to specify dialog title, of type
DialogChild.Title - body (required) -> used to specify dialog body, of type
DialogChild.Body - footer -> used to specify dialog footer, of type
DialogChild.Footer
-
-
Field Summary
Fields Modifier and Type Field Description static List<String>ALLOWED_STATE_VALUESstatic List<String>ALLOWED_WIDTH_VALUESstatic StringCLOSE_STATEstatic StringMEDIUM_WIDTHstatic StringMESSAGEML_TAGstatic StringSTATE_ATTRstatic StringWIDTH_ATTR-
Fields inherited from class org.symphonyoss.symphony.messageml.elements.Element
CLASS_ATTR, format, ID_ATTR, ID_MAX_LENGTH, MAPPER, STYLE_ATTR
-
-
Constructor Summary
Constructors Constructor Description Dialog(Element parent, FormatEnum format)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidasPresentationML(XmlPrintStream out, MessageMLContext context)protected voidbuildAttribute(MessageMLParser parser, Node item)StringgetPresentationMlIdAttribute()BooleanhasIdAttribute()Informs if the element has an "id" attribute.voidvalidate()-
Methods inherited from class org.symphonyoss.symphony.messageml.elements.Element
addChild, areNestedElementsAllowed, asText, buildAll, buildNode, checkIntegerAttribute, countChildrenOfType, countNonTextNodesInNodeList, findElements, findElements, findElements, getAttribute, getAttributes, getChild, getChildren, getFormat, getMessageMLTag, getParent, getPresentationMLTag, getStringAttribute, hasExactNumberOfChildren, putIntegerIfPresent, putOneIfPresent, putStringIfPresent, size, throwInvalidInputException
-
-
-
-
Field Detail
-
MESSAGEML_TAG
public static final String MESSAGEML_TAG
- See Also:
- Constant Field Values
-
STATE_ATTR
public static final String STATE_ATTR
- See Also:
- Constant Field Values
-
CLOSE_STATE
public static final String CLOSE_STATE
- See Also:
- Constant Field Values
-
WIDTH_ATTR
public static final String WIDTH_ATTR
- See Also:
- Constant Field Values
-
MEDIUM_WIDTH
public static final String MEDIUM_WIDTH
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Dialog
public Dialog(Element parent, FormatEnum format)
-
-
Method Detail
-
hasIdAttribute
public Boolean hasIdAttribute()
Description copied from class:ElementInforms if the element has an "id" attribute. The parser that builds all elements keeps track of all ids from the elements that have it, in order to ensure unique values.- Overrides:
hasIdAttributein classElement
-
buildAttribute
protected void buildAttribute(MessageMLParser parser, Node item) throws InvalidInputException
- Throws:
InvalidInputException
-
validate
public void validate() throws InvalidInputException- Throws:
InvalidInputException
-
asPresentationML
public void asPresentationML(XmlPrintStream out, MessageMLContext context)
-
getPresentationMlIdAttribute
public String getPresentationMlIdAttribute()
-
-