|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sakaiproject.message.impl.BaseMessageService
org.sakaiproject.announcement.impl.BaseAnnouncementService
public abstract class BaseAnnouncementService
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 |
|---|
protected static org.sakaiproject.util.ResourceLoader rb
protected org.sakaiproject.event.api.NotificationService m_notificationService
| Constructor Detail |
|---|
public BaseAnnouncementService()
| Method Detail |
|---|
public void setContentHostingService(org.sakaiproject.content.api.ContentHostingService service)
service - The NotificationService.public void setFunctionManager(org.sakaiproject.authz.api.FunctionManager functionManager)
public void setAliasService(org.sakaiproject.alias.api.AliasService aliasService)
public void setTimeService(org.sakaiproject.time.api.TimeService timeService)
setTimeService in class org.sakaiproject.message.impl.BaseMessageServicepublic void setSessionManager(org.sakaiproject.tool.api.SessionManager sessionManager)
setSessionManager in class org.sakaiproject.message.impl.BaseMessageServicepublic void setToolManager(org.sakaiproject.tool.api.ToolManager toolManager)
public void setSecurityService(org.sakaiproject.authz.api.SecurityService securityService)
setSecurityService in class org.sakaiproject.message.impl.BaseMessageServicepublic void setNotificationService(org.sakaiproject.event.api.NotificationService service)
service - The NotificationService.public void init()
init in class org.sakaiproject.message.impl.BaseMessageServicepublic org.sakaiproject.entity.api.Entity newContainer(String ref)
newContainer in interface org.sakaiproject.util.StorageUserref - The container reference.
public org.sakaiproject.entity.api.Entity newContainer(Element element)
newContainer in interface org.sakaiproject.util.StorageUserelement - The XML.
public org.sakaiproject.entity.api.Entity newContainer(org.sakaiproject.entity.api.Entity other)
newContainer in interface org.sakaiproject.util.StorageUserother - The other contianer to copy.
public org.sakaiproject.entity.api.Entity newResource(org.sakaiproject.entity.api.Entity container,
String id,
Object[] others)
newResource in interface org.sakaiproject.util.StorageUsercontainer - 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.
public org.sakaiproject.entity.api.Entity newResource(org.sakaiproject.entity.api.Entity container,
Element element)
newResource in interface org.sakaiproject.util.StorageUsercontainer - The Resource that is the container for the new resource (may be null).element - The XML.
public org.sakaiproject.entity.api.Entity newResource(org.sakaiproject.entity.api.Entity container,
org.sakaiproject.entity.api.Entity other)
newResource in interface org.sakaiproject.util.StorageUsercontainer - The Resource that is the container for the new resource (may be null).other - The other resource.
public org.sakaiproject.entity.api.Edit newContainerEdit(String ref)
newContainerEdit in interface org.sakaiproject.util.StorageUserref - The container reference.
public org.sakaiproject.entity.api.Edit newContainerEdit(Element element)
newContainerEdit in interface org.sakaiproject.util.StorageUserelement - The XML.
public org.sakaiproject.entity.api.Edit newContainerEdit(org.sakaiproject.entity.api.Entity other)
newContainerEdit in interface org.sakaiproject.util.StorageUserother - The other contianer to copy.
public org.sakaiproject.entity.api.Edit newResourceEdit(org.sakaiproject.entity.api.Entity container,
String id,
Object[] others)
newResourceEdit in interface org.sakaiproject.util.StorageUsercontainer - 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.
public org.sakaiproject.entity.api.Edit newResourceEdit(org.sakaiproject.entity.api.Entity container,
Element element)
newResourceEdit in interface org.sakaiproject.util.StorageUsercontainer - The Resource that is the container for the new resource (may be null).element - The XML.
public org.sakaiproject.entity.api.Edit newResourceEdit(org.sakaiproject.entity.api.Entity container,
org.sakaiproject.entity.api.Entity other)
newResourceEdit in interface org.sakaiproject.util.StorageUsercontainer - The Resource that is the container for the new resource (may be null).other - The other resource.
public Object[] storageFields(org.sakaiproject.entity.api.Entity r)
storageFields in interface org.sakaiproject.util.StorageUserpublic boolean isDraft(org.sakaiproject.entity.api.Entity r)
isDraft in interface org.sakaiproject.util.StorageUserr - The resource.
public String getOwnerId(org.sakaiproject.entity.api.Entity r)
getOwnerId in interface org.sakaiproject.util.StorageUserr - The resource.
public org.sakaiproject.time.api.Time getDate(org.sakaiproject.entity.api.Entity r)
getDate in interface org.sakaiproject.util.StorageUserr - The resource.
public Integer getMessage_order(org.sakaiproject.entity.api.Entity r)
r - The resource.
protected String serviceName()
serviceName in class org.sakaiproject.message.impl.BaseMessageService
protected org.sakaiproject.message.api.MessageHeaderEdit newMessageHeader(org.sakaiproject.message.api.Message msg,
String id)
newMessageHeader in class org.sakaiproject.message.impl.BaseMessageServiceid - The message Id.
protected org.sakaiproject.message.api.MessageHeaderEdit newMessageHeader(org.sakaiproject.message.api.Message msg,
Element el)
newMessageHeader in class org.sakaiproject.message.impl.BaseMessageServiceel - The XML DOM element that has the header information.
protected org.sakaiproject.message.api.MessageHeaderEdit newMessageHeader(org.sakaiproject.message.api.Message msg,
org.sakaiproject.message.api.MessageHeader other)
newMessageHeader in class org.sakaiproject.message.impl.BaseMessageServiceother - The other header to copy.
protected String eventId(String secure)
eventId in class org.sakaiproject.message.impl.BaseMessageServicesecure - The security function string.
protected String getReferenceRoot()
getReferenceRoot in class org.sakaiproject.message.impl.BaseMessageService
public boolean parseEntityReference(String reference,
org.sakaiproject.entity.api.Reference ref)
parseEntityReference in interface org.sakaiproject.entity.api.EntityProducerpublic org.sakaiproject.entity.api.Reference getAnnouncementReference(String context)
getAnnouncementReference in interface AnnouncementService
public String channelReference(String context,
String id)
channelReference in interface org.sakaiproject.message.api.MessageServicechannelReference in class org.sakaiproject.message.impl.BaseMessageServicepublic String getRssUrl(org.sakaiproject.entity.api.Reference ref)
getRssUrl in interface AnnouncementServicepublic boolean isMessageViewable(AnnouncementMessage message)
isMessageViewable in interface AnnouncementService
public void contextCreated(String context,
boolean toolPlacement)
contextCreated in interface org.sakaiproject.entity.api.ContextObserver
public void contextUpdated(String context,
boolean toolPlacement)
contextUpdated in interface org.sakaiproject.entity.api.ContextObserver
public void contextDeleted(String context,
boolean toolPlacement)
contextDeleted in interface org.sakaiproject.entity.api.ContextObserverpublic String[] myToolIds()
myToolIds in interface org.sakaiproject.entity.api.ContextObservermyToolIds in interface org.sakaiproject.entity.api.EntityTransferrer
protected Element generateItemElement(Document doc,
AnnouncementMessage msg,
org.sakaiproject.entity.api.Reference msgRef)
protected void printAnnouncementRss(OutputStream out,
org.sakaiproject.entity.api.Reference rssRef)
protected void printAnnouncementHtml(PrintWriter out,
org.sakaiproject.entity.api.Reference ref)
throws org.sakaiproject.entity.api.EntityPermissionException,
org.sakaiproject.entity.api.EntityNotDefinedException
org.sakaiproject.entity.api.EntityPermissionException
org.sakaiproject.entity.api.EntityNotDefinedExceptionpublic org.sakaiproject.entity.api.HttpAccess getHttpAccess()
getHttpAccess in interface org.sakaiproject.entity.api.EntityProducergetHttpAccess in class org.sakaiproject.message.impl.BaseMessageService
public AnnouncementChannel getAnnouncementChannel(String ref)
throws org.sakaiproject.exception.IdUnusedException,
org.sakaiproject.exception.PermissionException
getAnnouncementChannel in interface AnnouncementServiceref - The channel reference.
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 AnnouncementChannelEdit addAnnouncementChannel(String ref)
throws org.sakaiproject.exception.IdUsedException,
org.sakaiproject.exception.IdInvalidException,
org.sakaiproject.exception.PermissionException
addAnnouncementChannel in interface AnnouncementServiceref - The channel reference.
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 List getMessages(String channelReference,
org.sakaiproject.javax.Filter filter,
boolean order,
boolean merged)
throws org.sakaiproject.exception.IdUnusedException,
org.sakaiproject.exception.PermissionException,
NullPointerException
getMessages in interface AnnouncementServicechannelReference - 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.
NullPointerExceptionpublic String getLabel()
getLabel in interface org.sakaiproject.entity.api.EntityProducer
protected String getSummaryFromHeader(org.sakaiproject.message.api.Message item,
org.sakaiproject.message.api.MessageHeader header)
getSummaryFromHeader in class org.sakaiproject.message.impl.BaseMessageService
public void transferCopyEntities(String fromContext,
String toContext,
List resourceIds)
transferCopyEntities in interface org.sakaiproject.entity.api.EntityTransferrer
public Map<String,String> transferCopyEntitiesRefMigrator(String fromContext,
String toContext,
List resourceIds)
transferCopyEntitiesRefMigrator in interface org.sakaiproject.entity.api.EntityTransferrerRefMigrator
public void updateEntityReferences(String toContext,
Map<String,String> transversalMap)
updateEntityReferences in interface org.sakaiproject.entity.api.EntityTransferrerRefMigratorpublic String[] summarizableToolIds()
summarizableToolIds in interface org.sakaiproject.entity.api.EntitySummary
public String getSummarizableReference(String siteId,
String toolIdentifier)
getSummarizableReference in interface org.sakaiproject.entity.api.EntitySummarygetSummarizableReference in class org.sakaiproject.message.impl.BaseMessageService
public void transferCopyEntities(String fromContext,
String toContext,
List ids,
boolean cleanup)
transferCopyEntities in interface org.sakaiproject.entity.api.EntityTransferrer
public Map<String,String> transferCopyEntitiesRefMigrator(String fromContext,
String toContext,
List ids,
boolean cleanup)
transferCopyEntitiesRefMigrator in interface org.sakaiproject.entity.api.EntityTransferrerRefMigratorpublic void clearMessagesCache(String channelRef)
clearMessagesCache in interface AnnouncementService
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||