Class MessageML
- java.lang.Object
-
- org.symphonyoss.symphony.messageml.elements.Element
-
- org.symphonyoss.symphony.messageml.elements.MessageML
-
public class MessageML extends Element
Class representing a MessageML document (i.e. a message). A MessageML document tree is constructed through one of parse() methods inMessageMLContext.- Since:
- 3/27/17
- Author:
- lukasz
-
-
Field Summary
Fields Modifier and Type Field Description static StringMESSAGEML_TAGstatic StringMESSAGEML_VERSIONstatic StringPRESENTATIONML_TAG-
Fields inherited from class org.symphonyoss.symphony.messageml.elements.Element
CLASS_ATTR, format, ID_ATTR, STYLE_ATTR
-
-
Constructor Summary
Constructors Constructor Description MessageML(FormatEnum format, String version)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.fasterxml.jackson.databind.node.ObjectNodeasEntityJson(com.fasterxml.jackson.databind.node.ObjectNode parent)org.commonmark.node.DocumentasMarkdown()voidasPresentationML(XmlPrintStream out, MessageMLContext context)protected voidbuildAttribute(MessageMLParser parser, Node item)StringgetPresentationMLTag()Return the element's PresentationML tag.booleanisChime()Return whether this message is a chime.voidsetChime(boolean chime)Return whether this message is a chime.voidvalidate()-
Methods inherited from class org.symphonyoss.symphony.messageml.elements.Element
addChild, areNestedElementsAllowed, asText, buildAll, buildNode, countNonTextNodesInNodeList, findElements, findElements, findElements, getAttribute, getAttributes, getChild, getChildren, getFormat, getMessageMLTag, getParent, getStringAttribute, hasExactNumberOfChildren, hasIdAttribute, size, throwInvalidInputException
-
-
-
-
Field Detail
-
MESSAGEML_VERSION
public static final String MESSAGEML_VERSION
- See Also:
- Constant Field Values
-
MESSAGEML_TAG
public static final String MESSAGEML_TAG
- See Also:
- Constant Field Values
-
PRESENTATIONML_TAG
public static final String PRESENTATIONML_TAG
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MessageML
public MessageML(FormatEnum format, String version)
-
-
Method Detail
-
buildAttribute
protected void buildAttribute(MessageMLParser parser, Node item) throws InvalidInputException
- Throws:
InvalidInputException
-
asMarkdown
public org.commonmark.node.Document asMarkdown() throws InvalidInputException- Throws:
InvalidInputException
-
asPresentationML
public void asPresentationML(XmlPrintStream out, MessageMLContext context)
-
asEntityJson
public com.fasterxml.jackson.databind.node.ObjectNode asEntityJson(com.fasterxml.jackson.databind.node.ObjectNode parent)
-
validate
public void validate() throws InvalidInputException- Throws:
InvalidInputException
-
isChime
public boolean isChime()
Return whether this message is a chime.
-
setChime
public void setChime(boolean chime)
Return whether this message is a chime.
-
getPresentationMLTag
public String getPresentationMLTag()
Description copied from class:ElementReturn the element's PresentationML tag. By default is equals to MessageML tag, override when needed- Overrides:
getPresentationMLTagin classElement
-
-