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.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.IsWidget, DocumentLayoutController, ViewLayoutController, BreadcrumbSupport, HistorySupport, View, ReportExport, RequiresAuthorization, HasRequirements

public class ViewCourseController
extends TabMenuController
implements DocumentLayoutController, HasRequirements, RequiresAuthorization

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
protected  DataModel cluModel
           
 
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()
           
 
Method Summary
 void beforeShow(Callback<Boolean> onReadyCallback)
          Default implementation does nothing on before show.
 void checkAuthorization(AuthorizationCallback authCallback)
           
 void clear(String cluType)
           
 com.google.gwt.user.client.ui.Widget generateActionDropDown()
           
 String getCourseId()
           
 String getCourseTitle()
           
 String getCurrentId()
           
 DataModel getExportDataModel()
          This method needs to be implemented on every controller that want's to export the data
 List<ExportElement> getExportElementsFromView()
          This method returns array of ExportElements which represent the elements on the view that must be exported
 String getMessage(String courseMessageKey)
           
 CourseRequirementsDataModel getReqDataModel()
           
 com.google.gwt.user.client.ui.Widget getStatusLabel()
           
 com.google.gwt.user.client.ui.Widget getVersionHistoryWidget()
           
 String getVersionIndId()
           
 void initialize(Enum<?> viewType)
           
 boolean isAuthorizationRequired()
           
 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 setAuthorizationRequired(boolean required)
           
 void setCourseId(String courseId)
           
protected  void setHeaderTitle()
           
 void setViewContext(ViewContext viewContext)
          Sets the view context.
 void showDefaultView(Callback<Boolean> onReadyCallback)
          Shows the default view.
protected  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, getView, 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
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidgetOrNull, createHandlerManager, 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, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, 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

protected final DataModel cluModel
Constructor Detail

ViewCourseController

public ViewCourseController()
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

public void initialize(Enum<?> viewType)

generateActionDropDown

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

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

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)

setHeaderTitle

protected void setHeaderTitle()

updateStatus

protected void updateStatus()

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 List<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:

isAuthorizationRequired

public boolean isAuthorizationRequired()
Specified by:
isAuthorizationRequired in interface RequiresAuthorization

setAuthorizationRequired

public void setAuthorizationRequired(boolean required)
Specified by:
setAuthorizationRequired in interface RequiresAuthorization

checkAuthorization

public void checkAuthorization(AuthorizationCallback authCallback)
Specified by:
checkAuthorization in interface RequiresAuthorization


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