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

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

public class DisbursementVoucherCampusSpecialHandlingValidation
extends GenericValidation

Validates that if a disbursement voucher had special handling turned off at the campus node, an extra note explaining that change has been added.


Field Summary
static String DOCUMENT_EDITOR_ROLE_NAME
           
 
Constructor Summary
DisbursementVoucherCampusSpecialHandlingValidation()
           
 
Method Summary
 DisbursementVoucherDocument getDisbursementVoucherDocumentForValidation()
          Gets the disbursementVoucherDocumentForValidation attribute.
 org.kuali.rice.kns.service.DocumentService getDocumentService()
          Gets the documentService attribute.
protected  int getNoteCount(DisbursementVoucherDocument dvDoc)
          Determines the count of notes on the given document
protected  DisbursementVoucherDocument getPersistedDisbursementVoucherDocument()
          Retrieves from the persistence store the persisted version of the given document
 org.kuali.rice.kew.service.WorkflowInfo getWorkflowInfo()
          Gets the workflowInfo attribute.
protected  boolean isAtNodeToCheck()
          Determines if the DisbursementVoucherDocumentForValidation is at the Campus route node
protected  boolean isNoteAdded()
          Determines if another note was added from the time the DisbursementVoucherDocumentForValidation was persisted
protected  boolean isSpecialHandlingChanged(DisbursementVoucherDocument persistedDocument)
          Determines if special handling was turned off from the DisbursementVoucherDocumentForValidation
protected  boolean noteAddedByApproverForCurrentNode(org.kuali.rice.kns.bo.Note note)
          Determines if the given note was added by the current approver
 void setDisbursementVoucherDocumentForValidation(DisbursementVoucherDocument disbursementVoucherDocumentForValidation)
          Sets the disbursementVoucherDocumentForValidation attribute value.
 void setDocumentService(org.kuali.rice.kns.service.DocumentService documentService)
          Sets the documentService attribute value.
 void setWorkflowInfo(org.kuali.rice.kew.service.WorkflowInfo workflowInfo)
          Sets the workflowInfo attribute value.
 boolean validate(AttributedDocumentEvent event)
          Carries out the validation
 
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
 

Field Detail

DOCUMENT_EDITOR_ROLE_NAME

public static final String DOCUMENT_EDITOR_ROLE_NAME
See Also:
Constant Field Values
Constructor Detail

DisbursementVoucherCampusSpecialHandlingValidation

public DisbursementVoucherCampusSpecialHandlingValidation()
Method Detail

validate

public boolean validate(AttributedDocumentEvent event)
Carries out the validation

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

isAtNodeToCheck

protected boolean isAtNodeToCheck()
Determines if the DisbursementVoucherDocumentForValidation is at the Campus route node

Returns:
true if the document is at the campus route node, false otherwise

getPersistedDisbursementVoucherDocument

protected DisbursementVoucherDocument getPersistedDisbursementVoucherDocument()
Retrieves from the persistence store the persisted version of the given document

Parameters:
document - the document to find the persisted version of
Returns:
the persisted version of that document

isSpecialHandlingChanged

protected boolean isSpecialHandlingChanged(DisbursementVoucherDocument persistedDocument)
Determines if special handling was turned off from the DisbursementVoucherDocumentForValidation

Parameters:
persistedDocument - the persisted version of the document
Returns:
true if special handling was turned off, false otherwise

isNoteAdded

protected boolean isNoteAdded()
Determines if another note was added from the time the DisbursementVoucherDocumentForValidation was persisted

Parameters:
persistedDocument - the persisted version of the document
Returns:
true if an extra note was added, false otherwise

noteAddedByApproverForCurrentNode

protected boolean noteAddedByApproverForCurrentNode(org.kuali.rice.kns.bo.Note note)
Determines if the given note was added by the current approver

Parameters:
note - the note to see added
Returns:
true if the note was added by the current approver, false otherwise

getNoteCount

protected int getNoteCount(DisbursementVoucherDocument dvDoc)
Determines the count of notes on the given document

Parameters:
dvDoc - a document to find the count of notes on
Returns:
the count of notes on the document

getDisbursementVoucherDocumentForValidation

public DisbursementVoucherDocument getDisbursementVoucherDocumentForValidation()
Gets the disbursementVoucherDocumentForValidation attribute.

Returns:
Returns the disbursementVoucherDocumentForValidation.

setDisbursementVoucherDocumentForValidation

public void setDisbursementVoucherDocumentForValidation(DisbursementVoucherDocument disbursementVoucherDocumentForValidation)
Sets the disbursementVoucherDocumentForValidation attribute value.

Parameters:
disbursementVoucherDocumentForValidation - The disbursementVoucherDocumentForValidation to set.

getWorkflowInfo

public org.kuali.rice.kew.service.WorkflowInfo getWorkflowInfo()
Gets the workflowInfo attribute.

Returns:
Returns the workflowInfo.

setWorkflowInfo

public void setWorkflowInfo(org.kuali.rice.kew.service.WorkflowInfo workflowInfo)
Sets the workflowInfo attribute value.

Parameters:
workflowInfo - The workflowInfo to set.

getDocumentService

public org.kuali.rice.kns.service.DocumentService getDocumentService()
Gets the documentService attribute.

Returns:
Returns the documentService.

setDocumentService

public void setDocumentService(org.kuali.rice.kns.service.DocumentService documentService)
Sets the documentService attribute value.

Parameters:
documentService - The documentService to set.


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