org.sakaiproject.announcement.impl
Class BaseAnnouncementService

java.lang.Object
  extended by org.sakaiproject.message.impl.BaseMessageService
      extended by org.sakaiproject.announcement.impl.BaseAnnouncementService
All Implemented Interfaces:
AnnouncementService, org.sakaiproject.entity.api.ContextObserver, org.sakaiproject.entity.api.EntityProducer, org.sakaiproject.entity.api.EntitySummary, org.sakaiproject.entity.api.EntityTransferrer, org.sakaiproject.entity.api.EntityTransferrerRefMigrator, org.sakaiproject.memory.api.CacheRefresher, org.sakaiproject.message.api.MessageService, org.sakaiproject.util.StorageUser
Direct Known Subclasses:
DbAnnouncementService

public abstract class BaseAnnouncementService
extends org.sakaiproject.message.impl.BaseMessageService
implements AnnouncementService, org.sakaiproject.entity.api.ContextObserver, org.sakaiproject.entity.api.EntityTransferrer, org.sakaiproject.entity.api.EntityTransferrerRefMigrator

BaseAnnouncementService extends the BaseMessageService for the specifics of Announcement.


Nested Class Summary
 class BaseAnnouncementService.BaseAnnouncementChannelEdit
          AnnouncementChannel implementation
 class BaseAnnouncementService.BaseAnnouncementMessageEdit
          AnnouncementMessage implementation
 class BaseAnnouncementService.BaseAnnouncementMessageHeaderEdit
          AnnouncementMessageHeaderEdit implementation
protected  class BaseAnnouncementService.PrivacyFilter
          A filter that will reject announcement message drafts not from the current user, and otherwise use another filter, if defined, for acceptance.
 
Nested classes/interfaces inherited from class org.sakaiproject.message.impl.BaseMessageService
org.sakaiproject.message.impl.BaseMessageService.BaseMessageChannelEdit, org.sakaiproject.message.impl.BaseMessageService.BaseMessageEdit, org.sakaiproject.message.impl.BaseMessageService.BaseMessageHeaderEdit, org.sakaiproject.message.impl.BaseMessageService.MessagePermissionFilter, org.sakaiproject.message.impl.BaseMessageService.MessageSelectionFilter, org.sakaiproject.message.impl.BaseMessageService.NotifyThread, org.sakaiproject.message.impl.BaseMessageService.PublicFilter, org.sakaiproject.message.impl.BaseMessageService.Storage
 
Field Summary
protected  org.sakaiproject.event.api.NotificationService m_notificationService
          Dependency: NotificationService.
protected static org.sakaiproject.util.ResourceLoader rb
          Messages, for the http access.
 
Fields inherited from class org.sakaiproject.message.impl.BaseMessageService
m_authzGroupService, m_caching, m_channelCache, m_entityManager, m_eventTrackingService, m_idManager, m_memoryService, m_messageCaches, m_securityService, m_serverConfigurationService, m_sessionManager, m_siteService, m_storage, m_threadLocalManager, m_timeService, m_userDirectoryService
 
Fields inherited from interface org.sakaiproject.announcement.api.AnnouncementService
APPLICATION_ID, ASSIGNMENT_REFERENCE, EVENT_ANNC_UPDATE_ACCESS, EVENT_ANNC_UPDATE_AVAILABILITY, EVENT_ANNC_UPDATE_TITLE, MOD_DATE, REF_TYPE_ANNOUNCEMENT, REF_TYPE_ANNOUNCEMENT_RSS, REFERENCE_ROOT, RELEASE_DATE, RETRACT_DATE, SECURE_ANNC_ADD, SECURE_ANNC_ALL_GROUPS, SECURE_ANNC_READ, SECURE_ANNC_READ_DRAFT, SECURE_ANNC_REMOVE_ANY, SECURE_ANNC_REMOVE_OWN, SECURE_ANNC_ROOT, SECURE_ANNC_UPDATE_ANY, SECURE_ANNC_UPDATE_OWN
 
Fields inherited from interface org.sakaiproject.message.api.MessageService
REF_TYPE_CHANNEL, REF_TYPE_MESSAGE, SECURE_ADD, SECURE_ALL_GROUPS, SECURE_CREATE, SECURE_READ, SECURE_READ_DRAFT, SECURE_REMOVE_ANY, SECURE_REMOVE_OWN, SECURE_UPDATE_ANY, SECURE_UPDATE_OWN
 
Constructor Summary
BaseAnnouncementService()
           
 
Method Summary
 AnnouncementChannelEdit addAnnouncementChannel(String ref)
          Add a new announcement channel.
 String channelReference(String context, String id)
           
 void clearMessagesCache(String channelRef)
           
 void contextCreated(String context, boolean toolPlacement)
          
 void contextDeleted(String context, boolean toolPlacement)
          
 void contextUpdated(String context, boolean toolPlacement)
          
protected  String eventId(String secure)
          Form a tracking event string based on a security function string.
protected  Element generateItemElement(Document doc, AnnouncementMessage msg, org.sakaiproject.entity.api.Reference msgRef)
          Generate RSS Item element for specified assignment
 AnnouncementChannel getAnnouncementChannel(String ref)
          Return a specific announcement channel.
 org.sakaiproject.entity.api.Reference getAnnouncementReference(String context)
           
 org.sakaiproject.time.api.Time getDate(org.sakaiproject.entity.api.Entity r)
          Access the resource date.
 org.sakaiproject.entity.api.HttpAccess getHttpAccess()
          
 String getLabel()
          
 Integer getMessage_order(org.sakaiproject.entity.api.Entity r)
          Access the resource Message Order.
 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)
 String getOwnerId(org.sakaiproject.entity.api.Entity r)
          Access the resource owner user id.
protected  String getReferenceRoot()
          Return the reference rooot for use in resource references and urls.
 String getRssUrl(org.sakaiproject.entity.api.Reference ref)
           
 String getSummarizableReference(String siteId, String toolIdentifier)
           
protected  String getSummaryFromHeader(org.sakaiproject.message.api.Message item, org.sakaiproject.message.api.MessageHeader header)
          getSummaryFromHeader implementation
 void init()
          Final initialization, once all dependencies are set.
 boolean isDraft(org.sakaiproject.entity.api.Entity r)
          Check if this resource is in draft mode.
 boolean isMessageViewable(AnnouncementMessage message)
          
 String[] myToolIds()
          
 org.sakaiproject.entity.api.Entity newContainer(Element element)
          Construct a new container resource, from an XML element.
 org.sakaiproject.entity.api.Entity newContainer(org.sakaiproject.entity.api.Entity other)
          Construct a new container resource, as a copy of another
 org.sakaiproject.entity.api.Entity newContainer(String ref)
          Construct a new continer given just ids.
 org.sakaiproject.entity.api.Edit newContainerEdit(Element element)
          Construct a new container resource, from an XML element.
 org.sakaiproject.entity.api.Edit newContainerEdit(org.sakaiproject.entity.api.Entity other)
          Construct a new container resource, as a copy of another
 org.sakaiproject.entity.api.Edit newContainerEdit(String ref)
          Construct a new continer given just ids.
protected  org.sakaiproject.message.api.MessageHeaderEdit newMessageHeader(org.sakaiproject.message.api.Message msg, Element el)
          Construct a new message header from XML in a DOM element.
protected  org.sakaiproject.message.api.MessageHeaderEdit newMessageHeader(org.sakaiproject.message.api.Message msg, org.sakaiproject.message.api.MessageHeader other)
          Construct a new message header as a copy of another.
