public class DocumentControllerServiceImpl extends ControllerServiceImpl implements DocumentControllerService
Modifier and Type | Field and Description |
---|---|
protected static String[] |
DOCUMENT_LOAD_COMMANDS |
protected static String |
EXPLANATION_DIALOG |
protected static String |
SENSITIVE_DATA_DIALOG |
Constructor and Description |
---|
DocumentControllerServiceImpl() |
Modifier and Type | Method and Description |
---|---|
org.springframework.web.servlet.ModelAndView |
acknowledge(DocumentFormBase form)
Sends a acknowledge workflow action for the document contained on the form.
|
org.springframework.web.servlet.ModelAndView |
approve(DocumentFormBase form)
Sends a approve workflow action for the document contained on the form.
|
org.springframework.web.servlet.ModelAndView |
blanketApprove(DocumentFormBase form)
Sends a blanket approve workflow action for the document contained on the form.
|
protected DocumentAuthorizationException |
buildAuthorizationException(String action,
Document document)
Convenience method for building document authorization exceptions.
|
org.springframework.web.servlet.ModelAndView |
cancel(UifFormBase form)
Navigates back to a previous point (depending on how the view was requested).
|
org.springframework.web.servlet.ModelAndView |
cancelAttachment(DocumentFormBase form)
Invoked to remove an attachment that was uploaded for the add note instance.
|
protected org.springframework.web.servlet.ModelAndView |
checkSensitiveDataAndWarningDialog(String field,
UifFormBase form)
Helper method to check if sensitive data is present in a given string and dialog display.
|
org.springframework.web.servlet.ModelAndView |
close(DocumentFormBase form)
Closes the document and returns to the hub.
|
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)
Sends a complete workflow action for the document 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.
|
org.springframework.web.servlet.ModelAndView |
deleteNote(DocumentFormBase form)
Invoked by the delete note action to delete a note instance contained on document (within the form).
|
org.springframework.web.servlet.ModelAndView |
disapprove(DocumentFormBase form)
Sends a disapprove workflow action for the document contained on the form.
|
org.springframework.web.servlet.ModelAndView |
docHandler(DocumentFormBase form)
Determines whether a new document instance needs created or we need to load an existing document by
checking the
DocumentFormBase.getCommand() value, then delegates to
a helper method to carry out the action. |
org.springframework.web.servlet.ModelAndView |
downloadAttachment(DocumentFormBase form,
javax.servlet.http.HttpServletResponse response)
Retrieves a note attachment by either the line index of the note within the documents note collection, or
by the note identifier.
|
org.springframework.web.servlet.ModelAndView |
fyi(DocumentFormBase form)
Sends a fyi workflow action for the document contained on the form.
|
protected String |
generateDisapprovalNote(DocumentFormBase form)
Convenience method for generating disapproval note with text from the explanation dialog.
|
protected Note |
getAddLineNoteInstance(DocumentFormBase form)
Retrieves the note instance on the form that should be added to the document notes.
|
protected AttachmentService |
getAttachmentService() |
protected CollectionControllerService |
getCollectionControllerService() |
protected ConfigurationService |
getConfigurationService() |
protected DataDictionaryService |
getDataDictionaryService() |
protected DocumentDictionaryService |
getDocumentDictionaryService() |
protected DocumentService |
getDocumentService() |
protected LegacyDataAdapter |
getLegacyDataAdapter() |
protected ModelAndViewService |
getModelAndViewService() |
protected NavigationControllerService |
getNavigationControllerService() |
protected Attachment |
getNewNoteAttachment(DocumentFormBase form,
Document document,
Note newNote)
Builds an attachment for the file (if any) associated with the add note instance.
|
protected NoteService |
getNoteService() |
protected ParameterService |
getParameterService() |
protected WorkflowDocumentActionsService |
getWorkflowDocumentActionsService(String documentTypeId)
Helper method to get the correct
WorkflowDocumentActionsService from the applicationId of the
document type. |
org.springframework.web.servlet.ModelAndView |
insertNote(DocumentFormBase form)
Validates the note, saves attachment, adds the time stamp and author, and calls the
generic addLine method.
|
protected void |
loadDocument(DocumentFormBase form)
Loads the document by its provided document header id on the given form.
|
void |
performSuperUserWorkflowAction(DocumentFormBase form,
UifConstants.SuperUserWorkflowAction action)
Invokes the
DocumentService to carry out a super user request workflow action
and adds a success message. |
void |
performSuperUserWorkflowAction(DocumentFormBase form,
UifConstants.SuperUserWorkflowAction action,
ActionRequest actionRequest)
Invokes the
DocumentService to carry out a super user request workflow action
and adds a success message. |
void |
performWorkflowAction(DocumentFormBase form,
UifConstants.WorkflowAction action)
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. |
void |
performWorkflowAction(DocumentFormBase form,
UifConstants.WorkflowAction action,
DocumentEvent documentEvent)
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 |
recall(DocumentFormBase form)
Recalls the document with the given id on the form from workflow.
|
org.springframework.web.servlet.ModelAndView |
reload(DocumentFormBase form)
Reloads from the database the document with the doc id on the given form.
|
org.springframework.web.servlet.ModelAndView |
route(DocumentFormBase form)
Sends a route workflow action for the document contained on the form.
|
org.springframework.web.servlet.ModelAndView |
save(DocumentFormBase form)
Saves the document instance contained on the given form.
|
org.springframework.web.servlet.ModelAndView |
save(DocumentFormBase form,
SaveDocumentEvent saveDocumentEvent)
Saves the document instance contained on the given form and passes the given event for rule
evaluation.
|
protected void |
saveNewNote(DocumentFormBase form,
Document document,
Note newNote)
Saves a new note instance to the data store if the document state allows it.
|
org.springframework.web.servlet.ModelAndView |
sendAdHocRequests(DocumentFormBase form)
Sends AdHoc workflow Requests for the document instance contained on the form to the AdHoc recipients
contained on the form.
|
void |
setAttachmentService(AttachmentService attachmentService) |
void |
setCollectionControllerService(CollectionControllerService collectionControllerService) |
void |
setConfigurationService(ConfigurationService configurationService) |
void |
setDataDictionaryService(DataDictionaryService dataDictionaryService) |
void |
setDocumentDictionaryService(DocumentDictionaryService documentDictionaryService) |
void |
setDocumentService(DocumentService documentService) |
void |
setLegacyDataAdapter(LegacyDataAdapter legacyDataAdapter) |
void |
setModelAndViewService(ModelAndViewService modelAndViewService) |
void |
setNavigationControllerService(NavigationControllerService navigationControllerService) |
protected void |
setNewNoteProperties(DocumentFormBase form,
Document document,
Note newNote)
Defaults properties (posted timestamp, object id, author) on the note instance that will be added.
|
void |
setNoteService(NoteService noteService) |
void |
setParameterService(ParameterService parameterService) |
org.springframework.web.servlet.ModelAndView |
superUserApprove(DocumentFormBase form)
Sends a super user approve workflow action for the document contained on the form.
|
org.springframework.web.servlet.ModelAndView |
superUserDisapprove(DocumentFormBase form)
Sends a super user disapprove workflow action for the document contained on the form.
|
org.springframework.web.servlet.ModelAndView |
superUserTakeActions(DocumentFormBase form)
Invoked to take super user actions on a document.
|
org.springframework.web.servlet.ModelAndView |
supervisorFunctions(DocumentFormBase form)
Redirects to the supervisor workflow view.
|
checkViewAuthorization, sessionTimeout, start
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkViewAuthorization, sessionTimeout, start
protected static final String[] DOCUMENT_LOAD_COMMANDS
protected static final String SENSITIVE_DATA_DIALOG
protected static final String EXPLANATION_DIALOG
public DocumentControllerServiceImpl()
public org.springframework.web.servlet.ModelAndView docHandler(DocumentFormBase form) throws WorkflowException
DocumentFormBase.getCommand()
value, then delegates to
a helper method to carry out the action.
Handles all requests for a new document instance or to load an existing document based on the
given form parameters.docHandler
in interface DocumentControllerService
form
- form instance containing the document dataWorkflowException
- if a document cannot be created or loadedprotected void loadDocument(DocumentFormBase form) throws WorkflowException
This has been abstracted out so that it can be overridden in children if the need arises
form
- form instance that contains the doc id parameter and where
the retrieved document instance should be setWorkflowException
protected void createDocument(DocumentFormBase form) throws WorkflowException
This has been abstracted out so that it can be overridden in children if the need arises
form
- form instance that contains the doc type parameter and where
the new document instance should be setWorkflowException
public org.springframework.web.servlet.ModelAndView cancel(UifFormBase form)
cancel
in interface ControllerService
cancel
in class ControllerServiceImpl
form
- form instance containing the model datapublic org.springframework.web.servlet.ModelAndView reload(DocumentFormBase form) throws WorkflowException
reload
in interface DocumentControllerService
form
- form instance containing the document id that will be reloadedWorkflowException
- if the document cannot be reloadedpublic org.springframework.web.servlet.ModelAndView recall(DocumentFormBase form)
recall
in interface DocumentControllerService
form
- form instance containing the document id that will be recalledpublic org.springframework.web.servlet.ModelAndView save(DocumentFormBase form)
save
in interface DocumentControllerService
form
- form instance containing the document that will be savedpublic org.springframework.web.servlet.ModelAndView save(DocumentFormBase form, SaveDocumentEvent saveDocumentEvent)
save
in interface DocumentControllerService
form
- form instance containing the document that will be savedsaveDocumentEvent
- rule event that will be processed with the save operationpublic org.springframework.web.servlet.ModelAndView complete(DocumentFormBase form)
complete
in interface DocumentControllerService
form
- form instance containing the document the complete request will be generated forpublic org.springframework.web.servlet.ModelAndView route(DocumentFormBase form)
route
in interface DocumentControllerService
form
- form instance containing the document the route request will be generated forpublic org.springframework.web.servlet.ModelAndView blanketApprove(DocumentFormBase form)
blanketApprove
in interface DocumentControllerService
form
- form instance containing the document the blanket approve request will be generated forpublic org.springframework.web.servlet.ModelAndView approve(DocumentFormBase form)
approve
in interface DocumentControllerService
form
- form instance containing the document the approve request will be generated forpublic org.springframework.web.servlet.ModelAndView disapprove(DocumentFormBase form)
disapprove
in interface DocumentControllerService
form
- form instance containing the document the disapprove request will be generated forprotected String generateDisapprovalNote(DocumentFormBase form)
form
- document form instance containing the explanation dialogpublic org.springframework.web.servlet.ModelAndView fyi(DocumentFormBase form)
fyi
in interface DocumentControllerService
form
- form instance containing the document the fyi request will be generated forpublic org.springframework.web.servlet.ModelAndView acknowledge(DocumentFormBase form)
acknowledge
in interface DocumentControllerService
form
- form instance containing the document the acknowledge request will be generated forpublic org.springframework.web.servlet.ModelAndView sendAdHocRequests(DocumentFormBase form)
sendAdHocRequests
in interface DocumentControllerService
form
- form instance containing the document and recipients the requests will be generated forpublic org.springframework.web.servlet.ModelAndView supervisorFunctions(DocumentFormBase form)
supervisorFunctions
in interface DocumentControllerService
form
- form instance containing the document instancepublic org.springframework.web.servlet.ModelAndView close(DocumentFormBase form)
close
in interface DocumentControllerService
form
- form instance containing the document instancepublic org.springframework.web.servlet.ModelAndView insertNote(DocumentFormBase form)
insertNote
in interface DocumentControllerService
form
- form instance containing the note instanceprotected Note getAddLineNoteInstance(DocumentFormBase form)
form
- form instance containing the add note instanceprotected void setNewNoteProperties(DocumentFormBase form, Document document, Note newNote)
form
- form instance containing the add note instancedocument
- document instance the note will be added tonewNote
- note instance to set properties onprotected Attachment getNewNoteAttachment(DocumentFormBase form, Document document, Note newNote)
form
- form instance containing the attachment filedocument
- document instance the attachment should be associated withnewNote
- note instance the attachment should be associated withprotected void saveNewNote(DocumentFormBase form, Document document, Note newNote)
form
- form instance containing the add note instancedocument
- document instance the note is associated withnewNote
- note instance to savepublic org.springframework.web.servlet.ModelAndView deleteNote(DocumentFormBase form)
deleteNote
in interface DocumentControllerService
form
- form instance containing the note instancepublic org.springframework.web.servlet.ModelAndView downloadAttachment(DocumentFormBase form, javax.servlet.http.HttpServletResponse response)
downloadAttachment
in interface DocumentControllerService
form
- form instance containing the note (and attachment) instanceresponse
- http servlet response instance for sending back the attachment contentspublic org.springframework.web.servlet.ModelAndView cancelAttachment(DocumentFormBase form)
cancelAttachment
in interface DocumentControllerService
form
- form instance containing the attachment.public org.springframework.web.servlet.ModelAndView superUserTakeActions(DocumentFormBase form)
superUserTakeActions
in interface DocumentControllerService
form
- form instance containing the actions.public org.springframework.web.servlet.ModelAndView superUserApprove(DocumentFormBase form)
superUserApprove
in interface DocumentControllerService
form
- form instance containing the document the super user approve request will be generated forpublic org.springframework.web.servlet.ModelAndView superUserDisapprove(DocumentFormBase form)
superUserDisapprove
in interface DocumentControllerService
form
- form instance containing the document the super user disapprove request will be generated forpublic void performWorkflowAction(DocumentFormBase form, UifConstants.WorkflowAction action)
DocumentService
to carry out a request workflow action and adds a
success message, if requested a check for sensitive data is also performed.performWorkflowAction
in interface DocumentControllerService
form
- document form instance containing the document for which the action will be taken onaction
- UifConstants.WorkflowAction
enum indicating what workflow action
to takepublic void performWorkflowAction(DocumentFormBase form, UifConstants.WorkflowAction action, DocumentEvent documentEvent)
DocumentService
to carry out a request workflow action and adds a
success message, if requested a check for sensitive data is also performed.performWorkflowAction
in interface DocumentControllerService
form
- document form instance containing the document for which the action will be taken onaction
- UifConstants.WorkflowAction
enum indicating what workflow action
to takedocumentEvent
- rule event instance that will be evaluated with the workflow action, only currently
supported for the save actionprotected List<AdHocRouteRecipient> combineAdHocRecipients(DocumentFormBase form)
form
- document form instance containing the ad hod listspublic void performSuperUserWorkflowAction(DocumentFormBase form, UifConstants.SuperUserWorkflowAction action)
DocumentService
to carry out a super user request workflow action
and adds a success message.performSuperUserWorkflowAction
in interface DocumentControllerService
form
- document form instance containing the document for which the super user action will be taken onaction
- UifConstants.SuperUserWorkflowAction
enum indicating what super
user workflow action to takepublic void performSuperUserWorkflowAction(DocumentFormBase form, UifConstants.SuperUserWorkflowAction action, ActionRequest actionRequest)
DocumentService
to carry out a super user request workflow action
and adds a success message.performSuperUserWorkflowAction
in interface DocumentControllerService
form
- document form instance containing the document for which the super user action will be taken onaction
- UifConstants.SuperUserWorkflowAction
enum indicating what super
user workflow action to takeactionRequest
- the requested action to take, currenly only available for take actionprotected WorkflowDocumentActionsService getWorkflowDocumentActionsService(String documentTypeId)
WorkflowDocumentActionsService
from the applicationId
of the
document type.documentTypeId
- the document type to get the application id fromWorkflowDocumentActionsService
from the applicationId
of the document typeprotected org.springframework.web.servlet.ModelAndView checkSensitiveDataAndWarningDialog(String field, UifFormBase form)
If the string is sensitive we want to return a dialog box to make sure user wants to continue, else we just return null
field
- the string to check for sensitive dataform
- the form to add the dialog toprotected DocumentAuthorizationException buildAuthorizationException(String action, Document document)
action
- the action that was requesteddocument
- document instance the action was requested forprotected LegacyDataAdapter getLegacyDataAdapter()
public void setLegacyDataAdapter(LegacyDataAdapter legacyDataAdapter)
protected DataDictionaryService getDataDictionaryService()
public void setDataDictionaryService(DataDictionaryService dataDictionaryService)
protected DocumentService getDocumentService()
public void setDocumentService(DocumentService documentService)
protected DocumentDictionaryService getDocumentDictionaryService()
public void setDocumentDictionaryService(DocumentDictionaryService documentDictionaryService)
protected AttachmentService getAttachmentService()
public void setAttachmentService(AttachmentService attachmentService)
protected NoteService getNoteService()
public void setNoteService(NoteService noteService)
protected ModelAndViewService getModelAndViewService()
getModelAndViewService
in class ControllerServiceImpl
public void setModelAndViewService(ModelAndViewService modelAndViewService)
setModelAndViewService
in class ControllerServiceImpl
protected NavigationControllerService getNavigationControllerService()
getNavigationControllerService
in class ControllerServiceImpl
public void setNavigationControllerService(NavigationControllerService navigationControllerService)
setNavigationControllerService
in class ControllerServiceImpl
protected ConfigurationService getConfigurationService()
public void setConfigurationService(ConfigurationService configurationService)
protected CollectionControllerService getCollectionControllerService()
public void setCollectionControllerService(CollectionControllerService collectionControllerService)
protected ParameterService getParameterService()
public void setParameterService(ParameterService parameterService)
Copyright © 2005–2015 The Kuali Foundation. All rights reserved.