org.kuali.kfs.fp.document.validation.impl
Class TransferOfFundsFundGroupsBalancedValidation

java.lang.Object
  extended by org.kuali.kfs.sys.document.validation.ParameterizedValidation
      extended by org.kuali.kfs.sys.document.validation.GenericValidation
          extended by org.kuali.kfs.fp.document.validation.impl.TransferOfFundsFundGroupsBalancedValidation
All Implemented Interfaces:
Validation

public class TransferOfFundsFundGroupsBalancedValidation
extends GenericValidation

Validation for Transfer of Funds document that tests if the fund groups represented by a given document are in balance.


Constructor Summary
TransferOfFundsFundGroupsBalancedValidation()
           
 
Method Summary
 AccountingDocument getAccountingDocumentForValidation()
          Gets the accountingDocumentForValidation attribute.
 org.kuali.rice.kns.service.ParameterService getParameterService()
          Gets the parameterService attribute.
protected  boolean isFundGroupSetBalanceValid(AccountingDocument tranDoc, Class componentClass, String parameterName)
          This method will make sure that totals for a specified set of fund groups is valid across the two different accounting line sections.
 void setAccountingDocumentForValidation(AccountingDocument accountingDocumentForValidation)
          Sets the accountingDocumentForValidation attribute value.
 void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
          Sets the parameterService attribute value.
 boolean validate(AttributedDocumentEvent event)
          This is a helper method that wraps the fund group balancing check.
 
Methods inherited from class org.kuali.kfs.sys.document.validation.GenericValidation
setQuitOnFail, shouldQuitOnFail, stageValidation
 
Methods inherited from class org.kuali.kfs.sys.document.validation.ParameterizedValidation
getParameterProperties, populateParameterFromEvent, populateParametersFromEvent, setParameterProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransferOfFundsFundGroupsBalancedValidation

public TransferOfFundsFundGroupsBalancedValidation()
Method Detail

validate

public boolean validate(AttributedDocumentEvent event)
This is a helper method that wraps the fund group balancing check. This check can be configured by updating the application parameter table that is associated with this check. See the document's specification for details.

Returns:
true if validation should continue, false otherwise
See Also:
Validation.validate(org.kuali.kfs.sys.document.validation.event.AttributedDocumentEvent)

isFundGroupSetBalanceValid

protected boolean isFundGroupSetBalanceValid(AccountingDocument tranDoc,
                                             Class componentClass,
                                             String parameterName)
This method will make sure that totals for a specified set of fund groups is valid across the two different accounting line sections.

Parameters:
tranDoc -
fundGroupCodes - An array of the fund group codes that will be considered for balancing.
Returns:
True if they balance; false otherwise.

getAccountingDocumentForValidation

public AccountingDocument getAccountingDocumentForValidation()
Gets the accountingDocumentForValidation attribute.

Returns:
Returns the accountingDocumentForValidation.

setAccountingDocumentForValidation

public void setAccountingDocumentForValidation(AccountingDocument accountingDocumentForValidation)
Sets the accountingDocumentForValidation attribute value.

Parameters:
accountingDocumentForValidation - The accountingDocumentForValidation to set.

getParameterService

public org.kuali.rice.kns.service.ParameterService getParameterService()
Gets the parameterService attribute.

Returns:
Returns the parameterService.

setParameterService

public void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
Sets the parameterService attribute value.

Parameters:
parameterService - The parameterService to set.


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