|
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 PrivateMessageManager
Manages the private message feature. Private messages facilitate user to user communication as opposed to public messages viewable by a large group of people in a forum. Users must be given permission to be able to send and recieve private messages. A quota can be set to control the maximum number of messages a user can store between all folders (excluding Trash).
PrivateMessage
,
PrivateMessageFolder
Method Summary | |
---|---|
PrivateMessageFolder |
createFolder(User user,
java.lang.String name)
Creates a new folder. |
PrivateMessage |
createMessage(User sender)
Creates a new private message. |
void |
deleteFolder(PrivateMessageFolder folder)
Deletes a folder. |
PrivateMessageFolder |
getFolder(User user,
int folderID)
Returns the specified folder for a user. |
int |
getFolderCount(User user)
Returns the total number of folders the user has. |
java.util.Iterator |
getFolders(User user)
Returns an Iterator of PrivateMessageFolder objects for the folders the user has. |
int |
getMaxMessagesPerUser()
Returns the max number of messages each user is allowed to store in their mailbox, or -1 if there is no limit. |
PrivateMessage |
getMessage(long privateMessageID)
Returns the specified private message. |
int |
getMessageCount(User user)
Returns the total number of private messages a user has in their mailbox. |
RenderManager |
getRenderManager()
Returns a render manager for private messages in the system. |
int |
getUnreadMessageCount(User user)
Returns the total number of unread private messages a user has in their mailbox. |
boolean |
isPrivateMessagesEnabled()
Returns true if the feature is enabled, false otherwise. |
void |
saveMessageAsDraft(PrivateMessage privateMessage)
Saves a message as a draft by storing it in the sender's Drafts folder. |
PrivateMessage |
sendMessage(PrivateMessage privateMessage,
User recipient,
boolean copyToSentFolder)
Sends a private message to another user. |
void |
setMaxMessagesPerUser(int maxMessages)
Sets the max number of message is allowed to store in their mailbox. |
void |
setPrivateMessagesEnabled(boolean enabled)
Enables or disables the private message feature. |
Method Detail |
---|
boolean isPrivateMessagesEnabled()
void setPrivateMessagesEnabled(boolean enabled) throws UnauthorizedException
enabled
- true to enable PM's, false otherwise.
UnauthorizedException
RenderManager getRenderManager()
int getMaxMessagesPerUser()
void setMaxMessagesPerUser(int maxMessages) throws UnauthorizedException
maxMessages
- the max number of messages a user is allowed to store in their
mailbox, or -1 for no limit.
UnauthorizedException
- if not a system administrator.int getMessageCount(User user) throws UnauthorizedException
user
- the user.
UnauthorizedException
- if not an administrator or the user.int getUnreadMessageCount(User user) throws UnauthorizedException
user
- the user.
UnauthorizedException
- if not an administrator or the user.int getFolderCount(User user) throws UnauthorizedException
user
- the user.
UnauthorizedException
- if not an administrator or the user.java.util.Iterator getFolders(User user) throws UnauthorizedException
user
- the user.
UnauthorizedException
- if not an administrator or the user.PrivateMessageFolder getFolder(User user, int folderID) throws PrivateMessageFolderNotFoundException, UnauthorizedException
user
- the user.folderID
- the folder ID.
PrivateMessageFolderNotFoundException
- if the folder could not be loaded.
UnauthorizedException
- if not an administrator or the user.PrivateMessageFolder createFolder(User user, java.lang.String name) throws UnauthorizedException
user
- the user to create the folder for.name
- the name of the folder.
UnauthorizedException
- if not an administrator or the user.void deleteFolder(PrivateMessageFolder folder) throws UnauthorizedException
folder
- the folder to delete.
UnauthorizedException
- if not an administrator or the user.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(User sender) throws UnauthorizedException
sender
- the user sending the message.
UnauthorizedException
- if not an administrator or the user.void saveMessageAsDraft(PrivateMessage privateMessage) throws UnauthorizedException, PrivateMessageRejectedException
privateMessage
- the message to save.
UnauthorizedException
- if not an administrator or the user.
PrivateMessageRejectedException
- if the message could not be saved as a
draft.PrivateMessage sendMessage(PrivateMessage privateMessage, User recipient, boolean copyToSentFolder) throws UnauthorizedException, PrivateMessageRejectedException
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.recipient
- 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.
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |