public final class MessageBody extends ComplexProperty
| Constructor and Description |
|---|
MessageBody()
Initializes a new instance.
|
MessageBody(BodyType bodyType,
String text)
Initializes a new instance.
|
MessageBody(String text)
Initializes a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
BodyType |
getBodyType()
Gets the type of the message body's text.
|
static MessageBody |
getMessageBodyFromText(String textBody)
Defines an implicit conversation between a string and MessageBody.
|
static String |
getStringFromMessageBody(MessageBody messageBody)
Defines an implicit conversion of MessageBody into a string.
|
void |
readAttributesFromXml(EwsServiceXmlReader reader)
Reads attribute from XML.
|
void |
readTextValueFromXml(EwsServiceXmlReader reader)
Reads text value from XML.
|
void |
setBodyType(BodyType bodyType)
Sets the type of the message body's text.
|
void |
setText(String text)
Sets the text of the message body.
|
String |
toString()
Returns a String that represents the current Object.
|
void |
writeAttributesToXml(EwsServiceXmlWriter writer)
Writes attribute to XML.
|
void |
writeElementsToXml(EwsServiceXmlWriter writer)
Writes elements to XML.
|
addOnChangeEvent, canSetFieldValue, changed, clearChangeEvents, clearChangeLog, func, getNamespace, internalValidate, loadFromXml, loadFromXml, removeChangeEvent, setNamespace, tryReadElementFromXml, tryReadElementFromXmlToPatch, updateFromXml, updateFromXml, validate, writeToXml, writeToXmlpublic MessageBody()
public MessageBody(BodyType bodyType, String text)
bodyType - The type of the message body's text.text - The text of the message body.public MessageBody(String text)
text - The text of the message body, assumed to be HTML.public static MessageBody getMessageBodyFromText(String textBody)
textBody - The string to convert to MessageBody, assumed to be HTML.public static String getStringFromMessageBody(MessageBody messageBody) throws Exception
messageBody - The MessageBody to convert to a string.Exception - the exceptionpublic void readAttributesFromXml(EwsServiceXmlReader reader) throws Exception
readAttributesFromXml in class ComplexPropertyreader - The reader.Exception - the exceptionpublic void readTextValueFromXml(EwsServiceXmlReader reader) throws XMLStreamException, ServiceXmlDeserializationException
readTextValueFromXml in class ComplexPropertyreader - the readerXMLStreamException - the XML stream exceptionServiceXmlDeserializationException - the service xml deserialization exceptionpublic void writeAttributesToXml(EwsServiceXmlWriter writer) throws ServiceXmlSerializationException
writeAttributesToXml in class ComplexPropertywriter - The writer.ServiceXmlSerializationException - the service xml serialization exceptionpublic void writeElementsToXml(EwsServiceXmlWriter writer) throws ServiceXmlSerializationException
writeElementsToXml in class ComplexPropertywriter - The writer.ServiceXmlSerializationException - the service xml serialization exceptionpublic BodyType getBodyType()
public void setBodyType(BodyType bodyType)
bodyType - BodyType enumpublic void setText(String text)
text - message body textCopyright © 2012–2015 Microsoft. All rights reserved.