com.versionone.om
Class Message

java.lang.Object
  extended by com.versionone.om.Entity
      extended by com.versionone.om.BaseAsset
          extended by com.versionone.om.Message

public class Message
extends BaseAsset


Field Summary
 
Fields inherited from class com.versionone.om.BaseAsset
STATE_ACTIVE, STATE_CLOSED
 
Fields inherited from class com.versionone.om.Entity
ASSET_STATE_VALUE, ASSET_VALUE, CHANGE_DATE_UTC, CONTENT_TYPE_VALUE, CONTENT_VALUE, CREATE_DATE_UTC, DELETE_OPERATION, DESCRIPTION_VALUE, FILENAME_VALUE, NAME_VALUE
 
Method Summary
 boolean deleteReceipt()
          Deletes any message receipt associated with this message for the logged in user.
 java.util.Collection<Member> getRecipients()
          Members this message is addressed to.
 BaseAsset getRelatedAsset()
          An asset associated with this message.
 boolean isArchived()
           
 boolean isRead()
           
 boolean isReadyToSend()
           
 boolean isUnarchived()
           
 boolean isUnread()
           
 void markAsArchived()
          Mark the message as having been archived.
 void markAsRead()
          Mark the message as having been read by the recipient.
 void markAsUnarchived()
          Mark the message as not having been archived.
 void markAsUnread()
          Mark the message as having not been read by the recipient.
 Message send()
          Send this message.
 void setRelatedAsset(BaseAsset value)
           
 
Methods inherited from class com.versionone.om.BaseAsset
canClose, canDelete, canReactivate, close, createAttachment, createAttachment, createConversation, createConversation, createLink, createLink, createNote, createNote, delete, getAttachments, getCustomDropdown, getCustomField, getDescription, getLinks, getName, getNotes, getReferencedInExpressions, getURL, isActive, isClosed, reactivate, setDescription, setName
 
Methods inherited from class com.versionone.om.Entity
equals, get, getChangeComment, getChangeDate, getChangedBy, getCreateComment, getCreateDate, getCreatedBy, getID, getInstance, hashCode, save, save, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getRecipients

public java.util.Collection<Member> getRecipients()
Members this message is addressed to. Message may not be sent until there is at least one recipient.


getRelatedAsset

public BaseAsset getRelatedAsset()
An asset associated with this message.

Returns:
BaseAsset

setRelatedAsset

public void setRelatedAsset(BaseAsset value)

isReadyToSend

public boolean isReadyToSend()
Returns:
True if the item is in a state in which it may be sent.

isUnread

public boolean isUnread()
Returns:
True if the item has not been read

isRead

public boolean isRead()
Returns:
True if the item has been read

isUnarchived

public boolean isUnarchived()
Returns:
True if the item has not been archived

isArchived

public boolean isArchived()
Returns:
True if the item has been archived

send

public Message send()
Send this message. Must have at least one recipeint. Once sent it may not be modified. Message will always be saved as part of the send.


markAsRead

public void markAsRead()
Mark the message as having been read by the recipient.


markAsUnread

public void markAsUnread()
Mark the message as having not been read by the recipient.


markAsArchived

public void markAsArchived()
Mark the message as having been archived.


markAsUnarchived

public void markAsUnarchived()
Mark the message as not having been archived.


deleteReceipt

public boolean deleteReceipt()
Deletes any message receipt associated with this message for the logged in user.

Returns:
true if delete was successful, false otherwise