org.kuali.kfs.module.purap.document.web.struts
Class AccountsPayableActionBase

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.sys.web.struts.KualiAccountingDocumentActionBase
                              extended by org.kuali.kfs.module.purap.document.web.struts.PurchasingAccountsPayableActionBase
                                  extended by org.kuali.kfs.module.purap.document.web.struts.AccountsPayableActionBase
Direct Known Subclasses:
PaymentRequestAction, VendorCreditMemoAction

public class AccountsPayableActionBase
extends PurchasingAccountsPayableActionBase

Struts Action for Accounts Payable documents.


Field Summary
protected static org.apache.log4j.Logger LOG
           
 
Fields inherited from class org.kuali.kfs.sys.web.struts.KualiAccountingDocumentActionBase
UPDATE_EVENT_ACTIONS
 
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
AccountsPayableActionBase()
           
 
Method Summary
protected  org.apache.struts.action.ActionForward askCancelQuestion(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Constructs and asks the question as to whether the user wants to cancel, for payment requests and credit memos.
protected  org.apache.struts.action.ActionForward askQuestionsAndPerformReopenPurchaseOrder(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
protected  org.apache.struts.action.ActionForward askQuestionWithInput(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String questionType, String notePrefix, String operation, String messageKey, PurQuestionCallback callback)
          A wrapper method which prompts for a reason to hold a payment request or credit memo.
protected  org.apache.struts.action.ActionForward askQuestionWithInput(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String questionType, String notePrefix, String operation, String messageKey, TreeMap<String,PurQuestionCallback> questionsAndCallbacks, String messagePrefix, org.apache.struts.action.ActionForward redirect)
          Builds and asks questions which require text input by the user for a payment request or a credit memo.
 org.apache.struts.action.ActionForward calculate(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Perform calculation on item line.
 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)
           
protected  PurQuestionCallback cancelCallbackMethod()
          Returns a question callback for the Cancel action.
protected  PurQuestionCallback cancelPOActionCallbackMethod()
          Returns a question callback for the Cancel Purchase Order action.
 org.apache.struts.action.ActionForward clearAllTaxes(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 execute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Adds check for accountingLine updates, generates and dispatches any events caused by such updates
 String getActionName()
          Returns the current action name.
protected  String getQuestionProperty(String messageKey, String messagePrefix, org.kuali.rice.kns.service.KualiConfigurationService kualiConfiguration, String question)
          Used to look up messages to be displayed, from the KualiConfigurationService, given either a whole key or two parts of a key that may be concatenated together.
 PurchaseOrderDocument initiateReopenPurchaseOrder(PurchaseOrderDocument po, String annotation)
           
protected  void loadDocument(org.kuali.rice.kns.web.struts.form.KualiDocumentFormBase kualiDocumentFormBase)
          Checks the continuation account indicator and generates warnings if continuation accounts were used to replace original accounts on 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)
          Performs refresh of objects after a lookup.
 org.apache.struts.action.ActionForward reopenPo(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
protected  boolean requiresCaculate(AccountsPayableFormBase apForm)
          Checks if calculation is required.
 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)
           
 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.module.purap.document.web.struts.PurchasingAccountsPayableActionBase
customAccountRetrieval, customCalculate, deleteSourceLine, downloadBOAttachment, getSelectedLineForAccounts, getSourceAccountingLine, hideAllAccounts, insertAccountingLine, insertAccountingLine, insertBONote, insertSourceLine, processAccountingLineOverrides, processCustomInsertAccountingLine, refreshAccountSummary, showAllAccounts, updateBaseline, uploadAccountingLines
 
Methods inherited from class org.kuali.kfs.sys.web.struts.KualiAccountingDocumentActionBase
addCapitalAssetInfo, addCapitalAssetInfoDetailLines, applyCapitalAssetInformation, approve, blanketApprove, checkSalesTax, checkSalesTaxRequiredAllLines, checkUploadFile, clearCapitalAssetInfo, clearOverridesThatBecameUnneeded, copy, deepCopyAccountingLinesList, deleteAccountingLine, deleteCapitalAssetInfoDetailLine, deleteTargetLine, getCurrentCapitalAssetInformationObject, getMaxItemLineNumber, getNextItemLineNumberAndIncremented, getObjectTypeCodeFromLine, getTargetAccountingLine, handleSalesTaxRequired, handleSalesTaxRequiredAllLines, hasSalesTaxBeenEntered, hideDetails, insertAccountingLine, insertTargetLine, isSalesTaxRequired, isValidSalesTaxEntered, performBalanceInquiryForAccountingLine, performBalanceInquiryForSourceLine, performBalanceInquiryForTargetLine, performLookup, populateSalesTax, processAccountingLineOverrides, processAccountingLineOverrides, processAccountingLines, refreshSalesTaxInfo, removeSalesTax, resetCapitalAssetInfo, showDetails, toggleTab, uploadSourceLines, uploadTargetLines
 
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
populateAuthorizationFields
 
Methods inherited from class org.kuali.rice.kns.web.struts.action.KualiDocumentActionBase
acknowledge, attemptLockRelease, buildAuthorizationException, cancelBOAttachment, canSave, checkAndWarnAboutSensitiveData, checkAuthorization, close, combineAdHocRecipients, convertSetToMap, createDocument, delete, deleteAdHocRoutePerson, deleteAdHocRouteWorkgroup, deleteBONote, determineNoteWorkflowNotificationAction, disapprove, docHandler, doProcessingAfterPost, exitingDocument, fyi, generatePessimisticLockMessage, getAttachmentService, getBusinessObjectAuthorizationService, getBusinessObjectMetaDataService, getBusinessObjectService, getDataDictionaryService, getDocumentHelperService, getDocumentService, getEntityManagerFactory, getIdentityManagementService, getKualiConfigurationService, getKualiRuleService, getNoteService, getParameterService, getPessimisticLockService, getQuestion, hideAllTabs, insertAdHocRoutePerson, insertAdHocRouteWorkgroup, isFormRepresentingLockObject, performRouteReport, populateAdHocActionRequestCodes, promptBeforeValidation, promptBeforeValidation, refreshAdHocRoutingWorkgroupLookups, releaseLocks, reload, returnToSender, selectedAttachmentIndex, sendAdHocRequests, sendNoteWorkflowNotification, setupDocumentExit, setupPessimisticLockMessages, showAllTabs, streamToResponse, supervisorFunctions
 
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, 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, 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
Constructor Detail

AccountsPayableActionBase

public AccountsPayableActionBase()
Method Detail

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
Description copied from class: KualiAccountingDocumentActionBase
Adds check for accountingLine updates, generates and dispatches any events caused by such updates

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

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
Performs refresh of objects after a lookup.

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

loadDocument

protected void loadDocument(org.kuali.rice.kns.web.struts.form.KualiDocumentFormBase kualiDocumentFormBase)
                     throws org.kuali.rice.kew.exception.WorkflowException
Checks the continuation account indicator and generates warnings if continuation accounts were used to replace original accounts on the document.

Overrides:
loadDocument in class PurchasingAccountsPayableActionBase
Throws:
org.kuali.rice.kew.exception.WorkflowException
See Also:
KualiDocumentActionBase.loadDocument(org.kuali.rice.kns.web.struts.form.KualiDocumentFormBase)

calculate

public org.apache.struts.action.ActionForward calculate(org.apache.struts.action.ActionMapping mapping,
                                                        org.apache.struts.action.ActionForm form,
                                                        javax.servlet.http.HttpServletRequest request,
                                                        javax.servlet.http.HttpServletResponse response)
                                                 throws Exception
Perform calculation on item line.

Overrides:
calculate in class PurchasingAccountsPayableActionBase
Parameters:
mapping - An ActionMapping
form - An ActionForm
request - The HttpServletRequest
response - The HttpServletResponse
Returns:
An ActionForward
Throws:
Exception

clearAllTaxes

public org.apache.struts.action.ActionForward clearAllTaxes(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:
clearAllTaxes in class PurchasingAccountsPayableActionBase
Throws:
Exception

requiresCaculate

protected boolean requiresCaculate(AccountsPayableFormBase apForm)
Checks if calculation is required. Currently it is required when it has not already been calculated and full document entry status has not already passed.

Parameters:
apForm - A Form, which must inherit from AccountsPayableFormBase
Returns:
true if calculation is required, false otherwise

getActionName

public String getActionName()
Returns the current action name.

Returns:
A String. Set to null!

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
Overrides:
route in class KualiAccountingDocumentActionBase
Throws:
Exception
See Also:
KualiDocumentActionBase.route(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

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 KualiAccountingDocumentActionBase
Throws:
Exception
See Also:
KualiDocumentActionBase.save(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

askQuestionWithInput

protected org.apache.struts.action.ActionForward askQuestionWithInput(org.apache.struts.action.ActionMapping mapping,
                                                                      org.apache.struts.action.ActionForm form,
                                                                      javax.servlet.http.HttpServletRequest request,
                                                                      javax.servlet.http.HttpServletResponse response,
                                                                      String questionType,
                                                                      String notePrefix,
                                                                      String operation,
                                                                      String messageKey,
                                                                      PurQuestionCallback callback)
                                                               throws Exception
A wrapper method which prompts for a reason to hold a payment request or credit memo.

Parameters:
mapping - An ActionMapping
form - An ActionForm
request - The HttpServletRequest
response - The HttpServletResponse
questionType - A String used to distinguish which question is being asked
notePrefix - A String explaining what action was taken, to be prepended to the note containing the reason, which gets written to the document
operation - A one-word String description of the action to be taken, to be substituted into the message. (Can be an empty String for some messages.)
messageKey - A key to the message which will appear on the question screen
callback - A PurQuestionCallback
Returns:
An ActionForward
Throws:
Exception

askQuestionWithInput

protected org.apache.struts.action.ActionForward askQuestionWithInput(org.apache.struts.action.ActionMapping mapping,
                                                                      org.apache.struts.action.ActionForm form,
                                                                      javax.servlet.http.HttpServletRequest request,
                                                                      javax.servlet.http.HttpServletResponse response,
                                                                      String questionType,
                                                                      String notePrefix,
                                                                      String operation,
                                                                      String messageKey,
                                                                      TreeMap<String,PurQuestionCallback> questionsAndCallbacks,
                                                                      String messagePrefix,
                                                                      org.apache.struts.action.ActionForward redirect)
                                                               throws Exception
Builds and asks questions which require text input by the user for a payment request or a credit memo.

Parameters:
mapping - An ActionMapping
form - An ActionForm
request - The HttpServletRequest
response - The HttpServletResponse
questionType - A String used to distinguish which question is being asked
notePrefix - A String explaining what action was taken, to be prepended to the note containing the reason, which gets written to the document
operation - A one-word String description of the action to be taken, to be substituted into the message. (Can be an empty String for some messages.)
messageKey - A (whole) key to the message which will appear on the question screen
questionsAndCallbacks - A TreeMap associating the type of question to be asked and the type of callback which should happen in that case
messagePrefix - The most general part of a key to a message text to be retrieved from KualiConfigurationService, Describes a collection of questions.
redirect - An ActionForward to return to if done with questions
Returns:
An ActionForward
Throws:
Exception

getQuestionProperty

protected String getQuestionProperty(String messageKey,
                                     String messagePrefix,
                                     org.kuali.rice.kns.service.KualiConfigurationService kualiConfiguration,
                                     String question)
Used to look up messages to be displayed, from the KualiConfigurationService, given either a whole key or two parts of a key that may be concatenated together.

Parameters:
messageKey - String. One of the message keys in PurapKeyConstants.
messagePrefix - String. A prefix to the question key, such as "ap.question." that, concatenated with the question, comprises the whole key of the message.
kualiConfiguration - An instance of KualiConfigurationService
question - String. The most specific part of the message key in PurapKeyConstants.
Returns:
The message to be displayed given the key

reopenPo

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

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
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)

askCancelQuestion

protected org.apache.struts.action.ActionForward askCancelQuestion(org.apache.struts.action.ActionMapping mapping,
                                                                   org.apache.struts.action.ActionForm form,
                                                                   javax.servlet.http.HttpServletRequest request,
                                                                   javax.servlet.http.HttpServletResponse response)
                                                            throws Exception
Constructs and asks the question as to whether the user wants to cancel, for payment requests and credit memos.

Parameters:
mapping - An ActionMapping
form - An ActionForm
request - The HttpServletRequest
response - The HttpServletResponse
Returns:
An ActionForward
Throws:
Exception

cancelPOActionCallbackMethod

protected PurQuestionCallback cancelPOActionCallbackMethod()
Returns a question callback for the Cancel Purchase Order action.

Returns:
A PurQuestionCallback with a post-question activity appropriate to the Cancel PO action

cancelCallbackMethod

protected PurQuestionCallback cancelCallbackMethod()
Returns a question callback for the Cancel action.

Returns:
A PurQuestionCallback which does post-question tasks appropriate to Cancellation.

askQuestionsAndPerformReopenPurchaseOrder

protected org.apache.struts.action.ActionForward askQuestionsAndPerformReopenPurchaseOrder(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

initiateReopenPurchaseOrder

public PurchaseOrderDocument initiateReopenPurchaseOrder(PurchaseOrderDocument po,
                                                         String annotation)


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