org.kuali.kfs.coa.document.validation.impl
Class AccountRule

java.lang.Object
  extended by org.kuali.rice.kns.rules.DocumentRuleBase
      extended by org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase
          extended by org.kuali.kfs.sys.document.validation.impl.KfsMaintenanceDocumentRuleBase
              extended by org.kuali.kfs.coa.document.validation.impl.AccountRule
All Implemented Interfaces:
org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRule, org.kuali.rice.kns.rule.AddAdHocRoutePersonRule, org.kuali.rice.kns.rule.AddAdHocRouteWorkgroupRule, org.kuali.rice.kns.rule.AddCollectionLineRule, 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:
AccountAutoCreateDefaultsRule, AccountRule

public class AccountRule
extends KfsMaintenanceDocumentRuleBase

Business rule(s) applicable to AccountMaintenance documents.


Field Summary
protected  AccountService accountService
           
protected static String ACCT_CAPITAL_SUBFUNDGROUP
           
protected static String ACCT_PREFIX_RESTRICTION
           
protected  BalanceService balanceService
           
protected static String BUDGET_RECORDING_LEVEL_MIXED
           
protected  ContractsAndGrantsModuleService contractsAndGrantsModuleService
           
protected static String ENDOWMENT_FUND_CD
           
protected static String GENERAL_FUND_CD
           
protected  GeneralLedgerPendingEntryService generalLedgerPendingEntryService
           
protected static org.apache.log4j.Logger LOG
           
protected  Account newAccount
           
protected  Account oldAccount
           
protected static org.kuali.rice.kns.service.ParameterService parameterService
           
protected static String PLANT_FUND_CD
           
protected static String RESTRICTED_CD_RESTRICTED
           
protected static String RESTRICTED_CD_TEMPORARILY_RESTRICTED
           
protected static String RESTRICTED_CD_UNRESTRICTED
           
protected static String RESTRICTED_FUND_CD
           
protected static SubFundGroupService subFundGroupService
           
 
Fields inherited from class org.kuali.kfs.sys.document.validation.impl.KfsMaintenanceDocumentRuleBase
financialSystemUserService, personService
 
Fields inherited from class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase
boDictionaryService, boService, businessObjectAuthorizationService, configService, ddService, dictionaryValidationService, DOCUMENT_ERROR_PREFIX, documentHelperService, MAINTAINABLE_ERROR_PATH, MAINTAINABLE_ERROR_PREFIX, maintDocDictionaryService, persistenceService, persistenceStructureService, priorErrorPath, roleService, workflowDocumentService
 
Constructor Summary
AccountRule()
           
 
Method Summary
protected  boolean accountNumberStartsWithAllowedPrefix(String accountNumber, List<String> illegalValues)
          This method tests whether the accountNumber passed in is prefixed with an allowed prefix, or an illegal one.
protected  boolean areGuidelinesRequired(Account account)
          This method determines whether the guidelines are required, based on business rules.
protected  boolean areTwoUsersTheSame(org.kuali.rice.kim.bo.Person user1, org.kuali.rice.kim.bo.Person user2)
          This method checks to see if two users are the same Person using their identifiers
protected  boolean checkAccountExpirationDateValidTodayOrEarlier(Account newAccount)
          This method checks to see if the account expiration date is today's date or earlier
protected  boolean checkAccountGuidelinesValidation(AccountGuideline accountGuideline)
          This method validates that the account guidelines object is valid
protected  boolean checkCGFieldNotFilledIn(Account account, String propertyName)
          This method checks to see if the contracts and grants fields are filled in or not
protected  boolean checkCgRequiredFields(Account newAccount)
          This method checks to make sure that if the contracts and grants fields are required they are entered correctly
protected  boolean checkCloseAccount(org.kuali.rice.kns.document.MaintenanceDocument maintenanceDocument)
          This method checks to see if the user is trying to close the account and if so if any rules are being violated Calls the additional rule checkAccountExpirationDateValidTodayOrEarlier
protected  boolean checkContractControlAccountNumberRequired(Account newAccount)
          This method checks to make sure that if the contract control account exists it is the same as the Account that we are working on
protected  boolean checkContractsAndGrants(org.kuali.rice.kns.document.MaintenanceDocument maintenanceDocument)
          This method checks to see if any Contracts and Grants business rules were violated Calls the following sub-rules: checkCgRequiredFields checkCgIncomeStreamRequired
protected  boolean checkEmptyValues(org.kuali.rice.kns.document.MaintenanceDocument maintenanceDocument)
          This method checks the basic rules for empty values in an account and associated objects with this account If guidelines are required for this Business Object it checks to make sure that it is filled out It also checks for partially filled out reference keys on the following: continuationAccount incomeStreamAccount endowmentIncomeAccount reportsToAccount contractControlAccount indirectCostRecoveryAcct
protected  boolean checkExpirationDate(org.kuali.rice.kns.document.MaintenanceDocument maintenanceDocument)
          This method checks to see if any expiration date field rules were violated
protected  boolean checkFringeBenefitAccountRule(Account newAccount)
          the fringe benefit account (otherwise known as the reportsToAccount) is required if the fringe benefit code is set to N.
protected  boolean checkFundGroup(org.kuali.rice.kns.document.MaintenanceDocument maintenanceDocument)
          This method checks to see if any Fund Group rules were violated Specifically: if we are dealing with a "GF" (General Fund) we cannot have an account with a budget recording level of "M" (Mixed)
protected  boolean checkGeneralRules(org.kuali.rice.kns.document.MaintenanceDocument maintenanceDocument)
          This method checks some of the general business rules associated with this document Calls the following rules: accountNumberStartsWithAllowedPrefix isNonSystemSupervisorEditingAClosedAccount hasTemporaryRestrictedStatusCodeButNoRestrictedStatusDate checkFringeBenefitAccountRule checkUserStatusAndType (on fiscal officer, supervisor and manager) ensures that the fiscal officer, supervisor and manager are not the same isContinuationAccountExpired
protected  boolean checkIncomeStreamAccountRule()
          the income stream account is required if account's sub fund group code's fund group code is either GF or CG.
protected  boolean checkIncomeStreamValid(Account newAccount)
          This method checks to see if the income stream account is required
protected  boolean checkSubFundGroup(org.kuali.rice.kns.document.MaintenanceDocument maintenanceDocument)
          This method checks to see if any SubFund Group rules were violated Specifically: if SubFundGroup is empty or not "PFCMR" we cannot have a campus code or building code if SubFundGroup is "PFCMR" then campus code and building code "must" be entered and be valid codes
protected  boolean checkUniqueAccountNumber(org.kuali.rice.kns.document.MaintenanceDocument maintenanceDocument)
          This method checks to see if account is allowed to cross chart; and if not makes sure that the account number is unique in the whole system.
 org.kuali.rice.kns.service.ParameterService getParameterService()
           
 SubFundGroupService getSubFundGroupService()
           
protected  boolean hasDefaultRestrictedStatusCode(Account account)
          Checks whether the account restricted status code is the default from the sub fund group.
protected  boolean hasTemporaryRestrictedStatusCodeButNoRestrictedStatusDate(Account account)
          This method tests whether a given account has the T - Temporary value for Restricted Status Code, but does not have a Restricted Status Date, which is required when the code is T.
protected  boolean isContinuationAccountExpired(Account newAccount)
          This method tests whether the continuation account entered (if any) has expired or not.
protected  boolean isNonSystemSupervisorEditingAClosedAccount(org.kuali.rice.kns.document.MaintenanceDocument document, org.kuali.rice.kim.bo.Person user)
          This method tests whether an account is being ReOpened by anyone except a system supervisor.
protected  boolean isSupervisorSameAsFiscalOfficer(Account account)
          This method is a helper method for checking if the supervisor user is the same as the fiscal officer Calls areTwoUsersTheSame(Person, Person)
protected  boolean isSupervisorSameAsManager(Account account)
          This method is a helper method for checking if the supervisor user is the same as the manager Calls areTwoUsersTheSame(Person, Person)
protected  boolean isUpdatedExpirationDateInvalid(org.kuali.rice.kns.document.MaintenanceDocument maintDoc)
          This method checks to see if the new expiration date is different from the old expiration and if it has if it is invalid
protected  boolean processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document)
          This method calls the following rules: checkAccountGuidelinesValidation checkEmptyValues checkGeneralRules checkCloseAccount checkContractsAndGrants checkExpirationDate checkFundGroup checkSubFundGroup checkFiscalOfficerIsValidKualiUser this rule will fail on routing
protected  boolean processCustomSaveDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document)
          This method calls the route rules but does not fail if any of them fail (this only happens on routing)
protected  String replaceTokens(String errorConstant)
          This method is a helper method that replaces error tokens with values for contracts and grants labels
 void setAccountService(AccountService accountService)
          Sets the accountService attribute value.
 void setBalanceService(BalanceService balanceService)
          This method sets the balanceService
 void setContractsAndGrantsModuleService(ContractsAndGrantsModuleService contractsAndGrantsModuleService)
          Sets the contractsAndGrantsModuleService attribute value.
 void setGeneralLedgerPendingEntryService(GeneralLedgerPendingEntryService generalLedgerPendingEntryService)
          This method sets the generalLedgerPendingEntryService
 void setupConvenienceObjects()
          This method sets the convenience objects like newAccount and oldAccount, so you have short and easy handles to the new and old objects contained in the maintenance document.
 
Methods inherited from class org.kuali.kfs.sys.document.validation.impl.KfsMaintenanceDocumentRuleBase
getFinancialSystemUserService, getKfsUserService
 
Methods inherited from class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase
apcRuleFails, applyApcRule, checkEmptyBOField, checkEmptyDocumentField, checkEmptyValue, checkForPartiallyFilledOutReferenceForeignKeys, clearErrorPath, consolidateFieldNames, dataDictionaryValidate, errorAlreadyExists, getBoDictionaryService, getBoService, getBusinessObjectAuthorizationService, getConfigService, getDateTimeService, getDdService, getDictionaryValidationService, getDocumentHelperService, getFieldLabel, getFieldLabel, getHumanReadablePrimaryKeyFieldNames, getMaintDocDictionaryService, getNewBo, getOldBo, getPersistenceService, getPersistenceStructureService, getPersonService, getRoleService, getWorkflowDocumentService, isCorrectMaintenanceClass, isDocumentInactivatingBusinessObject, isDocumentValidForSave, primaryKeyCheck, processAddCollectionLineBusinessRules, processApproveDocument, processCustomAddCollectionLineBusinessRules, processCustomApproveDocumentBusinessRules, processGlobalApproveDocumentBusinessRules, processGlobalRouteDocumentBusinessRules, processGlobalSaveDocumentBusinessRules, processInactivationBlockChecking, processInactivationBlockChecking, processRouteDocument, processSaveDocument, putDocumentError, putDocumentError, putFieldError, putFieldError, putFieldError, putFieldErrorWithShortLabel, putGlobalError, putGlobalError, putGlobalError, putGlobalsError, putGlobalsError, putInactivationBlockingErrorOnPage, resumeErrorPath, setBoDictionaryService, setBoService, setBusinessObjectAuthorizationService, setConfigService, setDdService, setDictionaryValidationService, setDocumentHelperService, setMaintDocDictionaryService, setNewBo, setPersistenceService, setPersistenceStructureService, setPersonService, setupBaseConvenienceObjects, setWorkflowDocumentService, showErrorMap, validateDocumentStructure, validateDuplicateIdentifierInDataDictionary, validateGlobalBusinessObjectPersistable, validateMaintenanceDocument
 
Methods inherited from class org.kuali.rice.kns.rules.DocumentRuleBase
getDataDictionaryService, getIdentityManagementService, getKualiConfigurationService, getMaxDictionaryValidationDepth, getWorkflowInfoService, isAddHocRoutePersonValid, isAddHocRouteWorkgroupValid, isAdHocRouteRecipientsValid, isDocumentAttributesValid, isDocumentOverviewValid, isNoteValid, processAddAdHocRoutePerson, processAddAdHocRouteWorkgroup, processAddNote, processCustomAddAdHocRoutePersonBusinessRules, processCustomAddAdHocRouteWorkgroupBusinessRules, processCustomAddNoteBusinessRules, processCustomApproveDocumentBusinessRules, processCustomRouteDocumentBusinessRules, processCustomSaveDocumentBusinessRules, processCustomSendAdHocRequests, processSendAdHocRequests, setMaxDictionaryValidationDepth, validateSensitiveDataValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static org.apache.log4j.Logger LOG

ACCT_PREFIX_RESTRICTION

protected static final String ACCT_PREFIX_RESTRICTION
See Also:
Constant Field Values

ACCT_CAPITAL_SUBFUNDGROUP

protected static final String ACCT_CAPITAL_SUBFUNDGROUP
See Also:
Constant Field Values

GENERAL_FUND_CD

protected static final String GENERAL_FUND_CD
See Also:
Constant Field Values

RESTRICTED_FUND_CD

protected static final String RESTRICTED_FUND_CD
See Also:
Constant Field Values

ENDOWMENT_FUND_CD

protected static final String ENDOWMENT_FUND_CD
See Also:
Constant Field Values

PLANT_FUND_CD

protected static final String PLANT_FUND_CD
See Also:
Constant Field Values

RESTRICTED_CD_RESTRICTED

protected static final String RESTRICTED_CD_RESTRICTED
See Also:
Constant Field Values

RESTRICTED_CD_UNRESTRICTED

protected static final String RESTRICTED_CD_UNRESTRICTED
See Also:
Constant Field Values

RESTRICTED_CD_TEMPORARILY_RESTRICTED

protected static final String RESTRICTED_CD_TEMPORARILY_RESTRICTED
See Also:
Constant Field Values

BUDGET_RECORDING_LEVEL_MIXED

protected static final String BUDGET_RECORDING_LEVEL_MIXED
See Also:
Constant Field Values

subFundGroupService

protected static SubFundGroupService subFundGroupService

parameterService

protected static org.kuali.rice.kns.service.ParameterService parameterService

generalLedgerPendingEntryService

protected GeneralLedgerPendingEntryService generalLedgerPendingEntryService

balanceService

protected BalanceService balanceService

accountService

protected AccountService accountService

contractsAndGrantsModuleService

protected ContractsAndGrantsModuleService contractsAndGrantsModuleService

oldAccount

protected Account oldAccount

newAccount

protected Account newAccount
Constructor Detail

AccountRule

public AccountRule()
Method Detail

setupConvenienceObjects

public void setupConvenienceObjects()
This method sets the convenience objects like newAccount and oldAccount, so you have short and easy handles to the new and old objects contained in the maintenance document. It also calls the BusinessObjectBase.refresh(), which will attempt to load all sub-objects from the DB by their primary keys, if available.

Specified by:
setupConvenienceObjects in interface org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRule
Overrides:
setupConvenienceObjects in class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase

processCustomSaveDocumentBusinessRules

protected boolean processCustomSaveDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document)
This method calls the route rules but does not fail if any of them fail (this only happens on routing)

Overrides:
processCustomSaveDocumentBusinessRules in class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase
See Also:
MaintenanceDocumentRuleBase.processCustomSaveDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument)

processCustomRouteDocumentBusinessRules

protected boolean processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document)
This method calls the following rules: checkAccountGuidelinesValidation checkEmptyValues checkGeneralRules checkCloseAccount checkContractsAndGrants checkExpirationDate checkFundGroup checkSubFundGroup checkFiscalOfficerIsValidKualiUser this rule will fail on routing

Overrides:
processCustomRouteDocumentBusinessRules in class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase
See Also:
MaintenanceDocumentRuleBase.processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument)

checkEmptyValues

protected boolean checkEmptyValues(org.kuali.rice.kns.document.MaintenanceDocument maintenanceDocument)
This method checks the basic rules for empty values in an account and associated objects with this account If guidelines are required for this Business Object it checks to make sure that it is filled out It also checks for partially filled out reference keys on the following: continuationAccount incomeStreamAccount endowmentIncomeAccount reportsToAccount contractControlAccount indirectCostRecoveryAcct

Parameters:
maintenanceDocument -
Returns:
false if any of these are empty

checkAccountGuidelinesValidation

protected boolean checkAccountGuidelinesValidation(AccountGuideline accountGuideline)
This method validates that the account guidelines object is valid

Parameters:
accountGuideline -
Returns:
true if account guideline is valid

areGuidelinesRequired

protected boolean areGuidelinesRequired(Account account)
This method determines whether the guidelines are required, based on business rules.

Parameters:
account - - the populated Account bo to be evaluated
Returns:
true if guidelines are required, false otherwise

accountNumberStartsWithAllowedPrefix

protected boolean accountNumberStartsWithAllowedPrefix(String accountNumber,
                                                       List<String> illegalValues)
This method tests whether the accountNumber passed in is prefixed with an allowed prefix, or an illegal one. The illegal prefixes are passed in as an array of strings.

Parameters:
accountNumber - - The Account Number to be tested.
illegalValues - - An Array of Strings of the unallowable prefixes.
Returns:
false if the accountNumber starts with any of the illegalPrefixes, true otherwise

isNonSystemSupervisorEditingAClosedAccount

protected boolean isNonSystemSupervisorEditingAClosedAccount(org.kuali.rice.kns.document.MaintenanceDocument document,
                                                             org.kuali.rice.kim.bo.Person user)
This method tests whether an account is being ReOpened by anyone except a system supervisor. Only system supervisors may reopen closed accounts.

Parameters:
document - - populated document containing the old and new accounts
user - - the user who is trying to possibly reopen the account
Returns:
true if: document is an edit document, old was closed and new is open, and the user is not one of the System Supervisors

hasTemporaryRestrictedStatusCodeButNoRestrictedStatusDate

protected boolean hasTemporaryRestrictedStatusCodeButNoRestrictedStatusDate(Account account)
This method tests whether a given account has the T - Temporary value for Restricted Status Code, but does not have a Restricted Status Date, which is required when the code is T.

Parameters:
account -
Returns:
true if the account is temporarily restricted but the status date is empty

hasDefaultRestrictedStatusCode

protected boolean hasDefaultRestrictedStatusCode(Account account)
Checks whether the account restricted status code is the default from the sub fund group.

Parameters:
account -
Returns:
true if the restricted status code is the same as the sub fund group's

checkGeneralRules

protected boolean checkGeneralRules(org.kuali.rice.kns.document.MaintenanceDocument maintenanceDocument)
This method checks some of the general business rules associated with this document Calls the following rules: accountNumberStartsWithAllowedPrefix isNonSystemSupervisorEditingAClosedAccount hasTemporaryRestrictedStatusCodeButNoRestrictedStatusDate checkFringeBenefitAccountRule checkUserStatusAndType (on fiscal officer, supervisor and manager) ensures that the fiscal officer, supervisor and manager are not the same isContinuationAccountExpired

Parameters:
maintenanceDocument -
Returns:
false on rules violation

isContinuationAccountExpired

protected boolean isContinuationAccountExpired(Account newAccount)
This method tests whether the continuation account entered (if any) has expired or not.

Parameters:
newAccount -
Returns:
true if continuation account has expired

checkFringeBenefitAccountRule

protected boolean checkFringeBenefitAccountRule(Account newAccount)
the fringe benefit account (otherwise known as the reportsToAccount) is required if the fringe benefit code is set to N. The fringe benefit code of the account designated to accept the fringes must be Y.

Parameters:
newAccount -
Returns:

isSupervisorSameAsFiscalOfficer

protected boolean isSupervisorSameAsFiscalOfficer(Account account)
This method is a helper method for checking if the supervisor user is the same as the fiscal officer Calls areTwoUsersTheSame(Person, Person)

Parameters:
accountGlobals -
Returns:
true if the two users are the same

isSupervisorSameAsManager

protected boolean isSupervisorSameAsManager(Account account)
This method is a helper method for checking if the supervisor user is the same as the manager Calls areTwoUsersTheSame(Person, Person)

Parameters:
accountGlobals -
Returns:
true if the two users are the same

areTwoUsersTheSame

protected boolean areTwoUsersTheSame(org.kuali.rice.kim.bo.Person user1,
                                     org.kuali.rice.kim.bo.Person user2)
This method checks to see if two users are the same Person using their identifiers

Parameters:
user1 -
user2 -
Returns:
true if these two users are the same

checkCloseAccount

protected boolean checkCloseAccount(org.kuali.rice.kns.document.MaintenanceDocument maintenanceDocument)
This method checks to see if the user is trying to close the account and if so if any rules are being violated Calls the additional rule checkAccountExpirationDateValidTodayOrEarlier

Parameters:
maintenanceDocument -
Returns:
false on rules violation

checkAccountExpirationDateValidTodayOrEarlier

protected boolean checkAccountExpirationDateValidTodayOrEarlier(Account newAccount)
This method checks to see if the account expiration date is today's date or earlier

Parameters:
newAccount -
Returns:
fails if the expiration date is null or after today's date

checkContractsAndGrants

protected boolean checkContractsAndGrants(org.kuali.rice.kns.document.MaintenanceDocument maintenanceDocument)
This method checks to see if any Contracts and Grants business rules were violated Calls the following sub-rules: checkCgRequiredFields checkCgIncomeStreamRequired

Parameters:
maintenanceDocument -
Returns:
false on rules violation

checkIncomeStreamValid

protected boolean checkIncomeStreamValid(Account newAccount)
This method checks to see if the income stream account is required

Parameters:
newAccount -
Returns:
fails if it is required and not entered, or not valid

checkCgRequiredFields

protected boolean checkCgRequiredFields(Account newAccount)
This method checks to make sure that if the contracts and grants fields are required they are entered correctly

Parameters:
newAccount -
Returns:

replaceTokens

protected String replaceTokens(String errorConstant)
This method is a helper method that replaces error tokens with values for contracts and grants labels

Parameters:
errorConstant -
Returns:
error string that has had tokens "{0}" and "{1}" replaced

checkContractControlAccountNumberRequired

protected boolean checkContractControlAccountNumberRequired(Account newAccount)
This method checks to make sure that if the contract control account exists it is the same as the Account that we are working on

Parameters:
newAccount -
Returns:
false if the contract control account is entered and is not the same as the account we are maintaining

checkExpirationDate

protected boolean checkExpirationDate(org.kuali.rice.kns.document.MaintenanceDocument maintenanceDocument)
This method checks to see if any expiration date field rules were violated

Parameters:
maintenanceDocument -
Returns:
false on rules violation

isUpdatedExpirationDateInvalid

protected boolean isUpdatedExpirationDateInvalid(org.kuali.rice.kns.document.MaintenanceDocument maintDoc)
This method checks to see if the new expiration date is different from the old expiration and if it has if it is invalid

Parameters:
maintDoc -
Returns:
true if expiration date has changed and is invalid

checkFundGroup

protected boolean checkFundGroup(org.kuali.rice.kns.document.MaintenanceDocument maintenanceDocument)
This method checks to see if any Fund Group rules were violated Specifically: if we are dealing with a "GF" (General Fund) we cannot have an account with a budget recording level of "M" (Mixed)

Parameters:
maintenanceDocument -
Returns:
false on rules violation

checkSubFundGroup

protected boolean checkSubFundGroup(org.kuali.rice.kns.document.MaintenanceDocument maintenanceDocument)
This method checks to see if any SubFund Group rules were violated Specifically: if SubFundGroup is empty or not "PFCMR" we cannot have a campus code or building code if SubFundGroup is "PFCMR" then campus code and building code "must" be entered and be valid codes

Parameters:
maintenanceDocument -
Returns:
false on rules violation

checkIncomeStreamAccountRule

protected boolean checkIncomeStreamAccountRule()
the income stream account is required if account's sub fund group code's fund group code is either GF or CG.

Parameters:
newAccount -
Returns:
true if fund group code (obtained through sub fund group) is in the system parameter INCOME_STREAM_ACCOUNT_REQUIRING_FUND_GROUPS (values GF;CG) else return false.

checkCGFieldNotFilledIn

protected boolean checkCGFieldNotFilledIn(Account account,
                                          String propertyName)
This method checks to see if the contracts and grants fields are filled in or not

Parameters:
account -
propertyName - - property to attach error to
Returns:
false if the contracts and grants fields are blank

checkUniqueAccountNumber

protected boolean checkUniqueAccountNumber(org.kuali.rice.kns.document.MaintenanceDocument maintenanceDocument)
This method checks to see if account is allowed to cross chart; and if not makes sure that the account number is unique in the whole system. This checking is only needed when adding a new account, since users are not allowed to change account numbers on editing.

Parameters:
maintenanceDocument -
Returns:
false on account-cross-chart rule violation

setGeneralLedgerPendingEntryService

public void setGeneralLedgerPendingEntryService(GeneralLedgerPendingEntryService generalLedgerPendingEntryService)
This method sets the generalLedgerPendingEntryService

Parameters:
generalLedgerPendingEntryService -

setBalanceService

public void setBalanceService(BalanceService balanceService)
This method sets the balanceService

Parameters:
balanceService -

setAccountService

public final void setAccountService(AccountService accountService)
Sets the accountService attribute value.

Parameters:
accountService - The accountService to set.

setContractsAndGrantsModuleService

public void setContractsAndGrantsModuleService(ContractsAndGrantsModuleService contractsAndGrantsModuleService)
Sets the contractsAndGrantsModuleService attribute value.

Parameters:
contractsAndGrantsModuleService - The contractsAndGrantsModuleService to set.

getSubFundGroupService

public SubFundGroupService getSubFundGroupService()

getParameterService

public org.kuali.rice.kns.service.ParameterService getParameterService()


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