Class AnnouncementService


  • public class AnnouncementService
    extends Object
    Deprecated.

    AnnouncementService is a static Cover for the AnnouncementService; see that interface for usage details.

    Version:
    $Revision$
    Author:
    University of Michigan, Sakai Software Development Team
    • Field Detail

      • EVENT_ANNC_UPDATE_AVAILABILITY

        public static final String EVENT_ANNC_UPDATE_AVAILABILITY
        Deprecated.
        See Also:
        Constant Field Values
      • APPLICATION_ID

        public static String APPLICATION_ID
        Deprecated.
      • REFERENCE_ROOT

        public static String REFERENCE_ROOT
        Deprecated.
      • SECURE_ANNC_ROOT

        public static String SECURE_ANNC_ROOT
        Deprecated.
      • SECURE_ANNC_READ

        public static String SECURE_ANNC_READ
        Deprecated.
      • SECURE_ANNC_ADD

        public static String SECURE_ANNC_ADD
        Deprecated.
      • SECURE_ANNC_REMOVE_OWN

        public static String SECURE_ANNC_REMOVE_OWN
        Deprecated.
      • SECURE_ANNC_REMOVE_ANY

        public static String SECURE_ANNC_REMOVE_ANY
        Deprecated.
      • SECURE_ANNC_UPDATE_OWN

        public static String SECURE_ANNC_UPDATE_OWN
        Deprecated.
      • SECURE_ANNC_UPDATE_ANY

        public static String SECURE_ANNC_UPDATE_ANY
        Deprecated.
      • SECURE_ANNC_READ_DRAFT

        public static String SECURE_ANNC_READ_DRAFT
        Deprecated.
      • SECURE_READ

        public static String SECURE_READ
        Deprecated.
      • SECURE_ADD

        public static String SECURE_ADD
        Deprecated.
      • SECURE_REMOVE_OWN

        public static String SECURE_REMOVE_OWN
        Deprecated.
      • SECURE_REMOVE_ANY

        public static String SECURE_REMOVE_ANY
        Deprecated.
      • SECURE_UPDATE_OWN

        public static String SECURE_UPDATE_OWN
        Deprecated.
      • SECURE_UPDATE_ANY

        public static String SECURE_UPDATE_ANY
        Deprecated.
      • SECURE_READ_DRAFT

        public static String SECURE_READ_DRAFT
        Deprecated.
      • REF_TYPE_CHANNEL

        public static String REF_TYPE_CHANNEL
        Deprecated.
      • REF_TYPE_MESSAGE

        public static String REF_TYPE_MESSAGE
        Deprecated.
    • Constructor Detail

      • AnnouncementService

        public AnnouncementService()
        Deprecated.
    • Method Detail

      • getInstance

        public static AnnouncementService getInstance()
        Deprecated.
        Access the component instance: special cover only method.
        Returns:
        the component instance.
      • getAnnouncementChannel

        public static AnnouncementChannel getAnnouncementChannel​(String param0)
                                                          throws IdUnusedException,
                                                                 PermissionException
        Deprecated.
        A (AnnouncementChannel) cover for getChannel() to return a specific announcement channel.
        Parameters:
        param0 - The channel reference string.
        Returns:
        the AnnouncementChannel that has the specified name.
        Throws:
        IdUnusedException - If this name is not defined for a announcement channel.
        PermissionException - If the user does not have any permissions to the channel.
      • getChannels

        public static List getChannels()
        Deprecated.
        Return a list of all the defined channels.
        Returns:
        a list of MessageChannel (or extension) objects (may be empty).
      • allowGetChannel

        public static boolean allowGetChannel​(String param0)
        Deprecated.
        check permissions for getChannel().
        Parameters:
        param0 - The channel reference string.
        Returns:
        true if the user is allowed to getChannel(channelId), false if not.
      • allowAddChannel

        public static boolean allowAddChannel​(String param0)
        Deprecated.
        check permissions for addChannel().
        Parameters:
        param0 - The channel reference string.
        Returns:
        true if the user is allowed to addChannel(channelId), false if not.
      • allowEditChannel

        public static boolean allowEditChannel​(String param0)
        Deprecated.
        check permissions for editChannel()
        Parameters:
        param0 - The channel reference string.
        Returns:
        true if the user is allowed to update the channel, false if not.
      • commitChannel

        public static void commitChannel​(MessageChannelEdit param0)
        Deprecated.
        Commit the changes made to a MessageChannelEdit object, and release the lock. The MessageChannelEdit is disabled, and not to be used after this call.
        Parameters:
        param0 - The MessageChannelEdit object to commit.
      • cancelChannel

        public static void cancelChannel​(MessageChannelEdit param0)
        Deprecated.
        Cancel the changes made to a MessageChannelEdit object, and release the lock. The MessageChannelEdit is disabled, and not to be used after this call.
        Parameters:
        param0 - The MessageChannelEdit object to cancel.
      • allowRemoveChannel

        public static boolean allowRemoveChannel​(String param0)
        Deprecated.
        Check permissions for removeChannel().
        Parameters:
        param0 - The channel reference string.
        Returns:
        true if the user is allowed to removeChannel(), false if not.
      • removeChannel

        public static void removeChannel​(MessageChannelEdit param0)
                                  throws PermissionException
        Deprecated.
        Remove a channel - it must be locked from editChannel().
        Parameters:
        param0 - The MessageChannelEdit object of the channel to remove.
        Throws:
        PermissionException - if the user does not have permission to remove a channel.
      • channelReference

        public static String channelReference​(String param0,
                                              String param1)
        Deprecated.
        Access the internal reference which can be used to access the channel from within the system.
        Parameters:
        param0 - The context string.
        param1 - The channel id.
        Returns:
        The the internal reference which can be used to access the channel from within the system.
      • messageReference

        public static String messageReference​(String param0,
                                              String param1,
                                              String param2)
        Deprecated.
        Access the internal reference which can be used to access the message from within the system.
        Parameters:
        param0 - The context string.
        param1 - The channel id.
        param2 - The message id.
        Returns:
        The the internal reference which can be used to access the message from within the system.
      • messageReference

        public static String messageReference​(String param0,
                                              String param1)
        Deprecated.
        Access the internal reference which can be used to access the message from within the system.
        Parameters:
        param0 - The channel reference string
        param1 - The message id.
        Returns:
        The the internal reference which can be used to access the message from within the system.
      • cancelMessage

        public static void cancelMessage​(MessageEdit param0)
        Deprecated.
        Cancel the changes made to a MessageEdit object, and release the lock. The MessageEdit is disabled, and not to be used after this call.
        Parameters:
        param0 - The MessageEdit object to cancel.
      • getMessages

        public static List getMessages​(String param0,
                                       Time param1,
                                       int param2,
                                       boolean param3,
                                       boolean param4,
                                       boolean param5)
                                throws PermissionException
        Deprecated.
        Access a list of messages in the channel, that are after the date, limited to just the n latest messages, ordered as specified, including drafts if specified. Channel read permission is required, unless pubViewOnly is selected - draft read on the channel is required to see drafts.
        Parameters:
        param0 - channel reference string
        param1 - if null, no date limit, else limited to only messages after this date.
        param2 - if 0, no count limit, else limited to only the latest this number of messages.
        param3 - if true, sort oldest first, else sort latest first.
        param4 - if true, include drafts (if the user has draft permission), else leave them out.
        param5 - if true, include only messages marked pubview, else include any.
        Returns:
        A list of Message objects that meet the criteria; may be empty
        Throws:
        PermissionException - If the current user does not have channel read permission.
      • getChannelIds

        public static List getChannelIds​(String param0)
        Deprecated.
        Access a list of channel ids that are defined related to the context.
        Parameters:
        param0 - The context in which to search
        Returns:
        A List (String) of channel id for channels withing the context.
      • getMessage

        public static Message getMessage​(Reference param0)
                                  throws IdUnusedException,
                                         PermissionException
        Deprecated.
        Get a message, given a reference. This call avoids the need to have channel security, as long as the user has permissions to the message.
        Parameters:
        param0 - The message reference
        Returns:
        The message.
        Throws:
        IdUnusedException - If this reference does not identify a message.
        PermissionException - If the user does not have any permissions to the message.
      • getLabel

        public static String getLabel()
        Deprecated.
      • getSummary

        public static Map getSummary​(String param0,
                                     int param1,
                                     int param2)
                              throws IdUsedException,
                                     IdInvalidException,
                                     PermissionException
        Deprecated.
        Get a summary of an Announcement Channel
        Parameters:
        param0 - channel reference string.
        param1 - Maximum number of items to return
        param2 - Maximum number of days to peer back
        Returns:
        The Map containing the Summary
        Throws:
        IdUsedException - if the id is not unique.
        IdInvalidException - if the id is not made up of valid characters.
        PermissionException - if the user does not have permission to add a channel.
      • getAnnouncementReference

        public static Reference getAnnouncementReference​(String param0)
        Deprecated.
        Get announcement entity reference for given context
        Parameters:
        param0 - announcement context (site-id)
        Returns:
        announcement entity reference
      • getRssUrl

        public static String getRssUrl​(Reference param0)
        Deprecated.
        Get URL to access the announcement rss feed
        Parameters:
        param0 - The announcement entity reference
        Returns:
        URL for announcement rss feed
      • isMessageViewable

        public static boolean isMessageViewable​(AnnouncementMessage param0)
        Deprecated.
        Determine if message viewable based on release/retract dates (if set)
        Parameters:
        param0 - AnnouncementMessage
        Returns:
        boolean
      • clearMessagesCache

        public static void clearMessagesCache​(String channelRef)
        Deprecated.
        clears the message cache for this channel
        Parameters:
        channelRef -
      • getMessages

        public static List getMessages​(String channelReference,
                                       Filter filter,
                                       boolean order,
                                       boolean merged)
                                throws IdUnusedException,
                                       PermissionException,
                                       NullPointerException
        Deprecated.
        Return a list of messages from the provided channel (merged flag returns merged messages)
        Parameters:
        channelReference - Channel's reference String
        filter - A filtering object to accept messages, or null if no filtering is desired.
        order - Order of messages, ascending if true, descending if false
        merged - flag to include merged channel messages, true returns ALL messages including merged sites/channels
        Returns:
        a list of Message objects or specializations of Message objects (may be empty).
        Throws:
        IdUnusedException - If this name is not defined for a announcement channel.
        PermissionException - if the user does not have read permission to the channel.
        NullPointerException