| org.sakaiproject.discussion.api.DiscussionChannel
DiscussionChannel | public interface DiscussionChannel extends MessageChannel(Code) | |
DiscussionChannel is the extension to the MessageChanel interface for a CHEF Discussion service discussion channel.
|
Method Summary | |
public boolean | addCategory(String category) Add a new category for this channel.
Parameters: category - The new category string to add. | public DiscussionMessageEdit | addDiscussionMessage(String replyTo) A (DiscussionMessage) cover for addMessage to add a new message to this channel. | public DiscussionMessage | addDiscussionMessage(String category, String subject, boolean draft, String replyTo, List attachments, String body) A (DiscussionMessage) cover for addMessage to add a new message to this channel.
Parameters: category - The message header category. Parameters: subject - The message header subject. Parameters: draft - The message header draft setting. Parameters: replyTo - The message header message id to which this is a reply. Parameters: attachments - The message header attachments, a vector of Reference objects. Parameters: body - The message body. | public boolean | allowAddTopicMessage() check permissions for addMessage() - if the message is a new Topic. | public boolean | allowRemoveCategory() | public DiscussionMessageEdit | editDiscussionMessage(String messageId) A (DiscussionMessageEdit) cover for editMessage. | public List | getCategories(boolean scanMessages) Access the list of catagories defined in the channel.
Parameters: scanMessage - if true, scan the channel's messages for catagories set in messages that may not be in the channel's catagory list, if false, use just the channel's catagory list. | public DiscussionMessage | getDiscussionMessage(String messageId) A (DiscussionMessage) cover for getMessage to return a specific discussion channel message, as specified by message id.
Parameters: messageId - The id of the message to get. | public DiscussionMessage | getDiscussionMessageNoException(String messageId) A (DiscussionMessage) cover for getMessage to return a specific discussion channel message, as specified by message id, and ignore exceptions if any
Parameters: messageId - The id of the message to get. | public Iterator | getThread(DiscussionMessage message) Return an iterator on the DiscussionMessages that are in the response thread to the specified message. | public DiscussionMessage | getThreadLatestReply(DiscussionMessage message) Access the most recent reply to the thread descending from this message, if any.
Parameters: message - The message that forms the top of a thread. | public int | getThreadNumberOfReplies(DiscussionMessage message) Count the number of replies to this thread (i.e. | public Iterator | getThreads(String category) Return an iterator on all messages in thread - depth first order.
Parameters: category - Filter the responses to messages in just this category (optional, may be null). | public List | getTopicMsgIds(String category) Access the message ids for the topics (i.e. | public Iterator | getTopics(String category) Return an Iterator on the DiscussionMessages that are "topics", i.e. | public boolean | removeCategory(String category) Remove a category for this channel.
Parameters: category - The category string to be removed. |
addCategory | public boolean addCategory(String category) throws InUseException, PermissionException(Code) | | Add a new category for this channel.
Parameters: category - The new category string to add. true if the category was new, false if it is already there. exception: PermissionException - If the user does not have write permission to the channel. |
addDiscussionMessage | public DiscussionMessageEdit addDiscussionMessage(String replyTo) throws PermissionException(Code) | | A (DiscussionMessage) cover for addMessage to add a new message to this channel. Must commitEdit() to make official, or cancelEdit() when done!
Parameters: replyTo - The message id to which this message is a reply. The newly added message, locked for update. exception: PermissionException - If the user does not have write permission to the channel. |
addDiscussionMessage | public DiscussionMessage addDiscussionMessage(String category, String subject, boolean draft, String replyTo, List attachments, String body) throws PermissionException(Code) | | A (DiscussionMessage) cover for addMessage to add a new message to this channel.
Parameters: category - The message header category. Parameters: subject - The message header subject. Parameters: draft - The message header draft setting. Parameters: replyTo - The message header message id to which this is a reply. Parameters: attachments - The message header attachments, a vector of Reference objects. Parameters: body - The message body. The newly added message. exception: PermissionException - If the user does not have write permission to the channel. |
allowAddTopicMessage | public boolean allowAddTopicMessage()(Code) | | check permissions for addMessage() - if the message is a new Topic.
true if the user is allowed to addMessage(...) for a new Topic, false if not. |
allowRemoveCategory | public boolean allowRemoveCategory()(Code) | | check permissions for removing category
true if the user is allowed to remove category, false if not. |
editDiscussionMessage | public DiscussionMessageEdit editDiscussionMessage(String messageId) throws IdUnusedException, PermissionException, InUseException(Code) | | A (DiscussionMessageEdit) cover for editMessage. Return a specific channel message, as specified by message name, locked for update. Must commitEdit() to make official, or cancelEdit() when done!
Parameters: messageId - The id of the message to get. the Message that has the specified id. exception: IdUnusedException - If this name is not a defined message in this channel. exception: PermissionException - If the user does not have any permissions to read the message. exception: InUseException - if the current user does not have permission to mess with this user. |
getCategories | public List getCategories(boolean scanMessages)(Code) | | Access the list of catagories defined in the channel.
Parameters: scanMessage - if true, scan the channel's messages for catagories set in messages that may not be in the channel's catagory list, if false, use just the channel's catagory list. A List (String) of all the categories defined in the channel. |
getDiscussionMessage | public DiscussionMessage getDiscussionMessage(String messageId) throws IdUnusedException, PermissionException(Code) | | A (DiscussionMessage) cover for getMessage to return a specific discussion channel message, as specified by message id.
Parameters: messageId - The id of the message to get. the DiscussionMessage that has the specified id. exception: IdUnusedException - If this name is not a defined message in this discussion channel. exception: PermissionException - If the user does not have any permissions to read the message. |
getDiscussionMessageNoException | public DiscussionMessage getDiscussionMessageNoException(String messageId)(Code) | | A (DiscussionMessage) cover for getMessage to return a specific discussion channel message, as specified by message id, and ignore exceptions if any
Parameters: messageId - The id of the message to get. the DiscussionMessage that has the specified id. |
getThread | public Iterator getThread(DiscussionMessage message)(Code) | | Return an iterator on the DiscussionMessages that are in the response thread to the specified message. They will be returned in depth first order.
Parameters: message - The message to which those returned are some depth of response. an iterator on the DiscussionMessages that are in the response thread to the specified topic messages, in depth first order (may be empty). |
getThreadLatestReply | public DiscussionMessage getThreadLatestReply(DiscussionMessage message)(Code) | | Access the most recent reply to the thread descending from this message, if any.
Parameters: message - The message that forms the top of a thread. the most recent DiscussionMessage reply to this thread, or null if there are no replies. |
getThreadNumberOfReplies | public int getThreadNumberOfReplies(DiscussionMessage message)(Code) | | Count the number of replies to this thread (i.e. the size of the getThread() iterator).
Parameters: message - The message that forms the top of a thread. the number of replies to this thread. |
getThreads | public Iterator getThreads(String category)(Code) | | Return an iterator on all messages in thread - depth first order.
Parameters: category - Filter the responses to messages in just this category (optional, may be null). an iterator on all messages in thread - depth first order (may be empty). |
getTopicMsgIds | public List getTopicMsgIds(String category)(Code) | | Access the message ids for the topics (i.e. messages that are not a response to any other message) in the category.
Parameters: category - The category value. A List (Sting) of message id values for each message that is a topic in the category. |
getTopics | public Iterator getTopics(String category)(Code) | | Return an Iterator on the DiscussionMessages that are "topics", i.e. are not a response to any other message. Note: use DiscussionMessage.getReplies() to get the direct replies to any specific message.
Parameters: category - Filter the responses to messages in just this category (optional, may be null). an Iterator on the DiscussionMessages that are "topics", i.e. are not a response to any other message. |
removeCategory | public boolean removeCategory(String category) throws InUseException, PermissionException(Code) | | Remove a category for this channel.
Parameters: category - The category string to be removed. true if the category can be removed, false if not. exception: PermissionException - If the user does not have write permission to the channel. |
|
|