org.kuali.kfs.module.ar.document.validation.impl
Class CustomerPreRules

java.lang.Object
  extended by org.kuali.rice.kns.rules.PromptBeforeValidationBase
      extended by org.kuali.kfs.module.ar.document.validation.impl.CustomerPreRules
All Implemented Interfaces:
org.kuali.rice.kns.rule.PromptBeforeValidation

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


Nested Class Summary
 
Nested classes/interfaces inherited from class org.kuali.rice.kns.rules.PromptBeforeValidationBase
org.kuali.rice.kns.rules.PromptBeforeValidationBase.ContextSession
 
Field Summary
 
Fields inherited from class org.kuali.rice.kns.rules.PromptBeforeValidationBase
buttonClicked, event, form, LOG, question
 
Constructor Summary
CustomerPreRules()
           
 
Method Summary
 boolean checkIfOtherCustomerSameName(Customer newCustomer)
          This method checks if a customer with the same name already exists
protected  boolean conditionallyAskQuestion(org.kuali.rice.kns.document.Document document)
          This method checks if there is another customer with the same name and generates yes/no question
 boolean doPrompts(org.kuali.rice.kns.document.Document document)
           
 
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
 

Constructor Detail

CustomerPreRules

public CustomerPreRules()
Method Detail

doPrompts

public boolean doPrompts(org.kuali.rice.kns.document.Document document)
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)

conditionallyAskQuestion

protected boolean conditionallyAskQuestion(org.kuali.rice.kns.document.Document document)
This method checks if there is another customer with the same name and generates yes/no question

Parameters:
document - the maintenance document
Returns:

checkIfOtherCustomerSameName

public boolean checkIfOtherCustomerSameName(Customer newCustomer)
This method checks if a customer with the same name already exists

Parameters:
newCustomer -
Returns:
true if exists, false otherwise


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