org.sakaiproject.service.legacy.announcement
Interface AnnouncementChannel

All Superinterfaces:
Entity, MessageChannel
All Known Subinterfaces:
AnnouncementChannelEdit
All Known Implementing Classes:
BaseAnnouncementService.BaseAnnouncementChannelEdit

public interface AnnouncementChannel
extends MessageChannel

AnnouncementChannel is the extension to the MessageChanel interface for a Sakai Announcement service announcement channel.

Version:
$Revision: 2076 $
Author:
University of Michigan, Sakai Software Development Team
See Also:
org.sakaiproject.core.AnnouncementMessage

Field Summary
 
Fields inherited from interface org.sakaiproject.service.legacy.entity.Entity
SEPARATOR
 
Method Summary
 AnnouncementMessageEdit addAnnouncementMessage()
          a (AnnouncementMessage) cover for addMessage to add a new message to this channel.
 AnnouncementMessage addAnnouncementMessage(String subject, boolean draft, List attachments, String body)
          a (AnnouncementMessage) cover for addMessage to add a new message to this channel.
 AnnouncementMessageEdit editAnnouncementMessage(String messageId)
          A (AnnouncementMessageEdit) cover for editMessage.
 AnnouncementMessage getAnnouncementMessage(String messageId)
          A (AnnouncementMessage) cover for getMessage to return a specific announcement channel message, as specified by message id.
 
Methods inherited from interface org.sakaiproject.service.legacy.message.MessageChannel
addMessage, allowAddChannelMessage, allowAddMessage, allowEditMessage, allowGetMessages, allowRemoveMessage, cancelMessage, commitMessage, commitMessage, editMessage, getContext, getGroupsAllowAddMessage, getGroupsAllowGetMessage, getMessage, getMessages, mergeMessage, removeMessage, removeMessage
 
Methods inherited from interface org.sakaiproject.service.legacy.entity.Entity
getId, getProperties, getReference, getReference, getUrl, getUrl, toXml
 

Method Detail

getAnnouncementMessage

public AnnouncementMessage getAnnouncementMessage(String messageId)
                                           throws IdUnusedException,
                                                  PermissionException
A (AnnouncementMessage) cover for getMessage to return a specific announcement channel message, as specified by message id.

Parameters:
messageId - The id of the message to get.
Returns:
the AnnouncementMessage that has the specified id.
Throws:
IdUnusedException - If this name is not a defined message in this announcement channel.
PermissionException - If the user does not have any permissions to read the message.

editAnnouncementMessage

public AnnouncementMessageEdit editAnnouncementMessage(String messageId)
                                                throws IdUnusedException,
                                                       PermissionException,
                                                       InUseException
A (AnnouncementMessageEdit) 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.
Returns:
the Message that has the specified id.
Throws:
IdUnusedException - If this name is not a defined message in this channel.
PermissionException - If the user does not have any permissions to read the message.
InUseException - if the current user does not have permission to mess with this user.

addAnnouncementMessage

public AnnouncementMessageEdit addAnnouncementMessage()
                                               throws PermissionException
a (AnnouncementMessage) cover for addMessage to add a new message to this channel. Must commitEdit() to make official, or cancelEdit() when done!

Returns:
The newly added message, locked for update.
Throws:
PermissionException - If the user does not have write permission to the channel.

addAnnouncementMessage

public AnnouncementMessage addAnnouncementMessage(String subject,
                                                  boolean draft,
                                                  List attachments,
                                                  String body)
                                           throws PermissionException
a (AnnouncementMessage) cover for addMessage to add a new message to this channel.

Parameters:
subject - The message header subject.
draft - The message header draft indication.
attachments - The message header attachments, a vector of Reference objects.
body - The message body.
Returns:
The newly added message.
Throws:
PermissionException - If the user does not have write permission to the channel.