|
Jive API (5.0.0.0) Core 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 community. 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,
String name)
Creates a new folder. |
PrivateMessage |
createMessage(User sender)
Creates a new private message. |
void |
deleteFolder(PrivateMessageFolder folder)
Deletes a folder. |
void |
deleteUserMessages(User user)
Deletes a user's folders, including the four default folders. |
PrivateMessageFolder |
getFolder(User user,
long folderID)
Returns the specified folder for a user. |
int |
getFolderCount(User user)
Returns the total number of folders the user has. |
JiveIterator<PrivateMessageFolder> |
getFolders(User user)
Returns an Iterable 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 |
isPrivateMessageNotificationEnabled()
Returns true if the notification feature is enabled, false otherwise. |
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. |
void |
sendEmailNotification(User recipient,
User sender,
PrivateMessage pm)
Sends a private message notification email to the recipient. |
void |
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 |
setPrivateMessageNotificationEnabled(boolean enabled)
Enables or disables the private message notification feature. |
void |
setPrivateMessagesEnabled(boolean enabled)
Enables or disables the private message feature. |
| Methods inherited from interface com.jivesoftware.community.JiveManager |
|---|
destroy |
| Method Detail |
|---|
boolean isPrivateMessagesEnabled()
void setPrivateMessagesEnabled(boolean enabled)
throws UnauthorizedException
enabled - true to enable PM's, false otherwise.
UnauthorizedException - if not an administratorboolean isPrivateMessageNotificationEnabled()
void setPrivateMessageNotificationEnabled(boolean enabled)
throws UnauthorizedException
enabled - true to enable PM notifications, false otherwise.
UnauthorizedException - if not an administratorRenderManager 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.
JiveIterator<PrivateMessageFolder> getFolders(User user)
throws UnauthorizedException
user - the user.
UnauthorizedException - if not an administrator or the user.
PrivateMessageFolder getFolder(User user,
long 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,
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.
void deleteUserMessages(User user)
throws UnauthorizedException
user - the sender or recipient of the messages being deleted.
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.
void sendMessage(PrivateMessage privateMessage,
User recipient,
boolean copyToSentFolder)
throws UnauthorizedException,
PrivateMessageRejectedException,
RejectedException
If the recipient's mailbox is full, a 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.
RejectedException
void sendEmailNotification(User recipient,
User sender,
PrivateMessage pm)
recipient - - The user who will recieve the messatesender - - The user sending the messagepm - - The private messatge
|
Jive Product Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||