public class CapitalAssetInformationValidation extends GenericValidation
Constructor and Description |
---|
CapitalAssetInformationValidation() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
accountingLinesDisributedToCapitalAssets(AccountingDocument accountingDocument)
validates that all the accounting lines in source/target section have been
distributed in the capital assets.
|
protected boolean |
accountLineExists(AccountingDocument accountingDocument,
CapitalAssetAccountsGroupDetails groupAccountLine) |
protected boolean |
amountsForCapitalAssetsAndAccountLinesMatch(AccountingDocument accountingDocument)
total amount in each capital asset is compared to the distributed accounting lines
and returns true if they are equal, else return false.
|
protected boolean |
amountsForCapitalAssetsAndDistributedAccountLinesMatch(AccountingDocument accountingDocument)
compares each capital asset amount to its distributed accounting lines.
|
protected boolean |
capitalAssetsAccountLinesMatchToAccountingLines(AccountingDocument accountingDocument)
validates that all the accounting lines in capital assets do exist
source/target accounting line sections.
|
protected boolean |
checkAccountingLineExists(AccountingDocument accountingDocument,
CapitalAssetInformation capitalAsset,
String errorPathPrefix)
compares the account number from the capital asset accounting lines
to the source/target accounting lines.
|
protected boolean |
checkAmount(CapitalAssetInformation capitalAsset,
String errorPathPrefix)
compares the capital asset amount to this accounting lines and if they match return
true else return false
to the source/target accounting lines.
|
protected boolean |
checkSourceDistributedAccountingLineExists(SourceAccountingLine accountLine,
List<CapitalAssetInformation> capitalAssets)
checks source accounting lines again the distributed accounting line and if found
return true else false so that this distributed accounting line may be removed.
|
protected boolean |
checkTargetDistributedAccountingLineExists(TargetAccountingLine accountLine,
List<CapitalAssetInformation> capitalAssets)
checks target accounting lines again the distributed accounting line and if found
return true else false so that this distributed accounting line may be removed.
|
protected org.kuali.rice.core.api.util.type.KualiDecimal |
getSourceDistributedTotalAmount(SourceAccountingLine accountLine,
List<CapitalAssetInformation> capitalAssets)
checks amount from source accounting line to that of all distributed accounting line
from capital assets and return true if matched else false.
|
protected org.kuali.rice.core.api.util.type.KualiDecimal |
getTargetDistributedTotalAmount(TargetAccountingLine accountLine,
List<CapitalAssetInformation> capitalAssets)
checks amount from target accounting line to that of all distributed accounting line
from capital assets and return true if matched else false.
|
protected boolean |
hasValidCapitalAssetInformation(AccountingDocument accountingDocument) |
void |
setAccountingDocumentForValidation(AccountingDocument accountingDocumentForValidation)
Sets the accountingDocumentForValidation attribute value.
|
boolean |
validate(AttributedDocumentEvent event)
This method validates that certain parameters
|
setQuitOnFail, shouldQuitOnFail, stageValidation
getParameterProperties, populateParameterFromEvent, populateParametersFromEvent, setParameterProperties
public CapitalAssetInformationValidation()
public boolean validate(AttributedDocumentEvent event)
Validation
Validation.validate(org.kuali.ole.sys.document.validation.event.AttributedDocumentEvent)
protected boolean accountingLinesDisributedToCapitalAssets(AccountingDocument accountingDocument)
accountingDocument
- protected boolean checkSourceDistributedAccountingLineExists(SourceAccountingLine accountLine, List<CapitalAssetInformation> capitalAssets)
accountLine
- capitalAssets
- protected boolean checkTargetDistributedAccountingLineExists(TargetAccountingLine accountLine, List<CapitalAssetInformation> capitalAssets)
accountLine
- capitalAssets
- protected boolean hasValidCapitalAssetInformation(AccountingDocument accountingDocument)
protected boolean capitalAssetsAccountLinesMatchToAccountingLines(AccountingDocument accountingDocument)
accountingDocument
- protected boolean checkAccountingLineExists(AccountingDocument accountingDocument, CapitalAssetInformation capitalAsset, String errorPathPrefix)
accountingDocument
- capitalAsset
- protected boolean accountLineExists(AccountingDocument accountingDocument, CapitalAssetAccountsGroupDetails groupAccountLine)
accountingDocument
- groupAccount
- protected boolean amountsForCapitalAssetsAndAccountLinesMatch(AccountingDocument accountingDocument)
accountingDocument
- protected org.kuali.rice.core.api.util.type.KualiDecimal getSourceDistributedTotalAmount(SourceAccountingLine accountLine, List<CapitalAssetInformation> capitalAssets)
accountLine
- capitalAssets
- protected org.kuali.rice.core.api.util.type.KualiDecimal getTargetDistributedTotalAmount(TargetAccountingLine accountLine, List<CapitalAssetInformation> capitalAssets)
accountLine
- capitalAssets
- protected boolean amountsForCapitalAssetsAndDistributedAccountLinesMatch(AccountingDocument accountingDocument)
accountingDocument
- protected boolean checkAmount(CapitalAssetInformation capitalAsset, String errorPathPrefix)
capitalAsset
- public void setAccountingDocumentForValidation(AccountingDocument accountingDocumentForValidation)
accountingDocumentForValidation
- The accountingDocumentForValidation to set.Copyright © 2004-2014 The Kuali Foundation. All Rights Reserved.