Java Doc for ChatTool.java in  » ERP-CRM-Financial » sakai » org » sakaiproject » chat2 » tool » 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.chat2.tool 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.sakaiproject.chat2.tool.ChatTool

ChatTool
public class ChatTool implements RoomObserver,PresenceObserver(Code)
Chat works by the courier but not the same way as the old message delivery system. The courier sends messages into the JSF tool. When the user dials home it then picks up the messages. COOL TECHNOLOGY ALERT: TODO: The page that sends the messages is polled, the tool can wait on the connection until it recieves a message to send or until it times out. This would provide instant messaging as opposed to polling. When entering the tool the first main page calls the enterTool function which redirects the users based upon the tool's preferences: go to select a room or to a specific tool. The PresenceObserverHelper is placed on the current room. This this tool is informed when a user enters and exits the room. If the tool is forgotten (user clicked the tool refresh button or closed the browser) then eventually the presence service will remove that user from the location... which we are informed. The problem is that the presence change event doesn't say WHO entered or exited. Thus... we must wait until there are no users in the location before we know that we shouldn't be observing
author:
   andersjb


Field Summary
protected  CourierServicem_courierService
     Constructor discovered injected CourierService.


Method Summary
public  SelectItemcreateSelect(Object id, String description)
    
public  booleangetCanCreateChannel()
    
public  booleangetCanEditChannel(ChatChannel channel)
    
public  booleangetCanManageTool()
    
public  booleangetCanRead(ChatChannel channel)
    
public  booleangetCanRemoveChannel(ChatChannel channel)
    
public  booleangetCanRemoveMessage(ChatMessage message)
    
public  booleangetCanRenderAllMessages()
    
public  booleangetCanRenderDateMessages()
    
public  booleangetCanRenderMessageOptions()
    
public  booleangetCanRenderNumberMessages()
    
public  ListgetChatChannels()
    
public  StringgetChatFunctionPrefix()
    
public  ChatManagergetChatManager()
    
public  ListgetChatRoomsSelectItems()
    
public  ColorMappergetColorMapper()
    
protected  StringgetContext()
    
public  StringgetCourierString()
     This allows us to change/give the courier address.
public  DecoratedChatChannelgetCurrentChannel()
    
public  DecoratedChatChannelgetCurrentChannelEdit()
    
public  StringgetCurrentChatChannelId()
     gets the channel id of the current channel.
public  DecoratedChatMessagegetCurrentMessage()
    
public  DecoratedSynopticOptionsgetCurrentSynopticOptions()
    
protected  StringgetCustomOptionText(String filterType, int filterParam)
    
protected  StringgetCustomOptionValue(String filterType)
    
public  booleangetDisplayDate()
    
public  booleangetDisplayTime()
    
public  StringgetEnterTool()
     This is called from the first page to redirect the user to the proper view. If the tool is set to go to the select a chat room view and there are multiple chat rooms, then it will go to the select a room page.
public  StringgetFramePlacementId()
    
public  booleangetMaintainer()
    
public  StringgetMessageFromBundle(String key, Object[] args)
    
public  StringgetMessageFromBundle(String key)
    
public  StringgetMessageOptions()
    
public  ListgetMessageOptionsList()
    
public  StringgetMessageOwnerDisplayName(ChatMessage message)
    
protected  ListgetMessages(String context, Date limitDate, int numMessages, boolean sortAsc)
    
public  StringgetNewMessageText()
    
protected  StringgetPastXDaysText(int x)
    
protected  StringgetPastXMessagesText(int x)
    
public  StringgetPermissionsMessage()
    
public  ListgetRoomMessages()
    
public  StringgetServerUrl()
    
public  intgetSiteChannelCount()
    
protected  ListgetSiteChannels()
    
public  booleangetSoundAlert()
    
public  ListgetSynopticMessages()
    
public  ToolManagergetToolManager()
    
public  StringgetToolString()
    
public  ListgetUsersInCurrentChannel()
     this gets the users in the current channel.
public  StringgetViewOptions()
    
public  StringgetViewingChatRoomText()
    
public  SitegetWorksite()
    
protected  intinitMessageOptions()
    
