org.kuali.rice.kns.web.struts.action
Class KualiDocumentActionBase

java.lang.Object
  extended by org.apache.struts.action.Action
      extended by org.apache.struts.actions.BaseAction
          extended by org.apache.struts.actions.DispatchAction
              extended by org.kuali.rice.kns.web.struts.action.KualiAction
                  extended by org.kuali.rice.kns.web.struts.action.KualiDocumentActionBase
Direct Known Subclasses:
KualiMaintenanceDocumentAction, KualiTransactionalDocumentActionBase

public class KualiDocumentActionBase
extends KualiAction

This class handles all of the document handling related actions in terms of passing them from here at a central point to the distributed transactions that actually implement document handling.


Field Summary
protected static String[] DOCUMENT_LOAD_COMMANDS
           
 
Fields inherited from class org.kuali.rice.kns.web.struts.action.KualiAction
FORM_ACTION, FORWARD_NEXT, FORWARD_TEXT_AREA_UPDATE, METHOD_TO_CALL, POST_TEXT_AREA_TO_PARENT, TEXT_AREA_FIELD_ANCHOR, TEXT_AREA_FIELD_LABEL, TEXT_AREA_FIELD_NAME, TEXT_AREA_MAX_LENGTH, TEXT_AREA_READ_ONLY
 
Fields inherited from class org.apache.struts.actions.DispatchAction
clazz, log, methods, types
 
Fields inherited from class org.apache.struts.actions.BaseAction
messages
 
Fields inherited from class org.apache.struts.action.Action
servlet
 
