Package com.cometchat.pro.models
Class MediaMessage
- java.lang.Object
-
- com.cometchat.pro.models.AppEntity
-
- com.cometchat.pro.models.BaseMessage
-
- com.cometchat.pro.models.MediaMessage
-
public class MediaMessage extends BaseMessage
Created by adityagokula on 11/09/18.
-
-
Field Summary
-
Fields inherited from class com.cometchat.pro.models.BaseMessage
category, conversationId, deletedAt, deletedBy, deliveredAt, deliveredToMeAt, editedAt, editedBy, id, metadata, muid, parentMessageId, rawMessage, readAt, readByMeAt, receiver, receiverType, receiverUid, replyCount, sender, sentAt, TABLE_CONVERSATIONS, type, updatedAt
-
-
Constructor Summary
Constructors Constructor Description MediaMessage(java.lang.String receiverUid, java.io.File file, java.lang.String messageType, java.lang.String receiverType)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
static MediaMessage
fromJson(JSONObject jsonObject)
Attachment
getAttachment()
Get object of theAttachment
class with file details
java.lang.String
getCaption()
Get caption set by developerjava.io.File
getFile()
Get file object of media file sharedjava.util.List<java.lang.String>
getTags()
Returns the list of tags that the message has been tagged with.int
hashCode()
void
setAttachment(Attachment attachment)
void
setCaption(java.lang.String caption)
void
setFile(java.io.File file)
void
setTags(java.util.List<java.lang.String> tags)
java.util.HashMap<java.lang.String,java.lang.String>
toMap()
java.lang.String
toString()
-
Methods inherited from class com.cometchat.pro.models.BaseMessage
getCategory, getConversationId, getDeletedAt, getDeletedBy, getDeliveredAt, getDeliveredToMeAt, getEditedAt, getEditedBy, getId, getMessagesFromJSON, getMetadata, getMuid, getParentMessageId, getRawMessage, getReadAt, getReadByMeAt, getReceiver, getReceiverType, getReceiverUid, getReplyCount, getSender, getSentAt, getType, getUpdatedAt, setCategory, setConversationId, setDeletedAt, setDeletedBy, setDeliveredAt, setDeliveredToMeAt, setEditedAt, setEditedBy, setId, setMetadata, setMuid, setParentMessageId, setRawMessage, setReadAt, setReadByMeAt, setReceiver, setReceiverType, setReceiverUid, setReplyCount, setSender, setSentAt, setType, setUpdatedAt
-
-
-
-
Method Detail
-
getFile
public java.io.File getFile()
Get file object of media file shared- Returns:
- An file object of the media file shared
- Since:
- v1
-
setFile
public void setFile(java.io.File file)
-
getCaption
public java.lang.String getCaption()
Get caption set by developer- Returns:
- caption set by developer for media file
- Since:
- v1
-
setCaption
public void setCaption(java.lang.String caption)
-
getAttachment
public Attachment getAttachment()
Get object of theAttachment
class with file details
- Returns:
- An object of the
Attachment
class
- Since:
- v1
- See Also:
Attachment
-
setAttachment
public void setAttachment(Attachment attachment)
-
getTags
public java.util.List<java.lang.String> getTags()
Returns the list of tags that the message has been tagged with.- Returns:
- List
that holds the tags with which the message was tagged with. - Since:
- v3
-
setTags
public void setTags(java.util.List<java.lang.String> tags)
-
toMap
public java.util.HashMap<java.lang.String,java.lang.String> toMap()
-
fromJson
public static MediaMessage fromJson(JSONObject jsonObject)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classBaseMessage
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classBaseMessage
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classBaseMessage
-
-