public  DecoratedSynopticOptionslookupSynopticOptions()
    
public  StringprocessActionAddRoom()
    
public  StringprocessActionBackToRoom()
    
public  StringprocessActionCancelChangeChannel()
    
public  StringprocessActionDeleteMessage()
    
public  StringprocessActionDeleteMessageCancel()
    
protected  StringprocessActionDeleteMessageConfirm(DecoratedChatMessage message)
    
public  StringprocessActionDeleteRoom()
    
public  StringprocessActionDeleteRoomCancel()
    
protected  StringprocessActionDeleteRoomConfirm(DecoratedChatChannel chatChannel)
    
protected  StringprocessActionEditRoom(DecoratedChatChannel chatChannel)
    
public  StringprocessActionEditRoomCancel()
    
public  StringprocessActionEditRoomSave()
    
protected  StringprocessActionEnterRoom(DecoratedChatChannel chatChannel)
    
public  StringprocessActionListRooms()
    
public  StringprocessActionPermissions()
    
public  StringprocessActionResetMessage()
    
public  StringprocessActionSetAsDefaultRoom(DecoratedChatChannel decoChannel)
    
public  StringprocessActionSubmitMessage()
    
public  StringprocessActionSynopticOptions()
    
public  StringprocessActionSynopticOptionsCancel()
    
public  StringprocessActionSynopticOptionsSave()
    
public  voidreceivedMessage(String roomId, Object message)
    
protected  booleanrefreshPresence()
    
protected  voidresetCurrentChannel(DecoratedChatChannel oldChannel)
    
public  voidroomDeleted(String roomId)
    
public  voidsetChatManager(ChatManager chatManager)
    
public  voidsetColorMapper(ColorMapper colorMapper)
    
public  voidsetCurrentChannel(DecoratedChatChannel channel)
     Implements a change of the chat room.
public  voidsetCurrentChannelEdit(DecoratedChatChannel currentChannelEdit)
    
public  voidsetCurrentMessage(DecoratedChatMessage currentMessage)
    
public  voidsetCurrentSynopticOptions(DecoratedSynopticOptions currentSynopticOptions)
    
public  voidsetMessageOptions(String messageOptions)
    
public  voidsetNewMessageText(String newMessageText)
    
public  voidsetToolManager(ToolManager toolManager)
    
public  voidsetViewOptions(String d)
    
public  voiduserJoined(String location, String user)
    
public  voiduserLeft(String location, String user)
     If a user left the location and there are no more users then something happened and this is a stray presence observer.
protected  booleanvalidateChannel(ChatChannel channel)
    

Field Detail
m_courierService
protected CourierService m_courierService(Code)
Constructor discovered injected CourierService.





Method Detail
createSelect
public SelectItem createSelect(Object id, String description)(Code)



getCanCreateChannel
public boolean getCanCreateChannel()(Code)



getCanEditChannel
public boolean getCanEditChannel(ChatChannel channel)(Code)



getCanManageTool
public boolean getCanManageTool()(Code)



getCanRead
public boolean getCanRead(ChatChannel channel)(Code)



getCanRemoveChannel
public boolean getCanRemoveChannel(ChatChannel channel)(Code)



getCanRemoveMessage
public boolean getCanRemoveMessage(ChatMessage message)(Code)



getCanRenderAllMessages
public boolean getCanRenderAllMessages()(Code)



getCanRenderDateMessages
public boolean getCanRenderDateMessages()(Code)



getCanRenderMessageOptions
public boolean getCanRenderMessageOptions()(Code)
Determins if the message option display dropdown gets rendered or not



getCanRenderNumberMessages
public boolean getCanRenderNumberMessages()(Code)



getChatChannels
public List getChatChannels()(Code)
gets the tool decorated channels



getChatFunctionPrefix
public String getChatFunctionPrefix()(Code)



getChatManager
public ChatManager getChatManager()(Code)
gets the chatManager ChatManager



getChatRoomsSelectItems
public List getChatRoomsSelectItems()(Code)
This creates select items out of the channels available to the tool List of SelectItem



getColorMapper
public ColorMapper getColorMapper()(Code)



