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

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.AccountPreRules
All Implemented Interfaces:
org.kuali.rice.kns.rule.PromptBeforeValidation
Direct Known Subclasses:
AccountPreRules

public class AccountPreRules
extends MaintenancePreRulesBase

PreRules checks for the Account 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  AccountService accountService
           
protected  org.kuali.rice.kns.service.KualiConfigurationService configService
           
protected static String DEFAULT_ACCOUNT_TYPE_CODE
           
protected static String DEFAULT_STATE_CODE
           
protected static String ENDOWMENT_FUND_CD
           
protected static String GENERAL_FUND_CD
           
protected static org.apache.log4j.Logger LOG
           
protected  Account newAccount
           
protected static String PLANT_FUND_CD
           
protected  org.kuali.rice.kns.service.PostalCodeService postalZipCodeService
           
protected static String RESTRICTED_CD_NOT_APPLICABLE
           
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
           
 
Fields inherited from class org.kuali.rice.kns.rules.PromptBeforeValidationBase
buttonClicked, event, form, question
 
Constructor Summary
AccountPreRules()
           
 
Method Summary
protected  void checkForContinuationAccounts()
          This method checks for continuation accounts and presents the user with a question regarding their use on this account.
protected  void checkForDefaultSubFundGroupStatus()
          This method sets a default restricted status on an account if and only if the status code in SubFundGroup has been set and the user answers in the affirmative that they definitely want to use this SubFundGroup.
protected  boolean doCustomPreRules(org.kuali.rice.kns.document.MaintenanceDocument document)
          Executes the following pre rules MaintenancePreRulesBase.checkForContinuationAccount(String, String, String, String) checkForDefaultSubFundGroupStatus() newAccountDefaults(MaintenanceDocument) setStateFromZip(org.kuali.rice.kns.document.MaintenanceDocument) This does not fail on rule failures
protected  void newAccountDefaults(org.kuali.rice.kns.document.MaintenanceDocument maintenanceDocument)
          This method sets up some defaults for new Account
protected  void setStateFromZip(org.kuali.rice.kns.document.MaintenanceDocument maintenanceDocument)
          This method lookups state and city from populated zip, set the values on the form
protected  void setupConvenienceObjects(org.kuali.rice.kns.document.MaintenanceDocument document)
          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.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

LOG

protected static org.apache.log4j.Logger LOG

DEFAULT_STATE_CODE

protected static final String DEFAULT_STATE_CODE
See Also:
Constant Field Values

DEFAULT_ACCOUNT_TYPE_CODE

protected static final String DEFAULT_ACCOUNT_TYPE_CODE
See Also:
Constant Field Values

configService

protected org.kuali.rice.kns.service.KualiConfigurationService configService

accountService

protected AccountService accountService

postalZipCodeService

protected org.kuali.rice.kns.service.PostalCodeService postalZipCodeService

newAccount

protected Account newAccount

GENERAL_FUND_CD

protected static final String GENERAL_FUND_CD
See Also:
Constant Field Values

RESTRICTED_FUND_CD

protected static final String RESTRICTED_FUND_CD
See Also:
Constant Field Values

ENDOWMENT_FUND_CD

protected static final String ENDOWMENT_FUND_CD
See Also:
Constant Field Values

PLANT_FUND_CD

protected static final String PLANT_FUND_CD
See Also:
Constant Field Values

RESTRICTED_CD_RESTRICTED

protected static final String RESTRICTED_CD_RESTRICTED
See Also:
Constant Field Values

RESTRICTED_CD_UNRESTRICTED

protected static final String RESTRICTED_CD_UNRESTRICTED
See Also:
Constant Field Values

RESTRICTED_CD_TEMPORARILY_RESTRICTED

protected static final String RESTRICTED_CD_TEMPORARILY_RESTRICTED
See Also:
Constant Field Values

RESTRICTED_CD_NOT_APPLICABLE

protected static final String RESTRICTED_CD_NOT_APPLICABLE
See Also:
Constant Field Values
Constructor Detail

AccountPreRules

public AccountPreRules()
Method Detail

doCustomPreRules

protected boolean doCustomPreRules(org.kuali.rice.kns.document.MaintenanceDocument document)
Executes the following pre rules This does not fail on rule failures

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

checkForDefaultSubFundGroupStatus

protected void checkForDefaultSubFundGroupStatus()
This method sets a default restricted status on an account if and only if the status code in SubFundGroup has been set and the user answers in the affirmative that they definitely want to use this SubFundGroup.


checkForContinuationAccounts

protected void checkForContinuationAccounts()
This method checks for continuation accounts and presents the user with a question regarding their use on this account.


setupConvenienceObjects

protected void setupConvenienceObjects(org.kuali.rice.kns.document.MaintenanceDocument document)
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.

Parameters:
document - - the maintenanceDocument being evaluated

newAccountDefaults

protected void newAccountDefaults(org.kuali.rice.kns.document.MaintenanceDocument maintenanceDocument)
This method sets up some defaults for new Account

Parameters:
maintenanceDocument -

setStateFromZip

protected void setStateFromZip(org.kuali.rice.kns.document.MaintenanceDocument maintenanceDocument)
This method lookups state and city from populated zip, set the values on the form

Parameters:
maintenanceDocument -


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