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

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.TabMenuController
                          extended by org.kuali.student.lum.lu.ui.course.client.controllers.ViewCourseController
All Implemented Interfaces:
com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, DocumentLayoutController, ViewLayoutController, BreadcrumbSupport, HistorySupport, View, ReportExport, HasRequirements

public class ViewCourseController
extends TabMenuController
implements DocumentLayoutController, HasRequirements

This is a description of what this class does - Will Gomes don't forget to fill this in.

Author:
Kuali Student Team

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
private  List<CourseWorkflowActionList> actionDropDownWidgets
           
(package private)  ViewCourseConfigurer cfg
           
private static String CLU_STATE
           
private  DataModel cluModel
           
private  String cluType
           
private  String courseId
           
private  boolean initialized
           
private  BlockingTask initTask
           
private  BlockingTask loadDataTask
           
private  WorkQueue modelRequestQueue
           
private static String MSG_GROUP
           
private  String REFERENCE_TYPE
           
private  CourseRequirementsDataModel reqDataModel
           
(package private)  CourseRpcServiceAsync rpcServiceAsync
           
private  KSLabel statusLabel
           
 
Fields inherited from class org.kuali.student.common.ui.client.configurable.mvc.layouts.TabMenuController
header, layout, tabPanel
 
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
ViewCourseController(Enum<?> viewType)
           
 
Method Summary
 void beforeShow(Callback<Boolean> onReadyCallback)
          Default implementation does nothing on before show.
 void clear(String cluType)
           
private  com.google.gwt.event.logical.shared.CloseHandler<KSLightBox> createActionSubmitSuccessHandler()
           
private  void createNewCluModel(ModelRequestCallback callback, Callback<Boolean> workCompleteCallback)
           
 com.google.gwt.user.client.ui.Widget generateActionDropDown()
           
private  void getCourseFromCluId(ModelRequestCallback callback, Callback<Boolean> workCompleteCallback)
           
 String getCourseId()
           
 String getCourseTitle()
           
 String getCurrentId()
           
private  void getCurrentVersion(ModelRequestCallback callback, Callback<Boolean> workCompleteCallback)
           
 DataModel getExportDataModel()
          This method needs to be implemented on every controller that want's to export the data
 ArrayList<ExportElement> getExportElementsFromView()
          This method returns array of ExportElements which represent the elements on the view that must be exported
 String getMessage(String courseMessageKey)
           
private  KSButton getQuitButton()
           
 CourseRequirementsDataModel getReqDataModel()
           
 com.google.gwt.user.client.ui.Widget getStatusLabel()
           
 com.google.gwt.user.client.ui.Widget getVersionHistoryWidget()
           
 String getVersionIndId()
           
private  void init(Callback<Boolean> onReadyCallback)
           
private  void init(DataModelDefinition modelDefinition, Callback<Boolean> onReadyCallback)
           
private  void initialize()
           
 boolean isExportButtonActive()
          This method needs to be implemented only on views that want the export button to display.
 void onHistoryEvent(String historyStack)
          The onHistoryEvent implementation in controller reads the history stack it receives and determines if the next token/view to be processed is a controller, if it is, it hands off the rest of the history stack to that controller after showing it.
 void requestModel(Class modelType, ModelRequestCallback callback)
          Called by child views and controllers to request a model reference.
 void setCourseId(String courseId)
           
protected  void setHeaderTitle()
           
 void setViewContext(ViewContext viewContext)
          Sets the view context.
 void showDefaultView(Callback<Boolean> onReadyCallback)
          Shows the default view.
private  void updateCourseActionItems()
           
private  void updateStatus()
           
 
Methods inherited from class org.kuali.student.common.ui.client.configurable.mvc.layouts.TabMenuController
addContentWidget, addTab, hideView, renderView, setBasicTitle, setContentInfo, setContentTitle, setContentWarning, showExport, showPrint, updateModel
 
Methods inherited from class org.kuali.student.common.ui.client.configurable.mvc.LayoutController
addStartViewPopup, addView, asWidget, beforeHide, beforeViewChange, 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, getExportTemplateName, getHistoryToken, getParentController, getViewContext, registerModel, requestModel, requestModel, resetCurrentView, setCurrentViewEnum, setDefaultModelId, setParentController, showView, 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, addStyleName, 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.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

cluModel

private final DataModel cluModel

modelRequestQueue

private WorkQueue modelRequestQueue

cluType

private String cluType

courseId

private String courseId

CLU_STATE

private static final String CLU_STATE
See Also:
Constant Field Values

MSG_GROUP

private static final String MSG_GROUP
See Also:
Constant Field Values

REFERENCE_TYPE

private final String REFERENCE_TYPE
See Also:
Constant Field Values

initialized

private boolean initialized

rpcServiceAsync

CourseRpcServiceAsync rpcServiceAsync

loadDataTask

private final BlockingTask loadDataTask

initTask

private final BlockingTask initTask

statusLabel

private final KSLabel statusLabel

actionDropDownWidgets

