|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sakaiproject.announcement.cover.AnnouncementService
public class AnnouncementService
AnnouncementService is a static Cover for the AnnouncementService; see that interface for usage details.
| Field Summary | |
|---|---|
static String |
APPLICATION_ID
|
static String |
ASSIGNMENT_REFERENCE
|
static String |
EVENT_ANNC_UPDATE_ACCESS
|
static String |
EVENT_ANNC_UPDATE_AVAILABILITY
|
static String |
EVENT_ANNC_UPDATE_TITLE
Events |
static String |
MOD_DATE
|
static String |
REF_TYPE_CHANNEL
|
static String |
REF_TYPE_MESSAGE
|
static String |
REFERENCE_ROOT
|
static String |
RELEASE_DATE
|
static String |
RETRACT_DATE
|
static String |
SECURE_ADD
|
static String |
SECURE_ANNC_ADD
|
static String |
SECURE_ANNC_READ
|
static String |
SECURE_ANNC_READ_DRAFT
|
static String |
SECURE_ANNC_REMOVE_ANY
|
static String |
SECURE_ANNC_REMOVE_OWN
|
static String |
SECURE_ANNC_ROOT
|
static String |
SECURE_ANNC_UPDATE_ANY
|
static String |
SECURE_ANNC_UPDATE_OWN
|
static String |
SECURE_READ
|
static String |
SECURE_READ_DRAFT
|
static String |
SECURE_REMOVE_ANY
|
static String |
SECURE_REMOVE_OWN
|
static String |
SECURE_UPDATE_ANY
|
static String |
SECURE_UPDATE_OWN
|
| Constructor Summary | |
|---|---|
AnnouncementService()
|
|
| Method Summary | |
|---|---|
static AnnouncementChannelEdit |
addAnnouncementChannel(String param0)
A (AnnouncementChannel) cover for addChannel() to add a new announcement channel. |
static org.sakaiproject.message.api.MessageChannelEdit |
addChannel(String param0)
Add a new channel. |
static boolean |
allowAddChannel(String param0)
check permissions for addChannel(). |
static boolean |
allowEditChannel(String param0)
check permissions for editChannel() |
static boolean |
allowGetChannel(String param0)
check permissions for getChannel(). |
static boolean |
allowRemoveChannel(String param0)
Check permissions for removeChannel(). |
static String |
archive(String param0,
Document param1,
Stack param2,
String param3,
List param4)
|
static void |
cancelChannel(org.sakaiproject.message.api.MessageChannelEdit param0)
Cancel the changes made to a MessageChannelEdit object, and release the lock. |
static void |
cancelMessage(org.sakaiproject.message.api.MessageEdit param0)
Cancel the changes made to a MessageEdit object, and release the lock. |
static String |
channelReference(String param0,
String param1)
Access the internal reference which can be used to access the channel from within the system. |
static void |
clearMessagesCache(String channelRef)
clears the message cache for this channel |
static void |
commitChannel(org.sakaiproject.message.api.MessageChannelEdit param0)
Commit the changes made to a MessageChannelEdit object, and release the lock. |
static org.sakaiproject.message.api.MessageChannelEdit |
editChannel(String param0)
Return a specific channel, as specified by channel id, locked for update. |
static AnnouncementChannel |
getAnnouncementChannel(String param0)
A (AnnouncementChannel) cover for getChannel() to return a specific announcement channel. |
static org.sakaiproject.entity.api.Reference |
getAnnouncementReference(String param0)
Get announcement entity reference for given context |
static org.sakaiproject.message.api.MessageChannel |
getChannel(String param0)
Return a specific channel. |
static List |
getChannelIds(String param0)
Access a list of channel ids that are defined related to the context. |
static List |
getChannels()
Return a list of all the defined channels. |
static AnnouncementService |
getInstance()
Access the component instance: special cover only method. |
static String |
getLabel()
|
static org.sakaiproject.message.api.Message |
getMessage(org.sakaiproject.entity.api.Reference param0)
Get a message, given a reference. |
static List |
getMessages(String channelReference,
org.sakaiproject.javax.Filter filter,
boolean order,
boolean merged)
Return a list of messages from the provided channel (merged flag returns merged messages) |
static List |
getMessages(String param0,
org.sakaiproject.time.api.Time param1,
int param2,
boolean param3,
boolean param4,
boolean param5)
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 String |
getRssUrl(org.sakaiproject.entity.api.Reference param0)
Get URL to access the announcement rss feed |
static Map |
getSummary(String param0,
int param1,
int param2)
Get a summary of an Announcement Channel |
static boolean |
isMessageViewable(AnnouncementMessage param0)
Determine if message viewable based on release/retract dates (if set) |
static String |
merge(String param0,
Element param1,
String param2,
String param3,
Map param4,
HashMap param5,
Set param6)
|
static String |
messageReference(String param0,
String param1)
Access the internal reference which can be used to access the message from within the system. |
static String |
messageReference(String param0,
String param1,
String param2)
Access the internal reference which can be used to access the message from within the system. |
static void |
removeChannel(org.sakaiproject.message.api.MessageChannelEdit param0)
Remove a channel - it must be locked from editChannel(). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String MOD_DATE
public static final String RELEASE_DATE
public static final String RETRACT_DATE
public static final String ASSIGNMENT_REFERENCE
public static final String EVENT_ANNC_UPDATE_TITLE
public static final String EVENT_ANNC_UPDATE_ACCESS
public static final String EVENT_ANNC_UPDATE_AVAILABILITY
public static String APPLICATION_ID
public static String REFERENCE_ROOT
public static String SECURE_ANNC_ROOT
public static String SECURE_ANNC_READ
public static String SECURE_ANNC_ADD
public static String SECURE_ANNC_REMOVE_OWN
public static String SECURE_ANNC_REMOVE_ANY
public static String SECURE_ANNC_UPDATE_OWN
public static String SECURE_ANNC_UPDATE_ANY
public static String SECURE_ANNC_READ_DRAFT
public static String SECURE_READ
public static String SECURE_ADD
public static String SECURE_REMOVE_OWN
public static String SECURE_REMOVE_ANY
public static String SECURE_UPDATE_OWN
public static String SECURE_UPDATE_ANY
public static String SECURE_READ_DRAFT
public static String REF_TYPE_CHANNEL
public static String REF_TYPE_MESSAGE
| Constructor Detail |
|---|
public AnnouncementService()
| Method Detail |
|---|
public static AnnouncementService getInstance()
public static AnnouncementChannel getAnnouncementChannel(String param0)
throws org.sakaiproject.exception.IdUnusedException,
org.sakaiproject.exception.PermissionException
param0 - The channel reference string.
org.sakaiproject.exception.IdUnusedException - If this name is not defined for a announcement channel.
org.sakaiproject.exception.PermissionException - If the user does not have any permissions to the channel.
public static AnnouncementChannelEdit addAnnouncementChannel(String param0)
throws org.sakaiproject.exception.IdUsedException,
org.sakaiproject.exception.IdInvalidException,
org.sakaiproject.exception.PermissionException
param0 - The channel reference string.
org.sakaiproject.exception.IdUsedException - if the id is not unique.
org.sakaiproject.exception.IdInvalidException - if the id is not made up of valid characters.
org.sakaiproject.exception.PermissionException - if the user does not have permission to add a channel.public static List getChannels()
public static boolean allowGetChannel(String param0)
param0 - The channel reference string.
public static boolean allowAddChannel(String param0)
param0 - The channel reference string.
public static org.sakaiproject.message.api.MessageChannelEdit addChannel(String param0)
throws org.sakaiproject.exception.IdUsedException,
org.sakaiproject.exception.IdInvalidException,
org.sakaiproject.exception.PermissionException
The - channel reference string.
org.sakaiproject.exception.IdUsedException - if the id is not unique.
org.sakaiproject.exception.IdInvalidException - if the id is not made up of valid characters.
org.sakaiproject.exception.PermissionException - if the user does not have permission to add a channel.public static boolean allowEditChannel(String param0)
param0 - The channel reference string.
public static org.sakaiproject.message.api.MessageChannelEdit editChannel(String param0)
throws org.sakaiproject.exception.IdUnusedException,
org.sakaiproject.exception.PermissionException,
org.sakaiproject.exception.InUseException
param0 - The channel reference string.
org.sakaiproject.exception.IdUnusedException - If this name is not a defined channel.
org.sakaiproject.exception.PermissionException - If the user does not have any permissions to edit the channel.
org.sakaiproject.exception.InUseException - if the channel is locked for edit by someone else.public static void commitChannel(org.sakaiproject.message.api.MessageChannelEdit param0)
param0 - The MessageChannelEdit object to commit.public static void cancelChannel(org.sakaiproject.message.api.MessageChannelEdit param0)
param0 - The MessageChannelEdit object to cancel.public static boolean allowRemoveChannel(String param0)
param0 - The channel reference string.
public static void removeChannel(org.sakaiproject.message.api.MessageChannelEdit param0)
throws org.sakaiproject.exception.PermissionException
param0 - The MessageChannelEdit object of the channel to remove.
org.sakaiproject.exception.PermissionException - if the user does not have permission to remove a channel.
public static String channelReference(String param0,
String param1)
param0 - The context string.param1 - The channel id.
public static String messageReference(String param0,
String param1,
String param2)
param0 - The context string.param1 - The channel id.param2 - The message id.
public static String messageReference(String param0,
String param1)
param0 - The channel reference stringparam1 - The message id.
public static void cancelMessage(org.sakaiproject.message.api.MessageEdit param0)
param0 - The MessageEdit object to cancel.
public static List getMessages(String param0,
org.sakaiproject.time.api.Time param1,
int param2,
boolean param3,
boolean param4,
boolean param5)
throws org.sakaiproject.exception.PermissionException
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.
org.sakaiproject.exception.PermissionException - If the current user does not have channel read permission.public static List getChannelIds(String param0)
param0 - The context in which to search
public static org.sakaiproject.message.api.Message getMessage(org.sakaiproject.entity.api.Reference param0)
throws org.sakaiproject.exception.IdUnusedException,
org.sakaiproject.exception.PermissionException
param0 - The message reference
org.sakaiproject.exception.IdUnusedException - If this reference does not identify a message.
org.sakaiproject.exception.PermissionException - If the user does not have any permissions to the message.
public static org.sakaiproject.message.api.MessageChannel getChannel(String param0)
throws org.sakaiproject.exception.IdUnusedException,
org.sakaiproject.exception.PermissionException
param0 - The channel reference.
org.sakaiproject.exception.IdUnusedException - If this name is not defined for any channel.
org.sakaiproject.exception.PermissionException - If the user does not have any permissions to the channel.
public static String merge(String param0,
Element param1,
String param2,
String param3,
Map param4,
HashMap param5,
Set param6)
public static String getLabel()
public static String archive(String param0,
Document param1,
Stack param2,
String param3,
List param4)
public static Map getSummary(String param0,
int param1,
int param2)
throws org.sakaiproject.exception.IdUsedException,
org.sakaiproject.exception.IdInvalidException,
org.sakaiproject.exception.PermissionException
param0 - channel reference string.param1 - Maximum number of items to returnparam2 - Maximum number of days to peer back
org.sakaiproject.exception.IdUsedException - if the id is not unique.
org.sakaiproject.exception.IdInvalidException - if the id is not made up of valid characters.
org.sakaiproject.exception.PermissionException - if the user does not have permission to add a channel.public static org.sakaiproject.entity.api.Reference getAnnouncementReference(String param0)
param0 - announcement context (site-id)
public static String getRssUrl(org.sakaiproject.entity.api.Reference param0)
param0 - The announcement entity reference
public static boolean isMessageViewable(AnnouncementMessage param0)
param0 - AnnouncementMessage
public static void clearMessagesCache(String channelRef)
channelRef -
public static List getMessages(String channelReference,
org.sakaiproject.javax.Filter filter,
boolean order,
boolean merged)
throws org.sakaiproject.exception.IdUnusedException,
org.sakaiproject.exception.PermissionException,
NullPointerException
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
org.sakaiproject.exception.IdUnusedException - If this name is not defined for a announcement channel.
org.sakaiproject.exception.PermissionException - if the user does not have read permission to the channel.
NullPointerException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||