Java Doc for MessageChannel.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.MessageChannel

MessageChannel
public interface MessageChannel extends Entity(Code)

MessageChannel is the base interface for Sakai communications service message channels. Extensions to this interface configure types of communications channels (Chat, Announcements, etc.)

Channels contains collections of messages, each Message (or extension) object. Each chat channel has a unique channel id (read only), and is a Sakai Resource.

The chat channel can be asked:

  • for an iterator on the messages, with a filter
  • to find a specific message
  • to add a new message
  • to update an existing message
  • to remove an existing message

The chat channel can be subscribed to providing notification when:

  • a new message has been posted
  • a message has been changed
  • a message has been removed
  • the channel has been removed

Security on the channel include:

  • message.channel.read
  • message.channel.remove.any
  • message.channel.remove.own
  • message.channel.post
Security Roles for the channel include:
  • message.member: read, remove.own, post
  • message.administrator: chat.member, remove.any

Event handling is defined in the specific extension classes.


author:
   Sakai Software Development Team




Method Summary
 MessageEditaddMessage()
     Add a new message to this channel.
 booleanallowAddChannelMessage()
     Check if the user has permission to add a channel-wide (not grouped) message.
 booleanallowAddDraftMessage()
     check permission for adding draft message and modifying it afterwards.
 booleanallowAddMessage()
     check permissions for addMessage().
 booleanallowEditMessage(String messageId)
     check permissions for editMessage()
Parameters:
  id - The message id.
 booleanallowGetMessages()
     check permissions for getMessages() or getMessage().
 booleanallowRemoveMessage(Message message)
     check permissions for removeMessage().
Parameters:
  message - The message from this channel to remove.
 voidcancelMessage(MessageEdit edit)
     Cancel the changes made to a MessageEdit object, and release the lock.
 voidcommitMessage(MessageEdit edit)
     Commit the changes made to a MessageEdit object, and release the lock.
 voidcommitMessage(MessageEdit edit, int priority)
     Commit the changes made to a MessageEdit object, and release the lock.
 voidcommitMessage(MessageEdit edit, int priority, String invokee)
     Commit the changes made to a MessageEdit object, and release the lock.
 MessageEditeditMessage(String messageId)
     Return a specific channel message, as specified by message name, locked for update.
 StringgetContext()
     Access the context of the resource.
 CollectiongetGroupsAllowAddMessage()
     Get the collection of Groups defined for the context of this channel that the end user has add message permissions in.
 CollectiongetGroupsAllowGetMessage()
     Get the collection of Group defined for the context of this channel that the end user has get message permissions in.
 CollectiongetGroupsAllowRemoveMessage(boolean own)
     Get the collection of Group defined for the context of this channel that the end user has remove message permissions in.
Parameters:
  own - true if the message is the user's own, false if it is someone else's.
 MessagegetMessage(String messageId)
     Return a specific channel message, as specified by message name.
Parameters:
  messageId - The id of the message to get.
 ListgetMessages(Filter filter, boolean ascending)
     Return a list of all or filtered messages in the channel.
 MessageEditmergeMessage(Element el)
     Merge in a new message as defined in the xml.
 voidremoveMessage(String messageId)
    
 voidremoveMessage(MessageEdit message)
     Remove a message from the channel - it must be locked from editMessage().



Method Detail
addMessage
MessageEdit addMessage() throws PermissionException(Code)
Add a new message to this channel. Must commitEdit() to make official, or cancelEdit() when done! The newly added message, locked for update.
exception:
  PermissionException - If the user does not have write permission to the channel.



allowAddChannelMessage
boolean allowAddChannelMessage()(Code)
Check if the user has permission to add a channel-wide (not grouped) message. true if the user has permission to add a channel-wide (not grouped) message.



allowAddDraftMessage
boolean allowAddDraftMessage()(Code)
check permission for adding draft message and modifying it afterwards.



allowAddMessage
boolean allowAddMessage()(Code)
check permissions for addMessage(). true if the user is allowed to addMessage(...), false if not.



allowEditMessage
boolean allowEditMessage(String messageId)(Code)
check permissions for editMessage()
Parameters:
  id - The message id. true if the user is allowed to update the message, false if not.



allowGetMessages
boolean allowGetMessages()(Code)
check permissions for getMessages() or getMessage(). true if the user is allowed to get messages from this channel, false if not.



allowRemoveMessage
boolean allowRemoveMessage(Message message)(Code)
check permissions for removeMessage().
Parameters:
  message - The message from this channel to remove. true if the user is allowed to removeMessage(...), false if not.



cancelMessage
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 UserEdit object to commit.



commitMessage
void commitMessage(MessageEdit edit)(Code)
Commit the changes made to a MessageEdit object, and release the lock. The MessageEdit is disabled, and not to be used after this call. If the message is in a form that the user has no permission to store, a PermissionException is thrown, and the edit is canceled.
Parameters:
  user - The UserEdit object to commit.



commitMessage
void commitMessage(MessageEdit edit, int priority)(Code)
Commit the changes made to a MessageEdit object, and release the lock. The MessageEdit is disabled, and not to be used after this call. If the message is in a form that the user has no permission to store, a PermissionException is thrown, and the edit is canceled.
Parameters:
  user - The UserEdit object to commit.
Parameters:
  priority - The notification priority for this commit.



commitMessage
void commitMessage(MessageEdit edit, int priority, String invokee)(Code)
Commit the changes made to a MessageEdit object, and release the lock. The MessageEdit is disabled, and not to be used after this call. If the message is in a form that the user has no permission to store, a PermissionException is thrown, and the edit is canceled. Used when a scheduled notification is made for this message.
Parameters:
  user - The UserEdit object to commit.
Parameters:
  priority - The notification priority for this commit.
Parameters:
  invokee - The id for the object to be called when the scheduled notification fires.



editMessage
MessageEdit editMessage(String messageId) throws IdUnusedException, PermissionException, InUseException(Code)
Return a specific channel message, as specified by message name, locked for update. Must commitEdit() to make official, or cancelEdit() when done!
Parameters:
  messageId - The id of the message to get. the Message that has the specified id.
exception:
  IdUnusedException - If this name is not a defined message in this channel.
exception:
  PermissionException - If the user does not have any permissions to edit the message.
exception:
  InUseException - if the message is locked for edit by someone else.



getContext
String getContext()(Code)
Access the context of the resource. The context.



getGroupsAllowAddMessage
Collection getGroupsAllowAddMessage()(Code)
Get the collection of Groups defined for the context of this channel that the end user has add message permissions in. The Collection (Group) of groups defined for the context of this channel that the end user has add message permissions in, empty if none.



getGroupsAllowGetMessage
Collection getGroupsAllowGetMessage()(Code)
Get the collection of Group defined for the context of this channel that the end user has get message permissions in. The Collection (Group) of groups defined for the context of this channel that the end user has get message permissions in, empty if none.



getGroupsAllowRemoveMessage
Collection getGroupsAllowRemoveMessage(boolean own)(Code)
Get the collection of Group defined for the context of this channel that the end user has remove message permissions in.
Parameters:
  own - true if the message is the user's own, false if it is someone else's. The Collection (Group) of groups defined for the context of this channel that the end user has get message permissions in, empty if none.



getMessage
Message getMessage(String messageId) throws IdUnusedException, PermissionException(Code)
Return a specific channel message, as specified by message name.
Parameters:
  messageId - The id of the message to get. the Message that has the specified id.
exception:
  IdUnusedException - If this name is not a defined message in this channel.
exception:
  PermissionException - If the user does not have any permissions to read the message.



getMessages
List getMessages(Filter filter, boolean ascending) throws PermissionException(Code)
Return a list of all or filtered messages in the channel. The order in which the messages will be found in the iteration is by date, oldest first if ascending is true, newest first if ascending is false.
Parameters:
  filter - A filtering object to accept messages, or null if no filtering is desired.
Parameters:
  ascending - Order of messages, ascending if true, descending if false a list of channel Message objects or specializations of Message objects (may be empty).
exception:
  PermissionException - if the user does not have read permission to the channel.



mergeMessage
MessageEdit mergeMessage(Element el) throws PermissionException, IdUsedException(Code)
Merge in a new message as defined in the xml. Must commitEdit() to make official, or cancelEdit() when done!
Parameters:
  el - The message information in XML in a DOM element. The newly added message, locked for update.
exception:
  PermissionException - If the user does not have write permission to the channel.
exception:
  IdUsedException - if the user id is already used.



removeMessage
void removeMessage(String messageId) throws PermissionException(Code)
Remove a message from the channel based on message id
Parameters:
  messageId - The messageId for the message of the channel to remove.
exception:
  PermissionException - if the user does not have permission to remove the message.



removeMessage
void removeMessage(MessageEdit message) throws PermissionException(Code)
Remove a message from the channel - it must be locked from editMessage().
Parameters:
  message - The message from this channel to remove.
exception:
  PermissionException - if the user does not have permission to remove the message.



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