private final List<CourseWorkflowActionList> actionDropDownWidgets

reqDataModel

private final CourseRequirementsDataModel reqDataModel

cfg

final ViewCourseConfigurer cfg
Constructor Detail

ViewCourseController

public ViewCourseController(Enum<?> viewType)
Method Detail

setViewContext

public void setViewContext(ViewContext viewContext)
Description copied from class: Controller
Sets the view context. This is important for determining the permission for seeing views under this controllers scope, what the id and id type of the model the controller handles are defined here. Additional attributes that the controller and it's views need to know about are also defined in the viewContext.

Overrides:
setViewContext in class Controller

initialize

private void initialize()

generateActionDropDown

public com.google.gwt.user.client.ui.Widget generateActionDropDown()

init

private void init(Callback<Boolean> onReadyCallback)

updateCourseActionItems

private void updateCourseActionItems()

init

private void init(DataModelDefinition modelDefinition,
                  Callback<Boolean> onReadyCallback)

requestModel

public void requestModel(Class modelType,
                         ModelRequestCallback callback)
Description copied from class: Controller
Called by child views and controllers to request a model reference. By default it delegates calls to the parent controller if one is found. Override this method to declare a model local to the controller. Always make sure to delegate the call to the superclass if the requested type is not one which is defined locally. For example:

Overrides:
requestModel in class Controller

getCourseFromCluId

private void getCourseFromCluId(ModelRequestCallback callback,
                                Callback<Boolean> workCompleteCallback)

getCurrentVersion

private void getCurrentVersion(ModelRequestCallback callback,
                               Callback<Boolean> workCompleteCallback)

createNewCluModel

private void createNewCluModel(ModelRequestCallback callback,
                               Callback<Boolean> workCompleteCallback)

getCourseId

public String getCourseId()

getVersionIndId

public String getVersionIndId()

setCourseId

public void setCourseId(String courseId)

clear

public void clear(String cluType)

showDefaultView

public void showDefaultView(Callback<Boolean> onReadyCallback)
Description copied from class: Controller
Shows the default view. Must be implemented by subclass, in order to define the default view.

Overrides:
showDefaultView in class TabMenuController

beforeShow

public void beforeShow(Callback<Boolean> onReadyCallback)
Description copied from class: LayoutController
Default implementation does nothing on before show. Override to do other things before THIS view is shown.

Specified by:
beforeShow in interface View
Overrides:
beforeShow in class LayoutController
See Also:
View.beforeShow(org.kuali.student.common.ui.client.mvc.Callback)

getQuitButton

private KSButton getQuitButton()

setHeaderTitle

protected void setHeaderTitle()

updateStatus

private void updateStatus()

createActionSubmitSuccessHandler

private com.google.gwt.event.logical.shared.CloseHandler<KSLightBox> createActionSubmitSuccessHandler()

getMessage

public String getMessage(String courseMessageKey)

getStatusLabel

public com.google.gwt.user.client.ui.Widget getStatusLabel()

getVersionHistoryWidget

public com.google.gwt.user.client.ui.Widget getVersionHistoryWidget()

onHistoryEvent

public void onHistoryEvent(String historyStack)
Description copied from class: Controller
The onHistoryEvent implementation in controller reads the history stack it receives and determines if the next token/view to be processed is a controller, if it is, it hands off the rest of the history stack to that controller after showing it. Otherwise, it shows the view and allows that view to perform any onHistoryEvent actions it may need to take.

For example the historyStack /HOME/CURRICULUM_HOME/COURSE_PROPOSAL would start at the root controller, and hand it off to the home controller, then the curriculum home controller, then the course proposal controller and stop there. Along the way each of those controller would show themselves visually in the UI, if they contain any layout (some do not).

Specified by:
onHistoryEvent in interface HistorySupport
Overrides:
onHistoryEvent in class Controller
See Also:
HistorySupport.onHistoryEvent(java.lang.String)

getCourseTitle

public String getCourseTitle()

getCurrentId

public String getCurrentId()

getReqDataModel

public CourseRequirementsDataModel getReqDataModel()
Specified by:
getReqDataModel in interface HasRequirements

getExportDataModel

public DataModel getExportDataModel()
Description copied from interface: ReportExport
This method needs to be implemented on every controller that want's to export the data

Specified by:
getExportDataModel in interface ReportExport
Overrides:
getExportDataModel in class Controller
Returns:

isExportButtonActive

public boolean isExportButtonActive()
Description copied from interface: View
This method needs to be implemented only on views that want the export button to display. The default implementation is not to display the export button

Specified by:
isExportButtonActive in interface View
Overrides:
isExportButtonActive in class LayoutController
Returns:

getExportElementsFromView

public ArrayList<ExportElement> getExportElementsFromView()
Description copied from interface: ReportExport
This method returns array of ExportElements which represent the elements on the view that must be exported

Specified by:
getExportElementsFromView in interface ReportExport
Overrides:
getExportElementsFromView in class TabMenuController
Returns:


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