Java Doc for MessageService.java in  » ERP-CRM-Financial » sakai » org » sakaiproject » message » api » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » ERP CRM Financial » sakai » org.sakaiproject.message.api 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.sakaiproject.message.api.MessageService

All known Subclasses:   org.sakaiproject.message.impl.BaseMessageService,
MessageService
public interface MessageService extends EntityProducer(Code)

GenericMessageService is the base interface for the different specific Sakai communications service such as Chat, Announcements, etc.

The service manages a set of message channels, each containing a set of messages.

Channels and Messages can be worked with through the MessageChannel and Message APIs and their extensions.



Field Summary
final public static  StringREF_TYPE_CHANNEL
     The Reference type for a channel.
final public static  StringREF_TYPE_MESSAGE
     The Reference type for a messgae.
final public static  StringSECURE_ADD
     Security function / event for adding channel / message.
final public static  StringSECURE_ALL_GROUPS
     Security function giving the user permission to all groups, if granted to at the channel or site level.
final public static  StringSECURE_READ
     Security function / event for reading channel / message.
final public static  StringSECURE_READ_DRAFT
     Security function / event for accessing someone elses draft.
final public static  StringSECURE_REMOVE_ANY
     Security function / event for removing anyone's message or channel.
final public static  StringSECURE_REMOVE_OWN
     Security function / event for removing one's own message.
final public static  StringSECURE_UPDATE_ANY
     Security function / event for updating any message.
final public static  StringSECURE_UPDATE_OWN
     Security function / event for updating one's own message or the channel.


Method Summary
public  MessageChannelEditaddChannel(String ref)
     Add a new channel.
public  booleanallowAddChannel(String ref)
     check permissions for addChannel().
Parameters:
  ref - The channel reference.
public  booleanallowEditChannel(String ref)
     check permissions for editChannel()
Parameters:
  ref - The channel reference.
public  booleanallowGetChannel(String ref)
     check permissions for getChannel().
Parameters:
  ref - The channel reference.
public  booleanallowRemoveChannel(String ref)
     Check permissions for removeChannel().
Parameters:
  ref - The channel reference.
public  voidcancelChannel(MessageChannelEdit edit)
     Cancel the changes made to a MessageChannelEdit object, and release the lock.
public  voidcancelMessage(MessageEdit edit)
     Cancel the changes made to a MessageEdit object, and release the lock.
