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

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

public class JournalVoucherAccountingLineExternalEncumbranceReferenceValidation
extends GenericValidation

Validation that if the Journal Voucher is using an external encumbrance balance type, reference fields are included on each accounting line


Constructor Summary
JournalVoucherAccountingLineExternalEncumbranceReferenceValidation()
           
 
Method Summary
 AccountingLine getAccountingLineForValidation()
          Gets the accountingLineForValidation attribute.
 org.kuali.rice.kns.service.DataDictionaryService getDataDictionaryService()
          Gets the dataDictionaryService attribute.
protected  void putRequiredPropertyError(org.kuali.rice.kns.datadictionary.BusinessObjectEntry boe, String propertyName)
          Adds a global error for a missing required property.
 void setAccountingLineForValidation(AccountingLine voucherSourceAccountingLine)
          Sets the accountingLineForValidation attribute value.
 void setDataDictionaryService(org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService)
          Sets the dataDictionaryService attribute value.
 boolean validate(AttributedDocumentEvent event)
          This method checks that values exist in the three reference fields (referenceOriginCode, referenceTypeCode, referenceNumber) that are required if the balance type is set to EXTERNAL ENCUMBRANCE.
 
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

JournalVoucherAccountingLineExternalEncumbranceReferenceValidation

public JournalVoucherAccountingLineExternalEncumbranceReferenceValidation()
Method Detail

validate

public boolean validate(AttributedDocumentEvent event)
This method checks that values exist in the three reference fields (referenceOriginCode, referenceTypeCode, referenceNumber) that are required if the balance type is set to EXTERNAL ENCUMBRANCE.

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

putRequiredPropertyError

protected void putRequiredPropertyError(org.kuali.rice.kns.datadictionary.BusinessObjectEntry boe,
                                        String propertyName)
Adds a global error for a missing required property. This is used for properties, such as reference origin code, which cannot be required by the DataDictionary validation because not all documents require them.

Parameters:
boe -
propertyName -

getAccountingLineForValidation

public AccountingLine getAccountingLineForValidation()
Gets the accountingLineForValidation attribute.

Returns:
Returns the accountingLineForValidation.

setAccountingLineForValidation

public void setAccountingLineForValidation(AccountingLine voucherSourceAccountingLine)
Sets the accountingLineForValidation attribute value.

Parameters:
accountingLineForValidation - The accountingLineForValidation to set.

getDataDictionaryService

public org.kuali.rice.kns.service.DataDictionaryService getDataDictionaryService()
Gets the dataDictionaryService attribute.

Returns:
Returns the dataDictionaryService.

setDataDictionaryService

public void setDataDictionaryService(org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService)
Sets the dataDictionaryService attribute value.

Parameters:
dataDictionaryService - The dataDictionaryService to set.


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