org.sakaiproject.tool.chat
Class ChatAction

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended byorg.sakaiproject.vm.ComponentServlet
              extended byorg.sakaiproject.vm.VmServlet
                  extended byorg.sakaiproject.cheftool.VmServlet
                      extended byorg.sakaiproject.cheftool.ToolServlet
                          extended byorg.sakaiproject.cheftool.VelocityPortletPaneledAction
                              extended byorg.sakaiproject.tool.chat.ChatAction
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class ChatAction
extends VelocityPortletPaneledAction

ChatAction is the CHEF chat tool.

Version:
$Revision: 5825 $
Author:
University of Michigan, CHEF Software Development Team
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class org.sakaiproject.cheftool.VelocityPortletPaneledAction
VelocityPortletPaneledAction.MyLogger
 
Field Summary
 
Fields inherited from class org.sakaiproject.cheftool.VelocityPortletPaneledAction
ATTR_CONFIG, ATTR_CONTEXT, ATTR_FRAME_FOCUS, ATTR_FRAME_REFRESH, ATTR_PORTLET, ATTR_RUNDATA, ATTR_TOP_REFRESH, BUTTON, CONTEXT_SITE_COLLECTION_ID, CONTEXT_SITE_COLLECTION_URL, LAYOUT_MAIN, Log, MODE_OPTIONS, STATE_ACTION, STATE_FLOAT, STATE_HELPER, STATE_MESSAGE, STATE_MODE, STATE_OBSERVER, STATE_OBSERVER2, STATE_PRESENCE_OBSERVER, STATE_TOOL
 
Fields inherited from class org.sakaiproject.cheftool.ToolServlet
ALERT_ATTR, ALERT_STATE_INITED, MENU_ATTR, PARAM_ACTION, PARAM_ACTION_COMBO, TITLE_PANEL, TOOL_MODE_ATTR, TOOL_MODE_DEFAULT
 
Fields inherited from class org.sakaiproject.cheftool.VmServlet
m_validator
 
Fields inherited from class org.sakaiproject.vm.ComponentServlet
ATTR_PARAMS
 
Constructor Summary
ChatAction()
           
 
Method Summary
 String buildConfirmDeleteMessagePanelContext(VelocityPortlet portlet, Context context, RunData rundata, SessionState state)
           
 String buildControlPanelContext(VelocityPortlet portlet, Context context, RunData rundata, SessionState state)
          build the context for the Control panel (has a send field)
 String buildListPanelContext(VelocityPortlet portlet, Context context, RunData rundata, SessionState state)
          build the context for the List panel
 String buildMainPanelContext(VelocityPortlet portlet, Context context, RunData rundata, SessionState state)
          build the context for the Main (Layout) panel
 String buildOptionsPanelContext(VelocityPortlet portlet, Context context, RunData rundata, SessionState state)
          Setup for the options panel.
 String buildPresencePanelContext(VelocityPortlet portlet, Context context, RunData rundata, SessionState state)
          build the context for the Presence panel (has a send field)
 String buildToolbarPanelContext(VelocityPortlet portlet, Context context, RunData rundata, SessionState state)
          build the context for the Toolbar panel
 void doCancel(RunData data, Context context)
          Handle a user clicking the "Done" button in the Options panel
 void doChange_time_date_display(RunData runData, Context context)
          Handle a user clicking on the time-date dropdown.
 void doConfirmDeleteMessage(RunData data, Context context)
          Handle a user deleting a message - put up a confirmation page
 void doDeleteMessage(RunData data, Context context)
          Handle a user deleting a message - they've already confirmed the deletion, just delete it now
 void doOptions(RunData runData, Context context)
          Handle a request to set options.
 void doPermissions(RunData data, Context context)
          Fire up the permissions editor
 void doSend(RunData runData, Context context)
          Handle a user posting a new chat message.
 void doToggle_date_display(RunData runData, Context context)
          Handle a user clicking on the view-date menu.
 void doToggle_filter(RunData runData, Context context)
          Handle a user clicking on the show-all/show-some button.
 void doToggle_sound_alert(RunData runData, Context context)
          Handle a user clicking on the sound-alert button.
 void doToggle_time_display(RunData runData, Context context)
          Handle a user clicking on the view-time menu.
 void doUpdate(RunData data, Context context)
          Handle a user clicking the "Done" button in the Options panel
protected  void initState(SessionState state, VelocityPortlet portlet, JetspeedRunData rundata)
          Populate the state object, if needed.
 
