| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.kuali.rice.kns.rules.DocumentRuleBase
org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase
org.kuali.kfs.sys.document.validation.impl.KfsMaintenanceDocumentRuleBase
org.kuali.kfs.coa.document.validation.impl.GlobalDocumentRuleBase
org.kuali.kfs.coa.document.validation.impl.AccountGlobalRule
public class AccountGlobalRule
This class represents the business rules for the maintenance of AccountGlobal business objects
| Nested Class Summary | 
|---|
| Nested classes/interfaces inherited from class org.kuali.kfs.coa.document.validation.impl.GlobalDocumentRuleBase | 
|---|
| GlobalDocumentRuleBase.CheckOnlyOneChartResult | 
| Field Summary | |
|---|---|
| protected static String | ENDOWMENT_FUND_CD | 
| protected static String | GENERAL_FUND_CD | 
| protected static org.apache.log4j.Logger | LOG | 
| protected  AccountGlobal | newAccountGlobal | 
| 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 String | SUB_FUND_GROUP_MEDICAL_PRACTICE_FUNDS | 
| protected  Timestamp | today | 
| 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 | |
|---|---|
| AccountGlobalRule() | |
| Method Summary | |
|---|---|
| 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 | 
|  boolean | checkAccountDetails(AccountGlobalDetail dtl)This method ensures that each AccountGlobalDetailis valid and has a valid account number | 
|  boolean | checkAccountDetails(org.kuali.rice.kns.document.MaintenanceDocument document,
                                       List<AccountGlobalDetail> details)This method loops through the list of AccountGlobalDetails and passes them off to checkAccountDetails for further
 rule analysis One rule it does check is checkOnlyOneChartErrorWrapper | 
| protected  boolean | checkAccountUsers(AccountGlobalDetail detail,
                                   org.kuali.rice.kim.bo.Person newFiscalOfficer,
                                   org.kuali.rice.kim.bo.Person newManager,
                                   org.kuali.rice.kim.bo.Person newSupervisor,
                                   int index)This method checks that the new users (fiscal officer, supervisor, manager) are not the same individual for the Accountbeing changed (contained in theAccountGlobalDetail) | 
| protected  boolean | checkAllAccountUsers(AccountGlobal doc,
                                         org.kuali.rice.kim.bo.Person newFiscalOfficer,
                                         org.kuali.rice.kim.bo.Person newManager,
                                         org.kuali.rice.kim.bo.Person newSupervisor)This method checks to make sure that if the users are filled out (fiscal officer, supervisor, manager) that they are not the same individual Only need to check this if these are new users that override existing users on the Accountobject | 
| protected  boolean | checkCgIncomeStreamRequired(AccountGlobal accountGlobals)This method checks to see if the contracts and grants income stream account is required | 
| protected  boolean | checkContinuationAccount(org.kuali.rice.kns.document.MaintenanceDocument document,
                                                 Date newExpDate)This method validates that a continuation account is required and that the values provided exist | 
| protected  boolean | checkContractsAndGrants()This method checks to see if any Contracts and Grants business rules were violated | 
| protected  boolean | checkEmptyValues()This method checks the basic rules for empty reference key values on a continuation account and an income stream account | 
| protected  boolean | checkExpirationDate(org.kuali.rice.kns.document.MaintenanceDocument maintenanceDocument)This method checks to see if any expiration date field rules were violated Loops through each detail object and calls checkExpirationDate(MaintenanceDocument, AccountGlobalDetail) | 
| protected  boolean | checkExpirationDate(org.kuali.rice.kns.document.MaintenanceDocument maintenanceDocument,
                                       AccountGlobalDetail detail)This method checks to see if any expiration date field rules were violated in relation to the given detail record | 
| protected  boolean | checkGeneralRules(org.kuali.rice.kns.document.MaintenanceDocument maintenanceDocument)This method checks some of the general business rules associated with this document Such as: valid user for fiscal officer, supervisor or account manager (and not the same individual) are they trying to use an expired continuation account | 
| protected  boolean | checkOrganizationValidity(AccountGlobal acctGlobal)Validate that the object code on the form (if entered) is valid for all charts used in the detail sections. | 
| protected  boolean | isContinuationAccountExpired(AccountGlobal accountGlobals)This method tests whether the continuation account entered (if any) has expired or not. | 
| protected  boolean | isSupervisorSameAsFiscalOfficer(AccountGlobal accountGlobals)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(AccountGlobal accountGlobals)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(Account oldAccount,
                                                             AccountGlobal newAccountGlobal)This method checks to see if the updated expiration is not a valid one Only gets checked for specific SubFundGroups | 
|  boolean | processCustomAddCollectionLineBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document,
                                                                                       String collectionName,
                                                                                       org.kuali.rice.kns.bo.PersistableBusinessObject bo)This method calls checkAccountDetails checkExpirationDate checkOnlyOneChartAddLineErrorWrapper whenever a new AccountGlobalDetailis added to this global | 
