public abstract class DocumentControllerBase extends UifControllerBase
DocumentView screens working
with Document models
Provides default controller implementations for the standard document actions including: doc handler (retrieve from doc search and action list), save, route (and other KEW actions)
| Modifier and Type | Field and Description |
|---|---|
protected static String[] |
DOCUMENT_LOAD_COMMANDS |
REDIRECT_PREFIX| Constructor and Description |
|---|
DocumentControllerBase() |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.web.servlet.ModelAndView |
acknowledge(DocumentFormBase form,
org.springframework.validation.BindingResult result,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Performs the acknowledge workflow action on the form document instance
|
org.springframework.web.servlet.ModelAndView |
approve(DocumentFormBase form,
org.springframework.validation.BindingResult result,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Performs the approve workflow action on the form document instance
|
org.springframework.web.servlet.ModelAndView |
blanketApprove(DocumentFormBase form,
org.springframework.validation.BindingResult result,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Performs the blanket approve workflow action on the form document instance
|
protected DocumentAuthorizationException |
buildAuthorizationException(String action,
Document document)
Convenience method for building authorization exceptions
|
org.springframework.web.servlet.ModelAndView |
cancel(UifFormBase form,
org.springframework.validation.BindingResult result,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Prompts user to confirm the cancel action then if confirmed cancels the document instance
contained on the form
|
org.springframework.web.servlet.ModelAndView |
cancelAttachment(UifFormBase uifForm,
org.springframework.validation.BindingResult result,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Called by the cancel attachment action on a note.
|
protected String |
checkAndWarnAboutSensitiveData(DocumentFormBase form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String fieldName,
String fieldValue,
String caller,
String context)
Checks if the given value matches patterns that indicate sensitive data
and if configured to give a warning for sensitive data will prompt the
user to continue.
|
protected List<AdHocRouteRecipient> |
combineAdHocRecipients(DocumentFormBase form)
Convenience method to combine the two lists of ad hoc recipients into one which should be done before
calling any of the document service methods that expect a list of ad hoc recipients
|
org.springframework.web.servlet.ModelAndView |
complete(DocumentFormBase form,
org.springframework.validation.BindingResult result,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Completes the document instance contained on the form
|
protected void |
createDocument(DocumentFormBase form)
Creates a new document of the type specified by the docTypeName property of the given form.
|
protected abstract DocumentFormBase |
createInitialForm(javax.servlet.http.HttpServletRequest request)
Called to create a new model(form) object when necessary.
|
org.springframework.web.servlet.ModelAndView |
deleteNote(UifFormBase uifForm,
org.springframework.validation.BindingResult result,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Called by the delete note action for deleting a note.
|
org.springframework.web.servlet.ModelAndView |
disapprove(DocumentFormBase form,
org.springframework.validation.BindingResult result,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Performs the disapprove workflow action on the form document instance
|
org.springframework.web.servlet.ModelAndView |
docHandler(DocumentFormBase form,
org.springframework.validation.BindingResult result,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Used to funnel all document handling through, we could do useful things
like log and record various openings and status Additionally it may be
nice to have a single dispatcher that can know how to dispatch to a
redirect url for document specific handling but we may not need that as
all we should need is the document to be able to load itself based on
document id and then which action forward or redirect is pertinent for
the document type.
|
org.springframework.web.servlet.ModelAndView |
downloadAttachment(UifFormBase uifForm,
org.springframework.validation.BindingResult result,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Called by the download attachment action on a note.
|
org.springframework.web.servlet.ModelAndView |
fyi(DocumentFormBase form,
org.springframework.validation.BindingResult result,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Performs the fyi workflow action on the form document instance
|
AttachmentService |
getAttachmentService() |
BusinessObjectService |
getBusinessObjectService() |
org.kuali.rice.core.api.config.property.ConfigurationService |
getConfigurationService() |
DataDictionaryService |
getDataDictionaryService() |
DocumentDictionaryService |
getDocumentDictionaryService() |
DocumentService |
getDocumentService() |
NoteService |
getNoteService() |
org.springframework.web.servlet.ModelAndView |
insertNote(UifFormBase uifForm,
org.springframework.validation.BindingResult result,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Called by the add note action for adding a note.
|
protected void |
loadDocument(DocumentFormBase form)
Loads the document by its provided document header id.
|
protected void |
performWorkflowAction(DocumentFormBase form,
UifConstants.WorkflowAction action,
boolean checkSensitiveData)
Invokes the
DocumentService to carry out a request workflow action and adds a success message, if
requested a check for sensitive data is also performed |
org.springframework.web.servlet.ModelAndView |
reload(DocumentFormBase form,
org.springframework.validation.BindingResult result,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Reloads the document contained on the form from the database
|
org.springframework.web.servlet.ModelAndView |
route(DocumentFormBase form,
org.springframework.validation.BindingResult result,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Routes the document instance contained on the form
|
org.springframework.web.servlet.ModelAndView |
save(DocumentFormBase form,
org.springframework.validation.BindingResult result,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Saves the document instance contained on the form
|
void |
setBusinessObjectService(BusinessObjectService businessObjectService) |
void |
setDataDictionaryService(DataDictionaryService dataDictionaryService) |
void |
setDocumentDictionaryService(DocumentDictionaryService documentDictionaryService) |
void |
setDocumentService(DocumentService documentService) |
org.springframework.web.servlet.ModelAndView |
supervisorFunctions(DocumentFormBase form,
org.springframework.validation.BindingResult result,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Redirects to the supervisor functions page
|
addLine, checkViewAuthorization, close, deleteLine, getUIFModelAndView, getUIFModelAndView, getViewService, initForm, navigate, performFieldQuery, performFieldSuggest, performLookup, performRedirect, refresh, returnToHistory, returnToHub, returnToPrevious, start, toggleInactiveRecordDisplay, updateComponentprotected static final String[] DOCUMENT_LOAD_COMMANDS
public DocumentControllerBase()
protected abstract DocumentFormBase createInitialForm(javax.servlet.http.HttpServletRequest request)
UifControllerBasecreateInitialForm in class UifControllerBaserequest - - the http request that was madeUifControllerBase.createInitialForm(javax.servlet.http.HttpServletRequest)@RequestMapping(params="methodToCall=docHandler") public org.springframework.web.servlet.ModelAndView docHandler(@ModelAttribute(value="KualiForm") DocumentFormBase form, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
Exceptionprotected void loadDocument(DocumentFormBase form) throws org.kuali.rice.kew.api.exception.WorkflowException
form - - form instance that contains the doc id parameter and where
the retrieved document instance should be setorg.kuali.rice.kew.api.exception.WorkflowExceptionprotected void createDocument(DocumentFormBase form) throws org.kuali.rice.kew.api.exception.WorkflowException
form - - form instance that contains the doc type parameter and where
the new document instance should be setorg.kuali.rice.kew.api.exception.WorkflowException@RequestMapping(params="methodToCall=reload") public org.springframework.web.servlet.ModelAndView reload(@ModelAttribute(value="KualiForm") DocumentFormBase form, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
form - - document form base containing the document instance from which the document number will
be retrieved and used to fetch the document from the databaseException@RequestMapping(params="methodToCall=cancel") public org.springframework.web.servlet.ModelAndView cancel(@ModelAttribute(value="KualiForm") UifFormBase form, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
cancel in class UifControllerBaseform - - document form base containing the document instance that will be cancelled@RequestMapping(params="methodToCall=save") public org.springframework.web.servlet.ModelAndView save(@ModelAttribute(value="KualiForm") DocumentFormBase form, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
form - - document form base containing the document instance that will be savedException@RequestMapping(params="methodToCall=complete") public org.springframework.web.servlet.ModelAndView complete(@ModelAttribute(value="KualiForm") DocumentFormBase form, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
form - - document form base containing the document instance that will be completedException@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)
form - - document form base containing the document instance that will be routed@RequestMapping(params="methodToCall=blanketApprove") public org.springframework.web.servlet.ModelAndView blanketApprove(@ModelAttribute(value="KualiForm") DocumentFormBase form, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
form - - document form base containing the document instance that will be blanket approvedException@RequestMapping(params="methodToCall=approve") public org.springframework.web.servlet.ModelAndView approve(@ModelAttribute(value="KualiForm") DocumentFormBase form, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
form - - document form base containing the document instance that will be approvedException@RequestMapping(params="methodToCall=disapprove") public org.springframework.web.servlet.ModelAndView disapprove(@ModelAttribute(value="KualiForm") DocumentFormBase form, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
form - - document form base containing the document instance that will be disapprovedException@RequestMapping(params="methodToCall=fyi") public org.springframework.web.servlet.ModelAndView fyi(@ModelAttribute(value="KualiForm") DocumentFormBase form, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
form - - document form base containing the document instance the fyi will be taken onException@RequestMapping(params="methodToCall=acknowledge") public org.springframework.web.servlet.ModelAndView acknowledge(@ModelAttribute(value="KualiForm") DocumentFormBase form, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
form - - document form base containing the document instance the acknowledge will be taken onExceptionprotected void performWorkflowAction(DocumentFormBase form, UifConstants.WorkflowAction action, boolean checkSensitiveData)
DocumentService to carry out a request workflow action and adds a success message, if
requested a check for sensitive data is also performedform - - document form instance containing the document for which the action will be taken onaction - - UifConstants.WorkflowAction enum indicating what workflow action to takecheckSensitiveData - - boolean indicating whether a check for sensitive data should occur@RequestMapping(params="methodToCall=supervisorFunctions") public org.springframework.web.servlet.ModelAndView supervisorFunctions(@ModelAttribute(value="KualiForm") DocumentFormBase form, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
Exception@RequestMapping(method=POST,
params="methodToCall=insertNote")
public org.springframework.web.servlet.ModelAndView insertNote(@ModelAttribute(value="KualiForm")
UifFormBase uifForm,
org.springframework.validation.BindingResult result,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
uifForm - - document form base containing the note instance that will be inserted into the document@RequestMapping(method=POST,
params="methodToCall=deleteNote")
public org.springframework.web.servlet.ModelAndView deleteNote(@ModelAttribute(value="KualiForm")
UifFormBase uifForm,
org.springframework.validation.BindingResult result,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
@RequestMapping(method=POST,
params="methodToCall=downloadAttachment")
public org.springframework.web.servlet.ModelAndView downloadAttachment(@ModelAttribute(value="KualiForm")
UifFormBase uifForm,
org.springframework.validation.BindingResult result,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws org.springframework.web.bind.ServletRequestBindingException,
FileNotFoundException,
IOException
org.springframework.web.bind.ServletRequestBindingExceptionFileNotFoundExceptionIOException@RequestMapping(method=POST,
params="methodToCall=cancelAttachment")
public org.springframework.web.servlet.ModelAndView cancelAttachment(@ModelAttribute(value="KualiForm")
UifFormBase uifForm,
org.springframework.validation.BindingResult result,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
protected String checkAndWarnAboutSensitiveData(DocumentFormBase form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String fieldName, String fieldValue, String caller, String context) throws Exception
form - request - response - fieldName - - name of field with value being checkedfieldValue - - value to check for sensitive datacaller - - method that should be called back from questioncontext - - additional context that needs to be passed back with the
question responseExceptionprotected List<AdHocRouteRecipient> combineAdHocRecipients(DocumentFormBase form)
form - - document form instance containing the ad hod listsprotected DocumentAuthorizationException buildAuthorizationException(String action, Document document)
action - - the action that was requesteddocument - - document instance the action was requested forpublic BusinessObjectService getBusinessObjectService()
public void setBusinessObjectService(BusinessObjectService businessObjectService)
public DataDictionaryService getDataDictionaryService()
public void setDataDictionaryService(DataDictionaryService dataDictionaryService)
public DocumentService getDocumentService()
public void setDocumentService(DocumentService documentService)
public DocumentDictionaryService getDocumentDictionaryService()
public void setDocumentDictionaryService(DocumentDictionaryService documentDictionaryService)
public AttachmentService getAttachmentService()
public NoteService getNoteService()
public org.kuali.rice.core.api.config.property.ConfigurationService getConfigurationService()
Copyright © 2005–2016 The Kuali Foundation. All rights reserved.