org.kuali.kfs.module.ld.document.validation.impl
Class LaborJournalVoucherExternalEncumbranceValidation

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.module.ld.document.validation.impl.LaborJournalVoucherExternalEncumbranceValidation
All Implemented Interfaces:
Validation

public class LaborJournalVoucherExternalEncumbranceValidation
extends GenericValidation

Validates that a labor journal voucher document's accounting lines have valid encumbrance code


Constructor Summary
LaborJournalVoucherExternalEncumbranceValidation()
           
 
Method Summary
protected  boolean externalEncumbranceSpecificBusinessRulesValid(AccountingLine accountingLineForValidation)
          Checks whether employee id exists
 AccountingLine getAccountingLineForValidation()
          Gets the accountingLineForValidation attribute.
protected  boolean isRequiredReferenceFieldsValid(AccountingLine accountingLine)
          This method checks that values exist in the three reference fields that are required if the balance type is set to EXTERNAL ENCUMBRANCE.
 void setAccountingLineForValidation(AccountingLine accountingLineForValidation)
          Sets the accountingLineForValidation attribute value.
 boolean validate(AttributedDocumentEvent event)
          Validates that the accounting line in the labor journal voucher document for valid encumbrance code
 
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

LaborJournalVoucherExternalEncumbranceValidation

public LaborJournalVoucherExternalEncumbranceValidation()
Method Detail

validate

public boolean validate(AttributedDocumentEvent event)
Validates that the accounting line in the labor journal voucher document for valid encumbrance code

Returns:
true if validation should continue, false otherwise
See Also:
org.kuali.kfs.validation.Validation#validate(java.lang.Object[])

externalEncumbranceSpecificBusinessRulesValid

protected boolean externalEncumbranceSpecificBusinessRulesValid(AccountingLine accountingLineForValidation)
Checks whether employee id exists

Parameters:
accountingLineForValidation - laborJournalVoucherDetail line will be checked for valid encumbrance code
Returns:
True if accountingLineForValidation has the valid encumbrance code, false otherwise.

isRequiredReferenceFieldsValid

protected boolean isRequiredReferenceFieldsValid(AccountingLine accountingLine)
This method checks that values exist in the three reference fields that are required if the balance type is set to EXTERNAL ENCUMBRANCE.

Parameters:
accountingLine - The accounting line being validated.
Returns:
True if all of the required external encumbrance reference fields are valid, false otherwise.

getAccountingLineForValidation

public AccountingLine getAccountingLineForValidation()
Gets the accountingLineForValidation attribute.

Returns:
Returns the accountingLineForValidation.

setAccountingLineForValidation

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

Parameters:
accountingLineForValidation - The accountingLineForValidation to set.


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