org.kuali.kfs.sys.document.service
Interface AccountingDocumentRuleHelperService

All Known Implementing Classes:
AccountingDocumentRuleHelperServiceImpl

public interface AccountingDocumentRuleHelperService

A collection of methods that assist in rule validation for accounting documents


Method Summary
 String formatProperty(String propertyName, Object... arguments)
          Gets the named property from KualiConfigurationService (i.e., from ApplicationResources.properties) and formats it with the given arguments (if any).
 String getObjectCodeTypeCodeWithoutSideEffects(GeneralLedgerPendingEntrySourceDetail postable)
          Makes sure that the objectCode attribute is fully populated b/c we are using proxying in our persistence layer.
 boolean isExpense(GeneralLedgerPendingEntrySourceDetail postable)
          Check object code type to determine whether the accounting line is expense.
 boolean isIncome(GeneralLedgerPendingEntrySourceDetail postable)
          Determines whether an accounting line is an income line or not.
 boolean isValidBalanceType(BalanceType balanceType, Class entryClass, String attributeName, String errorPropertyName)
          This method checks for the existence of the provided balance type, in the system and also checks to see if it is active.
 boolean isValidBalanceType(BalanceType balanceType, String errorPropertyName)
          This method checks for the existence of the provided balance type, in the system and also checks to see if it is active.
 boolean isValidOpenAccountingPeriod(AccountingPeriod accountingPeriod, Class entryClass, String attribueName, String errorPropertyName)
          This method checks for the existence of the accounting period in the system and also makes sure that the accounting period is open for posting.
 boolean isValidReversalDate(Date reversalDate, String errorPropertyName)
          Some documents have reversal dates.
 

Method Detail

isValidBalanceType

boolean isValidBalanceType(BalanceType balanceType,
                           String errorPropertyName)
This method checks for the existence of the provided balance type, in the system and also checks to see if it is active.

Parameters:
balanceType -
errorPropertyName - also used as the BalanceTyp DD attribute name
Returns:
True if the balance type is valid, false otherwise.

isValidBalanceType

boolean isValidBalanceType(BalanceType balanceType,
                           Class entryClass,
                           String attributeName,
                           String errorPropertyName)
This method checks for the existence of the provided balance type, in the system and also checks to see if it is active.

Parameters:
balanceType -
entryClass - the Class of the DataDictionary entry containing the attribute with the label for the error message
attributeName - the name of the attribute in the DataDictionary entry
errorPropertyName -
Returns:
True if the balance type is valid, false otherwise.

isValidOpenAccountingPeriod

boolean isValidOpenAccountingPeriod(AccountingPeriod accountingPeriod,
                                    Class entryClass,
                                    String attribueName,
                                    String errorPropertyName)
This method checks for the existence of the accounting period in the system and also makes sure that the accounting period is open for posting.

Parameters:
accountingPeriod -
entryClass -
attribueName -
errorPropertyName -
Returns:
True if the accounting period exists in the system and is open for posting, false otherwise.

isValidReversalDate

boolean isValidReversalDate(Date reversalDate,
                            String errorPropertyName)
Some documents have reversal dates. This method represents the common implementation that transactional documents follow for reversal dates - that they must not be before the current date.

Parameters:
reversalDate -
errorPropertyName -
Returns:
boolean True if the reversal date is not earlier than the current date, false otherwise.

isIncome

boolean isIncome(GeneralLedgerPendingEntrySourceDetail postable)
Determines whether an accounting line is an income line or not. This goes agains the configurable object type code list in the ApplicationParameter mechanism. This list can be configured externally.

Parameters:
accountingLine -
Returns:
boolean True if the line is an income line.

isExpense

boolean isExpense(GeneralLedgerPendingEntrySourceDetail postable)
Check object code type to determine whether the accounting line is expense.

Parameters:
accountingLine -
Returns:
boolean True if the line is an expense line.

getObjectCodeTypeCodeWithoutSideEffects

String getObjectCodeTypeCodeWithoutSideEffects(GeneralLedgerPendingEntrySourceDetail postable)
Makes sure that the objectCode attribute is fully populated b/c we are using proxying in our persistence layer.

Parameters:
accountingLine -
Returns:
the object type code of the object code of the given accounting line

formatProperty

String formatProperty(String propertyName,
                      Object... arguments)
Gets the named property from KualiConfigurationService (i.e., from ApplicationResources.properties) and formats it with the given arguments (if any).

Parameters:
propertyName -
arguments -
Returns:
the formatted property (i.e., message), with any {0} replaced with the first argument, {1} with the second argument, etc.


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