| protected  boolean | processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document)This method checks the following rules: checkEmptyValues checkGeneralRules checkContractsAndGrants checkExpirationDate checkOnlyOneChartErrorWrapper checkFiscalOfficerIsValidKualiUser but does fail if any of these rule checks fail | 
| protected  boolean | processCustomSaveDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document)This method checks the following rules: checkEmptyValues checkGeneralRules checkContractsAndGrants checkExpirationDate checkOnlyOneChartErrorWrapper checkFiscalOfficerIsValidKualiUser but does not fail if any of them fail (this only happens on routing) | 
|  void | setupConvenienceObjects()This method sets the convenience objects like newAccountGlobal 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.coa.document.validation.impl.GlobalDocumentRuleBase | 
|---|
| checkOnlyOneChart, checkOnlyOneChartAddLine, checkOnlyOneChartAddLineErrorWrapper, checkOnlyOneChartErrorWrapper | 
| 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, 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 | 
|---|
protected static org.apache.log4j.Logger LOG
protected static final String GENERAL_FUND_CD
protected static final String RESTRICTED_FUND_CD
protected static final String ENDOWMENT_FUND_CD
protected static final String PLANT_FUND_CD
protected static final String RESTRICTED_CD_RESTRICTED
protected static final String RESTRICTED_CD_UNRESTRICTED
protected static final String RESTRICTED_CD_TEMPORARILY_RESTRICTED
protected static final String SUB_FUND_GROUP_MEDICAL_PRACTICE_FUNDS
protected AccountGlobal newAccountGlobal
protected Timestamp today
| Constructor Detail | 
|---|
public AccountGlobalRule()
| Method Detail | 
|---|
public void setupConvenienceObjects()
setupConvenienceObjects in interface org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRulesetupConvenienceObjects in class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBaseprotected boolean processCustomSaveDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document)
processCustomSaveDocumentBusinessRules in class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBaseMaintenanceDocumentRuleBase.processCustomSaveDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument)protected boolean processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document)
processCustomRouteDocumentBusinessRules in class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBaseMaintenanceDocumentRuleBase.processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument)
public boolean checkAccountDetails(org.kuali.rice.kns.document.MaintenanceDocument document,
                                   List<AccountGlobalDetail> details)
AccountGlobalDetails and passes them off to checkAccountDetails for further
 rule analysis One rule it does check is checkOnlyOneChartErrorWrapper
document - details - 
AccountGlobalDetails passes the sub-rulespublic boolean checkAccountDetails(AccountGlobalDetail dtl)
AccountGlobalDetail is valid and has a valid account number
dtl - 
protected boolean checkEmptyValues()
protected boolean checkGeneralRules(org.kuali.rice.kns.document.MaintenanceDocument maintenanceDocument)
maintenanceDocument - 
protected boolean checkAllAccountUsers(AccountGlobal doc,
                                       org.kuali.rice.kim.bo.Person newFiscalOfficer,
                                       org.kuali.rice.kim.bo.Person newManager,
                                       org.kuali.rice.kim.bo.Person newSupervisor)
Account object
doc - newFiscalOfficer - newManager - newSupervisor - 
protected boolean checkAccountUsers(AccountGlobalDetail detail,
                                    org.kuali.rice.kim.bo.Person newFiscalOfficer,
                                    org.kuali.rice.kim.bo.Person newManager,
                                    org.kuali.rice.kim.bo.Person newSupervisor,
                                    int index)
Account being changed (contained in the AccountGlobalDetail)
detail - - where the Account information is storednewFiscalOfficer - newManager - newSupervisor - index - - for storing the error line
protected boolean isSupervisorSameAsFiscalOfficer(AccountGlobal accountGlobals)
areTwoUsersTheSame(Person, Person)
accountGlobals - 
protected boolean isSupervisorSameAsManager(AccountGlobal accountGlobals)
areTwoUsersTheSame(Person, Person)
accountGlobals - 
protected boolean areTwoUsersTheSame(org.kuali.rice.kim.bo.Person user1,
                                     org.kuali.rice.kim.bo.Person user2)
user1 - user2 - 
protected boolean checkExpirationDate(org.kuali.rice.kns.document.MaintenanceDocument maintenanceDocument)
checkExpirationDate(MaintenanceDocument, AccountGlobalDetail)
maintenanceDocument - 
protected boolean checkExpirationDate(org.kuali.rice.kns.document.MaintenanceDocument maintenanceDocument,
                                      AccountGlobalDetail detail)
maintenanceDocument - detail - - the account detail we are investigating
protected boolean isUpdatedExpirationDateInvalid(Account oldAccount,
                                                 AccountGlobal newAccountGlobal)
SubFundGroups
oldAccount - newAccountGlobal - 
protected boolean isContinuationAccountExpired(AccountGlobal accountGlobals)
accountGlobals - 
protected boolean checkContractsAndGrants()
protected boolean checkCgIncomeStreamRequired(AccountGlobal accountGlobals)
accountGlobals - 
public boolean processCustomAddCollectionLineBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document,
                                                           String collectionName,
                                                           org.kuali.rice.kns.bo.PersistableBusinessObject bo)
AccountGlobalDetail is added to this global
processCustomAddCollectionLineBusinessRules in class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBaseMaintenanceDocumentRuleBase.processCustomAddCollectionLineBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument,
      java.lang.String, org.kuali.rice.kns.bo.PersistableBusinessObject)
protected boolean checkContinuationAccount(org.kuali.rice.kns.document.MaintenanceDocument document,
                                           Date newExpDate)
document - An instance of the maintenance document being validated.newExpDate - The expiration date assigned to the account being validated for submission.
protected boolean checkOrganizationValidity(AccountGlobal acctGlobal)
acctGlobal - 
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||