getContext
protected String getContext()(Code)
Gets the id of the site we are in String



getCourierString
public String getCourierString()(Code)
This allows us to change/give the courier address. We want the courier to respond to the chat room. String



getCurrentChannel
public DecoratedChatChannel getCurrentChannel()(Code)
gets the current channel ChatChannel



getCurrentChannelEdit
public DecoratedChatChannel getCurrentChannelEdit()(Code)
the currentChannelEdit



getCurrentChatChannelId
public String getCurrentChatChannelId()(Code)
gets the channel id of the current channel. If there isn't one then give a blank string ChatManager



getCurrentMessage
public DecoratedChatMessage getCurrentMessage()(Code)
the currentMessage



getCurrentSynopticOptions
public DecoratedSynopticOptions getCurrentSynopticOptions()(Code)
the synopticOptions



getCustomOptionText
protected String getCustomOptionText(String filterType, int filterParam)(Code)



getCustomOptionValue
protected String getCustomOptionValue(String filterType)(Code)



getDisplayDate
public boolean getDisplayDate()(Code)



getDisplayTime
public boolean getDisplayTime()(Code)



getEnterTool
public String getEnterTool()(Code)
This is called from the first page to redirect the user to the proper view. If the tool is set to go to the select a chat room view and there are multiple chat rooms, then it will go to the select a room page. If the user is to select a room and there is only one room, then it will go to that room. String



getFramePlacementId
public String getFramePlacementId()(Code)
Returns the frame identifier for resizing



getMaintainer
public boolean getMaintainer()(Code)



getMessageFromBundle
public String getMessageFromBundle(String key, Object[] args)(Code)



getMessageFromBundle
public String getMessageFromBundle(String key)(Code)



getMessageOptions
public String getMessageOptions()(Code)
the messageOptions



getMessageOptionsList
public List getMessageOptionsList()(Code)



getMessageOwnerDisplayName
public String getMessageOwnerDisplayName(ChatMessage message)(Code)



getMessages
protected List getMessages(String context, Date limitDate, int numMessages, boolean sortAsc)(Code)

Parameters:
  context -
Parameters:
  limitDate -
Parameters:
  numMessages -
Parameters:
  sortAsc -



getNewMessageText
public String getNewMessageText()(Code)



getPastXDaysText
protected String getPastXDaysText(int x)(Code)



getPastXMessagesText
protected String getPastXMessagesText(int x)(Code)



getPermissionsMessage
public String getPermissionsMessage()(Code)



getRoomMessages
public List getRoomMessages()(Code)



getServerUrl
public String getServerUrl()(Code)



getSiteChannelCount
public int getSiteChannelCount()(Code)
gets the number of channels in this site int



getSiteChannels
protected List getSiteChannels()(Code)
gets the channels in this site List of ChatChannel



getSoundAlert
public boolean getSoundAlert()(Code)



getSynopticMessages
public List getSynopticMessages()(Code)



getToolManager
public ToolManager getToolManager()(Code)



getToolString
public String getToolString()(Code)
Gets the id of the tool we are in String



getUsersInCurrentChannel
public List getUsersInCurrentChannel()(Code)
this gets the users in the current channel. It should be called often to refresh the presence of the channel List of Sakai User(?)



getViewOptions
public String getViewOptions()(Code)



getViewingChatRoomText
public String getViewingChatRoomText()(Code)



getWorksite
public Site getWorksite()(Code)



initMessageOptions
protected int initMessageOptions()(Code)



lookupSynopticOptions
public DecoratedSynopticOptions lookupSynopticOptions()(Code)



processActionAddRoom
public String processActionAddRoom()(Code)



processActionBackToRoom
public String processActionBackToRoom()(Code)



processActionCancelChangeChannel
public String processActionCancelChangeChannel()(Code)
When the user wants to cancel changing a room String next page



processActionDeleteMessage
public String processActionDeleteMessage()(Code)
Deletes the current message String goes to the room's main page



processActionDeleteMessageCancel
public String processActionDeleteMessageCancel()(Code)
Cancels the delete of the current message String goes to the room's main page



