org.kuali.kfs.module.endow.document.validation.impl
Class EndowmentAccountingLinesDocumentBaseRules

java.lang.Object
  extended by org.kuali.rice.kns.rules.DocumentRuleBase
      extended by org.kuali.rice.kns.rules.TransactionalDocumentRuleBase
          extended by org.kuali.kfs.module.endow.document.validation.impl.EndowmentTransactionalDocumentBaseRule
              extended by org.kuali.kfs.module.endow.document.validation.impl.EndowmentTransactionLinesDocumentBaseRules
                  extended by org.kuali.kfs.module.endow.document.validation.impl.EndowmentAccountingLinesDocumentBaseRules
All Implemented Interfaces:
AddEndowmentAccountingLineRule<EndowmentAccountingLinesDocument,EndowmentAccountingLine>, AddTransactionLineRule<EndowmentTransactionLinesDocument,EndowmentTransactionLine>, DeleteEndowmentAccountingLineRule<EndowmentAccountingLinesDocument,EndowmentAccountingLine>, DeleteTransactionLineRule<EndowmentTransactionLinesDocument,EndowmentTransactionLine>, RefreshTransactionLineRule<EndowmentTransactionLinesDocument,EndowmentTransactionLine,Number>, org.kuali.rice.kns.rule.AddAdHocRoutePersonRule, org.kuali.rice.kns.rule.AddAdHocRouteWorkgroupRule, org.kuali.rice.kns.rule.AddNoteRule, org.kuali.rice.kns.rule.ApproveDocumentRule, org.kuali.rice.kns.rule.BusinessRule, org.kuali.rice.kns.rule.RouteDocumentRule, org.kuali.rice.kns.rule.SaveDocumentRule, org.kuali.rice.kns.rule.SendAdHocRequestsRule
Direct Known Subclasses:
EndowmentToGLTransferOfFundsDocumentRules, GLToEndowmentTransferOfFundsDocumentRules

public class EndowmentAccountingLinesDocumentBaseRules
extends EndowmentTransactionLinesDocumentBaseRules
implements AddEndowmentAccountingLineRule<EndowmentAccountingLinesDocument,EndowmentAccountingLine>, DeleteEndowmentAccountingLineRule<EndowmentAccountingLinesDocument,EndowmentAccountingLine>


Constructor Summary
EndowmentAccountingLinesDocumentBaseRules()
           
 
Method Summary
 String getAcctLineErrorPrefix(EndowmentAccountingLine line, int index)
          Gets the prefix for an accounting line error.
protected  boolean isAccountNumberEmpty(EndowmentAccountingLine line, int index)
          Checks if the account number is empty.
protected  boolean isChartCodeEmpty(EndowmentAccountingLine line, int index)
          Checks if the chart code is empty.
protected  boolean isObjectCodeEmpty(EndowmentAccountingLine line, int index)
          Checks if the object code is empty.
 boolean processAddEndowmentAccountingLineRules(EndowmentAccountingLinesDocument endowmentAccountingLinesDocument, EndowmentAccountingLine endowmentAccountingLine)
           
protected  boolean processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.Document document)
           
 boolean processDeleteAccountingLineRules(EndowmentAccountingLinesDocument EndowmentAccountingLinesDocument, EndowmentAccountingLine EndowmentAccountingLine)
           
protected  boolean validateAccount(EndowmentAccountingLine line, int index)
          Validates if the account exists in the database.
protected  boolean validateAccountingLine(EndowmentAccountingLinesDocument accountingLinesDocument, EndowmentAccountingLine accountingLine, int index)
          Validates the given accounting Line.
protected  boolean validateAccountingLinesSizeGreaterThanZero(EndowmentAccountingLinesDocument document, boolean isSource)
          Validates that the document has at least one accounting line.
protected  boolean validateAccountIsActive(EndowmentAccountingLine line, int index)
          Validates that the account is active.
protected  boolean validateAccountNotExpired(EndowmentAccountingLine line, int index)
          Validates if the account is expired.
protected  boolean validateChartCode(EndowmentAccountingLine line, int index)
          Validates that the chart code exists in the database.
protected  boolean validateChartCodeIsActive(EndowmentAccountingLine line, int index)
          Validates if the chart code is Active.
protected  boolean validateGLTotalAmountMatchesKEMTotalAmount(EndowmentAccountingLinesDocumentBase endowmentAccountingLinesDocumentBase)
          Validates that the total amount in the FROM section equals the total amount in the To section.
protected  boolean validateObjectCode(EndowmentAccountingLine line, int index)
          Validates that the object code exists.
protected  boolean validateObjectCodeIsActive(EndowmentAccountingLine line, int index)
          Validates that the object code is active.