Constructor Summary
KualiDocumentActionBase()
           
 
Method Summary
 org.apache.struts.action.ActionForward acknowledge(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          call the document service to acknowledge
 org.apache.struts.action.ActionForward approve(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Calls the document service to approve the document
protected  void attemptLockRelease(Document document, String methodToCall)
           
 org.apache.struts.action.ActionForward blanketApprove(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Calls the document service to blanket approve the document
protected  DocumentAuthorizationException buildAuthorizationException(String action, Document document)
          Convenience method for building authorization exceptions
 org.apache.struts.action.ActionForward cancel(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Calls the document service to cancel the document
 org.apache.struts.action.ActionForward cancelBOAttachment(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Cancels the pending attachment, if any.
protected  boolean canSave(org.apache.struts.action.ActionForm form)
           
protected  org.apache.struts.action.ActionForward checkAndWarnAboutSensitiveData(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm 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  void checkAuthorization(org.apache.struts.action.ActionForm form, String methodToCall)
          Override this method to provide action-level access controls to the application.
 org.apache.struts.action.ActionForward close(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Close the document and take the user back to the index; only after asking the user if they want to save the document first.
protected  List<AdHocRouteRecipient> combineAdHocRecipients(KualiDocumentFormBase kualiDocumentFormBase)
          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.apache.struts.action.ActionForward complete(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Complete document action
protected  Map convertSetToMap(Set s)
           
protected  void createDocument(KualiDocumentFormBase kualiDocumentFormBase)
          This method creates a new document of the type specified by the docTypeName property of the given form.
 org.apache.struts.action.ActionForward delete(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          This method will verify that the form is representing a PessimisticLock object and delete it if possible
 org.apache.struts.action.ActionForward deleteAdHocRoutePerson(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          This method will delete one of the ad hoc persons from the list of ad hoc persons to route to based on the line number of the delete button that was clicked.
 org.apache.struts.action.ActionForward deleteAdHocRouteWorkgroup(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          This method will delete one of the ad hoc workgroups from the list of ad hoc workgroups to route to based on the line number of the delete button that was clicked.
 org.apache.struts.action.ActionForward deleteBONote(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          delete a note from the document
protected  String determineNoteWorkflowNotificationAction(javax.servlet.http.HttpServletRequest request, KualiDocumentFormBase kualiDocumentFormBase, Note note)
          Override this to customize which routing action to take when sending a note.
 org.apache.struts.action.ActionForward disapprove(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Calls the document service to disapprove the document
 org.apache.struts.action.ActionForward docHandler(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          This method may be 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 actionforward or redirect is pertinent for the document type.
protected  void doProcessingAfterPost(KualiForm form, javax.servlet.http.HttpServletRequest request)
          This method does all special processing on a document that should happen on each HTTP post (ie, save, route, approve, etc).
 org.apache.struts.action.ActionForward downloadBOAttachment(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Downloads the selected attachment to the user's browser
 org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Entry point to all actions.
protected  boolean exitingDocument()
           
 org.apache.struts.action.ActionForward fyi(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          call the document service to clear the fyis
protected  String generatePessimisticLockMessage(PessimisticLock lock)
           
protected  AttachmentService getAttachmentService()
           
protected  BusinessObjectAuthorizationService getBusinessObjectAuthorizationService()
           
 BusinessObjectMetaDataService getBusinessObjectMetaDataService()
           
protected  BusinessObjectService getBusinessObjectService()
           
protected  DataDictionaryService getDataDictionaryService()
           
protected  DocumentHelperService getDocumentHelperService()
           
protected  DocumentService getDocumentService()
           
 javax.persistence.EntityManagerFactory getEntityManagerFactory()
           
protected  GroupService getGroupService()
           
protected  ConfigurationService getKualiConfigurationService()
           
protected  KualiRuleService getKualiRuleService()
           
protected  NoteService getNoteService()
           
protected  ParameterService getParameterService()
           
protected  PessimisticLockService getPessimisticLockService()
           
protected  Object getQuestion(javax.servlet.http.HttpServletRequest request)
           
 org.apache.struts.action.ActionForward hideAllTabs(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Toggles all tabs to closed
 org.apache.struts.action.ActionForward insertAdHocRoutePerson(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          This method will insert the new ad hoc person from the from into the list of ad hoc person recipients, put a new new record in place and return like normal.
 org.apache.struts.action.ActionForward insertAdHocRouteWorkgroup(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          This method will insert the new ad hoc workgroup into the list of ad hoc workgroup recipients put a nuew record in place and then return like normal.
 org.apache.struts.action.ActionForward insertBONote(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          insert a note into the document
protected  boolean isFormRepresentingLockObject(KualiDocumentFormBase form)
           
protected  void loadDocument(KualiDocumentFormBase kualiDocumentFormBase)
          This method loads the document by its provided document header id.
 org.apache.struts.action.ActionForward performRouteReport(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          route the document using the document service
protected  void populateAdHocActionRequestCodes(KualiDocumentFormBase formBase)
           
protected  void populateAuthorizationFields(KualiDocumentFormBase formBase)
           
 org.apache.struts.action.ActionForward promptBeforeValidation(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Makes calls to the PromptBeforeValidation specified for the document.
 org.apache.struts.action.ActionForward promptBeforeValidation(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String methodToCall)
          Makes calls to the PromptBeforeValidation specified for the document.
 org.apache.struts.action.ActionForward recall(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Calls the document service to disapprove the document
 org.apache.struts.action.ActionForward refresh(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          if the action desires to retain error messages generated by the rules framework for save/submit/etc.
protected  void refreshAdHocRoutingWorkgroupLookups(javax.servlet.http.HttpServletRequest request, KualiDocumentFormBase kualiForm)
          special refresh needed to get the workgroups populated correctly when coming back from workgroup lookups
protected  void releaseLocks(Document document, String methodToCall)
           
 org.apache.struts.action.ActionForward reload(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          This method will reload the document.
protected  org.apache.struts.action.ActionForward returnToSender(javax.servlet.http.HttpServletRequest request, org.apache.struts.action.ActionMapping mapping, KualiDocumentFormBase form)
          If the given form has returnToActionList set to true, this method returns an ActionForward that should take the user back to their action list; otherwise, it returns them to the portal.
 org.apache.struts.action.ActionForward route(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          route the document using the document service
 org.apache.struts.action.ActionForward save(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          This method will save the document, which will then be available via the action list for the person who saved the document.
protected  int selectedAttachmentIndex(javax.servlet.http.HttpServletRequest request)
           
 org.apache.struts.action.ActionForward sendAdHocRequests(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 org.apache.struts.action.ActionForward sendNoteWorkflowNotification(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
protected  void setupDocumentExit()
           
protected  void setupPessimisticLockMessages(Document document, javax.servlet.http.HttpServletRequest request)
           
 org.apache.struts.action.ActionForward showAllTabs(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Toggles all tabs to open
protected  void streamToResponse(byte[] fileContents, String fileName, String fileContentType, javax.servlet.http.HttpServletResponse response)
          Handy method to stream the byte array to response object
 org.apache.struts.action.ActionForward superUserApprove(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 org.apache.struts.action.ActionForward superUserDisapprove(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 org.apache.struts.action.ActionForward supervisorFunctions(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          redirect to the supervisor functions that exist.
 org.apache.struts.action.ActionForward takeSuperUserActions(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 org.apache.struts.action.ActionForward toggleTab(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Toggles the tab state in the ui
 
Methods inherited from class org.kuali.rice.kns.web.struts.action.KualiAction
addMethodToCallToUncheckedList, defaultDispatch, dispatchMethod, findMethodToCall, getApplicationBaseUrl, getEncryptionService, getHeaderTabDispatch, getHeaderTabNavigateTo, getImageContext, getKualiModuleService, getLineToDelete, getLineToEdit, getReturnLocation, getRoleQualification, getSelectedLine, getTabToToggle, headerTab, isModuleLocked, performInquiry, performLookup, performQuestionWithInput, performQuestionWithInputAgainBecauseOfErrors, performQuestionWithoutInput, performWorkgroupLookup, postTextAreaToParent, retrieveLookupParameterValue, updateTextArea, validateLookupInquiryFullParameter
 
Methods inherited from class org.apache.struts.actions.DispatchAction
cancelled, getMethod, getMethodName, getParameter, unspecified
 
Methods inherited from class org.apache.struts.action.Action
addErrors, addMessages, execute, generateToken, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DOCUMENT_LOAD_COMMANDS

protected static final String[] DOCUMENT_LOAD_COMMANDS
Constructor Detail

KualiDocumentActionBase

public KualiDocumentActionBase()
Method Detail

checkAuthorization

protected void checkAuthorization(org.apache.struts.action.ActionForm form,
                                  String methodToCall)
                           throws AuthorizationException
Description copied from class: KualiAction
Override this method to provide action-level access controls to the application.

Overrides:
checkAuthorization in class KualiAction
Throws:
AuthorizationException

execute

public org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping,
                                                      org.apache.struts.action.ActionForm form,
                                                      javax.servlet.http.HttpServletRequest request,
                                                      javax.servlet.http.HttpServletResponse response)
                                               throws Exception
Entry point to all actions.

NOTE: No need to hook into execute for handling framwork setup anymore. Just implement the methodToCall for the framework setup, Constants.METHOD_REQUEST_PARAMETER will contain the full parameter, which can be sub stringed for getting framework parameters.

Overrides:
execute in class KualiAction
Throws:
Exception
See Also:
Action.execute(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

isFormRepresentingLockObject

protected boolean isFormRepresentingLockObject(KualiDocumentFormBase form)
                                        throws Exception
Throws:
Exception

attemptLockRelease

protected void attemptLockRelease(Document document,
                                  String methodToCall)

releaseLocks

protected void releaseLocks(Document document,
                            String methodToCall)

setupPessimisticLockMessages

protected void setupPessimisticLockMessages(Document document,
                                            javax.servlet.http.HttpServletRequest request)

generatePessimisticLockMessage

protected String generatePessimisticLockMessage(PessimisticLock lock)

docHandler

public org.apache.struts.action.ActionForward docHandler(org.apache.struts.action.ActionMapping mapping,
                                                         org.apache.struts.action.ActionForm form,
                                                         javax.servlet.http.HttpServletRequest request,
                                                         javax.servlet.http.HttpServletResponse response)
                                                  throws Exception
This method may be 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 actionforward or redirect is pertinent for the document type.

Parameters:
mapping -
form -
request -
response -
Returns:
ActionForward
Throws:
Exception

loadDocument

protected void loadDocument(KualiDocumentFormBase kualiDocumentFormBase)
                     throws WorkflowException
This method loads the document by its provided document header id. This has been abstracted out so that it can be overridden in children if the need arises.

Parameters:
kualiDocumentFormBase -
Throws:
WorkflowException

createDocument

protected void createDocument(KualiDocumentFormBase kualiDocumentFormBase)
                       throws WorkflowException
This method creates a new document of the type specified by the docTypeName property of the given form. This has been abstracted out so that it can be overridden in children if the need arises.

Parameters:
kualiDocumentFormBase -
Throws:
WorkflowException

insertAdHocRoutePerson

public org.apache.struts.action.ActionForward insertAdHocRoutePerson(org.apache.struts.action.ActionMapping mapping,
                                                                     org.apache.struts.action.ActionForm form,
                                                                     javax.servlet.http.HttpServletRequest request,
                                                                     javax.servlet.http.HttpServletResponse response)
                                                              throws Exception
This method will insert the new ad hoc person from the from into the list of ad hoc person recipients, put a new new record in place and return like normal.

Parameters:
mapping -
form -
request -
response -
Returns:
ActionForward
Throws:
Exception

deleteAdHocRoutePerson

public org.apache.struts.action.ActionForward deleteAdHocRoutePerson(org.apache.struts.action.ActionMapping mapping,
                                                                     org.apache.struts.action.ActionForm form,
                                                                     javax.servlet.http.HttpServletRequest request,
                                                                     javax.servlet.http.HttpServletResponse response)
                                                              throws Exception
This method will delete one of the ad hoc persons from the list of ad hoc persons to route to based on the line number of the delete button that was clicked. then it will return to the form.

Parameters:
mapping -
form -
request -
response -
Returns:
ActionForward
Throws:
Exception

insertAdHocRouteWorkgroup

public org.apache.struts.action.ActionForward insertAdHocRouteWorkgroup(org.apache.struts.action.ActionMapping mapping,
                                                                        org.apache.struts.action.ActionForm form,
                                                                        javax.servlet.http.HttpServletRequest request,
                                                                        javax.servlet.http.HttpServletResponse response)
                                                                 throws Exception
This method will insert the new ad hoc workgroup into the list of ad hoc workgroup recipients put a nuew record in place and then return like normal.

Parameters:
mapping -
form -
request -
response -
Returns:
ActionForward
Throws:
Exception

deleteAdHocRouteWorkgroup

public org.apache.struts.action.ActionForward deleteAdHocRouteWorkgroup(org.apache.struts.action.ActionMapping mapping,
                                                                        org.apache.struts.action.ActionForm form,
                                                                        javax.servlet.http.HttpServletRequest request,
                                                                        javax.servlet.http.HttpServletResponse response)
                                                                 throws Exception
This method will delete one of the ad hoc workgroups from the list of ad hoc workgroups to route to based on the line number of the delete button that was clicked. then it will return

Parameters:
mapping -
form -
request -
response -
Returns:
ActionForward
Throws:
Exception

sendAdHocRequests

public org.apache.struts.action.ActionForward sendAdHocRequests(org.apache.struts.action.ActionMapping mapping,
                                                                org.apache.struts.action.ActionForm form,
                                                                javax.servlet.http.HttpServletRequest request,
                                                                javax.servlet.http.HttpServletResponse response)
                                                         throws Exception
Throws:
Exception

reload

public org.apache.struts.action.ActionForward reload(org.apache.struts.action.ActionMapping mapping,
                                                     org.apache.struts.action.ActionForm form,
                                                     javax.servlet.http.HttpServletRequest request,
                                                     javax.servlet.http.HttpServletResponse response)
                                              throws Exception
This method will reload the document.

Parameters:
mapping -
form -
request -
response -
Returns:
ActionForward
Throws:
Exception

save

public org.apache.struts.action.ActionForward save(org.apache.struts.action.ActionMapping mapping,
                                                   org.apache.struts.action.ActionForm form,
                                                   javax.servlet.http.HttpServletRequest request,
                                                   javax.servlet.http.HttpServletResponse response)
                                            throws Exception
This method will save the document, which will then be available via the action list for the person who saved the document.

Parameters:
mapping -
form -
request -
response -
Returns:
ActionForward
Throws:
Exception

checkAndWarnAboutSensitiveData

protected org.apache.struts.action.ActionForward checkAndWarnAboutSensitiveData(org.apache.struts.action.ActionMapping mapping,
                                                                                org.apache.struts.action.ActionForm form,
                                                                                javax.servlet.http.HttpServletRequest request,
                                                                                javax.servlet.http.HttpServletResponse response,
                                                                                String fieldName,
                                                                                String fieldValue,
                                                                                String caller,
                                                                                String context)
                                                                         throws Exception
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

Parameters:
mapping -
form -
request -
response -
fieldName - - name of field with value being checked
fieldValue - - value to check for sensitive data
caller - - method that should be called back from question
context - - additional context that needs to be passed back with the question response
Returns:
ActionForward which contains the question forward, or basic forward if user select no to prompt, otherwise will return null to indicate processing should continue
Throws:
Exception

delete

public org.apache.struts.action.ActionForward delete(org.apache.struts.action.ActionMapping mapping,
                                                     org.apache.struts.action.ActionForm form,
                                                     javax.servlet.http.HttpServletRequest request,
                                                     javax.servlet.http.HttpServletResponse response)
                                              throws Exception
This method will verify that the form is representing a PessimisticLock object and delete it if possible

Parameters:
mapping -
form -
request -
response -
Returns:
ActionForward
Throws:
Exception

performRouteReport

public org.apache.struts.action.ActionForward performRouteReport(org.apache.struts.action.ActionMapping mapping,
                                                                 org.apache.struts.action.ActionForm form,
                                                                 javax.servlet.http.HttpServletRequest request,
                                                                 javax.servlet.http.HttpServletResponse response)
                                                          throws Exception
route the document using the document service

Parameters:
mapping -
form -
request -
response -
Returns:
ActionForward
Throws:
Exception

route

public org.apache.struts.action.ActionForward route(org.apache.struts.action.ActionMapping mapping,
                                                    org.apache.struts.action.ActionForm form,
                                                    javax.servlet.http.HttpServletRequest request,
                                                    javax.servlet.http.HttpServletResponse response)
                                             throws Exception
route the document using the document service

Parameters:
mapping -
form -
request -
response -
Returns:
ActionForward
Throws:
Exception

blanketApprove

public org.apache.struts.action.ActionForward blanketApprove(org.apache.struts.action.ActionMapping mapping,
                                                             org.apache.struts.action.ActionForm form,
                                                             javax.servlet.http.HttpServletRequest request,
                                                             javax.servlet.http.HttpServletResponse response)
                                                      throws Exception
Calls the document service to blanket approve the document

Parameters:
mapping -
form -
request -
response -
Returns:
ActionForward
Throws:
Exception

approve

public org.apache.struts.action.ActionForward approve(org.apache.struts.action.ActionMapping mapping,
                                                      org.apache.struts.action.ActionForm form,
                                                      javax.servlet.http.HttpServletRequest request,
                                                      javax.servlet.http.HttpServletResponse response)
                                               throws Exception
Calls the document service to approve the document

Parameters:
mapping -
form -
request -
response -
Returns:
ActionForward
Throws:
Exception

disapprove

public org.apache.struts.action.ActionForward disapprove(org.apache.struts.action.ActionMapping mapping,
                                                         org.apache.struts.action.ActionForm form,
                                                         javax.servlet.http.HttpServletRequest request,
                                                         javax.servlet.http.HttpServletResponse response)
                                                  throws Exception
Calls the document service to disapprove the document

Parameters:
mapping -
form -
request -
response -
Returns:
ActionForward
Throws:
Exception

cancel

public org.apache.struts.action.ActionForward cancel(org.apache.struts.action.ActionMapping mapping,
                                                     org.apache.struts.action.ActionForm form,
                                                     javax.servlet.http.HttpServletRequest request,
                                                     javax.servlet.http.HttpServletResponse response)
                                              throws Exception
Calls the document service to cancel the document

Parameters:
mapping -
form -
request -
response -
Returns:
ActionForward
Throws:
Exception

recall

public org.apache.struts.action.ActionForward recall(org.apache.struts.action.ActionMapping mapping,
                                                     org.apache.struts.action.ActionForm form,
                                                     javax.servlet.http.HttpServletRequest request,
                                                     javax.servlet.http.HttpServletResponse response)
                                              throws Exception
Calls the document service to disapprove the document

Parameters:
mapping -
form -
request -
response -
Returns:
ActionForward
Throws:
Exception

close

public org.apache.struts.action.ActionForward close(org.apache.struts.action.ActionMapping mapping,
                                                    org.apache.struts.action.ActionForm form,
                                                    javax.servlet.http.HttpServletRequest request,
                                                    javax.servlet.http.HttpServletResponse response)
                                             throws Exception
Close the document and take the user back to the index; only after asking the user if they want to save the document first. Only users who have the "canSave()" permission are given this option.

Parameters:
mapping -
form -
request -
response -
Returns:
ActionForward
Throws:
Exception

canSave

protected boolean canSave(org.apache.struts.action.ActionForm form)

getQuestion

protected Object getQuestion(javax.servlet.http.HttpServletRequest request)

fyi

public org.apache.struts.action.ActionForward fyi(org.apache.struts.action.ActionMapping mapping,
                                                  org.apache.struts.action.ActionForm form,
                                                  javax.servlet.http.HttpServletRequest request,
                                                  javax.servlet.http.HttpServletResponse response)
                                           throws Exception
call the document service to clear the fyis

Parameters:
mapping -
form -
request -
response -
Returns:
ActionForward
Throws:
Exception

acknowledge

public org.apache.struts.action.ActionForward acknowledge(org.apache.struts.action.ActionMapping mapping,
                                                          org.apache.struts.action.ActionForm form,
                                                          javax.servlet.http.HttpServletRequest request,
                                                          javax.servlet.http.HttpServletResponse response)
                                                   throws Exception
call the document service to acknowledge

Parameters:
mapping -
form -
request -
response -
Returns:
ActionForward
Throws:
Exception

supervisorFunctions

public org.apache.struts.action.ActionForward supervisorFunctions(org.apache.struts.action.ActionMapping mapping,
                                                                  org.apache.struts.action.ActionForm form,
                                                                  javax.servlet.http.HttpServletRequest request,
                                                                  javax.servlet.http.HttpServletResponse response)
                                                           throws Exception
redirect to the supervisor functions that exist.

Parameters:
mapping -
form -
request -
response -
Returns:
ActionForward
Throws:
Exception

combineAdHocRecipients

protected List<AdHocRouteRecipient> combineAdHocRecipients(KualiDocumentFormBase kualiDocumentFormBase)
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

Parameters:
kualiDocumentFormBase -
Returns:
List

refresh

public org.apache.struts.action.ActionForward refresh(org.apache.struts.action.ActionMapping mapping,
                                                      org.apache.struts.action.ActionForm form,
                                                      javax.servlet.http.HttpServletRequest request,
                                                      javax.servlet.http.HttpServletResponse response)
                                               throws Exception
if the action desires to retain error messages generated by the rules framework for save/submit/etc. validation after returning from a lookup.

Overrides:
refresh in class KualiAction
Returns:
Throws:
Exception
See Also:
KualiAction.refresh(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

refreshAdHocRoutingWorkgroupLookups

protected void refreshAdHocRoutingWorkgroupLookups(javax.servlet.http.HttpServletRequest request,
                                                   KualiDocumentFormBase kualiForm)
                                            throws WorkflowException
special refresh needed to get the workgroups populated correctly when coming back from workgroup lookups

Parameters:
request -
kualiForm -
Throws:
WorkflowException

cancelBOAttachment

public org.apache.struts.action.ActionForward cancelBOAttachment(org.apache.struts.action.ActionMapping mapping,
                                                                 org.apache.struts.action.ActionForm form,
                                                                 javax.servlet.http.HttpServletRequest request,
                                                                 javax.servlet.http.HttpServletResponse response)
                                                          throws Exception
Cancels the pending attachment, if any.

Parameters:
mapping -
form -
request -
response -
Returns:
ActionForward
Throws:
Exception

streamToResponse

protected void streamToResponse(byte[] fileContents,
                                String fileName,
                                String fileContentType,
                                javax.servlet.http.HttpServletResponse response)
                         throws Exception
Handy method to stream the byte array to response object

Parameters:
fileContents -
fileName -
fileContentType -
response -
Throws:
Exception

downloadBOAttachment

public org.apache.struts.action.ActionForward downloadBOAttachment(org.apache.struts.action.ActionMapping mapping,
                                                                   org.apache.struts.action.ActionForm form,
                                                                   javax.servlet.http.HttpServletRequest request,
                                                                   javax.servlet.http.HttpServletResponse response)
                                                            throws Exception
Downloads the selected attachment to the user's browser

Parameters:
mapping -
form -
request -
response -
Returns:
ActionForward
Throws:
Exception

selectedAttachmentIndex

protected int selectedAttachmentIndex(javax.servlet.http.HttpServletRequest request)
Parameters:
request -
Returns:
index of the attachment whose download button was just pressed

insertBONote

public org.apache.struts.action.ActionForward insertBONote(org.apache.struts.action.ActionMapping mapping,
                                                           org.apache.struts.action.ActionForm form,
                                                           javax.servlet.http.HttpServletRequest request,
                                                           javax.servlet.http.HttpServletResponse response)
                                                    throws Exception
insert a note into the document

Parameters:
mapping -
form -
request -
response -
Returns:
ActionForward
Throws:
Exception

deleteBONote

public org.apache.struts.action.ActionForward deleteBONote(org.apache.struts.action.ActionMapping mapping,
                                                           org.apache.struts.action.ActionForm form,
                                                           javax.servlet.http.HttpServletRequest request,
                                                           javax.servlet.http.HttpServletResponse response)
                                                    throws Exception
delete a note from the document

Parameters:
mapping -
form -
request -
response -
Returns:
ActionForward
Throws:
Exception

determineNoteWorkflowNotificationAction

protected String determineNoteWorkflowNotificationAction(javax.servlet.http.HttpServletRequest request,
                                                         KualiDocumentFormBase kualiDocumentFormBase,
                                                         Note note)
Override this to customize which routing action to take when sending a note. This method reads the system parameter KR-NS/Document/SEND_NOTE_WORKFLOW_NOTIFICATION_ACTIONS to determine which action to take

Parameters:
request -
note -
Returns:
a value from KewApiConstants

sendNoteWorkflowNotification

public org.apache.struts.action.ActionForward sendNoteWorkflowNotification(org.apache.struts.action.ActionMapping mapping,
                                                                           org.apache.struts.action.ActionForm form,
                                                                           javax.servlet.http.HttpServletRequest request,
                                                                           javax.servlet.http.HttpServletResponse response)
                                                                    throws Exception
Throws:
Exception

promptBeforeValidation

public org.apache.struts.action.ActionForward promptBeforeValidation(org.apache.struts.action.ActionMapping mapping,
                                                                     org.apache.struts.action.ActionForm form,
                                                                     javax.servlet.http.HttpServletRequest request,
                                                                     javax.servlet.http.HttpServletResponse response)
                                                              throws Exception
Makes calls to the PromptBeforeValidation specified for the document. If the class returns an actionforward, that forward will be returned (thus controlling how execution occurs), or null.

Parameters:
mapping -
form -
request -
response -
Returns:
Throws:
Exception

promptBeforeValidation

public org.apache.struts.action.ActionForward promptBeforeValidation(org.apache.struts.action.ActionMapping mapping,
                                                                     org.apache.struts.action.ActionForm form,
                                                                     javax.servlet.http.HttpServletRequest request,
                                                                     javax.servlet.http.HttpServletResponse response,
                                                                     String methodToCall)
                                                              throws Exception
Makes calls to the PromptBeforeValidation specified for the document. If the class returns an actionforward, that forward will be returned (thus controlling how execution occurs), or null.

Parameters:
mapping -
form -
request -
response -
methodToCall -
Returns:
Throws:
Exception

buildAuthorizationException

protected DocumentAuthorizationException buildAuthorizationException(String action,
                                                                     Document document)
Convenience method for building authorization exceptions

Parameters:
action -
document -

exitingDocument

protected boolean exitingDocument()

setupDocumentExit

protected void setupDocumentExit()

returnToSender

protected org.apache.struts.action.ActionForward returnToSender(javax.servlet.http.HttpServletRequest request,
                                                                org.apache.struts.action.ActionMapping mapping,
                                                                KualiDocumentFormBase form)
If the given form has returnToActionList set to true, this method returns an ActionForward that should take the user back to their action list; otherwise, it returns them to the portal.

Parameters:
form -
Returns:

populateAuthorizationFields

protected void populateAuthorizationFields(KualiDocumentFormBase formBase)

populateAdHocActionRequestCodes

protected void populateAdHocActionRequestCodes(KualiDocumentFormBase formBase)

convertSetToMap

protected Map convertSetToMap(Set s)

getDataDictionaryService

protected DataDictionaryService getDataDictionaryService()
Returns:
the dataDictionaryService

getDocumentHelperService

protected DocumentHelperService getDocumentHelperService()

getDocumentService

protected DocumentService getDocumentService()

getKualiConfigurationService

protected ConfigurationService getKualiConfigurationService()

getParameterService

protected ParameterService getParameterService()

getPessimisticLockService

protected PessimisticLockService getPessimisticLockService()

getKualiRuleService

protected KualiRuleService getKualiRuleService()

getGroupService

protected GroupService getGroupService()

getAttachmentService

protected AttachmentService getAttachmentService()

getNoteService

protected NoteService getNoteService()

getBusinessObjectService

protected BusinessObjectService getBusinessObjectService()

getBusinessObjectAuthorizationService

protected BusinessObjectAuthorizationService getBusinessObjectAuthorizationService()
Overrides:
getBusinessObjectAuthorizationService in class KualiAction

getBusinessObjectMetaDataService

public BusinessObjectMetaDataService getBusinessObjectMetaDataService()

getEntityManagerFactory

public javax.persistence.EntityManagerFactory getEntityManagerFactory()

hideAllTabs

public org.apache.struts.action.ActionForward hideAllTabs(org.apache.struts.action.ActionMapping mapping,
                                                          org.apache.struts.action.ActionForm form,
                                                          javax.servlet.http.HttpServletRequest request,
                                                          javax.servlet.http.HttpServletResponse response)
                                                   throws Exception
Description copied from class: KualiAction
Toggles all tabs to closed

Overrides:
hideAllTabs in class KualiAction
Returns:
Throws:
Exception
See Also:
KualiAction.hideAllTabs(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

showAllTabs

public org.apache.struts.action.ActionForward showAllTabs(org.apache.struts.action.ActionMapping mapping,
                                                          org.apache.struts.action.ActionForm form,
                                                          javax.servlet.http.HttpServletRequest request,
                                                          javax.servlet.http.HttpServletResponse response)
                                                   throws Exception
Description copied from class: KualiAction
Toggles all tabs to open

Overrides:
showAllTabs in class KualiAction
Returns:
Throws:
Exception
See Also:
KualiAction.showAllTabs(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

toggleTab

public org.apache.struts.action.ActionForward toggleTab(org.apache.struts.action.ActionMapping mapping,
                                                        org.apache.struts.action.ActionForm form,
                                                        javax.servlet.http.HttpServletRequest request,
                                                        javax.servlet.http.HttpServletResponse response)
                                                 throws Exception
Description copied from class: KualiAction
Toggles the tab state in the ui

Overrides:
toggleTab in class KualiAction
Returns:
Throws:
Exception
See Also:
KualiAction.toggleTab(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

doProcessingAfterPost

protected void doProcessingAfterPost(KualiForm form,
                                     javax.servlet.http.HttpServletRequest request)
Description copied from class: KualiAction
This method does all special processing on a document that should happen on each HTTP post (ie, save, route, approve, etc).

Overrides:
doProcessingAfterPost in class KualiAction

takeSuperUserActions

public org.apache.struts.action.ActionForward takeSuperUserActions(org.apache.struts.action.ActionMapping mapping,
                                                                   org.apache.struts.action.ActionForm form,
                                                                   javax.servlet.http.HttpServletRequest request,
                                                                   javax.servlet.http.HttpServletResponse response)

superUserDisapprove

public org.apache.struts.action.ActionForward superUserDisapprove(org.apache.struts.action.ActionMapping mapping,
                                                                  org.apache.struts.action.ActionForm form,
                                                                  javax.servlet.http.HttpServletRequest request,
                                                                  javax.servlet.http.HttpServletResponse response)

superUserApprove

public org.apache.struts.action.ActionForward superUserApprove(org.apache.struts.action.ActionMapping mapping,
                                                               org.apache.struts.action.ActionForm form,
                                                               javax.servlet.http.HttpServletRequest request,
                                                               javax.servlet.http.HttpServletResponse response)

complete

public org.apache.struts.action.ActionForward complete(org.apache.struts.action.ActionMapping mapping,
                                                       org.apache.struts.action.ActionForm form,
                                                       javax.servlet.http.HttpServletRequest request,
                                                       javax.servlet.http.HttpServletResponse response)
                                                throws Exception
Complete document action

Parameters:
mapping -
form -
request -
response -
Returns:
Throws:
Exception


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