|
Clearspace API (1.10.14) Web Services Client Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface PrivateMessageService
Provides the ability to manipulate private messages. Send, retrieve, move, list.
| Method Summary | |
|---|---|
PrivateMessageFolder |
createFolder(long userID,
java.lang.String name)
Creates a new folder. |
PrivateMessage |
createMessage(long senderID)
Creates a new private message. |
void |
deleteFolder(long userID,
int folderID)
Deletes a folder. |
void |
deleteMessage(long userID,
long messageID)
Deletes a private message from the folder by moving it to the trash folder. |
PrivateMessageFolder |
getFolder(long userID,
int folderID)
Returns the specified folder for a user. |
PrivateMessageFolder[] |
getFolders(long userID)
Returns an Iterator of PrivateMessageFolder objects for the folders the user has. |
PrivateMessage |
getMessage(long privateMessageID)
Returns the specified private message. |
int |
getMessageCount(long userID)
Returns the total number of private messages a user has in their mailbox. |
int |
getMessageCountForFolder(long userID,
int folderID)
Returns the message count on a specific folder. |
PrivateMessage[] |
getMessages(long userID,
long folderID)
Returns all the messages in the folder sorted by date descending. |
int |
getUnreadMessageCount(long userID)
Returns the total number of unread private messages a user has in their mailbox. |
int |
getUnreadMessageCountForFolder(long userID,
int folderID)
Returns the total number of unread private messages a user has in a specific folder. |
boolean |
isPrivateMessagesEnabled()
Returns true if the feature is enabled, false otherwise. |
void |
moveMessage(long userID,
long messageID,
int destinationFolderID)
Moves a private message to another folder. |
void |
saveMessageAsDraft(PrivateMessage privateMessage)
Saves a message as a draft by storing it in the sender's Drafts folder. |
void |
sendMessage(PrivateMessage privateMessage,
long recipientID,
boolean copyToSentFolder)
Sends a private message to another user. |
| Method Detail |
|---|
boolean isPrivateMessagesEnabled()
PrivateMessage[] getMessages(long userID,
long folderID)
throws UserNotFoundException,
com.jivesoftware.community.PrivateMessageFolderNotFoundException
UserNotFoundException
com.jivesoftware.community.PrivateMessageFolderNotFoundException
void deleteMessage(long userID,
long messageID)
throws UserNotFoundException,
com.jivesoftware.community.PrivateMessageFolderNotFoundException,
com.jivesoftware.community.PrivateMessageNotFoundException
messageID - the private message to delete.
UserNotFoundException
com.jivesoftware.community.PrivateMessageFolderNotFoundException
com.jivesoftware.community.PrivateMessageNotFoundException
void moveMessage(long userID,
long messageID,
int destinationFolderID)
throws UserNotFoundException,
com.jivesoftware.community.PrivateMessageFolderNotFoundException,
com.jivesoftware.community.PrivateMessageNotFoundException
userID - of the usermessageID - of the message to move.destinationFolderID - of the folder to move the message to.
UserNotFoundException
com.jivesoftware.community.PrivateMessageFolderNotFoundException
com.jivesoftware.community.PrivateMessageNotFoundException
int getMessageCount(long userID)
throws UnauthorizedException,
UserNotFoundException
userID - of the user.
UnauthorizedException - if not an administrator or the user.
UserNotFoundException
int getMessageCountForFolder(long userID,
int folderID)
throws UnauthorizedException,
UserNotFoundException,
com.jivesoftware.community.PrivateMessageFolderNotFoundException
userID - of the userfolderID - the folder id
UnauthorizedException - if not an administrator or the user
UserNotFoundException - if the user could not be found
com.jivesoftware.community.PrivateMessageFolderNotFoundException
int getUnreadMessageCount(long userID)
throws UnauthorizedException,
UserNotFoundException
userID - of the user.
UnauthorizedException - if not an administrator or the user.
UserNotFoundException
int getUnreadMessageCountForFolder(long userID,
int folderID)
throws UnauthorizedException,
UserNotFoundException,
com.jivesoftware.community.PrivateMessageFolderNotFoundException
userID - of the userfolderID - the folder id
UnauthorizedException - if not an administrator or the user
UserNotFoundException - if the user could not be found
com.jivesoftware.community.PrivateMessageFolderNotFoundException
PrivateMessageFolder[] getFolders(long userID)
throws UnauthorizedException,
UserNotFoundException
userID - of the user.
UnauthorizedException - if not an administrator or the user.
UserNotFoundException
PrivateMessageFolder getFolder(long userID,
int folderID)
throws com.jivesoftware.community.PrivateMessageFolderNotFoundException,
UnauthorizedException,
UserNotFoundException
userID - of the user.folderID - the folder ID.
com.jivesoftware.community.PrivateMessageFolderNotFoundException - if the folder could not be loaded.
UnauthorizedException - if not an administrator or the user.
UserNotFoundException
PrivateMessageFolder createFolder(long userID,
java.lang.String name)
throws UnauthorizedException,
UserNotFoundException
userID - of the user to create the folder for.name - the name of the folder.
UnauthorizedException - if not an administrator or the user.
UserNotFoundException
void deleteFolder(long userID,
int folderID)
throws UnauthorizedException,
UserNotFoundException,
com.jivesoftware.community.PrivateMessageFolderNotFoundException
userID - of the folder to associatefolderID - of the folder to delete.
UnauthorizedException - if not an administrator or the user.
UserNotFoundException
com.jivesoftware.community.PrivateMessageFolderNotFoundException
PrivateMessage getMessage(long privateMessageID)
throws UnauthorizedException,
com.jivesoftware.community.PrivateMessageNotFoundException
privateMessageID - the ID of the private message.
UnauthorizedException - if not an administrator or the user.
com.jivesoftware.community.PrivateMessageNotFoundException - if the message could not be loaded.
PrivateMessage createMessage(long senderID)
throws UnauthorizedException,
UserNotFoundException
senderID - of the user sending the message.
UnauthorizedException - if not an administrator or the user.
UserNotFoundException
void saveMessageAsDraft(PrivateMessage privateMessage)
throws UnauthorizedException,
com.jivesoftware.community.PrivateMessageRejectedException,
UserNotFoundException
privateMessage - the private message to save as a draft
UnauthorizedException - if not an administrator or the user.
com.jivesoftware.community.PrivateMessageRejectedException - if the private message was rejected
UserNotFoundException - if the user could not be found
void sendMessage(PrivateMessage privateMessage,
long recipientID,
boolean copyToSentFolder)
throws UnauthorizedException,
com.jivesoftware.community.PrivateMessageRejectedException,
UserNotFoundException
PrivateMessageRejectedException
will be thrown. The exception will also be thrown if the recipient is not allowed
to receive private messages or if the user has elected to save a copy of the message in
their Sent folder, but doesn't have room to do so.
privateMessage - the message to send.recipientID - of the user to send the message to.copyToSentFolder - true if the message should be copied to the Sent folder.
UnauthorizedException - if not allowed to send the message.
com.jivesoftware.community.PrivateMessageRejectedException - if the message could not be delivered.
UserNotFoundException
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||