org.kuali.kfs.coa.document.validation.impl
Class SubAccountPreRules

java.lang.Object
  extended by org.kuali.rice.kns.rules.PromptBeforeValidationBase
      extended by org.kuali.kfs.coa.document.validation.impl.MaintenancePreRulesBase
          extended by org.kuali.kfs.coa.document.validation.impl.SubAccountPreRules
All Implemented Interfaces:
org.kuali.rice.kns.rule.PromptBeforeValidation

public class SubAccountPreRules
extends MaintenancePreRulesBase

PreRules checks for the SubAccount that needs to occur while still in the Struts processing. This includes defaults, confirmations, etc.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.kuali.rice.kns.rules.PromptBeforeValidationBase
org.kuali.rice.kns.rules.PromptBeforeValidationBase.ContextSession
 
Field Summary
protected  SubAccount newSubAccount
           
 
Fields inherited from class org.kuali.kfs.coa.document.validation.impl.MaintenancePreRulesBase
accountService, configService
 
Fields inherited from class org.kuali.rice.kns.rules.PromptBeforeValidationBase
buttonClicked, event, form, LOG, question
 
Constructor Summary
SubAccountPreRules()
           
 
Method Summary
protected  void checkForContinuationAccounts(String maintenanceAction)
          This looks for the SubAccount's account number and then sets the values to the continuation account value if it exists
protected  void copyICRFromAccount(org.kuali.rice.kns.document.MaintenanceDocument document)
          This copies the Indirect Cost Rate (ICR) from the account if the SubAccount is a specific type - determined as "EX" from SubAccountRule#CG_A21_TYPE_ICR
protected  boolean doCustomPreRules(org.kuali.rice.kns.document.MaintenanceDocument document)
          This checks to see if a continuation account is necessary and then copies the ICR data from the Account associated with this SubAccount (if necessary)
protected  void setupConvenienceObjects(org.kuali.rice.kns.document.MaintenanceDocument document)
          This method sets the convenience objects like newSubAccount, 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.MaintenancePreRulesBase
buildContinuationConfirmationQuestion, checkForContinuationAccount, checkForContinuationAccount, doPrompts, getAccountService, getConfigService, setAccountService, setConfigService
 
Methods inherited from class org.kuali.rice.kns.rules.PromptBeforeValidationBase
abortRulesCheck, askOrAnalyzeYesNoQuestion, processPrompts
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

newSubAccount

protected SubAccount newSubAccount
Constructor Detail

SubAccountPreRules

public SubAccountPreRules()
Method Detail

doCustomPreRules

protected boolean doCustomPreRules(org.kuali.rice.kns.document.MaintenanceDocument document)
This checks to see if a continuation account is necessary and then copies the ICR data from the Account associated with this SubAccount (if necessary)

Overrides:
doCustomPreRules in class MaintenancePreRulesBase
Returns:
true if rules pass
See Also:
MaintenancePreRulesBase.doCustomPreRules(org.kuali.rice.kns.document.MaintenanceDocument)

checkForContinuationAccounts

protected void checkForContinuationAccounts(String maintenanceAction)
This looks for the SubAccount's account number and then sets the values to the continuation account value if it exists

Parameters:
maintenanceAction -

setupConvenienceObjects

protected void setupConvenienceObjects(org.kuali.rice.kns.document.MaintenanceDocument document)
This method sets the convenience objects like newSubAccount, 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.

Parameters:
document -

copyICRFromAccount

protected void copyICRFromAccount(org.kuali.rice.kns.document.MaintenanceDocument document)
This copies the Indirect Cost Rate (ICR) from the account if the SubAccount is a specific type - determined as "EX" from SubAccountRule#CG_A21_TYPE_ICR

If it is "EX" it will then copy over the ICR information from the Account specified for this SubAccount

Parameters:
document -


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.