public class DelegateGlobalRule extends GlobalDocumentRuleBase
DelegateGlobalMaintenanceDocumentGlobalDocumentRuleBase.CheckOnlyOneChartResult| Modifier and Type | Field and Description |
|---|---|
protected static String |
DELEGATE_GLOBALS_PREFIX |
protected static org.apache.log4j.Logger |
LOG |
protected AccountDelegateGlobal |
newDelegateGlobal |
protected static org.kuali.rice.core.api.util.type.KualiDecimal |
ZERO |
financialSystemUserService, personServiceboDictionaryService, boService, businessObjectAuthorizationService, businessObjectMetaDataService, configService, dataObjectMetaDataService, ddService, dictionaryValidationService, DOCUMENT_ERROR_PREFIX, documentHelperService, MAINTAINABLE_ERROR_PATH, MAINTAINABLE_ERROR_PREFIX, maintDocDictionaryService, persistenceStructureService, priorErrorPath, roleService, workflowDocumentService| Constructor and Description |
|---|
DelegateGlobalRule() |
| Modifier and Type | Method and Description |
|---|---|
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.core.api.util.type.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.core.api.util.type.KualiDecimal fromAmount,
org.kuali.rice.core.api.util.type.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.krad.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.
|
checkOnlyOneChart, checkOnlyOneChartAddLine, checkOnlyOneChartAddLineErrorWrapper, checkOnlyOneChartErrorWrappergetFinancialSystemUserService, getKfsUserServicecheckEmptyBOField, checkEmptyDocumentField, checkEmptyValue, checkForPartiallyFilledOutReferenceForeignKeys, clearErrorPath, consolidateFieldNames, dataDictionaryValidate, errorAlreadyExists, getBoService, getConfigService, getDataObjectMetaDataService, getDateTimeService, getDdService, getDictionaryValidationService, getDocumentHelperService, getFieldLabel, getFieldLabel, getHumanReadablePrimaryKeyFieldNames, getMaintDocDictionaryService, getNewBo, getOldBo, 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, setBusinessObjectMetaDataService, setConfigService, setDataObjectMetaDataService, setDdService, setDictionaryValidationService, setDocumentHelperService, setMaintDocDictionaryService, setNewBo, setPersistenceStructureService, setPersonService, setupBaseConvenienceObjects, setWorkflowDocumentService, showErrorMap, validateDocumentStructure, validateDuplicateIdentifierInDataDictionary, validateGlobalBusinessObjectPersistable, validateMaintenanceDocumentbuildDocumentTypeActionRequestPermissionDetails, buildDocumentTypePermissionDetails, getDataDictionaryService, getDocumentDictionaryService, getGroupService, getKualiConfigurationService, getMaxDictionaryValidationDepth, getPermissionService, hasAdHocRouteCompletion, isAddHocRoutePersonValid, isAddHocRouteWorkgroupValid, isAdHocRouteCompletionToInitiator, isAdHocRouteRecipientsValid, isDocumentAttributesValid, isDocumentOverviewValid, isNoteValid, processAddAdHocRoutePerson, processAddAdHocRouteWorkgroup, processAddNote, processCompleteDocument, processCustomAddAdHocRoutePersonBusinessRules, processCustomAddAdHocRouteWorkgroupBusinessRules, processCustomAddNoteBusinessRules, processCustomApproveDocumentBusinessRules, processCustomCompleteDocumentBusinessRules, processCustomRouteDocumentBusinessRules, processCustomSaveDocumentBusinessRules, processCustomSendAdHocRequests, processSendAdHocRequests, setDocumentDictionaryService, setMaxDictionaryValidationDepth, useKimPermission, validateSensitiveDataValueprotected static org.apache.log4j.Logger LOG
protected static final org.kuali.rice.core.api.util.type.KualiDecimal ZERO
protected AccountDelegateGlobal newDelegateGlobal
protected static final String DELEGATE_GLOBALS_PREFIX
public DelegateGlobalRule()
public void setupConvenienceObjects()
setupConvenienceObjects in interface org.kuali.rice.kns.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 AccountGlobalDetailsAccountGlobalDetail failpublic boolean checkAccountDetails(AccountGlobalDetail dtl)
AccountGlobalDetail has a valid Accountdtl - - the AccountGlobalDetailAccountprotected 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.core.api.util.type.KualiDecimal fromAmount, int lineNum, boolean add)
fromAmount - lineNum - protected boolean checkDelegateToAmtGreaterThanFromAmt(org.kuali.rice.core.api.util.type.KualiDecimal fromAmount, org.kuali.rice.core.api.util.type.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 timeprotected 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)
AccountdelegateGlobals - 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 validpublic boolean processCustomAddCollectionLineBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document, String collectionName, org.kuali.rice.krad.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.krad.bo.PersistableBusinessObject)Copyright © 2004-2014 The Kuali Foundation. All Rights Reserved.