Class AnnouncementService
- java.lang.Object
-
- org.sakaiproject.announcement.cover.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 Summary
-
Constructor Summary
Constructors Constructor Description AnnouncementService()Deprecated.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static AnnouncementChannelEditaddAnnouncementChannel(String param0)Deprecated.A (AnnouncementChannel) cover for addChannel() to add a new announcement channel.static MessageChannelEditaddChannel(String param0)Deprecated.Add a new channel.static booleanallowAddChannel(String param0)Deprecated.check permissions for addChannel().static booleanallowEditChannel(String param0)Deprecated.check permissions for editChannel()static booleanallowGetChannel(String param0)Deprecated.check permissions for getChannel().static booleanallowRemoveChannel(String param0)Deprecated.Check permissions for removeChannel().static Stringarchive(String param0, Document param1, Stack param2, String param3, List param4)Deprecated.static voidcancelChannel(MessageChannelEdit param0)Deprecated.Cancel the changes made to a MessageChannelEdit object, and release the lock.static voidcancelMessage(MessageEdit param0)Deprecated.Cancel the changes made to a MessageEdit object, and release the lock.static StringchannelReference(String param0, String param1)Deprecated.Access the internal reference which can be used to access the channel from within the system.static voidclearMessagesCache(String channelRef)Deprecated.clears the message cache for this channelstatic voidcommitChannel(MessageChannelEdit param0)Deprecated.Commit the changes made to a MessageChannelEdit object, and release the lock.static MessageChannelEditeditChannel(String param0)Deprecated.Return a specific channel, as specified by channel id, locked for update.static AnnouncementChannelgetAnnouncementChannel(String param0)Deprecated.A (AnnouncementChannel) cover for getChannel() to return a specific announcement channel.static ReferencegetAnnouncementReference(String param0)Deprecated.Get announcement entity reference for given contextstatic MessageChannelgetChannel(String param0)Deprecated.Return a specific channel.static ListgetChannelIds(String param0)Deprecated.Access a list of channel ids that are defined related to the context.static ListgetChannels()Deprecated.Return a list of all the defined channels.static AnnouncementServicegetInstance()Deprecated.Access the component instance: special cover only method.static StringgetLabel()Deprecated.static MessagegetMessage(Reference param0)Deprecated.Get a message, given a reference.static ListgetMessages(String channelReference, Filter filter, boolean order, boolean merged)Deprecated.Return a list of messages from the provided channel (merged flag returns merged messages)static ListgetMessages(String param0, Time param1, int param2, boolean param3, boolean param4, boolean param5)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.static StringgetRssUrl(Reference param0)Deprecated.Get URL to access the announcement rss feedstatic MapgetSummary(String param0, int param1, int param2)Deprecated.Get a summary of an Announcement Channelstatic booleanisMessageViewable(AnnouncementMessage param0)Deprecated.Determine if message viewable based on release/retract dates (if set)static Stringmerge(String param0, Element param1, String param2, String param3, Map param4, HashMap param5, Set param6)Deprecated.static StringmessageReference(String param0, String param1)Deprecated.Access the internal reference which can be used to access the message from within the system.static StringmessageReference(String param0, String param1, String param2)Deprecated.Access the internal reference which can be used to access the message from within the system.static voidremoveChannel(MessageChannelEdit param0)Deprecated.Remove a channel - it must be locked from editChannel().
-
-
-
Field Detail
-
MOD_DATE
public static final String MOD_DATE
Deprecated.- See Also:
- Constant Field Values
-
RELEASE_DATE
public static final String RELEASE_DATE
Deprecated.- See Also:
- Constant Field Values
-
RETRACT_DATE
public static final String RETRACT_DATE
Deprecated.- See Also:
- Constant Field Values
-
ASSIGNMENT_REFERENCE
public static final String ASSIGNMENT_REFERENCE
Deprecated.- See Also:
- Constant Field Values
-
EVENT_ANNC_UPDATE_TITLE
public static final String EVENT_ANNC_UPDATE_TITLE
Deprecated.Events- See Also:
- Constant Field Values
-
EVENT_ANNC_UPDATE_ACCESS
public static final String EVENT_ANNC_UPDATE_ACCESS
Deprecated.- See Also:
- Constant Field Values
-
EVENT_ANNC_UPDATE_AVAILABILITY
public static final String EVENT_ANNC_UPDATE_AVAILABILITY
Deprecated.- See Also:
- Constant Field Values
-
EVENT_AVAILABLE_ANNC
public static final String EVENT_AVAILABLE_ANNC
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.
-
-
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.
-
addAnnouncementChannel
public static AnnouncementChannelEdit addAnnouncementChannel(String param0) throws IdUsedException, IdInvalidException, PermissionException
Deprecated.A (AnnouncementChannel) cover for addChannel() to add a new announcement channel.- Parameters:
param0- The channel reference string.- Returns:
- The newly created channel.
- 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.
-
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.
-
addChannel
public static MessageChannelEdit addChannel(String param0) throws IdUsedException, IdInvalidException, PermissionException
Deprecated.Add a new channel. Must commitEdit() to make official, or cancelEdit() when done!- Parameters:
The- channel reference string.- Returns:
- The newly created channel, locked for update.
- 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.
-
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.
-
editChannel
public static MessageChannelEdit editChannel(String param0) throws IdUnusedException, PermissionException, InUseException
Deprecated.Return a specific channel, as specified by channel id, locked for update. Must commitEdit() to make official, or cancelEdit() when done!- Parameters:
param0- The channel reference string.- Returns:
- the Channel that has the specified id.
- Throws:
IdUnusedException- If this name is not a defined channel.PermissionException- If the user does not have any permissions to edit the channel.InUseException- if the channel is locked for edit by someone else.
-
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 stringparam1- 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 stringparam1- 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.
-
getChannel
public static MessageChannel getChannel(String param0) throws IdUnusedException, PermissionException
Deprecated.Return a specific channel.- Parameters:
param0- The channel reference.- Returns:
- the MessageChannel that has the specified name.
- Throws:
IdUnusedException- If this name is not defined for any channel.PermissionException- If the user does not have any permissions to the channel.
-
merge
public static String merge(String param0, Element param1, String param2, String param3, Map param4, HashMap param5, Set param6)
Deprecated.
-
getLabel
public static String getLabel()
Deprecated.
-
archive
public static String archive(String param0, Document param1, Stack param2, String param3, List param4)
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 returnparam2- 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 Stringfilter- A filtering object to accept messages, or null if no filtering is desired.order- Order of messages, ascending if true, descending if falsemerged- 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
-
-