protected  org.sakaiproject.message.api.MessageHeaderEdit newMessageHeader(org.sakaiproject.message.api.Message msg, String id)
          Construct a new message header from XML in a DOM element.
 org.sakaiproject.entity.api.Entity newResource(org.sakaiproject.entity.api.Entity container, Element element)
          Construct a new resource, from an XML element.
 org.sakaiproject.entity.api.Entity newResource(org.sakaiproject.entity.api.Entity container, org.sakaiproject.entity.api.Entity other)
          Construct a new resource from another resource of the same type.
 org.sakaiproject.entity.api.Entity newResource(org.sakaiproject.entity.api.Entity container, String id, Object[] others)
          Construct a new rsource given just an id.
 org.sakaiproject.entity.api.Edit newResourceEdit(org.sakaiproject.entity.api.Entity container, Element element)
          Construct a new resource, from an XML element.
 org.sakaiproject.entity.api.Edit newResourceEdit(org.sakaiproject.entity.api.Entity container, org.sakaiproject.entity.api.Entity other)
          Construct a new resource from another resource of the same type.
 org.sakaiproject.entity.api.Edit newResourceEdit(org.sakaiproject.entity.api.Entity container, String id, Object[] others)
          Construct a new rsource given just an id.
 boolean parseEntityReference(String reference, org.sakaiproject.entity.api.Reference ref)
          
protected  void printAnnouncementHtml(PrintWriter out, org.sakaiproject.entity.api.Reference ref)
          Print specified Announcement as HTML Page
protected  void printAnnouncementRss(OutputStream out, org.sakaiproject.entity.api.Reference rssRef)
          Print all Announcements as RSS Feed
protected  String serviceName()
          Report the Service API name being implemented.
 void setAliasService(org.sakaiproject.alias.api.AliasService aliasService)
           
 void setContentHostingService(org.sakaiproject.content.api.ContentHostingService service)
          Dependency: contentHostingService.
 void setFunctionManager(org.sakaiproject.authz.api.FunctionManager functionManager)
           
 void setNotificationService(org.sakaiproject.event.api.NotificationService service)
          Dependency: NotificationService.
 void setSecurityService(org.sakaiproject.authz.api.SecurityService securityService)
           
 void setSessionManager(org.sakaiproject.tool.api.SessionManager sessionManager)
           
 void setTimeService(org.sakaiproject.time.api.TimeService timeService)
           
 void setToolManager(org.sakaiproject.tool.api.ToolManager toolManager)
           
 Object[] storageFields(org.sakaiproject.entity.api.Entity r)
          Collect the fields that need to be stored outside the XML (for the resource).
 String[] summarizableToolIds()
           
 void transferCopyEntities(String fromContext, String toContext, List resourceIds)
          
 void transferCopyEntities(String fromContext, String toContext, List ids, boolean cleanup)
           
 Map<String,String> transferCopyEntitiesRefMigrator(String fromContext, String toContext, List resourceIds)
           
 Map<String,String> transferCopyEntitiesRefMigrator(String fromContext, String toContext, List ids, boolean cleanup)
           
 void updateEntityReferences(String toContext, Map<String,String> transversalMap)
          
 
Methods inherited from class org.sakaiproject.message.impl.BaseMessageService
addChannel, allowAddChannel, allowEditChannel, allowGetChannel, allowGetMessage, allowRemoveChannel, archive, archiveSynopticOptions, cancelChannel, cancelMessage, commitChannel, destroy, disableMessageChannel, editChannel, enableMessageChannel, findChannel, getAccessPoint, getChannel, getChannelIds, getChannelPublic, getChannels, getEntity, getEntityAuthzGroups, getEntityDescription, getEntityResourceProperties, getEntityUrl, getMessage, getMessages, getSummary, merge, messageReference, messageReference, newStorage, parseMergeChannelExtra, refresh, removeChannel, service, setAuthzGroupService, setCaching, setEntityManager, setEventTrackingService, setIdManager, setMemoryService, setServerConfigurationService, setSiteService, setThreadLocalManager, setUserDirectoryService, transferSynopticOptions, unlock, unlock2, unlock3, unlockCheck, unlockCheck2, unlockCheck3, willArchiveMerge
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.sakaiproject.message.api.MessageService
addChannel, allowAddChannel, allowEditChannel, allowGetChannel, allowRemoveChannel, cancelChannel, cancelMessage, commitChannel, editChannel, getChannel, getChannelIds, getChannelPublic, getChannels, getMessage, getMessages, getSummary, messageReference, messageReference, removeChannel
 