protected  boolean validateObjectCodeObjectConsolidation(EndowmentAccountingLine line, int index)
          Validate that the object code does not represent assets, liabilities or funds balances (as indicated by the object code's object consolidation).
protected  boolean validateObjectCodeType(EndowmentAccountingLine line, int index)
          Validates that Object codes belonging to the object types of Expense not Expenditure and Income not Cash may not be used on a Transfer of Funds document.
protected  boolean validateProjectCode(EndowmentAccountingLine line, int index)
          Validates that if the project code is not empty it exists in the DB and is active.
protected  boolean validateSubAccountNumber(EndowmentAccountingLine line, int index)
          Validates that if the sub account number is not empty it exists in the DB and is active.
protected  boolean validateSubObjectCode(EndowmentAccountingLine line, int index)
          Validates that if the sub object code is not empty it exists in the DB and is active.
 
Methods inherited from class org.kuali.kfs.module.endow.document.validation.impl.EndowmentTransactionLinesDocumentBaseRules
canKEMIDHaveAPrincipalTransaction, checkCashTransactionEndowmentCode, checkWhetherHaveSufficientFundsForCashBasedTransaction, checkWhetherReducePermanentlyRestrictedFund, getErrorPrefix, getRegistrationForValidation, getSecurityForValidation, getSecurityIDForValidation, hasEtranCode, isActiveKemId, isEndowmentTransactionCodeEmpty, isKemIdCodeEmpty, nonCashTransaction, processAddTransactionLineRules, processDeleteTransactionLineRules, processRefreshTransactionLineRules, templateMethod, transactionLineSizeGreaterThanZero, validateChartMatch, validateEndowmentTransactionCode, validateEndowmentTransactionTypeCode, validateKemId, validateNonDuplicateSecurityCodes, validateNoTransactionRestriction, validateRegistration, validateSecurity, validateSecurityEtranChartMatch, validateSourceTargetAmountEqual, validateSourceTargetUnitsEqual, validateSufficientUnits, validateTaxLots, validateTotalUnits, validateTransactionAmountGreaterThanZero, validateTransactionAmountLessThanZero, validateTransactionLine, validateTransactionUnitsAmountEqual, validateTransactionUnitsGreaterThanZero, validateTransactionUnitsLessThanZero
 
Methods inherited from class org.kuali.kfs.module.endow.document.validation.impl.EndowmentTransactionalDocumentBaseRule
errorAlreadyExists, getEndowmentTransactionSecurity, getEndowmentTransactionSecurityPrefix, isRegistrationCodeActive, isRegistrationCodeEmpty, isSecurityActive, isSecurityCodeEmpty, isSubTypeEmpty, putDocumentError, putDocumentError, putFieldError, putFieldError, putFieldError, putGlobalError, putGlobalError, putGlobalError, putGlobalsError, putGlobalsError, validateRegistrationCode, validateSecurityClassCodeTypeNotLiability, validateSecurityClassTypeCode, validateSecurityCode
 
Methods inherited from class org.kuali.rice.kns.rules.DocumentRuleBase
getDataDictionaryService, getDictionaryValidationService, getDocumentHelperService, getIdentityManagementService, getKualiConfigurationService, getMaxDictionaryValidationDepth, getPersonService, getWorkflowInfoService, isAddHocRoutePersonValid, isAddHocRouteWorkgroupValid, isAdHocRouteRecipientsValid, isDocumentAttributesValid, isDocumentOverviewValid, isNoteValid, processAddAdHocRoutePerson, processAddAdHocRouteWorkgroup, processAddNote, processApproveDocument, processCustomAddAdHocRoutePersonBusinessRules, processCustomAddAdHocRouteWorkgroupBusinessRules, processCustomAddNoteBusinessRules, processCustomApproveDocumentBusinessRules, processCustomSaveDocumentBusinessRules, processCustomSendAdHocRequests, processRouteDocument, processSaveDocument, processSendAdHocRequests, setMaxDictionaryValidationDepth, validateSensitiveDataValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EndowmentAccountingLinesDocumentBaseRules

public EndowmentAccountingLinesDocumentBaseRules()
Method Detail

processAddEndowmentAccountingLineRules

public boolean processAddEndowmentAccountingLineRules(EndowmentAccountingLinesDocument endowmentAccountingLinesDocument,
                                                      EndowmentAccountingLine endowmentAccountingLine)
Specified by:
processAddEndowmentAccountingLineRules in interface AddEndowmentAccountingLineRule<EndowmentAccountingLinesDocument,EndowmentAccountingLine>
See Also:
AddEndowmentAccountingLineRule.processAddEndowmentAccountingLineRules(org.kuali.kfs.module.endow.document.EndowmentAccountingLinesDocument, org.kuali.kfs.module.endow.businessobject.EndowmentAccountingLine)

processDeleteAccountingLineRules

public boolean processDeleteAccountingLineRules(EndowmentAccountingLinesDocument EndowmentAccountingLinesDocument,
                                                EndowmentAccountingLine EndowmentAccountingLine)
Specified by:
processDeleteAccountingLineRules in interface DeleteEndowmentAccountingLineRule<EndowmentAccountingLinesDocument,EndowmentAccountingLine>
See Also:
DeleteEndowmentAccountingLineRule.processDeleteAccountingLineRules(org.kuali.kfs.module.endow.document.EndowmentAccountingLinesDocument, org.kuali.kfs.module.endow.businessobject.EndowmentAccountingLine)

validateAccountingLine

protected boolean validateAccountingLine(EndowmentAccountingLinesDocument accountingLinesDocument,
                                         EndowmentAccountingLine accountingLine,
                                         int index)
Validates the given accounting Line.

Parameters:
accountingLinesDocument -
accountingLine -
index -
Returns:
true if valid, false otherwise

getAcctLineErrorPrefix

public String getAcctLineErrorPrefix(EndowmentAccountingLine line,
                                     int index)
Gets the prefix for an accounting line error.

Parameters:
line -
index -
Returns:
the prefix

isChartCodeEmpty

protected boolean isChartCodeEmpty(EndowmentAccountingLine line,
                                   int index)
Checks if the chart code is empty.

Parameters:
line -
index -
Returns:
true if valid, false otherwise

validateChartCode

protected boolean validateChartCode(EndowmentAccountingLine line,
                                    int index)
Validates that the chart code exists in the database.

Parameters:
line -
index -
Returns:
true if valid, false otherwise

validateChartCodeIsActive

protected boolean validateChartCodeIsActive(EndowmentAccountingLine line,
                                            int index)
Validates if the chart code is Active.

Parameters:
line -
index -
Returns:
true of active, false otherwise

isAccountNumberEmpty

protected boolean isAccountNumberEmpty(EndowmentAccountingLine line,
                                       int index)
Checks if the account number is empty.

Parameters:
line -
index -
Returns:
true if empty, false otherwise

validateAccount

protected boolean validateAccount(EndowmentAccountingLine line,
                                  int index)
Validates if the account exists in the database.

Parameters:
line -
index -
Returns:
true if it exists, false otherwise

validateAccountIsActive

protected boolean validateAccountIsActive(EndowmentAccountingLine line,
                                          int index)
Validates that the account is active.

Parameters:
line -
index -
Returns:
true if active, false otherwise

validateAccountNotExpired

protected boolean validateAccountNotExpired(EndowmentAccountingLine line,
                                            int index)
Validates if the account is expired.

Parameters:
line -
index -
Returns:
true if not expired, false otherwise.

isObjectCodeEmpty

protected boolean isObjectCodeEmpty(EndowmentAccountingLine line,
                                    int index)
Checks if the object code is empty.

Parameters:
line -
index -
Returns:
true if empty, false otherwise

validateObjectCode

protected boolean validateObjectCode(EndowmentAccountingLine line,
                                     int index)
Validates that the object code exists.

Parameters:
line -
index -
Returns:
true if valid, false otherwise

validateObjectCodeIsActive

protected boolean validateObjectCodeIsActive(EndowmentAccountingLine line,
                                             int index)
Validates that the object code is active.

Parameters:
line -
index -
Returns:
true if active, false otherwise

validateObjectCodeObjectConsolidation

protected boolean validateObjectCodeObjectConsolidation(EndowmentAccountingLine line,
                                                        int index)
Validate that the object code does not represent assets, liabilities or funds balances (as indicated by the object code's object consolidation).

Parameters:
line -
index -
Returns:
true if valid, false otherwise

validateObjectCodeType

protected boolean validateObjectCodeType(EndowmentAccountingLine line,
                                         int index)
Validates that Object codes belonging to the object types of Expense not Expenditure and Income not Cash may not be used on a Transfer of Funds document.

Parameters:
line -
index -
Returns:
true if valid, false otherwise

validateSubAccountNumber

protected boolean validateSubAccountNumber(EndowmentAccountingLine line,
                                           int index)
Validates that if the sub account number is not empty it exists in the DB and is active.

Parameters:
line -
index -
Returns:
true if valid, false otherwise

validateSubObjectCode

protected boolean validateSubObjectCode(EndowmentAccountingLine line,
                                        int index)
Validates that if the sub object code is not empty it exists in the DB and is active.

Parameters:
line -
index -
Returns:
true if valid, false otherwise

validateProjectCode

protected boolean validateProjectCode(EndowmentAccountingLine line,
                                      int index)
Validates that if the project code is not empty it exists in the DB and is active.

Parameters:
line -
index -
Returns:
true if valid, false otherwise

validateAccountingLinesSizeGreaterThanZero

protected boolean validateAccountingLinesSizeGreaterThanZero(EndowmentAccountingLinesDocument document,
                                                             boolean isSource)
Validates that the document has at least one accounting line.

Parameters:
document -
isSource -
Returns:
true if valid, false otherwise

processCustomRouteDocumentBusinessRules

protected boolean processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.Document document)
Overrides:
processCustomRouteDocumentBusinessRules in class EndowmentTransactionLinesDocumentBaseRules
See Also:
EndowmentTransactionLinesDocumentBaseRules.processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.Document)

validateGLTotalAmountMatchesKEMTotalAmount

protected boolean validateGLTotalAmountMatchesKEMTotalAmount(EndowmentAccountingLinesDocumentBase endowmentAccountingLinesDocumentBase)
Validates that the total amount in the FROM section equals the total amount in the To section.

Parameters:
endowmentAccountingLinesDocumentBase -
Returns:
true if valid, false otherwise


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