org.kuali.kfs.fp.document.validation.impl
Class DisbursementVoucherAccountingLineTotalsValidation
java.lang.Object
org.kuali.kfs.sys.document.validation.ParameterizedValidation
org.kuali.kfs.sys.document.validation.GenericValidation
org.kuali.kfs.sys.document.validation.impl.AccountingLineGroupTotalsUnchangedValidation
org.kuali.kfs.fp.document.validation.impl.DisbursementVoucherAccountingLineTotalsValidation
- All Implemented Interfaces:
- Validation
public class DisbursementVoucherAccountingLineTotalsValidation
- extends AccountingLineGroupTotalsUnchangedValidation
Field Summary |
protected static org.apache.log4j.Logger |
LOG
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
protected static org.apache.log4j.Logger LOG
DisbursementVoucherAccountingLineTotalsValidation
public DisbursementVoucherAccountingLineTotalsValidation()
validate
public boolean validate(AttributedDocumentEvent event)
- Description copied from class:
AccountingLineGroupTotalsUnchangedValidation
- Checks that the source and total amounts on the current version of the accounting document
are equal to the persisted source and total totals.
Expects a document to be sent in as the first parameter
- Specified by:
validate
in interface Validation
- Overrides:
validate
in class AccountingLineGroupTotalsUnchangedValidation
- Returns:
- true if validation should continue, false otherwise
- See Also:
AccountingLineGroupTotalsUnchangedValidation.validate(org.kuali.kfs.sys.document.validation.event.AttributedDocumentEvent)
hasRequiredEditMode
protected boolean hasRequiredEditMode(Set<String> currentEditModes,
List<String> candidateEditModes)
- determine whether the give user has permission to any edit mode defined in the given candidate edit modes
- Parameters:
currentEditModes
- the edit modes currently available to the given user on the documentcandidateEditEditModes
- the given candidate edit modes
- Returns:
- true if the give user has permission to any edit mode defined in the given candidate edit modes; otherwise, false
getEditModesFromDocument
protected Set<String> getEditModesFromDocument(AccountingDocument accountingDocument,
org.kuali.rice.kim.bo.Person financialSystemUser)
- Retrieves the current edit modes from the document
- Parameters:
accountingDocument
- the document to find edit modes offinancialSystemUser
- the user requesting the edit modes
- Returns:
- the Set of current edit modes
getCandidateEditModes
protected List<String> getCandidateEditModes()
- define the possibly desired edit modes
- Returns:
- the possibly desired edit modes
getForeignDraftAndWireTransferEditModes
protected List<String> getForeignDraftAndWireTransferEditModes(DisbursementVoucherDocument dvDocument)
- get foreign draft And wire transfer edit mode names, as well as tax if the payee is a non-resident alien
- Parameters:
dvDocument
- the document we're validating
- Returns:
- foreign draft And wire transfer edit mode names
includeTaxAsTotalChangingMode
protected boolean includeTaxAsTotalChangingMode(DisbursementVoucherDocument dvDocument)
- Determines whether the tax edit mode should be allowed to change the accounting line totals,
based on whether the payee is a non-resident alient or not
- Parameters:
dvDocument
- the document to check
- Returns:
- true if the tax entry mode can change accounting line totals, false otherwise
Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.