org.kuali.kfs.module.ld.document.web.struts
Class ExpenseTransferDocumentActionBase

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.ld.document.web.struts.ExpenseTransferDocumentActionBase
Direct Known Subclasses:
BenefitExpenseTransferAction, SalaryExpenseTransferAction

public class ExpenseTransferDocumentActionBase
extends KualiAccountingDocumentActionBase

Base Struts Action class for Benefit Expense Transfer Document.


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
ExpenseTransferDocumentActionBase()
           
 
Method Summary
protected  void buildAccountingLineFromLedgerBalance(LedgerBalance ledgerBalance, ExpenseTransferAccountingLine line, org.kuali.rice.kns.util.KualiDecimal amount, String periodCode)
          Translates LedgerBalance data into an ExpenseTransferAccountingLine
protected  void clearOverridesThatBecameUnneeded(AccountingLine formLine)
          Clear all overrides that are not needed.
 org.apache.struts.action.ActionForward copyAccountingLine(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Copy a single accounting line
protected  void copyAccountingLine(ExpenseTransferAccountingLine source, ExpenseTransferAccountingLine target)
          Copies content from one accounting line to the other.
 org.apache.struts.action.ActionForward copyAllAccountingLines(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          This method copies all accounting lines from financial document form if they pass validation rules
 org.apache.struts.action.ActionForward deleteAllSourceAccountingLines(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Delete all source accounting lines
 org.apache.struts.action.ActionForward deleteAllTargetAccountingLines(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Delete all target accounting lines
protected  String getLookupResultsBOClassName(ExpenseTransferDocumentFormBase expenseTransferDocumentForm)
          Get the BO class name of the set of lookup results
protected  SegmentedLookupResultsService getSegmentedLookupResultsService()
           
protected  void loadDocument(org.kuali.rice.kns.web.struts.form.KualiDocumentFormBase kualiDocumentFormBase)
          Overload the method in order to have balance importing section be populated with the last search criteria
 org.apache.struts.action.ActionForward performBalanceInquiryForSourceLine(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Takes care of storing the action form in the User session and forwarding to the balance inquiry report menu action for a source accounting line.
 org.apache.struts.action.ActionForward performBalanceInquiryForTargetLine(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Takes care of storing the action form in the User session and forwarding to the balance inquiry report menu action for a target accounting line.
 org.apache.struts.action.ActionForward performBalanceInquiryLookup(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Takes care of storing the action form in the user session and forwarding to the balance inquiry lookup action.
protected  void processAccountingLineOverrides(List accountingLines)
          Processes accounting line overrides for output to JSP
 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)
          Populates the lines of the ST or BT document from a balance lookup.
protected  void resetLookupFields(ExpenseTransferDocumentFormBase expenseTransferDocumentForm, LedgerBalance balance)
          Reset the lookup fields in the given expense transfer form with the given ledger balance
protected  boolean runRule(org.kuali.rice.kns.rule.event.KualiDocumentEventBase event)
          Executes for the given event.
protected  void updateAccountOverrideCode(ExpenseTransferAccountingLine line)
          For given accounting line, set the corresponding override code
 
Methods inherited from class org.kuali.kfs.sys.web.struts.KualiAccountingDocumentActionBase
addCapitalAssetInfo, addCapitalAssetInfoDetailLines, applyCapitalAssetInformation, approve, blanketApprove, checkSalesTax, checkSalesTaxRequiredAllLines, checkUploadFile, clearCapitalAssetInfo, copy, deepCopyAccountingLinesList, deleteAccountingLine, deleteCapitalAssetInfoDetailLine, deleteSourceLine, deleteTargetLine, execute, getCurrentCapitalAssetInformationObject, getMaxItemLineNumber, getNextItemLineNumberAndIncremented, getObjectTypeCodeFromLine, getSourceAccountingLine, getTargetAccountingLine, handleSalesTaxRequired, handleSalesTaxRequiredAllLines, hasSalesTaxBeenEntered, hideDetails, insertAccountingLine, insertSourceLine, insertTargetLine, isSalesTaxRequired, isValidSalesTaxEntered, performBalanceInquiryForAccountingLine, performLookup, populateSalesTax, processAccountingLineOverrides, processAccountingLineOverrides, processAccountingLines, refreshSalesTaxInfo, removeSalesTax, resetCapitalAssetInfo, route, save, showDetails, toggleTab, uploadAccountingLines, 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, cancel, cancelBOAttachment, canSave, checkAndWarnAboutSensitiveData, checkAuthorization, close, combineAdHocRecipients, convertSetToMap, createDocument, delete, deleteAdHocRoutePerson, deleteAdHocRouteWorkgroup, deleteBONote, determineNoteWorkflowNotificationAction, disapprove, docHandler, doProcessingAfterPost, downloadBOAttachment, 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, 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

ExpenseTransferDocumentActionBase

public ExpenseTransferDocumentActionBase()
Method Detail

performBalanceInquiryForSourceLine

public org.apache.struts.action.ActionForward performBalanceInquiryForSourceLine(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
Takes care of storing the action form in the User session and forwarding to the balance inquiry report menu action for a source accounting line.

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

performBalanceInquiryForTargetLine

public org.apache.struts.action.ActionForward performBalanceInquiryForTargetLine(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
Takes care of storing the action form in the User session and forwarding to the balance inquiry report menu action for a target accounting line.

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

performBalanceInquiryLookup

public org.apache.struts.action.ActionForward performBalanceInquiryLookup(org.apache.struts.action.ActionMapping mapping,
                                                                          org.apache.struts.action.ActionForm form,
                                                                          javax.servlet.http.HttpServletRequest request,
                                                                          javax.servlet.http.HttpServletResponse response)
                                                                   throws Exception
Takes care of storing the action form in the user session and forwarding to the balance inquiry lookup action.

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

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
Populates the lines of the ST or BT document from a balance lookup. First, the data must be retrieved based on the selected ids persisted from the framework. The basic steps are: 1) Retrieve selected (row) ids that were persisted 2) Each id has form: {db object id}.{period name}.{line amount} 3) Retrieve the balance records associated with the object ids 4)Build an accounting line from the retrieved balance record, using parsed period name as the pay period, and parsed amount as the new line amount. 5) Call insertAccountingLine

Overrides:
refresh in class KualiAccountingDocumentActionBase
Throws:
Exception
See Also:
KualiDocumentActionBase.refresh(ActionMapping, ActionForm, HttpServletRequest, HttpServletResponse)

loadDocument

protected void loadDocument(org.kuali.rice.kns.web.struts.form.KualiDocumentFormBase kualiDocumentFormBase)
                     throws org.kuali.rice.kew.exception.WorkflowException
Overload the method in order to have balance importing section be populated with the last search criteria

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

copyAllAccountingLines

public org.apache.struts.action.ActionForward copyAllAccountingLines(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 copies all accounting lines from financial document form if they pass validation rules

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

deleteAllSourceAccountingLines

public org.apache.struts.action.ActionForward deleteAllSourceAccountingLines(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 all source accounting lines

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

deleteAllTargetAccountingLines

public org.apache.struts.action.ActionForward deleteAllTargetAccountingLines(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 all target accounting lines

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

copyAccountingLine

public org.apache.struts.action.ActionForward copyAccountingLine(org.apache.struts.action.ActionMapping mapping,
                                                                 org.apache.struts.action.ActionForm form,
                                                                 javax.servlet.http.HttpServletRequest request,
                                                                 javax.servlet.http.HttpServletResponse response)
                                                          throws Exception
Copy a single accounting line

Throws:
Exception
See Also:
org.kuali.rice.kns.web.struts.action.KualiDocumentActionBase#copyAccountingLine(ActionMapping, ActionForm, HttpServletRequest, HttpServletResponse)

resetLookupFields

protected void resetLookupFields(ExpenseTransferDocumentFormBase expenseTransferDocumentForm,
                                 LedgerBalance balance)
Reset the lookup fields in the given expense transfer form with the given ledger balance

Parameters:
expenseTransferDocumentForm - the given expense transfer form
the - given ledger balance

copyAccountingLine

protected void copyAccountingLine(ExpenseTransferAccountingLine source,
                                  ExpenseTransferAccountingLine target)
Copies content from one accounting line to the other. Ignores Source or Target information.

Parameters:
source - line to copy from
target - new line to copy data to

buildAccountingLineFromLedgerBalance

protected void buildAccountingLineFromLedgerBalance(LedgerBalance ledgerBalance,
                                                    ExpenseTransferAccountingLine line,
                                                    org.kuali.rice.kns.util.KualiDecimal amount,
                                                    String periodCode)
Translates LedgerBalance data into an ExpenseTransferAccountingLine

Parameters:
bo - LedgerBalance instance
line - ExpenseTransferAccountingLine to copy data to

processAccountingLineOverrides

protected void processAccountingLineOverrides(List accountingLines)
Processes accounting line overrides for output to JSP

Overrides:
processAccountingLineOverrides in class KualiAccountingDocumentActionBase
See Also:
KualiAccountingDocumentActionBase.processAccountingLineOverrides(java.util.List)

clearOverridesThatBecameUnneeded

protected void clearOverridesThatBecameUnneeded(AccountingLine formLine)
Clear all overrides that are not needed.

Overrides:
clearOverridesThatBecameUnneeded in class KualiAccountingDocumentActionBase
See Also:
KualiAccountingDocumentActionBase.clearOverridesThatBecameUnneeded(org.kuali.kfs.sys.businessobject.AccountingLine)

updateAccountOverrideCode

protected void updateAccountOverrideCode(ExpenseTransferAccountingLine line)
For given accounting line, set the corresponding override code

Parameters:
line - accounting line

runRule

protected boolean runRule(org.kuali.rice.kns.rule.event.KualiDocumentEventBase event)
Executes for the given event. This is more of a convenience method.

Parameters:
event - to run the rules for
Returns:
true if rule passes

getLookupResultsBOClassName

protected String getLookupResultsBOClassName(ExpenseTransferDocumentFormBase expenseTransferDocumentForm)
Get the BO class name of the set of lookup results

Parameters:
expenseTransferDocumentForm - the Struts form for expense transfer document
Returns:
the BO class name of the set of lookup results

getSegmentedLookupResultsService

protected SegmentedLookupResultsService getSegmentedLookupResultsService()
Returns:
SegmentedLookupResultsService


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