org.sakaiproject.tool.admin
Class SitesAction

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.cheftool.PagedResourceActionII
                                  extended byorg.sakaiproject.tool.admin.SitesAction
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class SitesAction
extends PagedResourceActionII

SitesAction is the CHEF sites editor.

Version:
$Revision: 4742 $
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
protected static String FORM_SEARCH_SITEID
           
protected static String FORM_SEARCH_USERID
           
protected static String STATE_SEARCH_SITE_ID
          State holding the site id for site id search.
protected static String STATE_SEARCH_USER_ID
          State holding the user id for user id search.
 
Fields inherited from class org.sakaiproject.cheftool.PagedResourceActionII
DEFAULT_PAGE_SIZE, FORM_PAGE_NUMBER, FORM_SEARCH, PAGESIZES, PARAM_PAGESIZE, rb_praII, STATE_CURRENT_PAGE, STATE_FIRST_PAGE_EXISTS, STATE_GO_FIRST_PAGE, STATE_GO_LAST_PAGE, STATE_GO_NEXT, STATE_GO_NEXT_PAGE, STATE_GO_PREV, STATE_GO_PREV_PAGE, STATE_GOTO_PAGE, STATE_LAST_PAGE_EXISTS, STATE_MANUAL_REFRESH, STATE_NEXT_EXISTS, STATE_NEXT_PAGE_EXISTS, STATE_NUM_MESSAGES, STATE_PAGESIZE, STATE_PREV_EXISTS, STATE_PREV_PAGE_EXISTS, STATE_SEARCH, STATE_TOP_PAGE_MESSAGE, STATE_TOTAL_PAGENUMBER, STATE_VIEW_ID
 
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
SitesAction()
           
 
Method Summary
 String buildMainPanelContext(VelocityPortlet portlet, Context context, RunData rundata, SessionState state)
          build the context
 void doCancel_group(RunData data, Context context)
          cancel a group edit, return to the groups list
 void doCancel_page(RunData data, Context context)
          cancel a page edit, return to the pages list
 void doCancel_remove(RunData data, Context context)
          doCancel_remove called when "eventSubmit_doCancel_remove" is in the request parameters to cancel site removal
 void doCancel_saveas(RunData data, Context context)
          cancel the saveas request, return to edit
 void doCancel_tool(RunData data, Context context)
          cancel a tool edit, return to the tools list
 void doCancel(RunData data, Context context)
          doCancel called when "eventSubmit_doCancel" is in the request parameters to cancel site edits
 void doDone_feature(RunData data, Context context)
          save the tool's selected feature, continue editing the tool
 void doDone_group(RunData data, Context context)
          save the group edited, and return to the groups mode
 void doDone_page(RunData data, Context context)
          save the page edited, and return to the pages mode
 void doDone_tool(RunData data, Context context)
          save the tool edited, and return to the tools mode
 void doEdit_group(RunData data, Context context)
          Edit an existing group.
 void doEdit_page_down(RunData data, Context context)
          Move the page down in the order.
 void doEdit_page_up(RunData data, Context context)
          Move the page up in the order.
 void doEdit_page(RunData data, Context context)
          Edit an existing page.
 void doEdit_to_main(RunData data, Context context)
          Switch back to edit main info mode from another edit mode (like pages).
 void doEdit_to_page(RunData data, Context context)
          Switch back to edit page info mode from another edit mode (like tools).
 void doEdit_tool_down(RunData data, Context context)
          Move the tool down in the order.
 void doEdit_tool_up(RunData data, Context context)
          Move the tool up in the order.
 void doEdit_tool(RunData data, Context context)
          Edit an existing tool.
 void doEdit(RunData data, Context context)
          Handle a request to edit a site.
 void doGroups(RunData data, Context context)
          Switch to group display mode within a site edit.
 void doIds(RunData data, Context context)
          Handle a request to regenerate the ids in the site under edit.
 void doNew_group(RunData data, Context context)
          Handle a request to create a new group in the site edit.
 void doNew_page(RunData data, Context context)
          Handle a request to create a new page in the site edit.
 void doNew_tool(RunData data, Context context)
          create a new tool in the page edit.
 void doNew(RunData data, Context context)
          Handle a request for a new site.
 void doPages(RunData data, Context context)
          Switch to page display mode within a site edit.
 void doRemove_confirmed(RunData data, Context context)
          doRemove_confirmed called when "eventSubmit_doRemove_confirmed" is in the request parameters to remove the site
 void doRemove_group(RunData data, Context context)
          Handle a request to remove the group being edited.
 void doRemove_page(RunData data, Context context)
          Handle a request to remove the page being edited.
 void doRemove_tool(RunData data, Context context)
          Handle a request to remove the tool being edited.
 void doRemove(RunData data, Context context)
          doRemove called when "eventSubmit_doRemove" is in the request parameters to confirm removal of the site
 void doSave_edit(RunData data, Context context)
          Handle a request to save the edit from either page or tools list mode - no form to read in.
 void doSave_group(RunData data, Context context)
          save the group edited, and save the site edit
 void doSave_page(RunData data, Context context)
          save the page edited, and save the site edit
 void doSave_tool(RunData data, Context context)
          save the tool edited, and save the site edit.
 void doSave(RunData data, Context context)
          Handle a request to save the site edit (from the site edit form).
 void doSaveas_request(RunData data, Context context)
          Go into saveas mode
 void doSaveas(RunData data, Context context)
          Handle a request to save-as the site as a new site.
 void doSearch_clear(RunData runData, Context context)
          Handle a Search Clear request.
 void doSearch_site_id(RunData runData, Context context)
          Handle a Search request - for site id
 void doSearch_user_id(RunData runData, Context context)
          Handle a Search request - for user my workspace
 void doSearch(RunData runData, Context context)
          Handle a Search request.
 void doTools(RunData data, Context context)
          Switch to tools display mode within a site edit.
