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

java.lang.Object
  extended by org.kuali.rice.kns.rules.PromptBeforeValidationBase
      extended by org.kuali.kfs.coa.document.validation.impl.MaintenancePreRulesBase
All Implemented Interfaces:
org.kuali.rice.kns.rule.PromptBeforeValidation
Direct Known Subclasses:
AccountPreRules, ACIModelPreRule, AssetGlobalPreRules, AssetPreRule, AwardPreRules, BudgetConstructionPositionPreRules, CashSweepModelPreRule, IndirectCostRecoveryExclusionAccountPreRules, IndirectCostRecoveryRateDetailPreRules, KemidPreRule, LineItemReceivingDocumentPreRule, ObjectCodeGlobalPreRules, OrganizationReversionGlobalPreRules, OrganizationReversionPreRules, OrganizationRoutingModelPreRules, OrgPreRules, PooledFundValuePreRule, ReceivingAddressPreRules, SecurityPreRule, SubAccountPreRules, SubObjectPreRules, VendorPreRules

public class MaintenancePreRulesBase
extends org.kuali.rice.kns.rules.PromptBeforeValidationBase

General PreRules checks for all Maintenance docs that needs to occur while still in the Struts processing.


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
           
 
Fields inherited from class org.kuali.rice.kns.rules.PromptBeforeValidationBase
buttonClicked, event, form, LOG, question
 
Constructor Summary
MaintenancePreRulesBase()
          Constructs a MaintenancePreRulesBase class and injects some services through setters
 
Method Summary
protected  String buildContinuationConfirmationQuestion(String accName, String expiredAccount, String continuationAccount)
          This method builds up the continuation account confirmation question that will be presented to the user
protected  Account checkForContinuationAccount(String accName, String chart, String accountNumber, String accountName)
          This method checks for continuation accounts and presents the user with a question regarding their use on this account.
protected  Account checkForContinuationAccount(String accName, String chart, String accountNumber, String accountName, boolean allowExpiredAccount)
          This method checks for continuation accounts, returns the continuation account if it is found, null otherwise
protected  boolean doCustomPreRules(org.kuali.rice.kns.document.MaintenanceDocument maintenanceDocument)
          This is a hook for sub-classes to implement their own pre-rules.
 boolean doPrompts(org.kuali.rice.kns.document.Document document)
          This is called from the rules service to execute our rules A hook is provided here for sub-classes to override the doCustomPreRules(MaintenanceDocument)
 AccountService getAccountService()
           
 org.kuali.rice.kns.service.KualiConfigurationService getConfigService()
           
 void setAccountService(AccountService accountService)
           
 void setConfigService(org.kuali.rice.kns.service.KualiConfigurationService configService)
           
 
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

configService

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

accountService

protected AccountService accountService
Constructor Detail

MaintenancePreRulesBase

public MaintenancePreRulesBase()
Constructs a MaintenancePreRulesBase class and injects some services through setters

Method Detail

setAccountService

public void setAccountService(AccountService accountService)

setConfigService

public void setConfigService(org.kuali.rice.kns.service.KualiConfigurationService configService)

doPrompts

public boolean doPrompts(org.kuali.rice.kns.document.Document document)
This is called from the rules service to execute our rules A hook is provided here for sub-classes to override the doCustomPreRules(MaintenanceDocument)

Specified by:
doPrompts in class org.kuali.rice.kns.rules.PromptBeforeValidationBase
See Also:
org.kuali.rice.kns.rules.PromptBeforeValidationBase#doRules(org.kuali.rice.kns.document.Document)

doCustomPreRules

protected boolean doCustomPreRules(org.kuali.rice.kns.document.MaintenanceDocument maintenanceDocument)
This is a hook for sub-classes to implement their own pre-rules. Override to get hooked into main class

Parameters:
maintenanceDocument -
Returns:
true if rules pass

checkForContinuationAccount

protected Account checkForContinuationAccount(String accName,
                                              String chart,
                                              String accountNumber,
                                              String accountName,
                                              boolean allowExpiredAccount)
This method checks for continuation accounts, returns the continuation account if it is found, null otherwise

Parameters:
accName -
chart -
accountNumber -
accountName -
allowExpiredAccount -
Returns:
the continuation account if it is found, null otherwise

checkForContinuationAccount

protected Account checkForContinuationAccount(String accName,
                                              String chart,
                                              String accountNumber,
                                              String accountName)
This method checks for continuation accounts and presents the user with a question regarding their use on this account.

Parameters:
accName -
chart -
accountNumber -
accountName -
Returns:

buildContinuationConfirmationQuestion

protected String buildContinuationConfirmationQuestion(String accName,
                                                       String expiredAccount,
                                                       String continuationAccount)
This method builds up the continuation account confirmation question that will be presented to the user

Parameters:
accName -
expiredAccount -
continuationAccount -
Returns:
the question to the user about the continuation account

getAccountService

public AccountService getAccountService()

getConfigService

public org.kuali.rice.kns.service.KualiConfigurationService getConfigService()


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