-
- All Implemented Interfaces:
public final class MessageData container class for Apptentive Message Center message.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classMessage.Attachmentpublic enumMessage.Statuspublic classMessage.Companion
-
Field Summary
Fields Modifier and Type Field Description private final Stringidprivate final Stringnonceprivate Stringtypeprivate final Sendersenderprivate final Stringbodyprivate List<Message.Attachment>attachmentsprivate Message.StatusmessageStatusprivate final Booleaninboundprivate final Booleanhiddenprivate final Booleanautomatedprivate Booleanreadprivate DoublecreatedAtprivate StringgroupTimestampprivate final Map<String, Object>customData
-
Constructor Summary
Constructors Constructor Description Message(String id, String nonce, String type, Sender sender, String body, List<Message.Attachment> attachments, Message.Status messageStatus, Boolean inbound, Boolean hidden, Boolean automated, Boolean read, Double createdAt, String groupTimestamp, Map<String, Object> customData)
-
Method Summary
Modifier and Type Method Description final StringgetId()final StringgetNonce()final StringgetType()final UnitsetType(String type)final SendergetSender()final StringgetBody()final List<Message.Attachment>getAttachments()final UnitsetAttachments(List<Message.Attachment> attachments)final Message.StatusgetMessageStatus()final UnitsetMessageStatus(Message.Status messageStatus)final BooleangetInbound()final BooleangetHidden()final BooleangetAutomated()final BooleangetRead()final UnitsetRead(Boolean read)final DoublegetCreatedAt()final UnitsetCreatedAt(Double createdAt)final StringgetGroupTimestamp()final UnitsetGroupTimestamp(String groupTimestamp)final Map<String, Object>getCustomData()final MessagePayloadtoMessagePayload()-
-
Constructor Detail
-
Message
Message(String id, String nonce, String type, Sender sender, String body, List<Message.Attachment> attachments, Message.Status messageStatus, Boolean inbound, Boolean hidden, Boolean automated, Boolean read, Double createdAt, String groupTimestamp, Map<String, Object> customData)
- Parameters:
id-The server-side identifier for the message
nonce-The nonce assigned to the message
type-Text for text only. Compound if attachments are present.
sender-ID, name, and profile photo of sender from server Sender
body-Stringbody of the message
attachments-Attachments either locally stored or from server Message.Attachment
messageStatus-Status of the message Status
inbound-boolvalue to determine the message origin. true = inbound to THE BACKEND. false = outbound from THE BACKEND.
hidden-boolvalue to determine if the message should be hidden in the UI.Stringornull
automated-boolvalue to determine if the message was sent by an automatic process.Stringornull
read-boolvalue to determine if the message was shown
createdAt-The message created time in seconds
groupTimestamp-Visually groups the first date of a specific date in the message list.
Stringornull.
customData-Optional extra data sent with message
-
-
Method Detail
-
setType
final Unit setType(String type)
- Parameters:
type-Text for text only. Compound if attachments are present.
-
getAttachments
final List<Message.Attachment> getAttachments()
-
setAttachments
final Unit setAttachments(List<Message.Attachment> attachments)
- Parameters:
attachments-Attachments either locally stored or from server Message.Attachment
-
getMessageStatus
final Message.Status getMessageStatus()
-
setMessageStatus
final Unit setMessageStatus(Message.Status messageStatus)
- Parameters:
messageStatus-Status of the message Status
-
getInbound
final Boolean getInbound()
-
getAutomated
final Boolean getAutomated()
-
setRead
final Unit setRead(Boolean read)
- Parameters:
read-boolvalue to determine if the message was shown
-
getCreatedAt
final Double getCreatedAt()
-
setCreatedAt
final Unit setCreatedAt(Double createdAt)
- Parameters:
createdAt-The message created time in seconds
-
getGroupTimestamp
final String getGroupTimestamp()
-
setGroupTimestamp
final Unit setGroupTimestamp(String groupTimestamp)
- Parameters:
groupTimestamp-Visually groups the first date of a specific date in the message list.
Stringornull.
-
getCustomData
final Map<String, Object> getCustomData()
-
toMessagePayload
final MessagePayload toMessagePayload()
-
-
-
-