Methods inherited from interface org.sakaiproject.entity.api.EntityProducer
archive, getEntity, getEntityAuthzGroups, getEntityDescription, getEntityResourceProperties, getEntityUrl, merge, willArchiveMerge
 

Field Detail

rb

protected static org.sakaiproject.util.ResourceLoader rb
Messages, for the http access.


m_notificationService

protected org.sakaiproject.event.api.NotificationService m_notificationService
Dependency: NotificationService.

Constructor Detail

BaseAnnouncementService

public BaseAnnouncementService()
Method Detail

setContentHostingService

public void setContentHostingService(org.sakaiproject.content.api.ContentHostingService service)
Dependency: contentHostingService.

Parameters:
service - The NotificationService.

setFunctionManager

public void setFunctionManager(org.sakaiproject.authz.api.FunctionManager functionManager)

setAliasService

public void setAliasService(org.sakaiproject.alias.api.AliasService aliasService)

setTimeService

public void setTimeService(org.sakaiproject.time.api.TimeService timeService)
Overrides:
setTimeService in class org.sakaiproject.message.impl.BaseMessageService

setSessionManager

public void setSessionManager(org.sakaiproject.tool.api.SessionManager sessionManager)
Overrides:
setSessionManager in class org.sakaiproject.message.impl.BaseMessageService

setToolManager

public void setToolManager(org.sakaiproject.tool.api.ToolManager toolManager)

setSecurityService

public void setSecurityService(org.sakaiproject.authz.api.SecurityService securityService)
Overrides:
setSecurityService in class org.sakaiproject.message.impl.BaseMessageService

setNotificationService

public void setNotificationService(org.sakaiproject.event.api.NotificationService service)
Dependency: NotificationService.

Parameters:
service - The NotificationService.

init

public void init()
Final initialization, once all dependencies are set.

Overrides:
init in class org.sakaiproject.message.impl.BaseMessageService

newContainer

public org.sakaiproject.entity.api.Entity newContainer(String ref)
Construct a new continer given just ids.

Specified by:
newContainer in interface org.sakaiproject.util.StorageUser
Parameters:
ref - The container reference.
Returns:
The new containe Resource.

newContainer

public org.sakaiproject.entity.api.Entity newContainer(Element element)
Construct a new container resource, from an XML element.

Specified by:
newContainer in interface org.sakaiproject.util.StorageUser
Parameters:
element - The XML.
Returns:
The new container resource.

newContainer

public org.sakaiproject.entity.api.Entity newContainer(org.sakaiproject.entity.api.Entity other)
Construct a new container resource, as a copy of another

Specified by:
newContainer in interface org.sakaiproject.util.StorageUser
Parameters:
other - The other contianer to copy.
Returns:
The new container resource.

newResource

public org.sakaiproject.entity.api.Entity newResource(org.sakaiproject.entity.api.Entity container,
                                                      String id,
                                                      Object[] others)
Construct a new rsource given just an id.

Specified by:
newResource in interface org.sakaiproject.util.StorageUser
Parameters:
container - The Resource that is the container for the new resource (may be null).
id - The id for the new object.
others - (options) array of objects to load into the Resource's fields.
Returns:
The new resource.

newResource

public org.sakaiproject.entity.api.Entity newResource(org.sakaiproject.entity.api.Entity container,
                                                      Element element)
Construct a new resource, from an XML element.

Specified by:
newResource in interface org.sakaiproject.util.StorageUser
Parameters:
container - The Resource that is the container for the new resource (may be null).
element - The XML.
Returns:
The new resource from the XML.

newResource

public org.sakaiproject.entity.api.Entity newResource(org.sakaiproject.entity.api.Entity container,
                                                      org.sakaiproject.entity.api.Entity other)
Construct a new resource from another resource of the same type.