protected  void initState(SessionState state, VelocityPortlet portlet, JetspeedRunData rundata)
          Populate the state object, if needed.
protected  List readResourcesPage(SessionState state, int first, int last)
          Implement this to return a list of all the resources in this record range, with search and sorting applied.
protected  int sizeResources(SessionState state)
          Implement this to return the number of records that are currently selected.
 
Methods inherited from class org.sakaiproject.cheftool.PagedResourceActionII
addListPagingMenus, addRefreshMenus, addSearchMenus, addViewPagingMenus, cleanStatePaging, doAuto, doChange_pagesize, doList_first, doList_last, doList_next, doList_prev, doRefresh, doView_next, doView_page, doView_prev, enableObserver, pagingInfoToContext, prepPage, resetPaging, totalPageNumber
 
Methods inherited from class org.sakaiproject.cheftool.VelocityPortletPaneledAction
actionDispatch, addAlert, addOptionsMenu, cancelOptions, clientWindowId, disableObservers, doGet, doOptions, 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
 

Field Detail

STATE_SEARCH_SITE_ID

protected static final String STATE_SEARCH_SITE_ID
State holding the site id for site id search.

See Also:
Constant Field Values

STATE_SEARCH_USER_ID

protected static final String STATE_SEARCH_USER_ID
State holding the user id for user id search.

See Also:
Constant Field Values

FORM_SEARCH_SITEID

protected static final String FORM_SEARCH_SITEID
See Also:
Constant Field Values

FORM_SEARCH_USERID

protected static final String FORM_SEARCH_USERID
See Also:
Constant Field Values
Constructor Detail

SitesAction

public SitesAction()
Method Detail

readResourcesPage

protected List readResourcesPage(SessionState state,
                                 int first,
                                 int last)
Implement this to return a list of all the resources in this record range, with search and sorting applied.

Specified by:
readResourcesPage in class PagedResourceActionII
Parameters:
first - The first record to include (1 based).
last - The last record to include (inclusive, 1 based).

sizeResources

protected int sizeResources(SessionState state)
Implement this to return the number of records that are currently selected.

Specified by:
sizeResources in class PagedResourceActionII

initState

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

Overrides:
initState in class PagedResourceActionII

buildMainPanelContext

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


doNew

public void doNew(RunData data,
                  Context context)
Handle a request for a new site.


doEdit

public void doEdit(RunData data,
                   Context context)
Handle a request to edit a site.


doSave

public void doSave(RunData data,
                   Context context)
Handle a request to save the site edit (from the site edit form).


doSave_edit

public void doSave_edit(RunData data,
                        Context context)
Handle a request to save the edit from either page or tools list mode - no form to read in.


doSaveas_request

public void doSaveas_request(RunData data,
                             Context context)
Go into saveas mode


doSaveas

public void doSaveas(RunData data,
                     Context context)
Handle a request to save-as the site as a new site.


doCancel_saveas

public void doCancel_saveas(RunData data,
                            Context context)
