|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.krad.web.controller.UifControllerBase org.kuali.rice.krad.web.controller.DocumentControllerBase
public abstract class DocumentControllerBase
Base controller class for all KRAD 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)
Field Summary | |
---|---|
protected static String[] |
DOCUMENT_LOAD_COMMANDS
|
Fields inherited from class org.kuali.rice.krad.web.controller.UifControllerBase |
---|
REDIRECT_PREFIX |
Constructor Summary | |
---|---|
DocumentControllerBase()
|
Method Summary | |
---|---|
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 |
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()
|
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 |
Methods inherited from class org.kuali.rice.krad.web.controller.UifControllerBase |
---|
addLine, checkViewAuthorization, close, deleteLine, getSessionDocumentService, getUIFModelAndView, getUIFModelAndView, getViewService, initForm, navigate, performFieldQuery, performFieldSuggest, performLookup, performRedirect, refresh, returnToHistory, returnToHub, returnToPrevious, start, toggleInactiveRecordDisplay, updateComponent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String[] DOCUMENT_LOAD_COMMANDS
Constructor Detail |
---|
public DocumentControllerBase()
Method Detail |
---|
protected abstract DocumentFormBase createInitialForm(javax.servlet.http.HttpServletRequest request)
UifControllerBase
createInitialForm
in class UifControllerBase
request
- - 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
Exception
protected void loadDocument(DocumentFormBase form) throws WorkflowException
form
- - form instance that contains the doc id parameter and where
the retrieved document instance should be set
WorkflowException
protected void createDocument(DocumentFormBase form) throws WorkflowException
form
- - form instance that contains the doc type parameter and where
the new document instance should be set
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 database
Exception
@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 UifControllerBase
form
- - 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 saved
Exception
@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) throws Exception
form
- - document form base containing the document instance that will be routed
Exception
@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 approved
Exception
@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 approved
Exception
@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 disapproved
Exception
@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 on
Exception
@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 on
Exception
protected 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 performed
form
- - 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.ServletRequestBindingException
FileNotFoundException
IOException
@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 response
Exception
protected List<AdHocRouteRecipient> combineAdHocRecipients(DocumentFormBase form)
form
- - document form instance containing the ad hod lists
protected 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 ConfigurationService getConfigurationService()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |