org.kuali.kfs.module.cam.document.validation.impl
Class AssetPreRule

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.module.cam.document.validation.impl.AssetPreRule
All Implemented Interfaces:
org.kuali.rice.kns.rule.PromptBeforeValidation

public class AssetPreRule
extends MaintenancePreRulesBase

Business Prerules applicable to Asset documents. These PreRules checks for the Asset that needs to occur while still in the Struts processing. This includes setting the .... field using the values from .... and ..., and could be used for many other purposes.
This class (unlike AssetRule) does not delegate responsibility due to limited number of PreRules.


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  Asset copyAsset
           
protected static org.apache.log4j.Logger LOG
           
protected  Asset newAsset
           
protected  String personId
           
 
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, question
 
Constructor Summary
AssetPreRule()
           
 
Method Summary
protected  boolean doCustomPreRules(org.kuali.rice.kns.document.MaintenanceDocument document)
          Sets up a convenience object and few other Asset attributes
 String getPersonId()
          Returns the Universal User Id of the current logged-in user
protected  void setFederalContribution(org.kuali.rice.kns.document.MaintenanceDocument document)
           
protected  void setupConvenienceObjects(org.kuali.rice.kns.document.MaintenanceDocument document)
          Sets the convenience objects like newAsset and oldAsset, 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

newAsset

protected Asset newAsset

copyAsset

protected Asset copyAsset

personId

protected String personId
Constructor Detail

AssetPreRule

public AssetPreRule()
Method Detail

getPersonId

public String getPersonId()
Returns the Universal User Id of the current logged-in user

Returns:
String the PersonId

doCustomPreRules

protected boolean doCustomPreRules(org.kuali.rice.kns.document.MaintenanceDocument document)
Sets up a convenience object and few other Asset attributes

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

setupConvenienceObjects

protected void setupConvenienceObjects(org.kuali.rice.kns.document.MaintenanceDocument document)
Sets the convenience objects like newAsset and oldAsset, 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

setFederalContribution

protected void setFederalContribution(org.kuali.rice.kns.document.MaintenanceDocument document)


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