org.kuali.rice.krad.web.controller
Class MaintenanceDocumentController

java.lang.Object
  extended by org.kuali.rice.krad.web.controller.UifControllerBase
      extended by org.kuali.rice.krad.web.controller.DocumentControllerBase
          extended by org.kuali.rice.krad.web.controller.MaintenanceDocumentController
Direct Known Subclasses:
AgendaEditorController, PeopleFlowController

@Controller
@RequestMapping(value="/maintenance")
public class MaintenanceDocumentController
extends DocumentControllerBase

Controller for MaintenanceView screens which operate on MaintenanceDocument instances

Author:
Kuali Rice Team (rice.collab@kuali.org)

Field Summary
protected static org.apache.log4j.Logger LOG
           
 
Fields inherited from class org.kuali.rice.krad.web.controller.DocumentControllerBase
DOCUMENT_LOAD_COMMANDS
 
Fields inherited from class org.kuali.rice.krad.web.controller.UifControllerBase
REDIRECT_PREFIX
 
Constructor Summary
MaintenanceDocumentController()
           
 
Method Summary
protected  MaintenanceForm createInitialForm(javax.servlet.http.HttpServletRequest request)
          Called to create a new model(form) object when necessary.
 org.springframework.web.servlet.ModelAndView docHandler(DocumentFormBase formBase, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          After the document is loaded calls method to setup the maintenance object
protected  MaintenanceDocumentService getMaintenanceDocumentService()
           
 org.springframework.web.servlet.ModelAndView maintenanceCopy(MaintenanceForm form, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Setups a new MaintenanceView with the copy maintenance action
 org.springframework.web.servlet.ModelAndView maintenanceEdit(MaintenanceForm form, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Setups a new MaintenanceView with the edit maintenance action
 org.springframework.web.servlet.ModelAndView maintenanceNewWithExisting(MaintenanceForm form, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Setups a new MaintenanceView with the new with existing maintenance action
 org.springframework.web.servlet.ModelAndView route(DocumentFormBase form, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Override route to retrieve the maintenance object if it is an attachment
protected  void setupMaintenance(MaintenanceForm form, javax.servlet.http.HttpServletRequest request, String maintenanceAction)
          Sets up the MaintenanceDocument on initial get request
 org.springframework.web.servlet.ModelAndView start(UifFormBase form, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Default method for controller that setups a new MaintenanceView with the default new action
 
Methods inherited from class org.kuali.rice.krad.web.controller.DocumentControllerBase
acknowledge, approve, blanketApprove, buildAuthorizationException, cancel, cancelAttachment, checkAndWarnAboutSensitiveData, combineAdHocRecipients, createDocument, deleteNote, disapprove, downloadAttachment, fyi, getAttachmentService, getBusinessObjectService, getConfigurationService, getDataDictionaryService, getDocumentDictionaryService, getDocumentService, getNoteService, insertNote, loadDocument, performWorkflowAction, reload, save, setBusinessObjectService, setDataDictionaryService, setDocumentDictionaryService, setDocumentService, supervisorFunctions
 
Methods inherited from class org.kuali.rice.krad.web.controller.UifControllerBase
addLine, checkViewAuthorization, close, deleteLine, getUIFModelAndView, getUIFModelAndView, getViewService, initForm, navigate, performFieldQuery, performFieldSuggest, performLookup, performRedirect, refresh, returnToHistory, returnToHub, returnToPrevious, toggleInactiveRecordDisplay, updateComponent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final org.apache.log4j.Logger LOG
Constructor Detail

MaintenanceDocumentController

public MaintenanceDocumentController()
Method Detail

createInitialForm

protected MaintenanceForm createInitialForm(javax.servlet.http.HttpServletRequest request)
Description copied from class: UifControllerBase
Called to create a new model(form) object when necessary. This usually occurs on the initial request in a conversation (when the model is not present in the session). This method must be overridden when extending a controller and using a different form type than the superclass.

Specified by:
createInitialForm in class DocumentControllerBase
Parameters:
request - - the http request that was made
See Also:
UifControllerBase.createInitialForm(javax.servlet.http.HttpServletRequest)

docHandler

@RequestMapping(params="methodToCall=docHandler")
public org.springframework.web.servlet.ModelAndView docHandler(@ModelAttribute(value="KualiForm")
                                                                              DocumentFormBase formBase,
                                                                              org.springframework.validation.BindingResult result,
                                                                              javax.servlet.http.HttpServletRequest request,
                                                                              javax.servlet.http.HttpServletResponse response)
                                                        throws Exception
After the document is loaded calls method to setup the maintenance object

Overrides:
docHandler in class DocumentControllerBase
Throws:
Exception

start

@RequestMapping(params="methodToCall=start")
public org.springframework.web.servlet.ModelAndView start(@ModelAttribute(value="KualiForm")
                                                                         UifFormBase form,
                                                                         org.springframework.validation.BindingResult result,
                                                                         javax.servlet.http.HttpServletRequest request,
                                                                         javax.servlet.http.HttpServletResponse response)
Default method for controller that setups a new MaintenanceView with the default new action

Overrides:
start in class UifControllerBase

maintenanceEdit

@RequestMapping(params="methodToCall=maintenanceEdit")
public org.springframework.web.servlet.ModelAndView maintenanceEdit(@ModelAttribute(value="KualiForm")
                                                                                   MaintenanceForm form,
                                                                                   org.springframework.validation.BindingResult result,
                                                                                   javax.servlet.http.HttpServletRequest request,
                                                                                   javax.servlet.http.HttpServletResponse response)
                                                             throws Exception
Setups a new MaintenanceView with the edit maintenance action

Throws:
Exception

maintenanceCopy

@RequestMapping(params="methodToCall=maintenanceCopy")
public org.springframework.web.servlet.ModelAndView maintenanceCopy(@ModelAttribute(value="KualiForm")
                                                                                   MaintenanceForm form,
                                                                                   org.springframework.validation.BindingResult result,
                                                                                   javax.servlet.http.HttpServletRequest request,
                                                                                   javax.servlet.http.HttpServletResponse response)
                                                             throws Exception
Setups a new MaintenanceView with the copy maintenance action

Throws:
Exception

maintenanceNewWithExisting

@RequestMapping(params="methodToCall=maintenanceNewWithExisting")
public org.springframework.web.servlet.ModelAndView maintenanceNewWithExisting(@ModelAttribute(value="KualiForm")
                                                                                              MaintenanceForm form,
                                                                                              org.springframework.validation.BindingResult result,
                                                                                              javax.servlet.http.HttpServletRequest request,
                                                                                              javax.servlet.http.HttpServletResponse response)
                                                                        throws Exception
Setups a new MaintenanceView with the new with existing maintenance action

Throws:
Exception

setupMaintenance

protected void setupMaintenance(MaintenanceForm form,
                                javax.servlet.http.HttpServletRequest request,
                                String maintenanceAction)
Sets up the MaintenanceDocument on initial get request

First step is to create a new document instance based on the query parameters (document type name or object class name). Then call the Maintainable to do setup on the object being maintained.

Parameters:
form - - MaintenanceForm instance
request - - HTTP request object
maintenanceAction - - the maintenance action (new, new from existing, edit, copy) being request
Throws:
Exception

route

@RequestMapping(params="methodToCall=route")
public org.springframework.web.servlet.ModelAndView route(@ModelAttribute(value="KualiForm")
                                                                         DocumentFormBase form,
                                                                         org.springframework.validation.BindingResult result,
                                                                         javax.servlet.http.HttpServletRequest request,
                                                                         javax.servlet.http.HttpServletResponse response)
Override route to retrieve the maintenance object if it is an attachment

Overrides:
route in class DocumentControllerBase
Parameters:
form - - document form base containing the document instance that will be routed
Returns:
ModelAndView
See Also:
(DocumentFormBase, HttpServletRequest, HttpServletResponse)

getMaintenanceDocumentService

protected MaintenanceDocumentService getMaintenanceDocumentService()


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