processActionDeleteMessageConfirm
protected String processActionDeleteMessageConfirm(DecoratedChatMessage message)(Code)
Deletes the specified message
Parameters:
  message - String goes to the delete message page



processActionDeleteRoom
public String processActionDeleteRoom()(Code)
deletes the current room and all it's messages String goes to the select a room page



processActionDeleteRoomCancel
public String processActionDeleteRoomCancel()(Code)
cancels the deletion of a room via the confirmation String goes to the select a room page



processActionDeleteRoomConfirm
protected String processActionDeleteRoomConfirm(DecoratedChatChannel chatChannel)(Code)
Sets the current room and goes to confirm deleting the room
Parameters:
  chatChannel - String goes to the delete room confirmation page



processActionEditRoom
protected String processActionEditRoom(DecoratedChatChannel chatChannel)(Code)
Sets the current room and goes to edit that room
Parameters:
  chatChannel - String goes to the edit room view



processActionEditRoomCancel
public String processActionEditRoomCancel()(Code)
Sets the current room to null String goes to the edit room view



processActionEditRoomSave
public String processActionEditRoomSave()(Code)
Sets the current room to null String goes to the edit room view



processActionEnterRoom
protected String processActionEnterRoom(DecoratedChatChannel chatChannel)(Code)
Sets the current room and goes to the room page
Parameters:
  chatChannel - String selects a new room to go into



processActionListRooms
public String processActionListRooms()(Code)



processActionPermissions
public String processActionPermissions()(Code)



processActionResetMessage
public String processActionResetMessage()(Code)



processActionSetAsDefaultRoom
public String processActionSetAsDefaultRoom(DecoratedChatChannel decoChannel)(Code)



processActionSubmitMessage
public String processActionSubmitMessage()(Code)



processActionSynopticOptions
public String processActionSynopticOptions()(Code)



processActionSynopticOptionsCancel
public String processActionSynopticOptionsCancel()(Code)



processActionSynopticOptionsSave
public String processActionSynopticOptionsSave()(Code)



receivedMessage
public void receivedMessage(String roomId, Object message)(Code)
in the context of the event manager thread



refreshPresence
protected boolean refreshPresence()(Code)



resetCurrentChannel
protected void resetCurrentChannel(DecoratedChatChannel oldChannel)(Code)



roomDeleted
public void roomDeleted(String roomId)(Code)



setChatManager
public void setChatManager(ChatManager chatManager)(Code)
Sets the chatManager
Parameters:
  chatManager - ChatManager



setColorMapper
public void setColorMapper(ColorMapper colorMapper)(Code)



setCurrentChannel
public void setCurrentChannel(DecoratedChatChannel channel)(Code)
Implements a change of the chat room. It removes presence from the prior room, adds observation of the new room, and then becomes present in the new room
Parameters:
  channel -



setCurrentChannelEdit
public void setCurrentChannelEdit(DecoratedChatChannel currentChannelEdit)(Code)

Parameters:
  currentChannelEdit - the currentChannelEdit to set



setCurrentMessage
public void setCurrentMessage(DecoratedChatMessage currentMessage)(Code)

Parameters:
  currentMessage - the currentMessage to set



setCurrentSynopticOptions
public void setCurrentSynopticOptions(DecoratedSynopticOptions currentSynopticOptions)(Code)

Parameters:
  synopticOptions - the synopticOptions to set



setMessageOptions
public void setMessageOptions(String messageOptions)(Code)

Parameters:
  messageOptions - the messageOptions to set



setNewMessageText
public void setNewMessageText(String newMessageText)(Code)



setToolManager
public void setToolManager(ToolManager toolManager)(Code)



setViewOptions
public void setViewOptions(String d)(Code)



userJoined
public void userJoined(String location, String user)(Code)



userLeft
public void userLeft(String location, String user)(Code)
If a user left the location and there are no more users then something happened and this is a stray presence observer. When there are no users in a presence then the observer should be removed because this tool isn't updating the presence any longer thus isn't in the location thus doesn't need to observe the presence of the room.



validateChannel
protected boolean validateChannel(ChatChannel channel)(Code)
Make sure that the channel has a title when saving
Parameters:
  channel - Returns if the channel validates



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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