|
Jive Forums API (5.5.20.2-oracle) Developer 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,
int 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. |
PrivateMessage |
sendMessage(PrivateMessage privateMessage,
long recipientID,
boolean copyToSentFolder)
Sends a private message to another user. |
Method Detail |
---|
boolean isPrivateMessagesEnabled()
PrivateMessage[] getMessages(long userID, int folderID) throws UserNotFoundException, PrivateMessageFolderNotFoundException
UserNotFoundException
PrivateMessageFolderNotFoundException
void deleteMessage(long userID, long messageID) throws UserNotFoundException, PrivateMessageFolderNotFoundException, PrivateMessageNotFoundException
messageID
- the private message to delete.
UserNotFoundException
PrivateMessageFolderNotFoundException
PrivateMessageNotFoundException
void moveMessage(long userID, long messageID, int destinationFolderID) throws UserNotFoundException, PrivateMessageFolderNotFoundException, PrivateMessageNotFoundException
userID
- of the usermessageID
- of the message to move.destinationFolderID
- of the folder to move the message to.
UserNotFoundException
PrivateMessageFolderNotFoundException
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, PrivateMessageFolderNotFoundException
userID
- folderID
-
UnauthorizedException
UserNotFoundException
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, PrivateMessageFolderNotFoundException
userID
- folderID
-
UnauthorizedException
UserNotFoundException
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 PrivateMessageFolderNotFoundException, UnauthorizedException, UserNotFoundException
userID
- of the user.folderID
- the folder ID.
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, PrivateMessageFolderNotFoundException
userID
- of the folder to associatefolderID
- of the folder to delete.
UnauthorizedException
- if not an administrator or the user.
UserNotFoundException
PrivateMessageFolderNotFoundException
PrivateMessage getMessage(long privateMessageID) throws UnauthorizedException, PrivateMessageNotFoundException
privateMessageID
- the ID of the private message.
UnauthorizedException
- if not an administrator or the user.
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, PrivateMessageRejectedException, UserNotFoundException
privateMessage
-
UnauthorizedException
PrivateMessageRejectedException
UserNotFoundException
PrivateMessage sendMessage(PrivateMessage privateMessage, long recipientID, boolean copyToSentFolder) throws UnauthorizedException, 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.
PrivateMessageRejectedException
- if the message could not be delivered.
UserNotFoundException
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |