Package com.restfb.types
Class Conversation
- java.lang.Object
-
- com.restfb.types.AbstractFacebookType
-
- com.restfb.types.FacebookType
-
- com.restfb.types.Conversation
-
- All Implemented Interfaces:
Serializable
public class Conversation extends FacebookType
Represents the Conversation Graph API type.- Author:
- Mark Allen, Felipe Kurkowski
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Conversation.Tag
Represents the Tag Graph API type.-
Nested classes/interfaces inherited from class com.restfb.types.FacebookType
FacebookType.Metadata
-
-
Constructor Summary
Constructors Constructor Description Conversation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addFormerParticipant(NamedFacebookType formerParticipant)
boolean
addMessage(Message message)
boolean
addParticipant(ExtendedReferenceType participant)
boolean
addSender(NamedFacebookType sender)
boolean
addTag(Conversation.Tag tag)
Boolean
getCanReply()
Whether The Page can reply to the conversationList<NamedFacebookType>
getFormerParticipants()
Users who used to be on this message conversation.String
getLink()
A URL for this conversation.Long
getMessageCount()
The number of messages in the conversationList<Message>
getMessages()
List of all messages in the conversationString
getName()
The name of the message folder or source.List<ExtendedReferenceType>
getParticipants()
Users who are on this message conversationList<NamedFacebookType>
getSenders()
Users who send a message on the conversationString
getSnippet()
The title of a message in the conversationString
getSubject()
The subject of this conversation.Boolean
getSubscribed()
Whether you are subscribed to the conversationList<Conversation.Tag>
getTags()
A list of tags indicating the message folder, and whether the conversation is read and seen.String
getThreadKey()
The new identifier for threads effective after September 24, 2017Long
getUnreadCount()
The number of unread messages in the conversationDate
getUpdatedTime()
Last update time of the conversationString
getWallpaper()
Wallpaper to display as a background for the threadboolean
removeFormerParticipant(NamedFacebookType formerParticipant)
boolean
removeMessage(Message message)
boolean
removeParticipant(ExtendedReferenceType participant)
boolean
removeSender(NamedFacebookType sender)
boolean
removeTag(Conversation.Tag tag)
void
setCanReply(Boolean canReply)
Whether The Page can reply to the conversationvoid
setLink(String link)
A URL for this conversation.void
setMessageCount(Long messageCount)
The number of messages in the conversationvoid
setName(String name)
The name of the message folder or source.void
setSnippet(String snippet)
The title of a message in the conversationvoid
setSubject(String subject)
The subject of this conversation.void
setSubscribed(Boolean subscribed)
Whether you are subscribed to the conversationvoid
setThreadKey(String threadKey)
The new identifier for threads effective after September 24, 2017void
setUnreadCount(Long unreadCount)
The number of unread messages in the conversationvoid
setUpdatedTime(Date updatedTime)
Last update time of the conversationvoid
setWallpaper(String wallpaper)
Wallpaper to display as a background for the thread-
Methods inherited from class com.restfb.types.FacebookType
getId, getMetadata, getType, setId, setMetadata, setType
-
Methods inherited from class com.restfb.types.AbstractFacebookType
equals, hashCode, toString
-
-
-
-
Constructor Detail
-
Conversation
public Conversation()
-
-
Method Detail
-
getTags
public List<Conversation.Tag> getTags()
A list of tags indicating the message folder, and whether the conversation is read and seen.- Returns:
- A list of tags indicating the message folder, and whether the conversation is read and seen.
-
addTag
public boolean addTag(Conversation.Tag tag)
-
removeTag
public boolean removeTag(Conversation.Tag tag)
-
getParticipants
public List<ExtendedReferenceType> getParticipants()
Users who are on this message conversation- Returns:
- Users who are on this message conversation
-
addParticipant
public boolean addParticipant(ExtendedReferenceType participant)
-
removeParticipant
public boolean removeParticipant(ExtendedReferenceType participant)
-
getSenders
public List<NamedFacebookType> getSenders()
Users who send a message on the conversation- Returns:
- Users who send a message on the conversation
-
addSender
public boolean addSender(NamedFacebookType sender)
-
removeSender
public boolean removeSender(NamedFacebookType sender)
-
getMessages
public List<Message> getMessages()
List of all messages in the conversation- Returns:
- List of all messages in the conversation
-
addMessage
public boolean addMessage(Message message)
-
removeMessage
public boolean removeMessage(Message message)
-
getFormerParticipants
public List<NamedFacebookType> getFormerParticipants()
Users who used to be on this message conversation.- Returns:
- Users who used to be on this message conversation.
-
addFormerParticipant
public boolean addFormerParticipant(NamedFacebookType formerParticipant)
-
removeFormerParticipant
public boolean removeFormerParticipant(NamedFacebookType formerParticipant)
-
getSubject
public String getSubject()
The subject of this conversation.- Returns:
- The subject of this conversation.
-
setSubject
public void setSubject(String subject)
The subject of this conversation.
-
getSnippet
public String getSnippet()
The title of a message in the conversation- Returns:
- The title of a message in the conversation
-
setSnippet
public void setSnippet(String snippet)
The title of a message in the conversation
-
getThreadKey
public String getThreadKey()
The new identifier for threads effective after September 24, 2017- Returns:
- The new identifier for threads effective after September 24, 2017
-
setThreadKey
public void setThreadKey(String threadKey)
The new identifier for threads effective after September 24, 2017
-
getUpdatedTime
public Date getUpdatedTime()
Last update time of the conversation- Returns:
- Last update time of the conversation
-
setUpdatedTime
public void setUpdatedTime(Date updatedTime)
Last update time of the conversation
-
getMessageCount
public Long getMessageCount()
The number of messages in the conversation- Returns:
- The number of messages in the conversation
-
setMessageCount
public void setMessageCount(Long messageCount)
The number of messages in the conversation
-
getName
public String getName()
The name of the message folder or source.- Returns:
- The name of the message folder or source
-
getUnreadCount
public Long getUnreadCount()
The number of unread messages in the conversationFacebook does not send the unread count if there aren't any new messages. In order to keep data consistency, we set the default value to zero. If this value is sent, the
JsonMapper
will override it.- Returns:
- The number of unread messages in the conversation
-
setUnreadCount
public void setUnreadCount(Long unreadCount)
The number of unread messages in the conversationFacebook does not send the unread count if there aren't any new messages. In order to keep data consistency, we set the default value to zero. If this value is sent, the
JsonMapper
will override it.
-
getWallpaper
public String getWallpaper()
Wallpaper to display as a background for the thread- Returns:
- Wallpaper to display as a background for the thread
-
setWallpaper
public void setWallpaper(String wallpaper)
Wallpaper to display as a background for the thread
-
getCanReply
public Boolean getCanReply()
Whether The Page can reply to the conversation- Returns:
- Whether The Page can reply to the conversation
-
setCanReply
public void setCanReply(Boolean canReply)
Whether The Page can reply to the conversation
-
getSubscribed
public Boolean getSubscribed()
Whether you are subscribed to the conversation- Returns:
- Whether you are subscribed to the conversation
-
setSubscribed
public void setSubscribed(Boolean subscribed)
Whether you are subscribed to the conversation
-
-