org.kuali.kfs.module.purap.document.validation.impl
Class PaymentRequestProcessItemValidation

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

public class PaymentRequestProcessItemValidation
extends GenericValidation


Constructor Summary
PaymentRequestProcessItemValidation()
           
 
Method Summary
protected  void addParametersToValidation(AccountingLineAmountPositiveValidation validation)
           
protected  void addParametersToValidation(AccountingLineDataDictionaryValidation validation)
           
protected  void addParametersToValidation(AccountingLineValuesAllowedValidationHutch validation)
           
protected  void addParametersToValidation(BusinessObjectDataDictionaryValidation validation)
           
protected  void createGauntlet(CompositeValidation validation)
           
protected  AttributedDocumentEvent getEvent()
          Gets the event attribute.
 PurApItem getItemForValidation()
           
protected  PurApAccountingLine getPreqAccountingLine()
          Gets the preqAccountingLine attribute.
protected  PaymentRequestDocument getPreqDocument()
          Gets the preqDocument attribute.
 PurapService getPurapService()
           
 CompositeValidation getReviewAccountingLineValidation()
           
protected  boolean reviewAccountingLineValidation(PaymentRequestDocument document, PurApAccountingLine accountingLine)
           
protected  void setEvent(AttributedDocumentEvent event)
          Sets the event attribute value.
 void setItemForValidation(PurApItem itemForValidation)
           
protected  void setPreqAccountingLine(PurApAccountingLine preqAccountingLine)
          Sets the preqAccountingLine attribute value.
protected  void setPreqDocument(PaymentRequestDocument preqDocument)
          Sets the preqDocument attribute value.
 void setPurapService(PurapService purapService)
           
 void setReviewAccountingLineValidation(CompositeValidation reviewAccountingLineValidation)
           
 boolean validate(AttributedDocumentEvent event)
          This method validates that certain parameters
protected  boolean validateAboveTheLineItems(PaymentRequestItem item, String identifierString, boolean isReceivingDocumentRequiredIndicator)
          Validates above the line items.
protected  boolean validateEachItem(PaymentRequestDocument paymentRequestDocument, PaymentRequestItem item)
          Calls another validate item method and passes an identifier string from the item.
 boolean validateItem(PaymentRequestDocument paymentRequestDocument, PaymentRequestItem item, String identifierString)
          Performs validation if full document entry not completed and peforms varying item validation.
 boolean validateItemAccounts(PaymentRequestDocument paymentRequestDocument, PaymentRequestItem item, String identifierString)
          Validates the totals for the item by account, that the total by each accounting line for the item, matches the extended price on the item.
 boolean validateItemWithoutAccounts(PaymentRequestItem item, String identifierString)
          Validates that the item must contain at least one account
 
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

PaymentRequestProcessItemValidation

public PaymentRequestProcessItemValidation()
Method Detail

validate

public boolean validate(AttributedDocumentEvent event)
Description copied from interface: Validation
This method validates that certain parameters

Returns:
true if validation should continue, false otherwise

validateEachItem

protected boolean validateEachItem(PaymentRequestDocument paymentRequestDocument,
                                   PaymentRequestItem item)
Calls another validate item method and passes an identifier string from the item.

Parameters:
paymentRequestDocument - - payment request document.
item -
Returns:

validateItem

public boolean validateItem(PaymentRequestDocument paymentRequestDocument,
                            PaymentRequestItem item,
                            String identifierString)
Performs validation if full document entry not completed and peforms varying item validation. Such as, above the line, items without accounts, items with accounts.

Parameters:
paymentRequestDocument - - payment request document
item - - payment request item
identifierString - - identifier string used to mark in an error map
Returns:

validateAboveTheLineItems

protected boolean validateAboveTheLineItems(PaymentRequestItem item,
                                            String identifierString,
                                            boolean isReceivingDocumentRequiredIndicator)
Validates above the line items.

Parameters:
item - - payment request item
identifierString - - identifier string used to mark in an error map
Returns:

validateItemWithoutAccounts

public boolean validateItemWithoutAccounts(PaymentRequestItem item,
                                           String identifierString)
Validates that the item must contain at least one account

Parameters:
item - - payment request item
Returns:

validateItemAccounts

public boolean validateItemAccounts(PaymentRequestDocument paymentRequestDocument,
                                    PaymentRequestItem item,
                                    String identifierString)
Validates the totals for the item by account, that the total by each accounting line for the item, matches the extended price on the item.

Parameters:
paymentRequestDocument - - payment request document
item - - payment request item to validate
identifierString - - identifier string used to mark in an error map
Returns:

getReviewAccountingLineValidation

public CompositeValidation getReviewAccountingLineValidation()

setReviewAccountingLineValidation

public void setReviewAccountingLineValidation(CompositeValidation reviewAccountingLineValidation)

getPurapService

public PurapService getPurapService()

setPurapService

public void setPurapService(PurapService purapService)

getItemForValidation

public PurApItem getItemForValidation()

setItemForValidation

public void setItemForValidation(PurApItem itemForValidation)

reviewAccountingLineValidation

protected boolean reviewAccountingLineValidation(PaymentRequestDocument document,
                                                 PurApAccountingLine accountingLine)

createGauntlet

protected void createGauntlet(CompositeValidation validation)

addParametersToValidation

protected void addParametersToValidation(BusinessObjectDataDictionaryValidation validation)

addParametersToValidation

protected void addParametersToValidation(AccountingLineAmountPositiveValidation validation)

addParametersToValidation

protected void addParametersToValidation(AccountingLineDataDictionaryValidation validation)

addParametersToValidation

protected void addParametersToValidation(AccountingLineValuesAllowedValidationHutch validation)

getEvent

protected AttributedDocumentEvent getEvent()
Gets the event attribute.

Returns:
Returns the event.

setEvent

protected void setEvent(AttributedDocumentEvent event)
Sets the event attribute value.

Parameters:
event - The event to set.

getPreqDocument

protected PaymentRequestDocument getPreqDocument()
Gets the preqDocument attribute.

Returns:
Returns the preqDocument.

setPreqDocument

protected void setPreqDocument(PaymentRequestDocument preqDocument)
Sets the preqDocument attribute value.

Parameters:
preqDocument - The preqDocument to set.

getPreqAccountingLine

protected PurApAccountingLine getPreqAccountingLine()
Gets the preqAccountingLine attribute.

Returns:
Returns the preqAccountingLine.

setPreqAccountingLine

protected void setPreqAccountingLine(PurApAccountingLine preqAccountingLine)
Sets the preqAccountingLine attribute value.

Parameters:
preqAccountingLine - The preqAccountingLine to set.


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