|
Clearspace API (1.10.16) Core Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface PrivateMessage
Private messages are used for user to user communication.
PrivateMessageFolder,
PrivateMessageManager| Field Summary |
|---|
| Fields inherited from interface com.jivesoftware.community.JiveContentObject |
|---|
BODY_FIELD, SUBJECT_FIELD |
| Method Summary | |
|---|---|
void |
deleteAttachment(Attachment attachment)
Deletes an attachment that belongs to this private message. |
int |
getAttachmentCount()
Returns the number of attachments this private message has. |
JiveIterator<Attachment> |
getAttachments()
Returns an Iterable for all attachments of this private message. |
java.lang.String |
getBody()
Returns the message body. |
java.util.Date |
getDate()
Returns the date the message was saved or sent, or null if the message hasn't been sent or saved yet. |
PrivateMessageFolder |
getFolder()
Returns the folder the private message or null if the message does not yet belong to a folder. |
long |
getID()
Returns the id of the message. |
java.util.Map<java.lang.String,java.lang.String> |
getProperties()
Retrieve a map of all the extended properties for the private message. |
User |
getRecipient()
Returns the user the message was sent to. |
User |
getSender()
Returns the user the message was sent by, or null if the message was sent by the system. |
java.lang.String |
getSubject()
Returns the message subject. |
java.lang.String |
getUnfilteredBody()
Returns the message body, bypassing any active filters. |
java.lang.String |
getUnfilteredProperty(java.lang.String name)
Returns an extended property of the private message, bypassing any filters. |
java.lang.String |
getUnfilteredSubject()
Returns the message subject, bypassing any active filters. |
boolean |
isAuthorized(long permissionType)
Returns true if the handle on this object has the permission specified. |
boolean |
isRead()
Returns true if this message has been marked as read. |
void |
setBody(java.lang.String body)
Sets the body of the message. |
void |
setRead(boolean read)
Marks this message as read or unread. |
void |
setSubject(java.lang.String subject)
Sets the subject of the message. |
| Methods inherited from interface com.jivesoftware.community.JiveContentObject |
|---|
getCreationDate, getIndexContent, getModificationDate, getPlainBody, getPlainSubject, getUser |
| Methods inherited from interface com.jivesoftware.community.JiveObject |
|---|
getObjectType |
| Methods inherited from interface com.jivesoftware.community.AttachmentContentResource |
|---|
createAttachment, getAttachment |
| Method Detail |
|---|
long getID()
getID in interface JiveObjectjava.util.Date getDate()
PrivateMessageFolder getFolder()
java.lang.String getSubject()
getSubject in interface JiveContentObjectjava.lang.String getUnfilteredSubject()
Unfiltered content is necessary for a few reasons. One is when saving Jive content to another persistence mechanism such as an XML format. Another is when you need to skip filter formatting, such as when a user is responding to another user's message.
getUnfilteredSubject in interface JiveContentObject
void setSubject(java.lang.String subject)
throws UnauthorizedException
subject - the subject of the message.
UnauthorizedException - if not allowed to edit the message.java.lang.String getBody()
getBody in interface JiveContentObjectjava.lang.String getUnfilteredBody()
Unfiltered content is necessary for a few reasons. One is when saving Jive content to another persistence mechanism such as an XML format. Another is when you need to skip filter formatting, such as when a user is responding to another user's message.
getUnfilteredBody in interface JiveContentObject
void setBody(java.lang.String body)
throws UnauthorizedException
body - the body of the message.
UnauthorizedException - if does not have ADMIN permissions.User getSender()
User getRecipient()
boolean isRead()
void setRead(boolean read)
read - true to mark the message as read.int getAttachmentCount()
getAttachmentCount in interface AttachmentContentResourceJiveIterator<Attachment> getAttachments()
getAttachments in interface AttachmentContentResourceAttachment
void deleteAttachment(Attachment attachment)
throws AttachmentException,
UnauthorizedException
deleteAttachment in interface AttachmentContentResourceattachment - the attachment to delete.
java.lang.IllegalArgumentException - if the attachment doesn't belong to
this message.
UnauthorizedException - if not authorized to delete the attachment.
AttachmentException - if there was an error deleting the attachment.java.util.Map<java.lang.String,java.lang.String> getProperties()
If the user is not authorized to modify the private message any method which modifies the map will fail with a UnsupportedOperationException;
java.lang.String getUnfilteredProperty(java.lang.String name)
Because properties are not filtered before being returned, this method should be used with caution. In particular, you should avoid showing unfiltered data in an environment where embedded HTML might be interpreted.
name - the name of the property to get.
boolean isAuthorized(long permissionType)
A list of possible permissions can be found in the Permissions class. Certain methods of this class are restricted to certain permissions as specified in the method comments.
permissionType - permissionType a permission type.
Permissions
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||