org.kuali.kfs.sys.document.validation.impl
Class OptionalOneSidedDocumentAccountingLinesCountValidation

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.sys.document.validation.impl.OptionalOneSidedDocumentAccountingLinesCountValidation
All Implemented Interfaces:
Validation

public class OptionalOneSidedDocumentAccountingLinesCountValidation
extends GenericValidation

Validation which checks a one-sided accounting document (ie, an accounting document which only uses source accounting lines, not target) has a required number of accounting lines.


Constructor Summary
OptionalOneSidedDocumentAccountingLinesCountValidation()
           
 
Method Summary
 AccountingDocument getAccountingDocumentForValidation()
          Gets the accountingDocumentForValdation attribute.
 void setAccountingDocumentForValidation(AccountingDocument accountingDocumentForValidation)
          Sets the accountingDocumentForValdation attribute value.
 boolean validate(AttributedDocumentEvent event)
          Some double-sided documents also allow for one sided entries for correcting - so if one side is empty, the other side must have at least two lines in it.
 
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

OptionalOneSidedDocumentAccountingLinesCountValidation

public OptionalOneSidedDocumentAccountingLinesCountValidation()
Method Detail

validate

public boolean validate(AttributedDocumentEvent event)
Some double-sided documents also allow for one sided entries for correcting - so if one side is empty, the other side must have at least two lines in it. The balancing rules take care of validation of amounts.

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

getAccountingDocumentForValidation

public AccountingDocument getAccountingDocumentForValidation()
Gets the accountingDocumentForValdation attribute.

Returns:
Returns the accountingDocumentForValdation.

setAccountingDocumentForValidation

public void setAccountingDocumentForValidation(AccountingDocument accountingDocumentForValidation)
Sets the accountingDocumentForValdation attribute value.

Parameters:
accountingDocumentForValdation - The accountingDocumentForValdation to set.


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