| org.kuali.kfs.rules.AccountingDocumentRuleBase org.kuali.module.financial.rules.JournalVoucherDocumentRule
All known Subclasses: org.kuali.module.labor.rules.LaborJournalVoucherDocumentRule,
JournalVoucherDocumentRule | public class JournalVoucherDocumentRule extends AccountingDocumentRuleBase (Code) | | This class holds document specific business rules for the Journal Voucher. It overrides methods in the base rule class to apply
specific checks.
|
Method Summary | |
protected void | customizeExplicitGeneralLedgerPendingEntry(AccountingDocument financialDocument, AccountingLine accountingLine, GeneralLedgerPendingEntry explicitEntry) This method sets attributes on the explicitly general ledger pending entry specific to JournalVoucher documents. | protected KualiDecimal | getGeneralLedgerPendingEntryAmountForAccountingLine(AccountingLine accountingLine) | public boolean | isAmountValid(AccountingDocument document, AccountingLine accountingLine) Accounting lines for Journal Vouchers can be positive or negative, just not "$0.00". | public boolean | isDebit(AccountingDocument financialDocument, AccountingLine accountingLine) The following are credits (return false)
- (debitCreditCode isNotBlank) && debitCreditCode != 'D'
The following are debits (return true)
- debitCreditCode == 'D'
- debitCreditCode isBlank
Parameters: financialDocument - The document which contains the accounting line being analyzed. Parameters: accountingLine - The accounting line which will be analyzed to determine if it is a debit line. | protected boolean | isDocumentBalanceValid(AccountingDocument financialDocument) Overrides the parent to return true, because Journal Voucher documents do not have to balance in order to be submitted for
routing.
Parameters: financialDocument - The document being validated. | protected boolean | isExternalEncumbranceSpecificBusinessRulesValid(AccountingLine accountingLine) This method checks that values exist in the three reference fields (referenceOriginCode, referenceTypeCode, referenceNumber)
that are required if the balance type is set to EXTERNAL ENCUMBRANCE.
Parameters: accountingLine - The accounting line being validated. | public boolean | isObjectCodeAllowed(Class documentClass, AccountingLine accountingLine) Overrides the parent to return true, because Journal Voucher documents aren't restricted from using any object code. | public boolean | isObjectTypeAllowed(Class documentClass, AccountingLine accountingLine) The JV allows any object type b/c it is up to the user to enter it into the interface, but it is required. | protected boolean | isRequiredReferenceFieldsValid(AccountingLine accountingLine) This method checks that values exist in the three reference fields that are required if the balance type is set to EXTERNAL
ENCUMBRANCE.
Parameters: accountingLine - The accounting line being validated. | protected boolean | isSourceAccountingLinesRequiredNumberForRoutingMet(AccountingDocument financialDocument) This method will check to make sure that the required number of source accounting lines for routing, exist in the document.
The Journal Voucher only has one set of accounting lines; therefore, we need to use a different message for this.
Parameters: financialDocument - The document containing the source accounting lines being validated. | protected boolean | isTargetAccountingLinesRequiredNumberForRoutingMet(AccountingDocument financialDocument) Overrides the parent to return true, because Journal Voucher documents only use the SourceAccountingLines data structures.
The list that holds TargetAccountingLines should be empty. | public boolean | processCustomAddAccountingLineBusinessRules(AccountingDocument document, AccountingLine accountingLine) Performs additional Journal Voucher specific checks every time an accounting line is added. | public boolean | processCustomReviewAccountingLineBusinessRules(AccountingDocument document, AccountingLine accountingLine) This method performs business rule checks on the accounting line being provided to ensure the accounting line
is valid and appropriate for the document. | public boolean | processCustomSaveDocumentBusinessRules(Document document) Performs Journal Voucher document specific save rules. | public boolean | processCustomUpdateAccountingLineBusinessRules(AccountingDocument financialDocument, AccountingLine originalAccountingLine, AccountingLine updatedAccountingLine) This method performs business rule checks on the accounting line being updated to the document to ensure the accounting line
is valid and appropriate for the document. | protected boolean | processOffsetGeneralLedgerPendingEntry(AccountingDocument financialDocument, GeneralLedgerPendingEntrySequenceHelper sequenceHelper, AccountingLine accountingLineCopy, GeneralLedgerPendingEntry explicitEntry, GeneralLedgerPendingEntry offsetEntry) A Journal Voucher document doesn't generate an offset entry at all, so this method overrides to do nothing more than return
true. | boolean | validateAccountingLine(AccountingLine accountingLine) Implements Journal Voucher specific accountingLine validity checks. |
JournalVoucherDocumentRule | public JournalVoucherDocumentRule()(Code) | | Constructs a JournalVoucherDocumentRule instance.
|
customizeExplicitGeneralLedgerPendingEntry | protected void customizeExplicitGeneralLedgerPendingEntry(AccountingDocument financialDocument, AccountingLine accountingLine, GeneralLedgerPendingEntry explicitEntry)(Code) | | This method sets attributes on the explicitly general ledger pending entry specific to JournalVoucher documents.
This includes setting the accounting period code and year (as selected by the user, the object type code,
the balance type code, the debit/credit code, the encumbrance update code and the reversal date.
Parameters: financialDocument - The document which contains the general ledger pending entry being modified. Parameters: accountingLine - The accounting line the explicit entry was generated from. Parameters: explicitEntry - The explicit entry being updated. See Also: org.kuali.module.financial.rules.FinancialDocumentRuleBase.customizeExplicitGeneralLedgerPendingEntry(org.kuali.core.document.FinancialDocumentorg.kuali.core.bo.AccountingLineorg.kuali.module.gl.bo.GeneralLedgerPendingEntry) |
isAmountValid | public boolean isAmountValid(AccountingDocument document, AccountingLine accountingLine)(Code) | | Accounting lines for Journal Vouchers can be positive or negative, just not "$0.00".
Additionally, accounting lines cannot have negative dollar amounts if the balance type of the
journal voucher allows for general ledger pending entry offset generation or the balance type
is not a budget type code.
Parameters: document - The document when contains the accounting line being validated. Parameters: acocuntingLine - The accounting line to be validated. True if the accounting line amount is valid, false otherwise. See Also: org.kuali.module.financial.rules.FinancialDocumentRuleBase.isAmountValid(org.kuali.core.document.FinancialDocumentorg.kuali.core.bo.AccountingLine) |
isDebit | public boolean isDebit(AccountingDocument financialDocument, AccountingLine accountingLine) throws IllegalStateException(Code) | | The following are credits (return false)
- (debitCreditCode isNotBlank) && debitCreditCode != 'D'
The following are debits (return true)
- debitCreditCode == 'D'
- debitCreditCode isBlank
Parameters: financialDocument - The document which contains the accounting line being analyzed. Parameters: accountingLine - The accounting line which will be analyzed to determine if it is a debit line. True if the accounting line provided is a debit accounting line, false otherwise. throws: IllegalStateException - Thrown by method IsDebitUtiles.isDebitCode() See Also: org.kuali.core.rule.AccountingLineRule.isDebit(org.kuali.core.document.FinancialDocumentorg.kuali.core.bo.AccountingLine) See Also: org.kuali.kfs.rules.AccountingDocumentRuleBase.IsDebitUtils.isDebitCode(String) |
isDocumentBalanceValid | protected boolean isDocumentBalanceValid(AccountingDocument financialDocument)(Code) | | Overrides the parent to return true, because Journal Voucher documents do not have to balance in order to be submitted for
routing.
Parameters: financialDocument - The document being validated. True if the balance of the document is valid, false otherwise. |
isExternalEncumbranceSpecificBusinessRulesValid | protected boolean isExternalEncumbranceSpecificBusinessRulesValid(AccountingLine accountingLine)(Code) | | This method checks that values exist in the three reference fields (referenceOriginCode, referenceTypeCode, referenceNumber)
that are required if the balance type is set to EXTERNAL ENCUMBRANCE.
Parameters: accountingLine - The accounting line being validated. True if the fields are filled in, true if the balance type is not EXTERNAL ENCUMBRANCE, false otherwise. |
isObjectCodeAllowed | public boolean isObjectCodeAllowed(Class documentClass, AccountingLine accountingLine)(Code) | | Overrides the parent to return true, because Journal Voucher documents aren't restricted from using any object code. This is
part of the "save" check that gets done. This method is called automatically by the parent's processSaveDocument method.
Parameters: documentClass - The document type class used to retrieve the rules defining if the object code is allowed. Parameters: accountingLine - The accounting line containing the object code being validated. This method always returns true. See Also: org.kuali.module.financial.rules.FinancialDocumentRuleBase.isObjectCodeAllowed(org.kuali.core.bo.AccountingLine) |
isObjectTypeAllowed | public boolean isObjectTypeAllowed(Class documentClass, AccountingLine accountingLine)(Code) | | The JV allows any object type b/c it is up to the user to enter it into the interface, but it is required. The existence
check is done for us automatically by the data dictionary validation if a value exists; beforehand so we can assume that any
value in that field is valid.
Parameters: documentClass - The type of document the accounting line is contained within. Parameters: accountingLine - The accounting line the object type code will be retrieved from. True if the object type code exists, false otherwise. See Also: org.kuali.core.rule.AddAccountingLineRule.isObjectTypeAllowed(org.kuali.core.bo.AccountingLine) |
isRequiredReferenceFieldsValid | protected boolean isRequiredReferenceFieldsValid(AccountingLine accountingLine)(Code) | | This method checks that values exist in the three reference fields that are required if the balance type is set to EXTERNAL
ENCUMBRANCE.
Parameters: accountingLine - The accounting line being validated. True if all of the required external encumbrance reference fields are valid, false otherwise. |
isSourceAccountingLinesRequiredNumberForRoutingMet | protected boolean isSourceAccountingLinesRequiredNumberForRoutingMet(AccountingDocument financialDocument)(Code) | | This method will check to make sure that the required number of source accounting lines for routing, exist in the document.
The Journal Voucher only has one set of accounting lines; therefore, we need to use a different message for this.
Parameters: financialDocument - The document containing the source accounting lines being validated. True if there is one or more source accounting lines in the given document. See Also: org.kuali.module.financial.rules.FinancialDocumentRuleBase.isSourceAccountingLinesRequiredNumberForRoutingMet(org.kuali.core.document.FinancialDocument) |
isTargetAccountingLinesRequiredNumberForRoutingMet | protected boolean isTargetAccountingLinesRequiredNumberForRoutingMet(AccountingDocument financialDocument)(Code) | | Overrides the parent to return true, because Journal Voucher documents only use the SourceAccountingLines data structures.
The list that holds TargetAccountingLines should be empty. This will be checked when the document is "routed" or submitted to
post - it's called automatically by the parent's processRouteDocument method.
Parameters: financialDocument - The document containing the target accounting lines being validated. This method always returns true because Journal Vouchers do not contain target accounting lines. See Also: org.kuali.module.financial.rules.FinancialDocumentRuleBase.isTargetAccountingLinesRequiredNumberForRoutingMet(org.kuali.core.document.FinancialDocument) |
processCustomAddAccountingLineBusinessRules | public boolean processCustomAddAccountingLineBusinessRules(AccountingDocument document, AccountingLine accountingLine)(Code) | | Performs additional Journal Voucher specific checks every time an accounting line is added. These include
checking to make sure that encumbrance reference fields are filled in under certain circumstances.
Parameters: financialDocument - The document the new line is being added to. Parameters: accountingLine - The new accounting line being added. True if the business rules all pass, false otherwise. See Also: org.kuali.module.financial.rules.FinancialDocumentRuleBase.processCustomAddAccountingLineBusinessRules(org.kuali.core.document.FinancialDocumentorg.kuali.core.bo.AccountingLine) |
processCustomReviewAccountingLineBusinessRules | public boolean processCustomReviewAccountingLineBusinessRules(AccountingDocument document, AccountingLine accountingLine)(Code) | | This method performs business rule checks on the accounting line being provided to ensure the accounting line
is valid and appropriate for the document.
Parameters: transactionalDocument - The document associated with the accounting line being validated. Parameters: accountingLine - The accounting line being validated. True if the business rules all pass, false otherwise. See Also: org.kuali.module.financial.rules.FinancialDocumentRuleBase.processCustomReviewAccountingLineBusinessRules(org.kuali.core.document.FinancialDocumentorg.kuali.core.bo.AccountingLine) |
processCustomSaveDocumentBusinessRules | public boolean processCustomSaveDocumentBusinessRules(Document document)(Code) | | Performs Journal Voucher document specific save rules. These include checking to make sure that a valid and
active balance type is chosen and that a valid open accounting period is chosen.
Parameters: document - The document being saved. True if the document being saved passed all the business rules, false otherwise. See Also: org.kuali.core.rule.DocumentRuleBase.processCustomSaveDocumentBusinessRules(org.kuali.core.document.Document) |
processCustomUpdateAccountingLineBusinessRules | public boolean processCustomUpdateAccountingLineBusinessRules(AccountingDocument financialDocument, AccountingLine originalAccountingLine, AccountingLine updatedAccountingLine)(Code) | | This method performs business rule checks on the accounting line being updated to the document to ensure the accounting line
is valid and appropriate for the document. Performs additional Journal Voucher specific checks every time an accounting
line is updated.
Parameters: transactionalDocument - The document the accounting line being updated resides within. Parameters: accountingLine - The original accounting line. Parameters: updatedAccoutingLine - The updated version of the accounting line. True if the business rules all pass for the update, false otherwise. See Also: org.kuali.module.financial.rules.FinancialDocumentRuleBase.processCustomUpdateAccountingLineBusinessRules(org.kuali.core.document.FinancialDocumentorg.kuali.core.bo.AccountingLineorg.kuali.core.bo.AccountingLine) |
processOffsetGeneralLedgerPendingEntry | protected boolean processOffsetGeneralLedgerPendingEntry(AccountingDocument financialDocument, GeneralLedgerPendingEntrySequenceHelper sequenceHelper, AccountingLine accountingLineCopy, GeneralLedgerPendingEntry explicitEntry, GeneralLedgerPendingEntry offsetEntry)(Code) | | A Journal Voucher document doesn't generate an offset entry at all, so this method overrides to do nothing more than return
true. This will be called by the parent's processGeneralLedgerPendingEntries method.
Parameters: financialDocument - The document the offset will be stored within. Parameters: sequenceHelper - The sequence object to be modified. Parameters: accountingLineToCopy - The accounting line the offset is generated for. Parameters: explicitEntry - The explicit entry the offset will be generated for. Parameters: offsetEntry - The offset entry to be processed. This method always returns true. See Also: org.kuali.module.financial.rules.FinancialDocumentRuleBase.processOffsetGeneralLedgerPendingEntry(org.kuali.core.document.FinancialDocumentorg.kuali.core.util.GeneralLedgerPendingEntrySequenceHelperorg.kuali.core.bo.AccountingLineorg.kuali.module.gl.bo.GeneralLedgerPendingEntryorg.kuali.module.gl.bo.GeneralLedgerPendingEntry) |
Fields inherited from org.kuali.kfs.rules.AccountingDocumentRuleBase | protected static org.apache.log4j.Logger LOG(Code)(Java Doc)
|
Methods inherited from org.kuali.kfs.rules.AccountingDocumentRuleBase | protected boolean accountIsAccessible(AccountingDocument financialDocument, AccountingLine accountingLine)(Code)(Java Doc) protected void buildTotalChangeErrorMessage(String propertyName, KualiDecimal persistedSourceLineTotal, KualiDecimal currentSourceLineTotal)(Code)(Java Doc) protected boolean checkAccountingLineAccountAccessibility(AccountingDocument financialDocument, AccountingLine accountingLine, AccountingLineAction action)(Code)(Java Doc) protected void customizeExplicitGeneralLedgerPendingEntry(AccountingDocument accountingDocument, AccountingLine accountingLine, GeneralLedgerPendingEntry explicitEntry)(Code)(Java Doc) protected boolean customizeOffsetGeneralLedgerPendingEntry(AccountingDocument accountingDocument, AccountingLine accountingLine, GeneralLedgerPendingEntry explicitEntry, GeneralLedgerPendingEntry offsetEntry)(Code)(Java Doc) protected Class getAccountingLineDocumentClass(AccountingDocument financialDocument)(Code)(Java Doc) protected KualiDecimal getGeneralLedgerPendingEntryAmountForAccountingLine(AccountingLine accountingLine)(Code)(Java Doc) protected ParameterService getParameterService()(Code)(Java Doc) final protected void handleNonExistentDocumentWhenApproving(AccountingDocument accountingDocument)(Code)(Java Doc) protected boolean hasAccessibleAccountingLines(AccountingDocument financialDocument, int min)(Code)(Java Doc) protected boolean isAccountingLineTotalsUnchanged(AccountingDocument accountingDocument)(Code)(Java Doc) protected boolean isAccountingLinesRequiredNumberForRoutingMet(AccountingDocument accountingDocument)(Code)(Java Doc) public boolean isAmountValid(AccountingDocument document, AccountingLine accountingLine)(Code)(Java Doc) final public boolean isAsset(AccountingLine accountingLine)(Code)(Java Doc) final public boolean isAssetTypeCode(String objectTypeCode)(Code)(Java Doc) final public boolean isBudgetOnlyCodesSubType(String objectCode)(Code)(Java Doc) final public boolean isCashSubType(String objectCode)(Code)(Java Doc) final public boolean isCostRecoveryExpenseSubType(String objectCode)(Code)(Java Doc) public boolean isCredit(AccountingLine accountingLine, AccountingDocument financialDocument) throws IllegalStateException(Code)(Java Doc) protected boolean isDocumentBalanceValid(AccountingDocument accountingDocument)(Code)(Java Doc) protected boolean isDocumentBalanceValidConsideringDebitsAndCredits(AccountingDocument accountingDocument)(Code)(Java Doc) protected boolean isErrorCorrection(AccountingDocument accountingDocument)(Code)(Java Doc) public boolean isExpense(AccountingLine accountingLine)(Code)(Java Doc) final public boolean isExpenseOrAsset(AccountingLine line)(Code)(Java Doc) final public boolean isFringeBenefitsSubType(String objectCode)(Code)(Java Doc) final public boolean isFundBalanceCode(String objectCode)(Code)(Java Doc) final public boolean isFundBalanceSubType(String objectCode)(Code)(Java Doc) public boolean isFundGroupAllowed(Class documentClass, AccountingLine accountingLine)(Code)(Java Doc) protected boolean isFundGroupSetBalanceValid(AccountingDocument tranDoc, Class componentClass, String parameterName)(Code)(Java Doc) final public boolean isHourlyWagesSubType(String objectCode)(Code)(Java Doc) final public boolean isIncome(AccountingLine accountingLine)(Code)(Java Doc) final public boolean isIncomeOrLiability(AccountingLine line)(Code)(Java Doc) final public boolean isLiability(AccountingLine accountingLine)(Code)(Java Doc) final public boolean isLiabilityTypeCode(String objectTypeCode)(Code)(Java Doc) final public boolean isMandatoryTransfersSubType(String objectSubTypeCode)(Code)(Java Doc) final public boolean isNonMandatoryTransfersSubType(String objectSubTypeCode)(Code)(Java Doc) public boolean isObjectCodeAllowed(Class documentClass, AccountingLine accountingLine)(Code)(Java Doc) public boolean isObjectConsolidationAllowed(Class documentClass, AccountingLine accountingLine)(Code)(Java Doc) public boolean isObjectLevelAllowed(Class documentClass, AccountingLine accountingLine)(Code)(Java Doc) public boolean isObjectSubTypeAllowed(Class documentClass, AccountingLine accountingLine)(Code)(Java Doc) public boolean isObjectTypeAllowed(Class documentClass, AccountingLine accountingLine)(Code)(Java Doc) protected boolean isOptionalOneSidedDocumentAccountingLinesRequiredNumberForRoutingMet(AccountingDocument accountingDocument)(Code)(Java Doc) final public boolean isRevenue(AccountingLine line)(Code)(Java Doc) final public boolean isSalariesSubType(String objectCode)(Code)(Java Doc) protected boolean isSourceAccountingLinesRequiredNumberForRoutingMet(AccountingDocument accountingDocument)(Code)(Java Doc) public boolean isSubFundGroupAllowed(Class documentClass, AccountingLine accountingLine)(Code)(Java Doc) protected boolean isTargetAccountingLinesRequiredNumberForRoutingMet(AccountingDocument accountingDocument)(Code)(Java Doc) final public boolean isValuationsAndAdjustmentsSubType(String objectSubTypeCode)(Code)(Java Doc) protected void populateExplicitGeneralLedgerPendingEntry(AccountingDocument accountingDocument, AccountingLine accountingLine, GeneralLedgerPendingEntrySequenceHelper sequenceHelper, GeneralLedgerPendingEntry explicitEntry)(Code)(Java Doc) public boolean processAddAccountingLineBusinessRules(AccountingDocument financialDocument, AccountingLine accountingLine)(Code)(Java Doc) protected boolean processCustomAddAccountingLineBusinessRules(AccountingDocument financialDocument, AccountingLine accountingLine)(Code)(Java Doc) protected boolean processCustomApproveDocumentBusinessRules(ApproveDocumentEvent approveEvent)(Code)(Java Doc) protected boolean processCustomDeleteAccountingLineBusinessRules(AccountingDocument financialDocument, AccountingLine accountingLine, boolean lineWasAlreadyDeletedFromDocument)(Code)(Java Doc) protected boolean processCustomReviewAccountingLineBusinessRules(AccountingDocument financialDocument, AccountingLine accountingLine)(Code)(Java Doc) protected boolean processCustomRouteDocumentBusinessRules(Document document)(Code)(Java Doc) protected boolean processCustomUpdateAccountingLineBusinessRules(AccountingDocument accountingDocument, AccountingLine originalAccountingLine, AccountingLine updatedAccountingLine)(Code)(Java Doc) public boolean processDeleteAccountingLineBusinessRules(AccountingDocument financialDocument, AccountingLine accountingLine, boolean lineWasAlreadyDeletedFromDocument)(Code)(Java Doc) protected boolean processExplicitGeneralLedgerPendingEntry(AccountingDocument accountingDocument, GeneralLedgerPendingEntrySequenceHelper sequenceHelper, AccountingLine accountingLine, GeneralLedgerPendingEntry explicitEntry)(Code)(Java Doc) public boolean processGenerateGeneralLedgerPendingEntries(AccountingDocument accountingDocument, AccountingLine accountingLine, GeneralLedgerPendingEntrySequenceHelper sequenceHelper)(Code)(Java Doc) protected boolean processOffsetGeneralLedgerPendingEntry(AccountingDocument accountingDocument, GeneralLedgerPendingEntrySequenceHelper sequenceHelper, AccountingLine accountingLine, GeneralLedgerPendingEntry explicitEntry, GeneralLedgerPendingEntry offsetEntry)(Code)(Java Doc) public boolean processReviewAccountingLineBusinessRules(AccountingDocument financialDocument, AccountingLine accountingLine)(Code)(Java Doc) public boolean processUpdateAccountingLineBusinessRules(AccountingDocument financialDocument, AccountingLine accountingLine, AccountingLine updatedAccountingLine)(Code)(Java Doc) public static void putRequiredPropertyError(BusinessObjectEntry boe, String propertyName)(Code)(Java Doc) protected void reportError(String propertyName, String errorKey, String... errorParams)(Code)(Java Doc) protected AccountingDocument retrievePersistedDocument(AccountingDocument accountingDocument)(Code)(Java Doc)
|
|
|