org.wso2.carbon.registry.social.api.message
Interface Message


public interface Message

This interface models the Messages


Nested Class Summary
static class Message.Field
          An enumeration of field names in a message.
static class Message.Status
          The Status of a message.
static class Message.Type
          The type of a message.
 
Method Summary
 String getAppUrl()
          Gets the App URL for a message.
 String getBody()
          Gets the main text of the message.
 String getBodyId()
          Gets the body id.
 List<String> getCollectionIds()
          Gets the collection Ids for this message.
 String getId()
          Gets the unique ID of the message
 String getInReplyTo()
          Gets the parent message ID.
 List<String> getRecipients()
          Gets the recipient list of the message.
 List<String> getReplies()
          Gets the list of Replies to this message
 String getSenderId()
          Gets the sender ID value.
 Message.Status getStatus()
          Gets the Status of the message.
 Date getTimeSent()
          Gets the time the message was sent.
 String getTitle()
          Gets the title of the message.
 String getTitleId()
          Gets the title ID for this message.
 Message.Type getType()
          Gets the type of the message, as specified by opensocial.Message.Type.
 Date getUpdated()
          Gets the updated timestamp for the message.
 List<Url> getUrls()
          Get the URLs related to the message
 void setAppUrl(String url)
          Set the App URL for a message.
 void setBody(String newBody)
          Sets the main text of the message.
 void setBodyId(String bodyId)
          Sets the body id.
 void setCollectionIds(List<String> collectionIds)
          Sets the collection Ids for this message.
 void setId(String id)
          Sets the unique ID of the message.
 void setInReplyTo(String parentId)
          Sets the parent message ID
 void setRecipients(List<String> recipients)
          Sets the recipients of the message.
 void setSenderId(String senderId)
          sets the sender ID.
 void setStatus(Message.Status status)
          Sets the Status of the message.
 void setTimeSent(Date timeSent)
          Sets the time the message was sent.
 void setTitle(String newTitle)
          Sets the title of the message.
 void setTitleId(String titleId)
          Sets the title ID for this message.
 void setType(Message.Type newType)
          Sets the type of the message, as specified by opensocial.Message.Type.
 void setUpdated(Date updated)
          Sets the updated timestamp for the message.
 void setUrls(List<Url> urls)
          Set the URLs related to the message
 

Method Detail

getAppUrl

String getAppUrl()
Gets the App URL for a message.

Used if an App generated the message.

Returns:
the Application URL

setAppUrl

void setAppUrl(String url)
Set the App URL for a message.

Parameters:
url - the URL to set.

getBody

String getBody()
Gets the main text of the message.

Returns:
the main text of the message

setBody

void setBody(String newBody)
Sets the main text of the message. HTML attributes are allowed and are sanitized by the container

Parameters:
newBody - the main text of the message

getBodyId

String getBodyId()
Gets the body id. Used for message submission

Returns:
the body ID

setBodyId

void setBodyId(String bodyId)
Sets the body id.

Parameters:
bodyId - A valid body id defined in the gadget XML.

getCollectionIds

List<String> getCollectionIds()
Gets the collection Ids for this message.


setCollectionIds

void setCollectionIds(List<String> collectionIds)
Sets the collection Ids for this message.


getId

String getId()
Gets the unique ID of the message

Returns:
the ID of the message

setId

void setId(String id)
Sets the unique ID of the message.

Parameters:
id - the ID value to set

getInReplyTo

String getInReplyTo()
Gets the parent message ID.

Returns:
message id

setInReplyTo

void setInReplyTo(String parentId)
Sets the parent message ID

Parameters:
parentId - the parentId to set

getRecipients

List<String> getRecipients()
Gets the recipient list of the message.

Returns:
the recipients of the message

getReplies

List<String> getReplies()
Gets the list of Replies to this message

Returns:

getStatus

Message.Status getStatus()
Gets the Status of the message.

Returns:
the status of the message

setStatus

void setStatus(Message.Status status)
Sets the Status of the message.

Parameters:
status - the status to set

setRecipients

void setRecipients(List<String> recipients)
Sets the recipients of the message. HTML attributes are allowed and are sanitized by the container

Parameters:
recipients - the recipients text of the message

getSenderId

String getSenderId()
Gets the sender ID value.

Returns:
sender person id

setSenderId

void setSenderId(String senderId)
sets the sender ID.

Parameters:
senderId - the sender id to set

getTimeSent

Date getTimeSent()
Gets the time the message was sent.

Returns:
the message sent time

setTimeSent

void setTimeSent(Date timeSent)
Sets the time the message was sent.

Parameters:
timeSent - the time the message was sent

getTitle

String getTitle()
Gets the title of the message.

Returns:
the title of the message

setTitle

void setTitle(String newTitle)
Sets the title of the message. HTML attributes are allowed and are sanitized by the container.

Parameters:
newTitle - the title of the message

getTitleId

String getTitleId()
Gets the title ID for this message. Used for message submission.

Returns:
the title Id

setTitleId

void setTitleId(String titleId)
Sets the title ID for this message. Used for message submission.

Parameters:
titleId - the title ID as defined in the gadget XML

getType

Message.Type getType()
Gets the type of the message, as specified by opensocial.Message.Type.

Returns:
the type of message (enum Message.Type)

setType

void setType(Message.Type newType)
Sets the type of the message, as specified by opensocial.Message.Type.

Parameters:
newType - the type of message (enum Message.Type)

getUpdated

Date getUpdated()
Gets the updated timestamp for the message.

Returns:
the updated date of the message

setUpdated

void setUpdated(Date updated)
Sets the updated timestamp for the message.


getUrls

List<Url> getUrls()
Get the URLs related to the message

Returns:
the URLs related to the person, their webpages, or feeds

setUrls

void setUrls(List<Url> urls)
Set the URLs related to the message

Parameters:
urls - the URLs related to the person, their webpages, or feeds


Copyright © 2013 WSO2 Inc. All Rights Reserved.