org.apache.shindig.social.core.model
Class MessageImpl

java.lang.Object
  extended by org.apache.shindig.social.core.model.MessageImpl
All Implemented Interfaces:
Message

public final class MessageImpl
extends Object
implements Message

Default implementation for a Message


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.shindig.social.opensocial.model.Message
Message.Field, Message.Status, Message.Type
 
Constructor Summary
MessageImpl()
           
MessageImpl(String initBody, String initTitle, Message.Type initType)
           
 
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
 String sanitizeHTML(String htmlStr)
          TODO implement either a standard 'sanitizing' facility or define an interface that can be set on this class so others can plug in their own.
 void setAppUrl(String appUrl)
          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 setReplies(List<String> replies)
           
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageImpl

public MessageImpl()

MessageImpl

public MessageImpl(String initBody,
                   String initTitle,
                   Message.Type initType)
Method Detail

getAppUrl

public String getAppUrl()
Description copied from interface: Message
Gets the App URL for a message. Used if an App generated the message.

Specified by:
getAppUrl in interface Message
Returns:
the Application URL

setAppUrl

public void setAppUrl(String appUrl)
Description copied from interface: Message
Set the App URL for a message.

Specified by:
setAppUrl in interface Message
Parameters:
appUrl - the URL to set.

getBody

public String getBody()
Description copied from interface: Message
Gets the main text of the message.

Specified by:
getBody in interface Message
Returns:
the main text of the message

setBody

public void setBody(String newBody)
Description copied from interface: Message
Sets the main text of the message. HTML attributes are allowed and are sanitized by the container

Specified by:
setBody in interface Message
Parameters:
newBody - the main text of the message

getBodyId

public String getBodyId()
Description copied from interface: Message
Gets the body id. Used for message submission

Specified by:
getBodyId in interface Message
Returns:
the body ID

setBodyId

public void setBodyId(String bodyId)
Description copied from interface: Message
Sets the body id.

Specified by:
setBodyId in interface Message
Parameters:
bodyId - A valid body id defined in the gadget XML.

getCollectionIds

public List<String> getCollectionIds()
Description copied from interface: Message
Gets the collection Ids for this message.

Specified by:
getCollectionIds in interface Message

setCollectionIds

public void setCollectionIds(List<String> collectionIds)
Description copied from interface: Message
Sets the collection Ids for this message.

Specified by:
setCollectionIds in interface Message

getId

public String getId()
Description copied from interface: Message
Gets the unique ID of the message

Specified by:
getId in interface Message
Returns:
the ID of the message

setId

public void setId(String id)
Description copied from interface: Message
Sets the unique ID of the message.

Specified by:
setId in interface Message
Parameters:
id - the ID value to set

getInReplyTo

public String getInReplyTo()
Description copied from interface: Message
Gets the parent message ID.

Specified by:
getInReplyTo in interface Message
Returns:
message id

setInReplyTo

public void setInReplyTo(String parentId)
Description copied from interface: Message
Sets the parent message ID

Specified by:
setInReplyTo in interface Message
Parameters:
parentId - the parentId to set

getRecipients

public List<String> getRecipients()
Description copied from interface: Message
Gets the recipient list of the message.

Specified by:
getRecipients in interface Message
Returns:
the recipients of the message

setRecipients

public void setRecipients(List<String> recipients)
Description copied from interface: Message
Sets the recipients of the message. HTML attributes are allowed and are sanitized by the container

Specified by:
setRecipients in interface Message
Parameters:
recipients - the recipients text of the message

getReplies

public List<String> getReplies()
Description copied from interface: Message
Gets the list of Replies to this message

Specified by:
getReplies in interface Message
Returns:

setReplies

public void setReplies(List<String> replies)

getSenderId

public String getSenderId()
Description copied from interface: Message
Gets the sender ID value.

Specified by:
getSenderId in interface Message
Returns:
sender person id

setSenderId

public void setSenderId(String senderId)
Description copied from interface: Message
sets the sender ID.

Specified by:
setSenderId in interface Message
Parameters:
senderId - the sender id to set

getStatus

public Message.Status getStatus()
Description copied from interface: Message
Gets the Status of the message.

Specified by:
getStatus in interface Message
Returns:
the status of the message

setStatus

public void setStatus(Message.Status status)
Description copied from interface: Message
Sets the Status of the message.

Specified by:
setStatus in interface Message
Parameters:
status - the status to set

getTimeSent

public Date getTimeSent()
Description copied from interface: Message
Gets the time the message was sent.

Specified by:
getTimeSent in interface Message
Returns:
the message sent time

setTimeSent

public void setTimeSent(Date timeSent)
Description copied from interface: Message
Sets the time the message was sent.

Specified by:
setTimeSent in interface Message
Parameters:
timeSent - the time the message was sent

getTitle

public String getTitle()
Description copied from interface: Message
Gets the title of the message.

Specified by:
getTitle in interface Message
Returns:
the title of the message

setTitle

public void setTitle(String newTitle)
Description copied from interface: Message
Sets the title of the message. HTML attributes are allowed and are sanitized by the container.

Specified by:
setTitle in interface Message
Parameters:
newTitle - the title of the message

getTitleId

public String getTitleId()
Description copied from interface: Message
Gets the title ID for this message. Used for message submission.

Specified by:
getTitleId in interface Message
Returns:
the title Id

setTitleId

public void setTitleId(String titleId)
Description copied from interface: Message
Sets the title ID for this message. Used for message submission.

Specified by:
setTitleId in interface Message
Parameters:
titleId - the title ID as defined in the gadget XML

getType

public Message.Type getType()
Description copied from interface: Message
Gets the type of the message, as specified by opensocial.Message.Type.

Specified by:
getType in interface Message
Returns:
the type of message (enum Message.Type)

setType

public void setType(Message.Type newType)
Description copied from interface: Message
Sets the type of the message, as specified by opensocial.Message.Type.

Specified by:
setType in interface Message
Parameters:
newType - the type of message (enum Message.Type)

getUpdated

public Date getUpdated()
Description copied from interface: Message
Gets the updated timestamp for the message.

Specified by:
getUpdated in interface Message
Returns:
the updated date of the message

setUpdated

public void setUpdated(Date updated)
Description copied from interface: Message
Sets the updated timestamp for the message.

Specified by:
setUpdated in interface Message

getUrls

public List<Url> getUrls()
Description copied from interface: Message
Get the URLs related to the message

Specified by:
getUrls in interface Message
Returns:
the URLs related to the person, their webpages, or feeds

setUrls

public void setUrls(List<Url> urls)
Description copied from interface: Message
Set the URLs related to the message

Specified by:
setUrls in interface Message
Parameters:
urls - the URLs related to the person, their webpages, or feeds

sanitizeHTML

public String sanitizeHTML(String htmlStr)
Description copied from interface: Message
TODO implement either a standard 'sanitizing' facility or define an interface that can be set on this class so others can plug in their own.

Specified by:
sanitizeHTML in interface Message
Parameters:
htmlStr - String to be sanitized.
Returns:
the sanitized HTML String


Copyright © 2007-2012. All Rights Reserved.