Methods inherited from class org.sakaiproject.cheftool.VelocityPortletPaneledAction
actionDispatch, addAlert, addOptionsMenu, cancelOptions, clientWindowId, disableObservers, doGet, doReset, enableObservers, getContext, helperActionDispatch, initState, justDelivered, mainPanelUpdateId, processAction, resetTool, saveOptions, scheduleFocusRefresh, schedulePeerFrameRefresh, scheduleTopRefresh, setVmCourier, setVmStdRef, titlePanelUpdateId, toolModeDispatch, updateState
 
Methods inherited from class org.sakaiproject.cheftool.ToolServlet
doPost, getAlert, getAlert, getMenu, getPid, getState, getToolMode, prepState, setToolMode
 
Methods inherited from class org.sakaiproject.vm.VmServlet
getActionURL, getVmReference, includeVm, setVmReference
 
Methods inherited from class org.sakaiproject.vm.ComponentServlet
sendParentRedirect, service, setNoCacheHeaders
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChatAction

public ChatAction()
Method Detail

initState

protected void initState(SessionState state,
                         VelocityPortlet portlet,
                         JetspeedRunData rundata)
Populate the state object, if needed.

Overrides:
initState in class VelocityPortletPaneledAction

buildMainPanelContext

public String buildMainPanelContext(VelocityPortlet portlet,
                                    Context context,
                                    RunData rundata,
                                    SessionState state)
build the context for the Main (Layout) panel

Returns:
(optional) template name for this panel

doToggle_date_display

public void doToggle_date_display(RunData runData,
                                  Context context)
Handle a user clicking on the view-date menu.


doToggle_time_display

public void doToggle_time_display(RunData runData,
                                  Context context)
Handle a user clicking on the view-time menu.


doChange_time_date_display

public void doChange_time_date_display(RunData runData,
                                       Context context)
Handle a user clicking on the time-date dropdown.


doToggle_sound_alert

public void doToggle_sound_alert(RunData runData,
                                 Context context)
Handle a user clicking on the sound-alert button.


doToggle_filter

public void doToggle_filter(RunData runData,
                            Context context)
Handle a user clicking on the show-all/show-some button.


buildToolbarPanelContext

public String buildToolbarPanelContext(VelocityPortlet portlet,
                                       Context context,
                                       RunData rundata,
                                       SessionState state)
build the context for the Toolbar panel

Returns:
(optional) template name for this panel

buildListPanelContext

public String buildListPanelContext(VelocityPortlet portlet,
                                    Context context,
                                    RunData rundata,
                                    SessionState state)
build the context for the List panel

Returns:
(optional) template name for this panel

buildControlPanelContext

public String buildControlPanelContext(VelocityPortlet portlet,
                                       Context context,
                                       RunData rundata,
                                       SessionState state)
build the context for the Control panel (has a send field)

Returns:
(optional) template name for this panel

buildPresencePanelContext

public String buildPresencePanelContext(VelocityPortlet portlet,
                                        Context context,
                                        RunData rundata,
                                        SessionState state)
build the context for the Presence panel (has a send field)

Returns:
(optional) template name for this panel

doSend

public void doSend(RunData runData,
                   Context context)
Handle a user posting a new chat message.


buildOptionsPanelContext

public String buildOptionsPanelContext(VelocityPortlet portlet,
                                       Context context,
                                       RunData rundata,
                                       SessionState state)
Setup for the options panel.


buildConfirmDeleteMessagePanelContext

public String buildConfirmDeleteMessagePanelContext(VelocityPortlet portlet,
                                                    Context context,
                                                    RunData rundata,
                                                    SessionState state)

doUpdate

public void doUpdate(RunData data,
                     Context context)
Handle a user clicking the "Done" button in the Options panel


doCancel

public void doCancel(RunData data,
                     Context context)
Handle a user clicking the "Done" button in the Options panel


doConfirmDeleteMessage

public void doConfirmDeleteMessage(RunData data,
                                   Context context)
Handle a user deleting a message - put up a confirmation page


doDeleteMessage

public void doDeleteMessage(RunData data,
                            Context context)
Handle a user deleting a message - they've already confirmed the deletion, just delete it now


doOptions

public void doOptions(RunData runData,
                      Context context)
Handle a request to set options.

Overrides:
doOptions in class VelocityPortletPaneledAction

doPermissions

public void doPermissions(RunData data,
                          Context context)
Fire up the permissions editor