| org.kuali.module.chart.rules.GlobalDocumentRuleBase org.kuali.module.chart.rules.DelegateGlobalRule
DelegateGlobalRule | public class DelegateGlobalRule extends GlobalDocumentRuleBase (Code) | | This class executes specific rules for the
DelegateGlobalMaintenanceDocument |
Field Summary | |
protected static org.apache.log4j.Logger | LOG |
Method Summary | |
public boolean | checkAccountDetails(List<AccountGlobalDetail> details) | public boolean | checkAccountDetails(AccountGlobalDetail dtl) | protected boolean | checkDelegateForNullToAmount(KualiDecimal fromAmount, KualiDecimal toAmount, int lineNum, boolean add) | protected boolean | checkDelegateFromAmtGreaterThanEqualZero(KualiDecimal fromAmount, int lineNum, boolean add) | protected boolean | checkDelegateToAmtGreaterThanFromAmt(KualiDecimal fromAmount, KualiDecimal toAmount, int lineNum, boolean add) | protected boolean | checkDelegateUserRules(DelegateGlobalDetail delegateGlobal, int lineNum, boolean add) | protected boolean | checkForPrimaryDelegateAllLines() | protected Integer | checkPrimaryRouteOnlyAllowOneAllDocType(DelegateGlobalDetail delegateGlobalToTest, List<DelegateGlobalDetail> delegateGlobals, Integer testLineNum) This method validates the rule that says there can be only one PrimaryRoute delegate on a Global Delegate document if the
docType is ALL. | protected Integer | checkPrimaryRoutePerDocType(DelegateGlobalDetail delegateGlobalToTest, List<DelegateGlobalDetail> 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<DelegateGlobalDetail> delegateGlobals, DelegateGlobalDetail delegateGlobalToTest, Integer lineNum, boolean add) | protected boolean | checkSimpleRulesAllLines() This method checks the simple rules for all lines at once and gets called on save, submit, etc. | public boolean | processCustomAddCollectionLineBusinessRules(MaintenanceDocument document, String collectionName, PersistableBusinessObject bo) | protected boolean | processCustomApproveDocumentBusinessRules(MaintenanceDocument document) | protected boolean | processCustomRouteDocumentBusinessRules(MaintenanceDocument document) | protected boolean | processCustomSaveDocumentBusinessRules(MaintenanceDocument document) | 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. |
LOG | protected static org.apache.log4j.Logger LOG(Code) | | |
DelegateGlobalRule | public DelegateGlobalRule()(Code) | | |
checkDelegateForNullToAmount | protected boolean checkDelegateForNullToAmount(KualiDecimal fromAmount, KualiDecimal toAmount, int lineNum, boolean add)(Code) | | This method checks to see if the from amount is not null and the to amount is null
Parameters: fromAmount - Parameters: toAmount - Parameters: lineNum - false if from amount valid and to amount are null |
checkDelegateFromAmtGreaterThanEqualZero | protected boolean checkDelegateFromAmtGreaterThanEqualZero(KualiDecimal fromAmount, int lineNum, boolean add)(Code) | | This method checks to see if the from amount is greater than zero
Parameters: fromAmount - Parameters: lineNum - false if from amount less than zero |
checkDelegateToAmtGreaterThanFromAmt | protected boolean checkDelegateToAmtGreaterThanFromAmt(KualiDecimal fromAmount, KualiDecimal toAmount, int lineNum, boolean add)(Code) | | This method checks to see if the to Amount is greater than the from amount
Parameters: fromAmount - Parameters: toAmount - Parameters: lineNum - false if to amount less than from amount |
checkDelegateUserRules | protected boolean checkDelegateUserRules(DelegateGlobalDetail delegateGlobal, int lineNum, boolean add)(Code) | | This checks that the delegate for this
Account exists and is valid (active and a professional)
Parameters: delegateGlobal - Parameters: lineNum - Parameters: add - false if the delegate for the Account doesn't exist or isn't valid |
checkForPrimaryDelegateAllLines | protected boolean checkForPrimaryDelegateAllLines()(Code) | | 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
false if there is more than one primary delegate |
checkPrimaryRouteOnlyAllowOneAllDocType | protected Integer checkPrimaryRouteOnlyAllowOneAllDocType(DelegateGlobalDetail delegateGlobalToTest, List<DelegateGlobalDetail> delegateGlobals, Integer testLineNum)(Code) | | This method validates the rule that says there can be only one PrimaryRoute delegate on a Global Delegate document if the
docType is ALL. It checks the delegateGlobalToTest against the list, to determine whether adding this new
delegateGlobalToTest would violate any PrimaryRoute business rule violations. If any of the incoming variables is null or
empty, the method will do nothing, and return Null. It will only process the business rules if there is sufficient data to do
so.
Parameters: delegateGlobalToTest - A delegateGlobal line that you want to test agains the list. Parameters: delegateGlobals - A List of delegateGlobal items that is being tested against. Null if the business rule passes, or an Integer value greater than zero, representing the line that the new line isconflicting with |
checkPrimaryRoutePerDocType | protected Integer checkPrimaryRoutePerDocType(DelegateGlobalDetail delegateGlobalToTest, List<DelegateGlobalDetail> delegateGlobals, Integer testLineNum)(Code) | | This method validates the rule that says there can be only one PrimaryRoute delegate for each given docType. It checks the
delegateGlobalToTest against the list, to determine whether adding this new delegateGlobalToTest would violate any
PrimaryRoute business rule violations. If any of the incoming variables is null or empty, the method will do nothing, and
return Null. It will only process the business rules if there is sufficient data to do so.
Parameters: delegateGlobalToTest - A delegateGlobal line that you want to test against the list. Parameters: delegateGlobals - A List of delegateGlobal items that is being tested against. Null if the business rule passes, or an Integer value greater than zero, representing the line that the new line isconflicting with |
checkPrimaryRouteRules | protected boolean checkPrimaryRouteRules(List<DelegateGlobalDetail> delegateGlobals, DelegateGlobalDetail delegateGlobalToTest, Integer lineNum, boolean add)(Code) | | This checks that the primary routing for delegates is correct, specifically that - there is not already a primary route
delegate setup for this
Account Parameters: delegateGlobals - Parameters: delegateGlobalToTest - Parameters: lineNum - Parameters: add - |
checkSimpleRulesAllLines | protected boolean checkSimpleRulesAllLines()(Code) | | This method checks the simple rules for all lines at once and gets called on save, submit, etc. but not on add Specifically
it calls the following:
|
setupConvenienceObjects | public void setupConvenienceObjects()(Code) | | 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.
|
|
|