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

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

public class AuxiliaryVoucherRecodeAccountingPeriodValidation
extends GenericValidation

Validation that checks whether the accounting period of an AuxiliaryVoucher document is allowable, but only for recode-type AVs.


Constructor Summary
AuxiliaryVoucherRecodeAccountingPeriodValidation()
           
 
Method Summary
 AccountingPeriodService getAccountingPeriodService()
          Gets the accountingPeriodService attribute.
 AuxiliaryVoucherDocument getAuxiliaryVoucherDocumentForValidation()
          Gets the auxiliaryVoucherDocumentForValidation attribute.
 void setAccountingPeriodService(AccountingPeriodService accountingPeriodService)
          Sets the accountingPeriodService attribute value.
 void setAuxiliaryVoucherDocumentForValidation(AuxiliaryVoucherDocument auxiliaryVoucherDocumentForValidation)
          Sets the auxiliaryVoucherDocumentForValidation attribute value.
 boolean validate(AttributedDocumentEvent event)
          Validates the accounting period on an AV doc if the doc is a recode type, with the following rules: The accounting period does not occur in a previous fiscal year The accounting period is between 1 and 12 (13 can't be recoded, nor can the non-numeric periods: AB, BB, and CB
 
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

AuxiliaryVoucherRecodeAccountingPeriodValidation

public AuxiliaryVoucherRecodeAccountingPeriodValidation()
Method Detail

validate

public boolean validate(AttributedDocumentEvent event)
Validates the accounting period on an AV doc if the doc is a recode type, with the following rules:
  1. The accounting period does not occur in a previous fiscal year
  2. The accounting period is between 1 and 12 (13 can't be recoded, nor can the non-numeric periods: AB, BB, and CB

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

getAccountingPeriodService

public AccountingPeriodService getAccountingPeriodService()
Gets the accountingPeriodService attribute.

Returns:
Returns the accountingPeriodService.

setAccountingPeriodService

public void setAccountingPeriodService(AccountingPeriodService accountingPeriodService)
Sets the accountingPeriodService attribute value.

Parameters:
accountingPeriodService - The accountingPeriodService to set.

getAuxiliaryVoucherDocumentForValidation

public AuxiliaryVoucherDocument getAuxiliaryVoucherDocumentForValidation()
Gets the auxiliaryVoucherDocumentForValidation attribute.

Returns:
Returns the auxiliaryVoucherDocumentForValidation.

setAuxiliaryVoucherDocumentForValidation

public void setAuxiliaryVoucherDocumentForValidation(AuxiliaryVoucherDocument auxiliaryVoucherDocumentForValidation)
Sets the auxiliaryVoucherDocumentForValidation attribute value.

Parameters:
auxiliaryVoucherDocumentForValidation - The auxiliaryVoucherDocumentForValidation to set.


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