|
||||||||||
| 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.DelegateGlobalRule
public class DelegateGlobalRule
This class executes specific rules for the DelegateGlobalMaintenanceDocument
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.kuali.kfs.coa.document.validation.impl.GlobalDocumentRuleBase |
|---|
GlobalDocumentRuleBase.CheckOnlyOneChartResult |
| Field Summary | |
|---|---|
protected static String |
DELEGATE_GLOBALS_PREFIX
|
protected static org.apache.log4j.Logger |
LOG
|
protected AccountDelegateGlobal |
newDelegateGlobal
|
protected static org.kuali.rice.kns.util.KualiDecimal |
ZERO
|
| 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 | |
|---|---|
DelegateGlobalRule()
|
|
| Method Summary | |
|---|---|
boolean |
checkAccountDetails(AccountGlobalDetail dtl)
This checks to make sure that each AccountGlobalDetail has a valid Account |
boolean |
checkAccountDetails(List<AccountGlobalDetail> details)
This checks to see if there are any accounts in the details collection if there are then it calls checkAccountDetails(AccountGlobalDetail) |
protected boolean |
checkDelegateDocumentTypeCode(String documentTypeCode,
FinancialSystemDocumentTypeService documentService)
Validates the document type code for the delegate, to make sure it is a Financial System document type code |
protected boolean |
checkDelegateFromAmtGreaterThanEqualZero(org.kuali.rice.kns.util.KualiDecimal fromAmount,
int lineNum,
boolean add)
This method checks to see if the from amount is greater than zero |
protected boolean |
checkDelegateToAmtGreaterThanFromAmt(org.kuali.rice.kns.util.KualiDecimal fromAmount,
org.kuali.rice.kns.util.KualiDecimal toAmount,
int lineNum,
boolean add)
This method checks to see if the to Amount is greater than the from amount |
protected boolean |
checkDelegateUserRules(org.kuali.rice.kns.document.MaintenanceDocument document,
AccountDelegateGlobalDetail delegateGlobal,
int lineNum,
boolean add)
This checks that the delegate for this Account exists and is valid (active and a professional) |
protected boolean |
checkForPrimaryDelegateAllLines()
This method will check through each delegate referenced in the DelegateGlobal to ensure that there is one and only primary for each account and doctype |
protected Integer |
checkPrimaryRoutePerDocType(AccountDelegateGlobalDetail delegateGlobalToTest,
List<AccountDelegateGlobalDetail> delegateGlobals,
Integer testLineNum)
This method validates the rule that says there can be only one PrimaryRoute delegate for each given docType. |
protected boolean |
checkPrimaryRouteRules(List<AccountDelegateGlobalDetail> delegateGlobals,
AccountDelegateGlobalDetail delegateGlobalToTest,
Integer lineNum,
boolean add)
This checks that the primary routing for delegates is correct, specifically that - there is not already a primary route delegate setup for this Account |
protected boolean |
checkSimpleRulesAllLines(org.kuali.rice.kns.document.MaintenanceDocument document)
This method checks the simple rules for all lines at once and gets called on save, submit, etc. |
boolean |
processCustomAddCollectionLineBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document,
String collectionName,
org.kuali.rice.kns.bo.PersistableBusinessObject bo)
This checks that when a new line is added (either AccountGlobalDetail or DelegateGlobalDetail) that the
appropriate rules are run on the new lines being added on AccountGlobalDetail: - make sure that the account number
and chart are entered
checkAccountDetails(AccountGlobalDetail)
on DelegateGlobalDetail
checkDelegateFromAmtGreaterThanEqualZero(KualiDecimal, int, boolean)
DelegateGlobalRule#checkDelegateForNullToAmount(KualiDecimal, KualiDecimal, int, boolean)
checkDelegateToAmtGreaterThanFromAmt(KualiDecimal, KualiDecimal, int, boolean)
DelegateGlobalRule#checkDelegateUserRules(DelegateGlobalDetail, int, boolean)
DelegateGlobalRule#checkPrimaryRouteRules(List, DelegateGlobalDetail, Integer, boolean)
|
protected boolean |
processCustomApproveDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document)
This checks some basic rules for document approval Specifically it calls the following: DelegateGlobalRule#checkSimpleRulesAllLines()
GlobalDocumentRuleBase.checkOnlyOneChartErrorWrapper(List)
checkForPrimaryDelegateAllLines()
fails if any rules fail |
protected boolean |
processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document)
This checks some basic rules for document routing Specifically it calls the following: DelegateGlobalRule#checkSimpleRulesAllLines()
checkAccountDetails(List)
checkForPrimaryDelegateAllLines()
fails if any rules fail |
protected boolean |
processCustomSaveDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document)
This checks some basic rules for document saving Specifically it calls the following: DelegateGlobalRule#checkSimpleRulesAllLines()
GlobalDocumentRuleBase.checkOnlyOneChartErrorWrapper(List)
checkForPrimaryDelegateAllLines()
fails if any rules fail |
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.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, 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 org.kuali.rice.kns.util.KualiDecimal ZERO
protected AccountDelegateGlobal newDelegateGlobal
protected static final String DELEGATE_GLOBALS_PREFIX
| Constructor Detail |
|---|
public DelegateGlobalRule()
| 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 processCustomApproveDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document)
DelegateGlobalRule#checkSimpleRulesAllLines()GlobalDocumentRuleBase.checkOnlyOneChartErrorWrapper(List)checkForPrimaryDelegateAllLines()
processCustomApproveDocumentBusinessRules in class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBaseMaintenanceDocumentRuleBase.processCustomApproveDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument)protected boolean processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document)
DelegateGlobalRule#checkSimpleRulesAllLines()checkAccountDetails(List)checkForPrimaryDelegateAllLines()
processCustomRouteDocumentBusinessRules in class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBaseMaintenanceDocumentRuleBase.processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument)protected boolean processCustomSaveDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document)
DelegateGlobalRule#checkSimpleRulesAllLines()GlobalDocumentRuleBase.checkOnlyOneChartErrorWrapper(List)checkForPrimaryDelegateAllLines()
processCustomSaveDocumentBusinessRules in class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBaseMaintenanceDocumentRuleBase.processCustomSaveDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument)public boolean checkAccountDetails(List<AccountGlobalDetail> details)
checkAccountDetails(AccountGlobalDetail)
details - - collection of AccountGlobalDetails
AccountGlobalDetail failpublic boolean checkAccountDetails(AccountGlobalDetail dtl)
AccountGlobalDetail has a valid Account
dtl - - the AccountGlobalDetail
Accountprotected boolean checkSimpleRulesAllLines(org.kuali.rice.kns.document.MaintenanceDocument document)
DelegateGlobalRule#checkDelegateUserRules(DelegateGlobalDetail, int, boolean)DelegateGlobalRule#checkDelegateForNullToAmount(KualiDecimal, KualiDecimal, int, boolean)checkDelegateToAmtGreaterThanFromAmt(KualiDecimal, KualiDecimal, int, boolean)checkDelegateFromAmtGreaterThanEqualZero(KualiDecimal, int, boolean)DelegateGlobalRule#checkPrimaryRouteRules(List, DelegateGlobalDetail, Integer, boolean)
protected boolean checkForPrimaryDelegateAllLines()
protected boolean checkDelegateFromAmtGreaterThanEqualZero(org.kuali.rice.kns.util.KualiDecimal fromAmount,
int lineNum,
boolean add)
fromAmount - lineNum -
protected boolean checkDelegateToAmtGreaterThanFromAmt(org.kuali.rice.kns.util.KualiDecimal fromAmount,
org.kuali.rice.kns.util.KualiDecimal toAmount,
int lineNum,
boolean add)
fromAmount - toAmount - lineNum -
protected boolean checkDelegateDocumentTypeCode(String documentTypeCode,
FinancialSystemDocumentTypeService documentService)
documentTypeCode - the document type code to checkdelegateService - a helpful instance of the delegate service, so new ones don't have to be created all the time
protected Integer checkPrimaryRoutePerDocType(AccountDelegateGlobalDetail delegateGlobalToTest,
List<AccountDelegateGlobalDetail> delegateGlobals,
Integer testLineNum)
delegateGlobalToTest - A delegateGlobal line that you want to test against the list.delegateGlobals - A List of delegateGlobal items that is being tested against.
protected boolean checkPrimaryRouteRules(List<AccountDelegateGlobalDetail> delegateGlobals,
AccountDelegateGlobalDetail delegateGlobalToTest,
Integer lineNum,
boolean add)
Account
delegateGlobals - delegateGlobalToTest - lineNum - add -
protected boolean checkDelegateUserRules(org.kuali.rice.kns.document.MaintenanceDocument document,
AccountDelegateGlobalDetail delegateGlobal,
int lineNum,
boolean add)
Account exists and is valid (active and a professional)
delegateGlobal - lineNum - add -
Account doesn't exist or isn't valid
public boolean processCustomAddCollectionLineBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document,
String collectionName,
org.kuali.rice.kns.bo.PersistableBusinessObject bo)
AccountGlobalDetail or DelegateGlobalDetail) that the
appropriate rules are run on the new lines being added on AccountGlobalDetail: - make sure that the account number
and chart are entered
on DelegateGlobalDetail
checkDelegateFromAmtGreaterThanEqualZero(KualiDecimal, int, boolean)DelegateGlobalRule#checkDelegateForNullToAmount(KualiDecimal, KualiDecimal, int, boolean)checkDelegateToAmtGreaterThanFromAmt(KualiDecimal, KualiDecimal, int, boolean)DelegateGlobalRule#checkDelegateUserRules(DelegateGlobalDetail, int, boolean)DelegateGlobalRule#checkPrimaryRouteRules(List, DelegateGlobalDetail, Integer, boolean)
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)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||