public class Message
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
Message.Draft
Encapsulating the content will be post.
|
static class |
Message.Text
The wrapper for the message text in different formats: plain text, markdown, and html.
|
Modifier and Type | Method and Description |
---|---|
static Message.Draft |
draft(Message.Text text)
Write a draft to be posted.
|
java.util.Date |
getCreated()
Returns the
Date that the message being created. |
java.util.List<RemoteFile> |
getFiles()
Return a list of files attached to this message.
|
java.lang.String |
getId()
Returns The identifier of this message.
|
java.util.List<Mention> |
getMentions()
Returns all people mentioned in the message
|
java.lang.String |
getParentId()
Returns the parent if this message is a reply message.
|
java.lang.String |
getPersonDisplayName()
Returns the name of the person who sent this message.
|
java.lang.String |
getPersonEmail()
Returns the email address of the person who sent this message.
|
java.lang.String |
getPersonId()
Returns the identifier of the person who sent this message.
|
java.util.List<RemoteFile> |
getRemoteFiles()
Deprecated.
|
java.lang.String |
getSpaceId()
Returns the identifier of the space where this message was posted.
|
Space.SpaceType |
getSpaceType() |
java.lang.String |
getText()
Returns the content of the message.
|
Message.Text |
getTextAsObject()
Returns the content of the message in as
Message.Text object. |
java.lang.String |
getToPersonEmail()
Returns the email address of the recipient when sending a private 1:1 message
|
java.lang.String |
getToPersonId()
Returns the identifier of the recipient when sending a private 1:1 message.
|
java.util.Date |
getUpdated()
Returns the
Date that the message being updated, the date will equals created time, if has NOT updated. |
boolean |
isAllMentioned()
Returns true if the message mentioned everyone in space.
|
boolean |
isReply()
Checks if this is a reply message.
|
boolean |
isSelfMentioned()
Returns true if the message is the recepient of the message is included in message's mention list
|
java.lang.String |
toString()
Returns the message in JSON string format.
|
void |
update(MessageObserver.MessageEdited event) |
public static Message.Draft draft(Message.Text text)
text
- The content of draft to be posted. The content can be plain text, html, or markdown.public java.lang.String getId()
public java.lang.String getPersonId()
public java.lang.String getPersonEmail()
public java.lang.String getPersonDisplayName()
public java.lang.String getSpaceId()
public Space.SpaceType getSpaceType()
public java.lang.String getText()
public Message.Text getTextAsObject()
Message.Text
object.public java.lang.String getToPersonId()
public java.lang.String getToPersonEmail()
public java.util.Date getCreated()
Date
that the message being created.Date
that the message being created.public java.util.Date getUpdated()
Date
that the message being updated, the date will equals created time, if has NOT updated.Date
that the message being updated, the date will equals created time, if has NOT updated.public boolean isSelfMentioned()
public boolean isAllMentioned()
public java.util.List<Mention> getMentions()
@Deprecated public java.util.List<RemoteFile> getRemoteFiles()
public java.util.List<RemoteFile> getFiles()
public boolean isReply()
public java.lang.String getParentId()
public java.lang.String toString()
toString
in class java.lang.Object
public void update(MessageObserver.MessageEdited event)