|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.gwt.user.client.ui.UIObject com.google.gwt.user.client.ui.Widget com.google.gwt.user.client.ui.Composite org.kuali.student.common.ui.client.mvc.Controller org.kuali.student.common.ui.client.configurable.mvc.LayoutController org.kuali.student.common.ui.client.configurable.mvc.layouts.MenuSectionController org.kuali.student.common.ui.client.configurable.mvc.layouts.MenuEditableSectionController org.kuali.student.lum.lu.ui.course.client.controllers.CourseProposalController
public class CourseProposalController
Controller for course proposal screens. This controller controls all functions of the course proposal process and contains the data model and is responsible for retrieving its data and metadata from the server. In addition, this controller is responsible for course proposal save events and updating its ui accordingly.
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 CourseProposalConfigurer |
cfg
|
protected DataModel |
cluProposalModel
|
protected CreditCourseProposalRpcServiceAsync |
cluProposalRpcServiceAsync
|
protected DataModel |
comparisonModel
|
protected CourseRpcServiceAsync |
courseServiceAsync
|
protected String |
currentDocType
|
protected String |
currentTitle
|
private DateFormat |
df
|
private boolean |
initialized
|
private BlockingTask |
initializingTask
|
protected boolean |
isNew
|
protected BlockingTask |
loadDataTask
|
private WorkQueue |
modelRequestQueue
|
private static String |
MSG_GROUP
|
protected String |
proposalPath
|
protected CourseRequirementsDataModel |
reqDataModel
|
protected CourseRequirementsDataModel |
reqDataModelComp
|
private BlockingTask |
saving
|
private static String |
UPDATED_KEY
|
private static String |
VERSION_KEY
|
protected WorkflowUtilities |
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 | |
---|---|
CourseProposalController()
|
Method Summary | ||
---|---|---|
void |
addPermissionAttributes(Map<String,String> attributes)
This method adds any permission attributes required for checking permissions |
|
void |
beforeShow(Callback<Boolean> onReadyCallback)
Default implementation does nothing on before show. |
|
void |
beforeViewChange(Enum<?> viewChangingTo,
Callback<Boolean> okToChange)
This particular implementation of beforeViewChange checks to see if all its view contains a Controller and if it does checks with that controller to see if it is ok to change the view. |
|
void |
checkAuthorization(AuthorizationCallback authCallback)
|
|
protected void |
configureScreens(DataModelDefinition modelDefinition,
Callback<Boolean> onReadyCallback)
|
|
private void |
createCopyCourseModel(String originalCluId,
ModelRequestCallback callback,
Callback<Boolean> workCompleteCallback)
|
|
private void |
createCopyCourseProposalModel(String originalProposalId,
ModelRequestCallback callback,
Callback<Boolean> workCompleteCallback)
|
|
private void |
createModifyCluProposalModel(String versionComment,
ModelRequestCallback callback,
Callback<Boolean> workCompleteCallback)
|
|
protected void |
createNewCluProposalModel(ModelRequestCallback callback,
Callback<Boolean> workCompleteCallback)
|
|
void |
doSaveAction(SaveActionEvent saveActionEvent)
|
|
KSButton |
getCancelButton(Enum<?> summaryView)
|
|
protected void |
getCluProposalFromProposalId(String id,
ModelRequestCallback callback,
Callback<Boolean> workCompleteCallback)
|
|
private void |
getCluProposalFromWorkflowId(ModelRequestCallback callback,
Callback<Boolean> workCompleteCallback)
|
|
protected void |
getCourseComparisonModelAndReqs(ModelRequestCallback proposalModelRequestCallback,
Callback<Boolean> workCompleteCallback)
|
|
String |
getCourseId()
|
|
CourseProposalConfigurer |
getCourseProposalConfigurer()
|
|
protected BaseDataOrchestrationRpcServiceAsync |
getCourseProposalRpcService()
This method exists to allow the save/get implementations defined in this CourseProposalController in this controller to be reused in the CourseAdminWithoutVersion controller. |
|
String |
getCourseState()
|
|
protected void |
getCurrentModel(ModelRequestCallback<DataModel> callback,
Callback<Boolean> workCompleteCallback)
|
|
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 |
getExportTemplateName()
This overridden method only needs to be implemented if the Generic Export reports has to be overwritten for a particular COntroller. |
|
String |
getMessage(String courseMessageKey)
|
|
void |
getMetadataForFinalState(KSAsyncCallback<Metadata> callback)
|
|
private String |
getProposalTitle()
|
|
CourseRequirementsDataModel |
getReqDataModel()
|
|
CourseRequirementsDataModel |
getReqDataModelComp()
|
|
KSButton |
getSaveButton()
|
|
protected String |
getStateforSaveAction(DataModel model)
This method is used to determine which state the dto will be when making the save call. |
|
WorkflowUtilities |
getWfUtilities()
|
|
private boolean |
hasTitles(String proposalTitle,
String courseTitle)
|
|
protected void |
initializeController()
|
|
private void |
intializeView(Callback<Boolean> onReadyCallback)
|
|
boolean |
isAuthorizationRequired()
|
|
boolean |
isExportButtonActive()
This method needs to be implemented only on views that want the export button to display. |
|
boolean |
isNew()
|
|
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. |
|
private void |
populateModel(ModelRequestCallback<DataModel> callback,
Callback<Boolean> workCompleteCallback)
Used to populate the proposal model based on the view context. |
|
protected void |
progressiveEnableFields()
This progressively enables/disables screen fields based on other fields present in the screens. |
|
protected void |
registerModelsAndHandlers()
|
|
void |
requestModel(Class modelType,
ModelRequestCallback callback)
Called by child views and controllers to request a model reference. |
|
void |
saveProposalClu(SaveActionEvent saveActionEvent)
|
|
void |
setAuthorizationRequired(boolean required)
|
|
protected void |
setHeaderTitle()
|
|
void |
setLastUpdated()
|
|
void |
setParentController(Controller controller)
Sets the controller's parent controller. |
|
void |
setViewContext(ViewContext viewContext)
Sets the view context. |
|
void |
showDefaultView(Callback<Boolean> onReadyCallback)
Shows the default view. |
|
|
showView(V viewType,
Callback<Boolean> onReadyCallback)
Directs the controller to display the specified view. |
|
boolean |
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 |
---|
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, 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.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 |
---|
protected CreditCourseProposalRpcServiceAsync cluProposalRpcServiceAsync
protected CourseRpcServiceAsync courseServiceAsync
protected final DataModel cluProposalModel
protected final DataModel comparisonModel
protected CourseProposalConfigurer cfg
private WorkQueue modelRequestQueue
protected WorkflowUtilities workflowUtil
private boolean initialized
protected boolean isNew
private static final String UPDATED_KEY
private static final String VERSION_KEY
private static final String MSG_GROUP
protected String currentDocType
protected String proposalPath
protected String currentTitle
private final DateFormat df
private final BlockingTask initializingTask
protected final BlockingTask loadDataTask
private final BlockingTask saving
protected CourseRequirementsDataModel reqDataModel
protected CourseRequirementsDataModel reqDataModelComp
Constructor Detail |
---|
public CourseProposalController()
Method Detail |
---|
protected void initializeController()
protected void registerModelsAndHandlers()
private void populateModel(ModelRequestCallback<DataModel> callback, Callback<Boolean> workCompleteCallback)
callback
- workCompleteCallback
- protected void getCurrentModel(ModelRequestCallback<DataModel> callback, Callback<Boolean> workCompleteCallback)
private void intializeView(Callback<Boolean> onReadyCallback)
public void getMetadataForFinalState(KSAsyncCallback<Metadata> callback)
getMetadataForFinalState
in interface WorkflowEnhancedNavController
protected void configureScreens(DataModelDefinition modelDefinition, Callback<Boolean> onReadyCallback)
protected void progressiveEnableFields()
public void requestModel(Class modelType, ModelRequestCallback callback)
Controller
- Overrides:
requestModel
in class Controller
private void getCluProposalFromWorkflowId(ModelRequestCallback callback, Callback<Boolean> workCompleteCallback)
protected void getCluProposalFromProposalId(String id, ModelRequestCallback callback, Callback<Boolean> workCompleteCallback)
protected void getCourseComparisonModelAndReqs(ModelRequestCallback proposalModelRequestCallback, Callback<Boolean> workCompleteCallback)
protected void createNewCluProposalModel(ModelRequestCallback callback, Callback<Boolean> workCompleteCallback)
private void createModifyCluProposalModel(String versionComment, ModelRequestCallback callback, Callback<Boolean> workCompleteCallback)
private void createCopyCourseModel(String originalCluId, ModelRequestCallback callback, Callback<Boolean> workCompleteCallback)
private void createCopyCourseProposalModel(String originalProposalId, ModelRequestCallback callback, Callback<Boolean> workCompleteCallback)
public void doSaveAction(SaveActionEvent saveActionEvent)
public boolean startSectionRequired()
private boolean hasTitles(String proposalTitle, String courseTitle)
public void saveProposalClu(SaveActionEvent saveActionEvent)
public void setLastUpdated()
public void beforeShow(Callback<Boolean> onReadyCallback)
LayoutController
beforeShow
in interface View
beforeShow
in class LayoutController
View.beforeShow(org.kuali.student.common.ui.client.mvc.Callback)
public <V extends Enum<?>> void showView(V viewType, Callback<Boolean> onReadyCallback)
Controller
public enum SearchViews {
SIMPLE_SEARCH,
ADVANCED_SEARCH,
SEARCH_RESULTS
}
The implementing class must define a getView(V viewType) method that will cast the generic enum to the view
specific enum.
showView
in class MenuEditableSectionController
V
- view enum typeviewType
- enum value representing the view to showonReadyCallback
- the callback to invoke when the method has completed executionpublic void showDefaultView(Callback<Boolean> onReadyCallback)
Controller
showDefaultView
in class LayoutController
public void setParentController(Controller controller)
Controller
setParentController
in class Controller
controller
- the parent controllerpublic void checkAuthorization(AuthorizationCallback authCallback)
checkAuthorization
in interface RequiresAuthorization
public void setViewContext(ViewContext viewContext)
Controller
setViewContext
in class Controller
public void addPermissionAttributes(Map<String,String> attributes)
public boolean isAuthorizationRequired()
isAuthorizationRequired
in interface RequiresAuthorization
public void setAuthorizationRequired(boolean required)
setAuthorizationRequired
in interface RequiresAuthorization
protected void setHeaderTitle()
public WorkflowUtilities getWfUtilities()
getWfUtilities
in interface WorkflowEnhancedNavController
public void beforeViewChange(Enum<?> viewChangingTo, Callback<Boolean> okToChange)
LayoutController
beforeViewChange
in class LayoutController
Controller.beforeViewChange(java.lang.Enum, org.kuali.student.common.ui.client.mvc.Callback)
public KSButton getSaveButton()
public KSButton getCancelButton(Enum<?> summaryView)
public void onHistoryEvent(String historyStack)
Controller
onHistoryEvent
in interface HistorySupport
onHistoryEvent
in class Controller
HistorySupport.onHistoryEvent(java.lang.String)
private String getProposalTitle()
public String getCourseId()
public String getCourseState()
public boolean isNew()
public CourseRequirementsDataModel getReqDataModel()
getReqDataModel
in interface HasRequirements
public CourseRequirementsDataModel getReqDataModelComp()
public DataModel getExportDataModel()
ReportExport
getExportDataModel
in interface ReportExport
getExportDataModel
in class Controller
public String getExportTemplateName()
ReportExport
getExportTemplateName
in interface ReportExport
getExportTemplateName
in class Controller
ReportExport.getExportTemplateName()
public List<ExportElement> getExportElementsFromView()
ReportExport
getExportElementsFromView
in interface ReportExport
getExportElementsFromView
in class MenuSectionController
public boolean isExportButtonActive()
View
isExportButtonActive
in interface View
isExportButtonActive
in class LayoutController
protected String getStateforSaveAction(DataModel model)
public String getMessage(String courseMessageKey)
protected BaseDataOrchestrationRpcServiceAsync getCourseProposalRpcService()
public CourseProposalConfigurer getCourseProposalConfigurer()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |