public class AccountRule extends IndirectCostRecoveryAccountsRule
Modifier and Type | Field and Description |
---|---|
protected AccountService |
accountService |
protected static String |
ACCT_CAPITAL_SUBFUNDGROUP |
protected static String |
ACCT_PREFIX_RESTRICTION |
protected BalanceService |
balanceService |
protected ContractsAndGrantsModuleService |
contractsAndGrantsModuleService |
protected EncumbranceService |
encumbranceService |
protected GeneralLedgerPendingEntryService |
generalLedgerPendingEntryService |
protected static org.apache.log4j.Logger |
LOG |
protected Account |
newAccount |
protected Account |
oldAccount |
protected static org.kuali.rice.coreservice.framework.parameter.ParameterService |
parameterService |
protected static String |
RESTRICTED_CD_TEMPORARILY_RESTRICTED
Deprecated.
|
protected static SubFundGroupService |
subFundGroupService |
BD100, boFieldPath
financialSystemUserService, personService
Constructor and Description |
---|
AccountRule() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
accountNumberStartsWithAllowedPrefix(String accountNumber,
Collection<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.api.identity.Person user1,
org.kuali.rice.kim.api.identity.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 |
checkAccountRestrictedStatusDateIsGreaterThanCurrentDate()
This method is modified for jira OLE-2356
This method checks whether AccountRestrictedStatusDate is GreaterThan Currentdate or not displays error message if date is null or lessthan currentdate.
|
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.krad.maintenance.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.krad.maintenance.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.krad.maintenance.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
|
protected boolean |
checkExpirationDate(org.kuali.rice.krad.maintenance.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.krad.maintenance.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.krad.maintenance.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 |
checkOpenEncumbrances() |
protected boolean |
checkSubFundGroup(org.kuali.rice.krad.maintenance.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.krad.maintenance.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.
|
protected boolean |
checkVendorNameForSubFundGroup(org.kuali.rice.krad.maintenance.MaintenanceDocument maintenanceDocument)
This method checks whether the sun fund group is associated with the vendor name or not
|
EncumbranceService |
getEncumbranceService() |
org.kuali.rice.coreservice.framework.parameter.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 |
hasTemporaryRestrictedStatusCodeButRestrictedStatusDateisGreaterThanCurrentDate(Account account)
This method is called by AccountRuleTest.testHasTemporaryRestrictedStatusCodeButRestrictedStatusDateisGreaterThanCurrentDate for checking
AccountStatusDate is greaterThan or Lessthan for T-Restricted Accounts.
|
protected boolean |
isAccountAndContinuationAccountAreSame(Account newAccount)
This method tests whether the account and continuation account are same.
|
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.krad.maintenance.MaintenanceDocument document,
org.kuali.rice.kim.api.identity.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.krad.maintenance.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.krad.maintenance.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.krad.maintenance.MaintenanceDocument document)
This method calls the route rules but does not fail if any of them fail (this only happens on routing)
|
protected void |
refreshSubObjects(Account account)
Refreshes the references of account
|
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.
|
boolean |
validateSufficientFundCheckTab() |
checkICRCollectionExist, checkICRCollectionExistWithErrorMessage, checkIndirectCostRecoveryAccount, checkIndirectCostRecoveryAccount, checkIndirectCostRecoveryAccountDistributions, getActiveIndirectCostRecoveryAccountList, getBoFieldPath, getDDAttributeLabel, processCustomAddCollectionLineBusinessRules, processCustomRouteDocumentBusinessRules, setActiveIndirectCostRecoveryAccountList, setBoFieldPath
getFinancialSystemUserService, getKfsUserService
checkEmptyBOField, checkEmptyDocumentField, checkEmptyValue, checkForPartiallyFilledOutReferenceForeignKeys, clearErrorPath, consolidateFieldNames, dataDictionaryValidate, errorAlreadyExists, getConfigService, getDataObjectAuthorizationService, getDataObjectService, getDateTimeService, getDdService, getDictionaryValidationService, getFieldLabel, getFieldLabel, getHumanReadablePrimaryKeyFieldNames, getNewDataObject, getOldDataObject, getPersonService, getRoleService, getWorkflowDocumentService, isCorrectMaintenanceClass, isDocumentInactivatingBusinessObject, isDocumentValidForSave, primaryKeyCheck, processAddCollectionLine, processApproveDocument, processCustomAddCollectionLineBusinessRules, processCustomApproveDocumentBusinessRules, processGlobalApproveDocumentBusinessRules, processGlobalRouteDocumentBusinessRules, processGlobalSaveDocumentBusinessRules, processInactivationBlockChecking, processInactivationBlockChecking, processRouteDocument, processSaveDocument, putDocumentError, putDocumentError, putFieldError, putFieldError, putFieldError, putFieldErrorWithShortLabel, putGlobalError, putGlobalError, putGlobalError, putGlobalsError, putGlobalsError, putInactivationBlockingErrorOnPage, resumeErrorPath, setConfigService, setDataObjectAuthorizationService, setDdService, setDictionaryValidationService, setNewDataObject, setPersonService, setupBaseConvenienceObjects, setWorkflowDocumentService, showErrorMap, validateBulkUpdateMaintenanceDocument, validateDocumentStructure, validateMaintenanceDocument
buildDocumentTypeActionRequestPermissionDetails, buildDocumentTypePermissionDetails, getDataDictionaryService, getDocumentDictionaryService, getGroupService, getKualiConfigurationService, getMaxDictionaryValidationDepth, getPermissionService, hasAdHocRouteCompletion, isAddHocRoutePersonValid, isAddHocRouteWorkgroupValid, isAdHocRouteCompletionToInitiator, isAdHocRouteRecipientsValid, isDocumentAttributesValid, isDocumentOverviewValid, isNoteValid, processAddAdHocRoutePerson, processAddAdHocRouteWorkgroup, processAddNote, processCompleteDocument, processCustomAddAdHocRoutePersonBusinessRules, processCustomAddAdHocRouteWorkgroupBusinessRules, processCustomAddCollectionLineBusinessRules, processCustomAddNoteBusinessRules, processCustomApproveDocumentBusinessRules, processCustomCompleteDocumentBusinessRules, processCustomRouteDocumentBusinessRules, processCustomSaveDocumentBusinessRules, processCustomSendAdHocRequests, processSendAdHocRequests, setDocumentDictionaryService, setMaxDictionaryValidationDepth, useKimPermission, validateSensitiveDataValue
protected static final org.apache.log4j.Logger LOG
protected static final String ACCT_PREFIX_RESTRICTION
protected static final String ACCT_CAPITAL_SUBFUNDGROUP
@Deprecated protected static final String RESTRICTED_CD_TEMPORARILY_RESTRICTED
protected static SubFundGroupService subFundGroupService
protected static org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService
protected EncumbranceService encumbranceService
protected GeneralLedgerPendingEntryService generalLedgerPendingEntryService
protected BalanceService balanceService
protected AccountService accountService
protected ContractsAndGrantsModuleService contractsAndGrantsModuleService
protected Account oldAccount
protected Account newAccount
public AccountRule()
public void setupConvenienceObjects()
setupConvenienceObjects
in interface org.kuali.rice.krad.rules.MaintenanceDocumentRule
setupConvenienceObjects
in class org.kuali.rice.krad.rules.MaintenanceDocumentRuleBase
protected void refreshSubObjects(Account account)
account
- Accountprotected boolean processCustomSaveDocumentBusinessRules(org.kuali.rice.krad.maintenance.MaintenanceDocument document)
processCustomSaveDocumentBusinessRules
in class org.kuali.rice.krad.rules.MaintenanceDocumentRuleBase
MaintenanceDocumentRuleBase.processCustomSaveDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument)
protected boolean processCustomRouteDocumentBusinessRules(org.kuali.rice.krad.maintenance.MaintenanceDocument document)
processCustomRouteDocumentBusinessRules
in class org.kuali.rice.krad.rules.MaintenanceDocumentRuleBase
MaintenanceDocumentRuleBase.processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument)
protected boolean checkEmptyValues(org.kuali.rice.krad.maintenance.MaintenanceDocument maintenanceDocument)
maintenanceDocument
- protected boolean checkAccountGuidelinesValidation(AccountGuideline accountGuideline)
accountGuideline
- protected boolean areGuidelinesRequired(Account account)
account
- - the populated Account bo to be evaluatedprotected boolean accountNumberStartsWithAllowedPrefix(String accountNumber, Collection<String> illegalValues)
accountNumber
- - The Account Number to be tested.illegalValues
- - An Array of Strings of the unallowable prefixes.protected boolean isNonSystemSupervisorEditingAClosedAccount(org.kuali.rice.krad.maintenance.MaintenanceDocument document, org.kuali.rice.kim.api.identity.Person user)
document
- - populated document containing the old and new accountsuser
- - the user who is trying to possibly reopen the accountprotected boolean hasTemporaryRestrictedStatusCodeButNoRestrictedStatusDate(Account account)
account
- protected boolean hasTemporaryRestrictedStatusCodeButRestrictedStatusDateisGreaterThanCurrentDate(Account account)
account
- protected boolean hasDefaultRestrictedStatusCode(Account account)
account
- protected boolean checkGeneralRules(org.kuali.rice.krad.maintenance.MaintenanceDocument maintenanceDocument)
maintenanceDocument
- protected boolean isAccountAndContinuationAccountAreSame(Account newAccount)
newAccount
- protected boolean isContinuationAccountExpired(Account newAccount)
newAccount
- protected boolean checkFringeBenefitAccountRule(Account newAccount)
newAccount
- protected boolean isSupervisorSameAsFiscalOfficer(Account account)
areTwoUsersTheSame(Person, Person)
accountGlobals
- protected boolean isSupervisorSameAsManager(Account account)
areTwoUsersTheSame(Person, Person)
accountGlobals
- protected boolean areTwoUsersTheSame(org.kuali.rice.kim.api.identity.Person user1, org.kuali.rice.kim.api.identity.Person user2)
user1
- user2
- protected boolean checkCloseAccount(org.kuali.rice.krad.maintenance.MaintenanceDocument maintenanceDocument)
maintenanceDocument
- protected boolean checkAccountExpirationDateValidTodayOrEarlier(Account newAccount)
newAccount
- protected boolean checkContractsAndGrants(org.kuali.rice.krad.maintenance.MaintenanceDocument maintenanceDocument)
maintenanceDocument
- protected boolean checkIncomeStreamValid(Account newAccount)
newAccount
- protected boolean checkCgRequiredFields(Account newAccount)
newAccount
- protected String replaceTokens(String errorConstant)
errorConstant
- protected boolean checkContractControlAccountNumberRequired(Account newAccount)
newAccount
- protected boolean checkExpirationDate(org.kuali.rice.krad.maintenance.MaintenanceDocument maintenanceDocument)
maintenanceDocument
- protected boolean isUpdatedExpirationDateInvalid(org.kuali.rice.krad.maintenance.MaintenanceDocument maintDoc)
maintDoc
- protected boolean checkFundGroup(org.kuali.rice.krad.maintenance.MaintenanceDocument maintenanceDocument)
maintenanceDocument
- protected boolean checkSubFundGroup(org.kuali.rice.krad.maintenance.MaintenanceDocument maintenanceDocument)
maintenanceDocument
- protected boolean checkVendorNameForSubFundGroup(org.kuali.rice.krad.maintenance.MaintenanceDocument maintenanceDocument)
maintenanceDocument
- protected boolean checkIncomeStreamAccountRule()
newAccount
- protected boolean checkCGFieldNotFilledIn(Account account, String propertyName)
account
- propertyName
- - property to attach error toprotected boolean checkUniqueAccountNumber(org.kuali.rice.krad.maintenance.MaintenanceDocument maintenanceDocument)
maintenanceDocument
- protected boolean checkOpenEncumbrances()
protected boolean checkAccountRestrictedStatusDateIsGreaterThanCurrentDate()
public void setGeneralLedgerPendingEntryService(GeneralLedgerPendingEntryService generalLedgerPendingEntryService)
generalLedgerPendingEntryService
- public void setBalanceService(BalanceService balanceService)
balanceService
- public final void setAccountService(AccountService accountService)
accountService
- The accountService to set.public void setContractsAndGrantsModuleService(ContractsAndGrantsModuleService contractsAndGrantsModuleService)
contractsAndGrantsModuleService
- The contractsAndGrantsModuleService to set.public SubFundGroupService getSubFundGroupService()
public org.kuali.rice.coreservice.framework.parameter.ParameterService getParameterService()
public EncumbranceService getEncumbranceService()
public boolean validateSufficientFundCheckTab()
Copyright © 2004–2014 The Kuali Foundation. All rights reserved.