org.kuali.kfs.module.ar.document.web.struts
Class PaymentApplicationDocumentAction

java.lang.Object
  extended by org.apache.struts.action.Action
      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
                  extended by org.kuali.rice.kns.web.struts.action.KualiTransactionalDocumentActionBase
                      extended by org.kuali.kfs.sys.document.web.struts.FinancialSystemTransactionalDocumentActionBase
                          extended by org.kuali.kfs.module.ar.document.web.struts.PaymentApplicationDocumentAction

public class PaymentApplicationDocumentAction
extends FinancialSystemTransactionalDocumentActionBase


Field Summary
protected  org.kuali.rice.kns.service.BusinessObjectService businessObjectService
           
protected  CustomerInvoiceDetailService customerInvoiceDetailService
           
protected  CustomerInvoiceDocumentService customerInvoiceDocumentService
           
protected  org.kuali.rice.kns.service.DocumentService documentService
           
protected static org.apache.log4j.Logger LOG
           
protected  NonAppliedHoldingService nonAppliedHoldingService
           
protected  PaymentApplicationDocumentService paymentApplicationDocumentService
           
protected  org.kuali.rice.kns.workflow.service.WorkflowDocumentService workflowDocumentService
           
 
Fields inherited from class org.kuali.rice.kns.web.struts.action.KualiDocumentActionBase
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, messages, methods, types
 
Fields inherited from class org.apache.struts.action.Action
defaultLocale, servlet
 
Constructor Summary
PaymentApplicationDocumentAction()
          Constructs a PaymentApplicationDocumentAction.java.
 
Method Summary
protected  void addFieldError(String errorPathToAdd, String propertyName, String errorKey)
          Get an error to display in the UI for a certain field.
protected  void addGlobalError(String errorKey)
          Get an error to display at the global level, for the whole document.
 org.apache.struts.action.ActionForward applyAllAmounts(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
protected  NonInvoiced applyNonInvoiced(PaymentApplicationDocumentForm payAppForm)
           
protected  List<InvoicePaidApplied> applyToIndividualCustomerInvoiceDetails(PaymentApplicationDocumentForm paymentApplicationDocumentForm)
           
protected  NonAppliedHolding applyUnapplied(PaymentApplicationDocumentForm payAppForm)
           
 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)
          Cancel the document.
protected  void createDocument(org.kuali.rice.kns.web.struts.form.KualiDocumentFormBase kualiDocumentFormBase)
           
 org.apache.struts.action.ActionForward deleteNonArLine(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
protected  void doApplicationOfFunds(PaymentApplicationDocumentForm paymentApplicationDocumentForm)
           
 org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)
           
protected  InvoicePaidApplied generateAndValidateNewPaidApplied(PaymentApplicationInvoiceDetailApply detailApplication, String fieldName, org.kuali.rice.kns.util.KualiDecimal totalFromControl)
          Create an InvoicePaidApplied for a CustomerInvoiceDetail and validate it.
 org.apache.struts.action.ActionForward goToInvoice(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          This method updates the customer invoice details when a new invoice is selected
 org.apache.struts.action.ActionForward goToNextInvoice(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          This method updates customer invoice details when next invoice is selected
 org.apache.struts.action.ActionForward goToPreviousInvoice(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          This method updates customer invoice details when previous invoice is selected
protected  void loadDocument(org.kuali.rice.kns.web.struts.form.KualiDocumentFormBase kualiDocumentFormBase)
           
 org.apache.struts.action.ActionForward loadInvoices(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Retrieve all invoices for the selected customer.
protected  void loadInvoices(PaymentApplicationDocumentForm payAppForm, String selectedInvoiceNumber)
          This method loads the invoices for currently selected customer
protected  List<InvoicePaidApplied> quickApplyToInvoices(PaymentApplicationDocumentForm paymentApplicationDocumentForm, List<InvoicePaidApplied> appliedToIndividualDetails)
           
 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)
          This is overridden in order to recalculate the invoice totals before doing the submit.
 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)
           
 
Methods inherited from class org.kuali.kfs.sys.document.web.struts.FinancialSystemTransactionalDocumentActionBase
correct
 
Methods inherited from class org.kuali.rice.kns.web.struts.action.KualiTransactionalDocumentActionBase
copy, populateAuthorizationFields
 
Methods inherited from class org.kuali.rice.kns.web.struts.action.KualiDocumentActionBase
acknowledge, approve, attemptLockRelease, blanketApprove, buildAuthorizationException, cancelBOAttachment, canSave, checkAndWarnAboutSensitiveData, checkAuthorization, close, combineAdHocRecipients, convertSetToMap, delete, deleteAdHocRoutePerson, deleteAdHocRouteWorkgroup, deleteBONote, determineNoteWorkflowNotificationAction, disapprove, docHandler, doProcessingAfterPost, downloadBOAttachment, execute, exitingDocument, fyi, generatePessimisticLockMessage, getAttachmentService, getBusinessObjectAuthorizationService, getBusinessObjectMetaDataService, getBusinessObjectService, getDataDictionaryService, getDocumentHelperService, getDocumentService, getEntityManagerFactory, getIdentityManagementService, getKualiConfigurationService, getKualiRuleService, getNoteService, getParameterService, getPessimisticLockService, getQuestion, hideAllTabs, insertAdHocRoutePerson, insertAdHocRouteWorkgroup, insertBONote, isFormRepresentingLockObject, performRouteReport, populateAdHocActionRequestCodes, promptBeforeValidation, promptBeforeValidation, refresh, refreshAdHocRoutingWorkgroupLookups, releaseLocks, reload, returnToSender, selectedAttachmentIndex, sendAdHocRequests, sendNoteWorkflowNotification, setupDocumentExit, setupPessimisticLockMessages, showAllTabs, streamToResponse, supervisorFunctions, toggleTab
 
Methods inherited from class org.kuali.rice.kns.web.struts.action.KualiAction
addMethodToCallToUncheckedList, defaultDispatch, dispatchMethod, findMethodToCall, getApplicationBaseUrl, getBasePath, getEncryptionService, getHeaderTabDispatch, getHeaderTabNavigateTo, getImageContext, getKualiModuleService, getLineToDelete, getReturnLocation, getRoleQualification, getSelectedLine, getTabToToggle, headerTab, 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, generateToken, getDataSource, getDataSource, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, 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

LOG

protected static org.apache.log4j.Logger LOG

businessObjectService

protected org.kuali.rice.kns.service.BusinessObjectService businessObjectService

documentService

protected org.kuali.rice.kns.service.DocumentService documentService

workflowDocumentService

protected org.kuali.rice.kns.workflow.service.WorkflowDocumentService workflowDocumentService

paymentApplicationDocumentService

protected PaymentApplicationDocumentService paymentApplicationDocumentService

customerInvoiceDocumentService

protected CustomerInvoiceDocumentService customerInvoiceDocumentService

customerInvoiceDetailService

protected CustomerInvoiceDetailService customerInvoiceDetailService

nonAppliedHoldingService

protected NonAppliedHoldingService nonAppliedHoldingService
Constructor Detail

PaymentApplicationDocumentAction

public PaymentApplicationDocumentAction()
Constructs a PaymentApplicationDocumentAction.java.

Method Detail

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
Overrides:
save in class org.kuali.rice.kns.web.struts.action.KualiDocumentActionBase
Throws:
Exception

execute

public org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping,
                                                      org.apache.struts.action.ActionForm form,
                                                      javax.servlet.ServletRequest request,
                                                      javax.servlet.ServletResponse response)
                                               throws Exception
Overrides:
execute in class org.apache.struts.action.Action
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
This is overridden in order to recalculate the invoice totals before doing the submit.

Overrides:
route in class org.kuali.rice.kns.web.struts.action.KualiDocumentActionBase
Throws:
Exception
See Also:
KualiDocumentActionBase.route(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

deleteNonArLine

public org.apache.struts.action.ActionForward deleteNonArLine(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

generateAndValidateNewPaidApplied

protected InvoicePaidApplied generateAndValidateNewPaidApplied(PaymentApplicationInvoiceDetailApply detailApplication,
                                                               String fieldName,
                                                               org.kuali.rice.kns.util.KualiDecimal totalFromControl)
Create an InvoicePaidApplied for a CustomerInvoiceDetail and validate it. If the validation succeeds the paidApplied is returned. If the validation does succeed a null is returned.

Parameters:
customerInvoiceDetail -
paymentApplicationDocument -
amount -
fieldName -
Returns:
Throws:
org.kuali.rice.kew.exception.WorkflowException

applyAllAmounts

public org.apache.struts.action.ActionForward applyAllAmounts(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

doApplicationOfFunds

protected void doApplicationOfFunds(PaymentApplicationDocumentForm paymentApplicationDocumentForm)
                             throws org.kuali.rice.kew.exception.WorkflowException
Throws:
org.kuali.rice.kew.exception.WorkflowException

applyToIndividualCustomerInvoiceDetails

protected List<InvoicePaidApplied> applyToIndividualCustomerInvoiceDetails(PaymentApplicationDocumentForm paymentApplicationDocumentForm)

quickApplyToInvoices

protected List<InvoicePaidApplied> quickApplyToInvoices(PaymentApplicationDocumentForm paymentApplicationDocumentForm,
                                                        List<InvoicePaidApplied> appliedToIndividualDetails)

applyNonInvoiced

protected NonInvoiced applyNonInvoiced(PaymentApplicationDocumentForm payAppForm)
                                throws org.kuali.rice.kew.exception.WorkflowException
Throws:
org.kuali.rice.kew.exception.WorkflowException

applyUnapplied

protected NonAppliedHolding applyUnapplied(PaymentApplicationDocumentForm payAppForm)
                                    throws org.kuali.rice.kew.exception.WorkflowException
Throws:
org.kuali.rice.kew.exception.WorkflowException

loadInvoices

protected void loadInvoices(PaymentApplicationDocumentForm payAppForm,
                            String selectedInvoiceNumber)
This method loads the invoices for currently selected customer

Parameters:
applicationDocumentForm -

goToInvoice

public org.apache.struts.action.ActionForward goToInvoice(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 updates the customer invoice details when a new invoice is selected

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

goToNextInvoice

public org.apache.struts.action.ActionForward goToNextInvoice(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 updates customer invoice details when next invoice is selected

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

goToPreviousInvoice

public org.apache.struts.action.ActionForward goToPreviousInvoice(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 updates customer invoice details when previous invoice is selected

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

loadInvoices

public org.apache.struts.action.ActionForward loadInvoices(org.apache.struts.action.ActionMapping mapping,
                                                           org.apache.struts.action.ActionForm form,
                                                           javax.servlet.http.HttpServletRequest request,
                                                           javax.servlet.http.HttpServletResponse response)
                                                    throws Exception
Retrieve all invoices for the selected customer.

Parameters:
mapping -
form -
request -
response -
Returns:
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
Cancel the document.

Overrides:
cancel in class org.kuali.rice.kns.web.struts.action.KualiDocumentActionBase
Throws:
Exception
See Also:
KualiDocumentActionBase.cancel(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

createDocument

protected void createDocument(org.kuali.rice.kns.web.struts.form.KualiDocumentFormBase kualiDocumentFormBase)
                       throws org.kuali.rice.kew.exception.WorkflowException
Overrides:
createDocument in class org.kuali.rice.kns.web.struts.action.KualiDocumentActionBase
Throws:
org.kuali.rice.kew.exception.WorkflowException
See Also:
KualiDocumentActionBase.createDocument(org.kuali.rice.kns.web.struts.form.KualiDocumentFormBase)

loadDocument

protected void loadDocument(org.kuali.rice.kns.web.struts.form.KualiDocumentFormBase kualiDocumentFormBase)
                     throws org.kuali.rice.kew.exception.WorkflowException
Overrides:
loadDocument in class org.kuali.rice.kns.web.struts.action.KualiDocumentActionBase
Throws:
org.kuali.rice.kew.exception.WorkflowException
See Also:
KualiDocumentActionBase.loadDocument(org.kuali.rice.kns.web.struts.form.KualiDocumentFormBase)

addFieldError

protected void addFieldError(String errorPathToAdd,
                             String propertyName,
                             String errorKey)
Get an error to display in the UI for a certain field.

Parameters:
propertyName -
errorKey -

addGlobalError

protected void addGlobalError(String errorKey)
Get an error to display at the global level, for the whole document.

Parameters:
errorKey -


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