Specified by:
newResource in interface org.sakaiproject.util.StorageUser
Parameters:
container - The Resource that is the container for the new resource (may be null).
other - The other resource.
Returns:
The new resource as a copy of the other.

newContainerEdit

public org.sakaiproject.entity.api.Edit newContainerEdit(String ref)
Construct a new continer given just ids.

Specified by:
newContainerEdit in interface org.sakaiproject.util.StorageUser
Parameters:
ref - The container reference.
Returns:
The new containe Resource.

newContainerEdit

public org.sakaiproject.entity.api.Edit newContainerEdit(Element element)
Construct a new container resource, from an XML element.

Specified by:
newContainerEdit in interface org.sakaiproject.util.StorageUser
Parameters:
element - The XML.
Returns:
The new container resource.

newContainerEdit

public org.sakaiproject.entity.api.Edit newContainerEdit(org.sakaiproject.entity.api.Entity other)
Construct a new container resource, as a copy of another

Specified by:
newContainerEdit in interface org.sakaiproject.util.StorageUser
Parameters:
other - The other contianer to copy.
Returns:
The new container resource.

newResourceEdit

public org.sakaiproject.entity.api.Edit newResourceEdit(org.sakaiproject.entity.api.Entity container,
                                                        String id,
                                                        Object[] others)
Construct a new rsource given just an id.

Specified by:
newResourceEdit in interface org.sakaiproject.util.StorageUser
Parameters:
container - The Resource that is the container for the new resource (may be null).
id - The id for the new object.
others - (options) array of objects to load into the Resource's fields.
Returns:
The new resource.

newResourceEdit

public org.sakaiproject.entity.api.Edit newResourceEdit(org.sakaiproject.entity.api.Entity container,
                                                        Element element)
Construct a new resource, from an XML element.

Specified by:
newResourceEdit in interface org.sakaiproject.util.StorageUser
Parameters:
container - The Resource that is the container for the new resource (may be null).
element - The XML.
Returns:
The new resource from the XML.

newResourceEdit

public org.sakaiproject.entity.api.Edit newResourceEdit(org.sakaiproject.entity.api.Entity container,
                                                        org.sakaiproject.entity.api.Entity other)
Construct a new resource from another resource of the same type.

Specified by:
newResourceEdit in interface org.sakaiproject.util.StorageUser
Parameters:
container - The Resource that is the container for the new resource (may be null).
other - The other resource.
Returns:
The new resource as a copy of the other.

storageFields

public Object[] storageFields(org.sakaiproject.entity.api.Entity r)
Collect the fields that need to be stored outside the XML (for the resource).

Specified by:
storageFields in interface org.sakaiproject.util.StorageUser
Returns:
An array of field values to store in the record outside the XML (for the resource).

isDraft

public boolean isDraft(org.sakaiproject.entity.api.Entity r)
Check if this resource is in draft mode.

Specified by:
isDraft in interface org.sakaiproject.util.StorageUser
Parameters:
r - The resource.
Returns:
true if the resource is in draft mode, false if not.

getOwnerId

public String getOwnerId(org.sakaiproject.entity.api.Entity r)
Access the resource owner user id.

Specified by:
getOwnerId in interface org.sakaiproject.util.StorageUser
Parameters:
r - The resource.
Returns:
The resource owner user id.

getDate

public org.sakaiproject.time.api.Time getDate(org.sakaiproject.entity.api.Entity r)
Access the resource date.

Specified by:
getDate in interface org.sakaiproject.util.StorageUser
Parameters:
r - The resource.
Returns:
The resource date.

getMessage_order

public Integer getMessage_order(org.sakaiproject.entity.api.Entity r)
Access the resource Message Order.

Parameters:
r - The resource.
Returns:
The resource order.

serviceName

protected String serviceName()
Report the Service API name being implemented.

Specified by:
serviceName in class org.sakaiproject.message.impl.BaseMessageService

newMessageHeader

protected org.sakaiproject.message.api.MessageHeaderEdit newMessageHeader(org.sakaiproject.message.api.Message msg,
                                                                          String id)
