org.kuali.student.lum.lu.ui.course.client.controllers
Class CourseAdminController

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Composite
              extended by org.kuali.student.common.ui.client.mvc.Controller
                  extended by org.kuali.student.common.ui.client.configurable.mvc.LayoutController
                      extended by org.kuali.student.common.ui.client.configurable.mvc.layouts.MenuSectionController
                          extended by org.kuali.student.common.ui.client.configurable.mvc.layouts.MenuEditableSectionController
                              extended by org.kuali.student.lum.lu.ui.course.client.controllers.CourseProposalController
                                  extended by org.kuali.student.lum.lu.ui.course.client.controllers.CourseAdminController
All Implemented Interfaces:
com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, ContentNavLayoutController, DocumentLayoutController, ViewLayoutController, BreadcrumbSupport, HistorySupport, View, ReportExport, RequiresAuthorization, WorkflowEnhancedNavController, HasRequirements
Direct Known Subclasses:
CourseAdminWithoutVersionController

public class CourseAdminController
extends CourseProposalController

Controller for create/modify course with proposal wrapper admin screens. This controller uses a different configurer for admin screens and attempts to reuse as much of the validation, save & retreive logic coded in the CourseProposalController. Also it reuses the menu from CourseProposalController and adds click handlers to button menu to navigate user b/w sections of the same view.

Author:
Will

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Field Summary
(package private)  List<KSButton> cancelButtons
           
 
Fields inherited from class org.kuali.student.lum.lu.ui.course.client.controllers.CourseProposalController
cfg, cluProposalModel, cluProposalRpcServiceAsync, comparisonModel, courseServiceAsync, currentDocType, currentTitle, INITIAL_SAVE_VERSION, isNew, loadDataTask, proposalPath, reqDataModel, reqDataModelComp, workflowUtil
 
Fields inherited from class org.kuali.student.common.ui.client.configurable.mvc.layouts.MenuSectionController
leftPanel, menu, menuViewMap, rightPanel, topLevelMenuItems, viewMenuItemMap
 
Fields inherited from class org.kuali.student.common.ui.client.configurable.mvc.LayoutController
defaultView, name, startPopupView, startViewWindow, viewEnumMap, viewMap, viewType
 
Fields inherited from class org.kuali.student.common.ui.client.mvc.Controller
context, NO_OP_CALLBACK, parentController
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Fields inherited from interface org.kuali.student.common.ui.client.reporting.ReportExport
exportTemplateName
 
Constructor Summary
CourseAdminController()
           
 
Method Summary
 void addMenuItemSection(String parentMenu, String sectionName, String widgetId, com.google.gwt.user.client.ui.Widget widget)
          This is a special method for CourseAdminController, which adds a menu item to the navigation menu and navigates a user to a section within the view rather than a different view.
protected  void configureScreens(DataModelDefinition modelDefinition, Callback<Boolean> onReadyCallback)
           
private  void doAdminSaveAction(SaveActionEvent saveActionEvent, String state)
          Fires the SaveActionEvent to be handled by the CourseProposalController.
 KSButton getApproveAndActivateButton()
           
 KSButton getCancelButton()
           
private  String getProposalTitle()
           
private  SaveActionEvent getSaveActionEvent(String state)
          Returns a SaveActionEvent with the appropriate ActionCompleteCallback, which will take additional admin actions once save is complete.
 KSButton getSaveButton()
          Override the getSaveButton to provide a new set of buttons for the admin screens
protected  void handleButtonClick(String state)
          Processes the save, approve, or approve and activate button clicks.
protected  void initializeController()
          Override the intitailzeController method to use CourseAdminConfigurer
protected  void setHeaderTitle()
          Override the setHeaderTitle to display proper header title for admin screens
 
Methods inherited from class org.kuali.student.lum.lu.ui.course.client.controllers.CourseProposalController
beforeShow, beforeViewChange, checkAuthorization, createNewCluProposalModel, doSaveAction, getCancelButton, getCluProposalFromProposalId, getCourseComparisonModelAndReqs, getCourseId, getCourseProposalRpcService, getCourseState, getCurrentModel, getExportDataModel, getExportElementsFromView, getExportTemplateName, getMessage, getMetadataForFinalState, getReqDataModel, getReqDataModelComp, getWfUtilities, isAuthorizationRequired, isExportButtonActive, isNew, onHistoryEvent, progressiveEnableFields, registerModelsAndHandlers, requestModel, saveProposalClu, setAuthorizationRequired, setLastUpdated, setParentController, setViewContext, showDefaultView, showView, startSectionRequired
 
Methods inherited from class org.kuali.student.common.ui.client.configurable.mvc.layouts.MenuEditableSectionController
addCommonEditButton, addMenuItem, attachEditLink, generateEditLink, setEditable, setEditMode
 
