|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MessageManager
Utility class for managing Discussion Board message objects
| Method Summary | |
|---|---|
java.util.List |
collectMessagesByIds(java.lang.String ids)
Deprecated. This loader does not load message status objects with the messages. Use collectMessagesWithStatusByStringIds( String[] messageIds, Id currentUserInContext ) instead. |
java.util.List<Message> |
collectMessagesByThreadId(Id threadId)
Collect all child messages by the Id of the top-level topic message. |
java.util.List<Message> |
collectMessagesWithStatusByStringIds(java.lang.String[] messageIds,
Id currentUserInContext,
boolean loadTags)
Collect a list of message with message statuses by their string message identifiers. |
java.util.List<Message> |
collectMessagesWithStatusByThreadId(Id threadId,
Id currentUserIdInContext,
boolean loadTags)
Collect all child messages by the Id of the top-level topic message. |
java.util.List<Message> |
collectMessagesWithStatusByThreadIds(java.util.List<Id> threadIds,
Id forumId,
Id currentUserId,
boolean loadTags)
Collect all messages in the specified threads (including the thread messages themselves) |
java.util.List<Message> |
collectUnreadMessagesByUserIdAndForumId(Id userId,
Id forumId,
boolean loadTags)
Collect unread messages with message status only, by user id and forum id |
java.util.List<Message> |
collectUnreadMessagesByUserIdAndThreadId(Id userId,
Id threadId,
boolean loadTags)
Collect unread messages with message status only, by user id and thread id |
boolean |
containsOnlyCalculatedUserNames(java.util.Collection<Message> messages)
Returns false if any of the Messages in the collection are using stored names that will not sort correctly by last or first names (e.g., if they are stored as Anonymous, or stored directly in the postedName field rather than calculated on the fly). |
java.lang.String |
getParentBody(Message message)
Get the body of the immediate message parent. |
java.util.List |
loadAllByForum(Id forum_id)
Load all messages from a forum. |
MessageAttachment |
loadAttachment(Id message_id)
Load the message attachment object by its message id. |
java.util.List |
loadByForumIdAndLifecycle(Id forum_id,
Message.MessageLifecycle ml)
Load all messages in a given forum with a given Message.MessageLifecycle. |
Message |
loadById(Id message_id)
Load a message by Id. |
Message |
loadTopThreadById(Id message_id)
Load a top level topic message by Id. |
java.util.List |
loadUnreadByForum(Id forum_id,
Id user_id)
Load unread messages from a forum for a given user |
Message |
loadWithStatus(Id msg_id,
Id user_id)
Load a message, including the status, by its Id. |
void |
removeAttachment(Id messageAttach_id)
Remove a message attachment by its own Id (message object remains). |
void |
removeMessageById(Id id)
Remove a message with a given id. |
void |
save(Message message)
Save a message. |
| Method Detail |
|---|
Message loadById(Id message_id)
throws PersistenceException,
KeyNotFoundException
message_id -
PersistenceException
KeyNotFoundException
Message loadTopThreadById(Id message_id)
throws PersistenceException,
KeyNotFoundException
message_id -
PersistenceException
KeyNotFoundException
Message loadWithStatus(Id msg_id,
Id user_id)
throws PersistenceException,
KeyNotFoundException
msg_id - user_id -
PersistenceException
KeyNotFoundException
java.util.List loadByForumIdAndLifecycle(Id forum_id,
Message.MessageLifecycle ml)
throws PersistenceException,
KeyNotFoundException
forum_id - ml -
PersistenceException
KeyNotFoundException
void save(Message message)
throws ValidationException,
PersistenceException,
KeyNotFoundException
message -
ValidationException
PersistenceException
KeyNotFoundException
void removeMessageById(Id id)
throws PersistenceException,
KeyNotFoundException
id -
PersistenceException
KeyNotFoundException
java.util.List collectMessagesByIds(java.lang.String ids)
throws PersistenceException,
KeyNotFoundException
ids -
PersistenceException
KeyNotFoundException
java.util.List<Message> collectMessagesWithStatusByStringIds(java.lang.String[] messageIds,
Id currentUserInContext,
boolean loadTags)
throws PersistenceException,
KeyNotFoundException
messageIds - string array of message identifierscurrentUserInContext - Id of the current user in context
PersistenceException
KeyNotFoundException
MessageAttachment loadAttachment(Id message_id)
throws PersistenceException,
KeyNotFoundException
message_id -
PersistenceException
KeyNotFoundException
void removeAttachment(Id messageAttach_id)
throws PersistenceException,
KeyNotFoundException
messageAttach_id -
PersistenceException
KeyNotFoundExceptionjava.lang.String getParentBody(Message message)
message -
java.util.List<Message> collectMessagesWithStatusByThreadId(Id threadId,
Id currentUserIdInContext,
boolean loadTags)
throws PersistenceException,
KeyNotFoundException
threadId - currentUserIdInContext -
PersistenceException
KeyNotFoundException
java.util.List<Message> collectMessagesWithStatusByThreadIds(java.util.List<Id> threadIds,
Id forumId,
Id currentUserId,
boolean loadTags)
throws PersistenceException,
KeyNotFoundException
threadIds - forumId - currentUserId - loadTags -
PersistenceException
KeyNotFoundException
java.util.List<Message> collectMessagesByThreadId(Id threadId)
throws PersistenceException,
KeyNotFoundException
threadId -
PersistenceException
KeyNotFoundException
java.util.List loadUnreadByForum(Id forum_id,
Id user_id)
throws PersistenceException,
KeyNotFoundException
forum_id - user_id -
PersistenceException
KeyNotFoundException
java.util.List loadAllByForum(Id forum_id)
throws PersistenceException,
KeyNotFoundException
forum_id -
PersistenceException
KeyNotFoundException
java.util.List<Message> collectUnreadMessagesByUserIdAndForumId(Id userId,
Id forumId,
boolean loadTags)
throws PersistenceException,
KeyNotFoundException
userId - forumId -
PersistenceException
KeyNotFoundException
java.util.List<Message> collectUnreadMessagesByUserIdAndThreadId(Id userId,
Id threadId,
boolean loadTags)
throws PersistenceException,
KeyNotFoundException
userId - threadId -
PersistenceException
KeyNotFoundExceptionboolean containsOnlyCalculatedUserNames(java.util.Collection<Message> messages)
messages -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||