public  StringchannelReference(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  voidcommitChannel(MessageChannelEdit edit)
     Commit the changes made to a MessageChannelEdit object, and release the lock.
public  MessageChannelEditeditChannel(String ref)
     Return a specific channel, as specified by channel id, locked for update.
public  MessageChannelgetChannel(String ref)
     Return a specific channel.
Parameters:
  ref - The channel reference.
public  ListgetChannelIds(String context)
     Access a list of channel ids that are defined related to the context.
public  ListgetChannels()
     Return a list of all the defined channels.
public  MessagegetMessage(Reference ref)
     Get a message, given a reference.
public  ListgetMessages(String channelRef, Time afterDate, int limitedToLatest, boolean ascending, boolean includeDrafts, boolean pubViewOnly)
     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.
public  MapgetSummary(String ref, int items, int days)
    
public  StringmessageReference(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  StringmessageReference(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.
public  voidremoveChannel(MessageChannelEdit channel)
     Remove a channel - it must be locked from editChannel().

Field Detail
REF_TYPE_CHANNEL
final public static String REF_TYPE_CHANNEL(Code)
The Reference type for a channel.



REF_TYPE_MESSAGE
final public static String REF_TYPE_MESSAGE(Code)
The Reference type for a messgae.



SECURE_ADD
final public static String SECURE_ADD(Code)
Security function / event for adding channel / message.



SECURE_ALL_GROUPS
final public static String SECURE_ALL_GROUPS(Code)
Security function giving the user permission to all groups, if granted to at the channel or site level.



SECURE_READ
final public static String SECURE_READ(Code)
Security function / event for reading channel / message.



SECURE_READ_DRAFT
final public static String SECURE_READ_DRAFT(Code)
Security function / event for accessing someone elses draft.



SECURE_REMOVE_ANY
final public static String SECURE_REMOVE_ANY(Code)
Security function / event for removing anyone's message or channel.



SECURE_REMOVE_OWN
final public static String SECURE_REMOVE_OWN(Code)
Security function / event for removing one's own message.



SECURE_UPDATE_ANY
final public static String SECURE_UPDATE_ANY(Code)
Security function / event for updating any message.



SECURE_UPDATE_OWN
final public static String SECURE_UPDATE_OWN(Code)
Security function / event for updating one's own message or the channel.





Method Detail
addChannel
public MessageChannelEdit addChannel(String ref) throws IdUsedException, IdInvalidException, PermissionException(Code)
Add a new channel. Must commitEdit() to make official, or cancelEdit() when done!
Parameters:
  ref - The channel reference. The newly created channel, locked for update.
exception:
  IdUsedException - if the id is not unique.
exception:
  IdInvalidException - if the id is not made up of valid characters.
exception:
  PermissionException - if the user does not have permission to add a channel.



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.



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.



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 cancel.



cancelMessage
public void cancelMessage(MessageEdit edit)(Code)
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:
  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.



editChannel
public MessageChannelEdit editChannel(String ref) throws IdUnusedException, PermissionException, InUseException(Code)
Return a specific channel, as specified by channel id, locked for update. Must commitEdit() to make official, or cancelEdit() when done!
Parameters:
  ref - The channel reference. the Channel that has the specified id.
exception:
  IdUnusedException - If this name is not a defined channel.
exception:
  PermissionException - If the user does not have any permissions to edit the channel.
exception:
  InUseException - if the channel is locked for edit by someone else.



getChannel
public MessageChannel getChannel(String ref) throws IdUnusedException, PermissionException(Code)
Return a specific channel.
Parameters:
  ref - The channel reference. the MessageChannel that has the specified name.
exception:
  IdUnusedException - If this name is not defined for any channel.
exception:
  PermissionException - If the user does not have any permissions to the channel.



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).



getMessage
public Message getMessage(Reference ref) throws IdUnusedException, PermissionException(Code)
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:
  ref - The message reference The message.
exception:
  IdUnusedException - If this reference does not identify a message.
exception:
  PermissionException - If the user does not have any permissions to the message.



getMessages
public List getMessages(String channelRef, Time afterDate, int limitedToLatest, boolean ascending, boolean includeDrafts, boolean pubViewOnly) throws PermissionException(Code)
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:
  afterDate - if null, no date limit, else limited to only messages after this date.
Parameters:
  limitedToLatest - if 0, no count limit, else limited to only the latest this number of messages.
Parameters:
  ascending - if true, sort oldest first, else sort latest first.
Parameters:
  includeDrafts - if true, include drafts (if the user has draft permission), else leave them out.
Parameters:
  pubViewOnly - if true, include only messages marked pubview, else include any. A list of Message objects that meet the criteria; may be empty
exception:
  PermissionException - If the current user does not have channel read permission.



getSummary
public Map getSummary(String ref, int items, int days) throws IdUsedException, IdInvalidException, PermissionException(Code)
Get a summary of an Announcement Channel
Parameters:
  ref - The channel reference.
Parameters:
  items - Maximum number of items to return
Parameters:
  days - Maximum number of dayes to peer back The Map containnt the Summary
exception:
  IdUsedException - if the id is not unique.
exception:
  IdInvalidException - if the id is not made up of valid characters.
exception:
  PermissionException - if the user does not have permission to add a channel.



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.



removeChannel
public void removeChannel(MessageChannelEdit channel) throws PermissionException(Code)
Remove a channel - it must be locked from editChannel().
Parameters:
  channel - The channel to remove.
exception:
  PermissionException - if the user does not have permission to remove a channel.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.