cancel the saveas request, return to edit


doCancel

public void doCancel(RunData data,
                     Context context)
doCancel called when "eventSubmit_doCancel" is in the request parameters to cancel site edits


doRemove

public void doRemove(RunData data,
                     Context context)
doRemove called when "eventSubmit_doRemove" is in the request parameters to confirm removal of the site


doRemove_confirmed

public void doRemove_confirmed(RunData data,
                               Context context)
doRemove_confirmed called when "eventSubmit_doRemove_confirmed" is in the request parameters to remove the site


doCancel_remove

public void doCancel_remove(RunData data,
                            Context context)
doCancel_remove called when "eventSubmit_doCancel_remove" is in the request parameters to cancel site removal


doPages

public void doPages(RunData data,
                    Context context)
Switch to page display mode within a site edit.


doNew_page

public void doNew_page(RunData data,
                       Context context)
Handle a request to create a new page in the site edit.


doEdit_page

public void doEdit_page(RunData data,
                        Context context)
Edit an existing page.


doEdit_page_up

public void doEdit_page_up(RunData data,
                           Context context)
Move the page up in the order.


doEdit_page_down

public void doEdit_page_down(RunData data,
                             Context context)
Move the page down in the order.


doSave_page

public void doSave_page(RunData data,
                        Context context)
save the page edited, and save the site edit


doDone_page

public void doDone_page(RunData data,
                        Context context)
save the page edited, and return to the pages mode


doCancel_page

public void doCancel_page(RunData data,
                          Context context)
cancel a page edit, return to the pages list


doRemove_page

public void doRemove_page(RunData data,
                          Context context)
Handle a request to remove the page being edited.


doGroups

public void doGroups(RunData data,
                     Context context)
Switch to group display mode within a site edit.


doEdit_group

public void doEdit_group(RunData data,
                         Context context)
Edit an existing group.


doSave_group

public void doSave_group(RunData data,
                         Context context)
save the group edited, and save the site edit


doDone_group

public void doDone_group(RunData data,
                         Context context)
save the group edited, and return to the groups mode


doCancel_group

public void doCancel_group(RunData data,
                           Context context)
cancel a group edit, return to the groups list


doRemove_group

public void doRemove_group(RunData data,
                           Context context)
Handle a request to remove the group being edited.


doNew_group

public void doNew_group(RunData data,
                        Context context)
Handle a request to create a new group in the site edit.


doEdit_to_main

public void doEdit_to_main(RunData data,
                           Context context)
Switch back to edit main info mode from another edit mode (like pages).


doTools

public void doTools(RunData data,
                    Context context)
Switch to tools display mode within a site edit.


doNew_tool

public void doNew_tool(RunData data,
                       Context context)
create a new tool in the page edit.


doEdit_tool

public void doEdit_tool(RunData data,
                        Context context)
Edit an existing tool.


doEdit_tool_up

public void doEdit_tool_up(RunData data,
                           Context context)
Move the tool up in the order.


doEdit_tool_down

public void doEdit_tool_down(RunData data,
                             Context context)
Move the tool down in the order.


doSave_tool

public void doSave_tool(RunData data,
                        Context context)
save the tool edited, and save the site edit.


doDone_tool

public void doDone_tool(RunData data,
                        Context context)
save the tool edited, and return to the tools mode


doDone_feature

public void doDone_feature(RunData data,
                           Context context)
save the tool's selected feature, continue editing the tool


doCancel_tool

public void doCancel_tool(RunData data,
                          Context context)
cancel a tool edit, return to the tools list


doRemove_tool

public void doRemove_tool(RunData data,
                          Context context)
Handle a request to remove the tool being edited.


doEdit_to_page

public void doEdit_to_page(RunData data,
                           Context context)
Switch back to edit page info mode from another edit mode (like tools).


doIds

public void doIds(RunData data,
                  Context context)
Handle a request to regenerate the ids in the site under edit.


doSearch

public void doSearch(RunData runData,
                     Context context)
Handle a Search request.

Overrides:
doSearch in class PagedResourceActionII

doSearch_site_id

public void doSearch_site_id(RunData runData,
                             Context context)
Handle a Search request - for site id


doSearch_user_id

public void doSearch_user_id(RunData runData,
                             Context context)
Handle a Search request - for user my workspace


doSearch_clear

public void doSearch_clear(RunData runData,
                           Context context)
Handle a Search Clear request.

Overrides:
doSearch_clear in class PagedResourceActionII