Methods inherited from class org.kuali.student.common.ui.client.configurable.mvc.layouts.MenuSectionController
addButtonForView, addCommonButton, addCommonButton, addContentWidget, addInfoWidget, addMenu, addMenuItem, addSpecialMenuItem, addStartMenuItem, addStyleName, addTopButtonForView, hideView, removeMenuNavigation, renderView, revealMenuItems, setContentInfo, setContentTitle, setContentWarning, setSideBarWidget, showExport, showNextViewOnMenu, showPrint, updateModel
 
Methods inherited from class org.kuali.student.common.ui.client.configurable.mvc.LayoutController
addStartViewPopup, addView, asWidget, beforeHide, checkForErrors, clear, clearAllWarnings, collectBreadcrumbNames, findParentLayout, getController, getDefaultView, getName, getStartPopup, getStartPopupView, getView, getViewEnum, getViewEnumValue, isStartViewShowing, isValid, isValid, setController, setDefaultView, setName, setViewEnum, showFirstView, showStartPopup, showWarnings, updateModelFromCurrentView, updateModelFromView
 
Methods inherited from class org.kuali.student.common.ui.client.mvc.Controller
addApplicationEventHandler, collectHistory, doReportExport, findController, fireApplicationEvent, fireNavigationEvent, getCurrentView, getCurrentViewEnum, getDefaultModelId, getHistoryToken, getParentController, getView, getViewContext, registerModel, requestModel, requestModel, resetCurrentView, setCurrentViewEnum, setDefaultModelId, showView
 
Methods inherited from class com.google.gwt.user.client.ui.Composite
getWidget, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addDomHandler, addHandler, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.kuali.student.common.ui.client.configurable.mvc.layouts.ContentNavLayoutController
addButtonForView, addCommonButton, addCommonButton, addMenu, addMenuItem, addSpecialMenuItem, removeMenuNavigation
 
Methods inherited from interface org.kuali.student.common.ui.client.configurable.mvc.layouts.DocumentLayoutController
addContentWidget, setContentInfo, setContentTitle
 
Methods inherited from interface org.kuali.student.common.ui.client.configurable.mvc.layouts.ViewLayoutController
addStartViewPopup, addView, setDefaultView, showView
 
Methods inherited from interface org.kuali.student.common.ui.client.mvc.history.HistorySupport
collectHistory
 

Field Detail

cancelButtons

List<KSButton> cancelButtons
Constructor Detail

CourseAdminController

public CourseAdminController()
Method Detail

initializeController

protected void initializeController()
Override the intitailzeController method to use CourseAdminConfigurer

Overrides:
initializeController in class CourseProposalController

getSaveButton

public KSButton getSaveButton()
Override the getSaveButton to provide a new set of buttons for the admin screens

Overrides:
getSaveButton in class CourseProposalController

getApproveAndActivateButton

public KSButton getApproveAndActivateButton()

getCancelButton

public KSButton getCancelButton()

handleButtonClick

protected void handleButtonClick(String state)
Processes the save, approve, or approve and activate button clicks. The action is determined by the value of the state parameter.

Parameters:
state - The state to set on the course when saving course data. DRAFT=Save, APPROVED=Approve, and ACTIVE=Approve & Activate

getSaveActionEvent

private SaveActionEvent getSaveActionEvent(String state)
Returns a SaveActionEvent with the appropriate ActionCompleteCallback, which will take additional admin actions once save is complete. The action (i.e. button clicked) is determined by the value of the state parameter

Parameters:
state - The state to set on the course when saving course data. DRAFT=Save, APPROVED=Approve, and ACTIVE=Approve & Activate
Returns:
the save event that will be fired based on the button click

doAdminSaveAction

private void doAdminSaveAction(SaveActionEvent saveActionEvent,
                               String state)
Fires the SaveActionEvent to be handled by the CourseProposalController.

Parameters:
saveActionEvent - SaveActionEvent to fire
state - The state to set on the course when saving course data. DRAFT=Save, APPROVED=Approve, and ACTIVE=Approve & Activate
See Also:
CourseProposalController.registerModelsAndHandlers()

setHeaderTitle

protected void setHeaderTitle()
Override the setHeaderTitle to display proper header title for admin screens

Overrides:
setHeaderTitle in class CourseProposalController

getProposalTitle

private String getProposalTitle()

addMenuItemSection

public void addMenuItemSection(String parentMenu,
                               String sectionName,
                               String widgetId,
                               com.google.gwt.user.client.ui.Widget widget)
This is a special method for CourseAdminController, which adds a menu item to the navigation menu and navigates a user to a section within the view rather than a different view.

Parameters:
parentMenu -
sectionName -
sectionId -
section -

configureScreens

protected void configureScreens(DataModelDefinition modelDefinition,
                                Callback<Boolean> onReadyCallback)
Overrides:
configureScreens in class CourseProposalController


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.