Construct a new message header from XML in a DOM element.

Specified by:
newMessageHeader in class org.sakaiproject.message.impl.BaseMessageService
Parameters:
id - The message Id.
Returns:
The new message header.

newMessageHeader

protected org.sakaiproject.message.api.MessageHeaderEdit newMessageHeader(org.sakaiproject.message.api.Message msg,
                                                                          Element el)
Construct a new message header from XML in a DOM element.

Specified by:
newMessageHeader in class org.sakaiproject.message.impl.BaseMessageService
Parameters:
el - The XML DOM element that has the header information.
Returns:
The new message header.

newMessageHeader

protected org.sakaiproject.message.api.MessageHeaderEdit newMessageHeader(org.sakaiproject.message.api.Message msg,
                                                                          org.sakaiproject.message.api.MessageHeader other)
Construct a new message header as a copy of another.

Specified by:
newMessageHeader in class org.sakaiproject.message.impl.BaseMessageService
Parameters:
other - The other header to copy.
Returns:
The new message header.

eventId

protected String eventId(String secure)
Form a tracking event string based on a security function string.

Specified by:
eventId in class org.sakaiproject.message.impl.BaseMessageService
Parameters:
secure - The security function string.
Returns:
The event tracking string.

getReferenceRoot

protected String getReferenceRoot()
Return the reference rooot for use in resource references and urls.

Specified by:
getReferenceRoot in class org.sakaiproject.message.impl.BaseMessageService
Returns:
The reference rooot for use in resource references and urls.

parseEntityReference

public boolean parseEntityReference(String reference,
                                    org.sakaiproject.entity.api.Reference ref)

Specified by:
parseEntityReference in interface org.sakaiproject.entity.api.EntityProducer

getAnnouncementReference

public org.sakaiproject.entity.api.Reference getAnnouncementReference(String context)
Specified by:
getAnnouncementReference in interface AnnouncementService

channelReference

public String channelReference(String context,
                               String id)
Specified by:
channelReference in interface org.sakaiproject.message.api.MessageService
Overrides:
channelReference in class org.sakaiproject.message.impl.BaseMessageService

getRssUrl

public String getRssUrl(org.sakaiproject.entity.api.Reference ref)
Specified by:
getRssUrl in interface AnnouncementService

isMessageViewable

public boolean isMessageViewable(AnnouncementMessage message)

Specified by:
isMessageViewable in interface AnnouncementService

contextCreated

public void contextCreated(String context,
                           boolean toolPlacement)

Specified by:
contextCreated in interface org.sakaiproject.entity.api.ContextObserver

contextUpdated

public void contextUpdated(String context,
                           boolean toolPlacement)

Specified by:
contextUpdated in interface org.sakaiproject.entity.api.ContextObserver

contextDeleted

public void contextDeleted(String context,
                           boolean toolPlacement)

Specified by:
contextDeleted in interface org.sakaiproject.entity.api.ContextObserver

myToolIds

public String[] myToolIds()

Specified by:
myToolIds in interface org.sakaiproject.entity.api.ContextObserver
Specified by:
myToolIds in interface org.sakaiproject.entity.api.EntityTransferrer

generateItemElement

protected Element generateItemElement(Document doc,
                                      AnnouncementMessage msg,
                                      org.sakaiproject.entity.api.Reference msgRef)
Generate RSS Item element for specified assignment


printAnnouncementRss

protected void printAnnouncementRss(OutputStream out,
                                    org.sakaiproject.entity.api.Reference rssRef)
Print all Announcements as RSS Feed


printAnnouncementHtml

protected void printAnnouncementHtml(PrintWriter out,
                                     org.sakaiproject.entity.api.Reference ref)
                              throws org.sakaiproject.entity.api.EntityPermissionException,
                                     org.sakaiproject.entity.api.EntityNotDefinedException
Print specified Announcement as HTML Page

Throws:
org.sakaiproject.entity.api.EntityPermissionException
org.sakaiproject.entity.api.EntityNotDefinedException

