| java.lang.Object org.sakaiproject.message.impl.BaseMessageService
All known Subclasses: org.sakaiproject.chat.impl.BaseChatService, org.sakaiproject.discussion.impl.BaseDiscussionService, org.sakaiproject.announcement.impl.BaseAnnouncementService, org.sakaiproject.mailarchive.impl.BaseMailArchiveService,
Inner Class :protected interface Storage | |
Inner Class :protected class MessagePermissionFilter implements Filter | |
Inner Class :protected class MessageSelectionFilter implements Filter | |
Method Summary | |
public MessageChannelEdit | addChannel(String ref) Add a new channel. | public boolean | allowAddChannel(String ref) check permissions for addChannel().
Parameters: ref - The channel reference. | public boolean | allowEditChannel(String ref) check permissions for editChannel()
Parameters: ref - The channel reference. | public boolean | allowGetChannel(String ref) check permissions for getChannel().
Parameters: ref - The channel reference. | protected boolean | allowGetMessage(String channelRef, String msgRef) Check the message read permission for the message
Parameters: ref - The Reference (assumed to be to a message). | public boolean | allowRemoveChannel(String ref) Check permissions for removeChannel().
Parameters: ref - The channel reference. | public String | archive(String siteId, Document doc, Stack stack, String archivePath, List attachments) | public void | archiveSynopticOptions(String siteId, Document doc, Element element) | public void | cancelChannel(MessageChannelEdit edit) Cancel the changes made to a MessageChannelEdit object, and release the lock. | public void | cancelMessage(MessageEdit edit) Cancel the changes made to a MessageEdit object, and release the lock. | public String | channelReference(String context, String id) Access the internal reference which can be used to access the channel from within the system.
Parameters: context - The context. Parameters: id - The channel id. | public void | commitChannel(MessageChannelEdit edit) Commit the changes made to a MessageChannelEdit object, and release the lock. | public void | destroy() | protected void | disableMessageChannel(String siteId) Remove the main message channel for a site. | public MessageChannelEdit | editChannel(String ref) Return a specific channel, as specified by channel id, locked for update. | protected void | enableMessageChannel(String siteId) Setup a main message channel for a site. | abstract protected String | eventId(String secure) Form a tracking event string based on a security function string.
Parameters: secure - The security function string. | protected MessageChannel | findChannel(String ref) Find the channel, in cache or info store - cache it if newly found.
Parameters: ref - The channel reference. | protected String | getAccessPoint(boolean relative) Access the partial URL that forms the root of resource URLs.
Parameters: relative - if true, form within the access path only (i.e. | public MessageChannel | getChannel(String ref) Return a specific channel.
Parameters: ref - The channel reference. | public List | getChannelIds(String context) Access a list of channel ids that are defined related to the context. | public List | getChannels() Return a list of all the defined channels. | public Entity | getEntity(Reference ref) | public Collection | getEntityAuthzGroups(Reference ref, String userId) | public String | getEntityDescription(Reference ref) | public ResourceProperties | getEntityResourceProperties(Reference ref) | public String | getEntityUrl(Reference ref) | public HttpAccess | getHttpAccess() | public Message | getMessage(Reference ref) Get a message, given a reference. | public List | getMessages(String channelRef, Time afterDate, int limitedToLatest, boolean ascending, boolean includeDrafts, boolean pubViewOnly) | abstract protected String | getReferenceRoot() Return the reference rooot for use in resource references and urls. | public Map | getSummary(String channel, int items, int days) | protected String | getSummaryFromHeader(Message item, MessageHeader header) | public void | init() Final initialization, once all dependencies are set. | public String | merge(String siteId, Element root, String archivePath, String fromSiteId, Map attachmentNames, Map userIdTrans, Set userListAllowImport) | public String | messageReference(String context, String channelId, String id) Access the internal reference which can be used to access the message from within the system.
Parameters: context - The context. Parameters: channelId - The channel id. Parameters: id - The message id. | public String | messageReference(String channelRef, String id) Access the internal reference which can be used to access the message from within the system.
Parameters: channelRef - The channel reference. Parameters: id - The message id. | abstract protected MessageHeaderEdit | newMessageHeader(Message msg, String id) Construct a new message header from XML in a DOM element.
Parameters: msg - The message to own this header. Parameters: id - The message Id. | abstract protected MessageHeaderEdit | newMessageHeader(Message msg, Element el) Construct a new message header from XML in a DOM element.
Parameters: msg - The message to own this header. Parameters: el - The XML DOM element that has the header information. | abstract protected MessageHeaderEdit | newMessageHeader(Message msg, MessageHeader other) Construct a new message header as a copy of another.
Parameters: msg - The message to own this header. Parameters: other - The other header to copy. | abstract protected Storage | newStorage() Construct a Storage object. | protected void | parseMergeChannelExtra(Element element3, String channelRef) Handle the extra "categtories" stuff in the channel part of the merge xml. | public Object | refresh(Object key, Object oldValue, Event event) Get a new value for this key whose value has already expired in the cache.
Parameters: key - The key whose value has expired and needs to be refreshed. Parameters: oldValue - The old exipred value of the key. Parameters: event - The event which triggered this refresh. | public void | removeChannel(MessageChannelEdit channel) Remove a channel. | protected BaseMessageService | service() Access this service from the inner classes. | abstract protected String | serviceName() Report the Service API name being implemented. | public void | setAuthzGroupService(AuthzGroupService service) Dependency: AuthzGroupService. | public void | setCaching(String value) | public void | setEntityManager(EntityManager service) Dependency: EntityManager. | public void | setEventTrackingService(EventTrackingService service) Dependency: EventTrackingService. | public void | setIdManager(IdManager service) Dependency: IdManager. | public void | setMemoryService(MemoryService service) Dependency: MemoryService. | public void | setSecurityService(SecurityService service) Dependency: SecurityService. | public void | setServerConfigurationService(ServerConfigurationService service) Dependency: ServerConfigurationService. | public void | setSessionManager(SessionManager service) Dependency: SessionManager. | public void | setSiteService(SiteService service) Dependency: SiteService. | public void | setThreadLocalManager(ThreadLocalManager service) Dependency: ThreadLocalManager. | public void | setTimeService(TimeService service) Dependency: TimeService. | public void | setUserDirectoryService(UserDirectoryService service) Dependency: UserDirectoryService. | public void | transferSynopticOptions(String fromContext, String toContext) | protected void | unlock(String lock, String resource) Check security permission. | protected void | unlock2(String lock1, String lock2, String resource) Check security permission. | protected void | unlock3(String lock1, String lock2, String lock3, String resource) Check security permission. | protected boolean | unlockCheck(String lock, String resource) Check security permission.
Parameters: lock - The lock id string. Parameters: resource - The resource reference string, or null if no resource is involved. | protected boolean | unlockCheck2(String lock1, String lock2, String resource) Check security permission, for either of two locks/
Parameters: lock1 - The lock id string. Parameters: lock2 - The lock id string. Parameters: resource - The resource reference string, or null if no resource is involved. | protected boolean | unlockCheck3(String lock1, String lock2, String lock3, String resource) Check security permission, for any of three locks/
Parameters: lock1 - The lock id string. Parameters: lock2 - The lock id string. Parameters: resource - The resource reference string, or null if no resource is involved. | public boolean | willArchiveMerge() |
m_caching | protected boolean m_caching(Code) | | Configuration: cache, or not.
|
m_channelCache | protected Cache m_channelCache(Code) | | A Cache object for caching: channels keyed by reference. (if m_caching)
|
m_messageCaches | protected Hashtable m_messageCaches(Code) | | A bunch of caches for messages: keyed by channel id, the cache is keyed by message reference. (if m_caching)
|
m_storage | protected Storage m_storage(Code) | | A Storage object for persistent storage.
|
allowAddChannel | public boolean allowAddChannel(String ref)(Code) | | check permissions for addChannel().
Parameters: ref - The channel reference. true if the user is allowed to addChannel(channelId), false if not. |
allowEditChannel | public boolean allowEditChannel(String ref)(Code) | | check permissions for editChannel()
Parameters: ref - The channel reference. true if the user is allowed to update the channel, false if not. |
allowGetChannel | public boolean allowGetChannel(String ref)(Code) | | check permissions for getChannel().
Parameters: ref - The channel reference. true if the user is allowed to getChannel(channelId), false if not. |
allowGetMessage | protected boolean allowGetMessage(String channelRef, String msgRef)(Code) | | Check the message read permission for the message
Parameters: ref - The Reference (assumed to be to a message). True if the end user has permission to read the message, or permission to all messages in the channel, false if not. |
allowRemoveChannel | public boolean allowRemoveChannel(String ref)(Code) | | Check permissions for removeChannel().
Parameters: ref - The channel reference. true if the user is allowed to removeChannel(), false if not. |
archiveSynopticOptions | public void archiveSynopticOptions(String siteId, Document doc, Element element)(Code) | | try to add synoptic options for this tool to the archive, if they exist
Parameters: siteId - Parameters: doc - Parameters: element - |
cancelChannel | public void cancelChannel(MessageChannelEdit edit)(Code) | | 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: user - The MessageChannelEdit object to commit. |
cancelMessage | public void cancelMessage(MessageEdit edit)(Code) | | Cancel the changes made to a MessageEdit object, and release the lock. The MessageChannelEdit is disabled, and not to be used after this call.
Parameters: user - The MessageEdit object to cancel. |
channelReference | public String channelReference(String context, String id)(Code) | | Access the internal reference which can be used to access the channel from within the system.
Parameters: context - The context. Parameters: id - The channel id. The the internal reference which can be used to access the channel from within the system. |
commitChannel | public void commitChannel(MessageChannelEdit edit)(Code) | | 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: user - The MessageChannelEdit object to commit. |
destroy | public void destroy()(Code) | | Destroy
|
disableMessageChannel | protected void disableMessageChannel(String siteId)(Code) | | Remove the main message channel for a site.
Parameters: site - The site. |
enableMessageChannel | protected void enableMessageChannel(String siteId)(Code) | | Setup a main message channel for a site.
Parameters: siteId - The site id. |
eventId | abstract protected String eventId(String secure)(Code) | | Form a tracking event string based on a security function string.
Parameters: secure - The security function string. The event tracking string. |
findChannel | protected MessageChannel findChannel(String ref)(Code) | | Find the channel, in cache or info store - cache it if newly found.
Parameters: ref - The channel reference. The channel, if found. |
getAccessPoint | protected String getAccessPoint(boolean relative)(Code) | | Access the partial URL that forms the root of resource URLs.
Parameters: relative - if true, form within the access path only (i.e. starting with /msg) the partial URL that forms the root of resource URLs. |
getChannelIds | public List getChannelIds(String context)(Code) | | Access a list of channel ids that are defined related to the context.
Parameters: context - The context in which to search A List (String) of channel id for channels withing the context. |
getChannels | public List getChannels()(Code) | | Return a list of all the defined channels.
a list of MessageChannel (or extension) objects (may be empty). |
getReferenceRoot | abstract protected String getReferenceRoot()(Code) | | Return the reference rooot for use in resource references and urls.
The reference rooot for use in resource references and urls. |
init | public void init()(Code) | | Final initialization, once all dependencies are set.
|
messageReference | public String messageReference(String context, String channelId, String id)(Code) | | Access the internal reference which can be used to access the message from within the system.
Parameters: context - The context. Parameters: channelId - The channel id. Parameters: id - The message id. The the internal reference which can be used to access the message from within the system. |
messageReference | public String messageReference(String channelRef, String id)(Code) | | Access the internal reference which can be used to access the message from within the system.
Parameters: channelRef - The channel reference. Parameters: id - The message id. The the internal reference which can be used to access the message from within the system. |
newMessageHeader | abstract protected MessageHeaderEdit newMessageHeader(Message msg, String id)(Code) | | Construct a new message header from XML in a DOM element.
Parameters: msg - The message to own this header. Parameters: id - The message Id. The new message header. |
newMessageHeader | abstract protected MessageHeaderEdit newMessageHeader(Message msg, Element el)(Code) | | Construct a new message header from XML in a DOM element.
Parameters: msg - The message to own this header. Parameters: el - The XML DOM element that has the header information. The new message header. |
newMessageHeader | abstract protected MessageHeaderEdit newMessageHeader(Message msg, MessageHeader other)(Code) | | Construct a new message header as a copy of another.
Parameters: msg - The message to own this header. Parameters: other - The other header to copy. The new message header. |
newStorage | abstract protected Storage newStorage()(Code) | | Construct a Storage object.
The new storage object. |
parseMergeChannelExtra | protected void parseMergeChannelExtra(Element element3, String channelRef)(Code) | | Handle the extra "categtories" stuff in the channel part of the merge xml.
Parameters: element - The "channel" node child. Parameters: channelRef - The message channel ref. |
refresh | public Object refresh(Object key, Object oldValue, Event event)(Code) | | Get a new value for this key whose value has already expired in the cache.
Parameters: key - The key whose value has expired and needs to be refreshed. Parameters: oldValue - The old exipred value of the key. Parameters: event - The event which triggered this refresh. a new value for use in the cache for this key; if null, the entry will be removed. |
serviceName | abstract protected String serviceName()(Code) | | Report the Service API name being implemented.
|
setAuthzGroupService | public void setAuthzGroupService(AuthzGroupService service)(Code) | | Dependency: AuthzGroupService.
Parameters: service - The AuthzGroupService. |
setCaching | public void setCaching(String value)(Code) | | Configuration: set the locks-in-db
Parameters: path - The storage path. |
setEntityManager | public void setEntityManager(EntityManager service)(Code) | | Dependency: EntityManager.
Parameters: service - The EntityManager. |
setEventTrackingService | public void setEventTrackingService(EventTrackingService service)(Code) | | Dependency: EventTrackingService.
Parameters: service - The EventTrackingService. |
setIdManager | public void setIdManager(IdManager service)(Code) | | Dependency: IdManager.
Parameters: service - The IdManager. |
setMemoryService | public void setMemoryService(MemoryService service)(Code) | | Dependency: MemoryService.
Parameters: service - The MemoryService. |
setSecurityService | public void setSecurityService(SecurityService service)(Code) | | Dependency: SecurityService.
Parameters: service - The SecurityService. |
setServerConfigurationService | public void setServerConfigurationService(ServerConfigurationService service)(Code) | | Dependency: ServerConfigurationService.
Parameters: service - The ServerConfigurationService. |
setSessionManager | public void setSessionManager(SessionManager service)(Code) | | Dependency: SessionManager.
Parameters: service - The SessionManager. |
setSiteService | public void setSiteService(SiteService service)(Code) | | Dependency: SiteService.
Parameters: service - The SiteService. |
setThreadLocalManager | public void setThreadLocalManager(ThreadLocalManager service)(Code) | | Dependency: ThreadLocalManager.
Parameters: service - The ThreadLocalManager. |
setTimeService | public void setTimeService(TimeService service)(Code) | | Dependency: TimeService.
Parameters: service - The TimeService. |
setUserDirectoryService | public void setUserDirectoryService(UserDirectoryService service)(Code) | | Dependency: UserDirectoryService.
Parameters: service - The UserDirectoryService. |
transferSynopticOptions | public void transferSynopticOptions(String fromContext, String toContext)(Code) | | Import the synoptic tool options from another site
Parameters: fromContext - Parameters: toContext - |
unlock | protected void unlock(String lock, String resource) throws PermissionException(Code) | | Check security permission.
Parameters: lock - The lock id string. Parameters: resource - The resource reference string, or null if no resource is involved. exception: PermissionException - Thrown if the user does not have access |
unlock2 | protected void unlock2(String lock1, String lock2, String resource) throws PermissionException(Code) | | Check security permission.
Parameters: lock1 - The lock id string. Parameters: lock2 - The lock id string. Parameters: resource - The resource reference string, or null if no resource is involved. exception: PermissionException - Thrown if the user does not have access to either. |
unlock3 | protected void unlock3(String lock1, String lock2, String lock3, String resource) throws PermissionException(Code) | | Check security permission.
Parameters: lock1 - The lock id string. Parameters: lock2 - The lock id string. Parameters: lock3 - The lock id string. Parameters: resource - The resource reference string, or null if no resource is involved. exception: PermissionException - Thrown if the user does not have access to either. |
unlockCheck | protected boolean unlockCheck(String lock, String resource)(Code) | | Check security permission.
Parameters: lock - The lock id string. Parameters: resource - The resource reference string, or null if no resource is involved. true if allowd, false if not |
unlockCheck2 | protected boolean unlockCheck2(String lock1, String lock2, String resource)(Code) | | Check security permission, for either of two locks/
Parameters: lock1 - The lock id string. Parameters: lock2 - The lock id string. Parameters: resource - The resource reference string, or null if no resource is involved. true if either allowed, false if not |
unlockCheck3 | protected boolean unlockCheck3(String lock1, String lock2, String lock3, String resource)(Code) | | Check security permission, for any of three locks/
Parameters: lock1 - The lock id string. Parameters: lock2 - The lock id string. Parameters: resource - The resource reference string, or null if no resource is involved. true if either allowed, false if not |
willArchiveMerge | public boolean willArchiveMerge()(Code) | | |
|
|