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

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

public class BenefitExpenseTransferSameAccountValidation
extends GenericValidation

Validates that the given accounting line and source lines are the same


Constructor Summary
BenefitExpenseTransferSameAccountValidation()
           
 
Method Summary
 AccountingLine getAccountingLineForValidation()
          Gets the accountingLineForValidation attribute.
 org.kuali.rice.kns.document.Document getDocumentForValidation()
          Gets the DocumentForValidation attribute.
 boolean hasSameAccount(org.kuali.rice.kns.document.Document document, AccountingLine accountingLine)
          Determines whether the given accounting line has the same account as the source accounting lines
 void setAccountingLineForValidation(AccountingLine accountingLineForValidation)
          Sets the accountingLineForValidation attribute value.
 void setDocumentForValidation(org.kuali.rice.kns.document.Document documentForValidation)
          Sets the accountingDocumentForValidation attribute value.
 boolean validate(AttributedDocumentEvent event)
          Validates that the given accounting lines in the accounting document have the same account as the source accounting lines.
 
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

BenefitExpenseTransferSameAccountValidation

public BenefitExpenseTransferSameAccountValidation()
Method Detail

validate

public boolean validate(AttributedDocumentEvent event)
Validates that the given accounting lines in the accounting document have the same account as the source accounting lines. Expects an accounting document as the first a parameter

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

hasSameAccount

public boolean hasSameAccount(org.kuali.rice.kns.document.Document document,
                              AccountingLine accountingLine)
Determines whether the given accounting line has the same account as the source accounting lines

Parameters:
document - the given document
accountingLine - the given accounting line
Returns:
true if the given accounting line has the same account as the source accounting lines; otherwise, false

setDocumentForValidation

public void setDocumentForValidation(org.kuali.rice.kns.document.Document documentForValidation)
Sets the accountingDocumentForValidation attribute value.

Parameters:
accountingDocumentForValidation - The accountingDocumentForValidation to set.

getDocumentForValidation

public org.kuali.rice.kns.document.Document getDocumentForValidation()
Gets the DocumentForValidation attribute.

Returns:
Returns the documentForValidation.

getAccountingLineForValidation

public AccountingLine getAccountingLineForValidation()
Gets the accountingLineForValidation attribute.

Returns:
Returns the accountingLineForValidation.

setAccountingLineForValidation

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

Parameters:
accountingDocumentForValidation - The accountingDocumentForValidation to set.


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