getHttpAccess

public org.sakaiproject.entity.api.HttpAccess getHttpAccess()

Specified by:
getHttpAccess in interface org.sakaiproject.entity.api.EntityProducer
Overrides:
getHttpAccess in class org.sakaiproject.message.impl.BaseMessageService

getAnnouncementChannel

public AnnouncementChannel getAnnouncementChannel(String ref)
                                           throws org.sakaiproject.exception.IdUnusedException,
                                                  org.sakaiproject.exception.PermissionException
Return a specific announcement channel.

Specified by:
getAnnouncementChannel in interface AnnouncementService
Parameters:
ref - The channel reference.
Returns:
the AnnouncementChannel that has the specified name.
Throws:
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.

addAnnouncementChannel

public AnnouncementChannelEdit addAnnouncementChannel(String ref)
                                               throws org.sakaiproject.exception.IdUsedException,
                                                      org.sakaiproject.exception.IdInvalidException,
                                                      org.sakaiproject.exception.PermissionException
Add a new announcement channel.

Specified by:
addAnnouncementChannel in interface AnnouncementService
Parameters:
ref - The channel reference.
Returns:
The newly created channel.
Throws:
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.

getMessages

public List getMessages(String channelReference,
                        org.sakaiproject.javax.Filter filter,
                        boolean order,
                        boolean merged)
                 throws org.sakaiproject.exception.IdUnusedException,
                        org.sakaiproject.exception.PermissionException,
                        NullPointerException
Return a list of messages from the provided channel (merged flag returns merged messages)

Specified by:
getMessages in interface AnnouncementService
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:
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

getLabel

public String getLabel()

Specified by:
getLabel in interface org.sakaiproject.entity.api.EntityProducer

getSummaryFromHeader

protected String getSummaryFromHeader(org.sakaiproject.message.api.Message item,
                                      org.sakaiproject.message.api.MessageHeader header)
getSummaryFromHeader implementation

Overrides:
getSummaryFromHeader in class org.sakaiproject.message.impl.BaseMessageService

transferCopyEntities

public void transferCopyEntities(String fromContext,
                                 String toContext,
                                 List resourceIds)

Specified by:
transferCopyEntities in interface org.sakaiproject.entity.api.EntityTransferrer

transferCopyEntitiesRefMigrator

public Map<String,String> transferCopyEntitiesRefMigrator(String fromContext,
                                                          String toContext,
                                                          List resourceIds)
Specified by:
transferCopyEntitiesRefMigrator in interface org.sakaiproject.entity.api.EntityTransferrerRefMigrator

updateEntityReferences

public void updateEntityReferences(String toContext,
                                   Map<String,String> transversalMap)

Specified by:
updateEntityReferences in interface org.sakaiproject.entity.api.EntityTransferrerRefMigrator

summarizableToolIds

public String[] summarizableToolIds()
Specified by:
summarizableToolIds in interface org.sakaiproject.entity.api.EntitySummary

getSummarizableReference

public String getSummarizableReference(String siteId,
                                       String toolIdentifier)
Specified by:
getSummarizableReference in interface org.sakaiproject.entity.api.EntitySummary
Overrides:
getSummarizableReference in class org.sakaiproject.message.impl.BaseMessageService

transferCopyEntities

public void transferCopyEntities(String fromContext,
                                 String toContext,
                                 List ids,
                                 boolean cleanup)
Specified by:
transferCopyEntities in interface org.sakaiproject.entity.api.EntityTransferrer

transferCopyEntitiesRefMigrator

public Map<String,String> transferCopyEntitiesRefMigrator(String fromContext,
                                                          String toContext,
                                                          List ids,
                                                          boolean cleanup)
Specified by:
transferCopyEntitiesRefMigrator in interface org.sakaiproject.entity.api.EntityTransferrerRefMigrator

clearMessagesCache

public void clearMessagesCache(String channelRef)
Specified by:
clearMessagesCache in interface AnnouncementService


Copyright © 2003-2012 University of Michigan. All Rights Reserved.