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

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.BudgetAdjustmentAccountingLineAmountValidation
All Implemented Interfaces:
Validation

public class BudgetAdjustmentAccountingLineAmountValidation
extends GenericValidation

Validation that checks the amounts on budget adjustment document accounting lines.


Constructor Summary
BudgetAdjustmentAccountingLineAmountValidation()
           
 
Method Summary
protected  boolean checkAmountSign(org.kuali.rice.kns.util.KualiDecimal amount, String propertyName, String label)
          Helper method to check if an amount is negative and add an error if not.
 AccountingDocument getAccountingDocumentForValidation()
          Gets the accountingDocumentForValidation attribute.
 BudgetAdjustmentAccountingLine getAccountingLineForValidation()
          Gets the accountingLineForValidation attribute.
 DebitDeterminerService getDebitDeterminerService()
          Gets the debitDeterminerService attribute.
 void setAccountingDocumentForValidation(AccountingDocument accountingDocumentForValidation)
          Sets the accountingDocumentForValidation attribute value.
 void setAccountingLineForValidation(BudgetAdjustmentAccountingLine accountingLineForValidation)
          Sets the accountingLineForValidation attribute value.
 void setDebitDeterminerService(DebitDeterminerService debitDeterminerService)
          Sets the debitDeterminerService attribute value.
 boolean validate(AttributedDocumentEvent event)
          Validates the amounts on a budget adjustment accounting line, making sure that either the current adjustment amount or the base adjustment amount are not zero, and that all given amounts are positive.
 
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

BudgetAdjustmentAccountingLineAmountValidation

public BudgetAdjustmentAccountingLineAmountValidation()
Method Detail

validate

public boolean validate(AttributedDocumentEvent event)
Validates the amounts on a budget adjustment accounting line, making sure that either the current adjustment amount or the base adjustment amount are not zero, and that all given amounts are positive.

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

checkAmountSign

protected boolean checkAmountSign(org.kuali.rice.kns.util.KualiDecimal amount,
                                  String propertyName,
                                  String label)
Helper method to check if an amount is negative and add an error if not.

Parameters:
amount - to check
propertyName - to add error under
label - for error
Returns:
boolean indicating if the value has the requested sign

getAccountingLineForValidation

public BudgetAdjustmentAccountingLine getAccountingLineForValidation()
Gets the accountingLineForValidation attribute.

Returns:
Returns the accountingLineForValidation.

setAccountingLineForValidation

public void setAccountingLineForValidation(BudgetAdjustmentAccountingLine accountingLineForValidation)
Sets the accountingLineForValidation attribute value.

Parameters:
accountingLineForValidation - The accountingLineForValidation to set.

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.

getDebitDeterminerService

public DebitDeterminerService getDebitDeterminerService()
Gets the debitDeterminerService attribute.

Returns:
Returns the debitDeterminerService.

setDebitDeterminerService

public void setDebitDeterminerService(DebitDeterminerService debitDeterminerService)
Sets the debitDeterminerService attribute value.

Parameters:
debitDeterminerService - The debitDeterminerService to set.


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