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

java.lang.Object
  extended by org.kuali.rice.kns.rules.PromptBeforeValidationBase
      extended by org.kuali.kfs.fp.document.validation.impl.DisbursementVoucherDocumentPreRules
All Implemented Interfaces:
DisbursementVoucherConstants, ParameterKeyConstants, org.kuali.rice.kns.rule.PromptBeforeValidation

public class DisbursementVoucherDocumentPreRules
extends org.kuali.rice.kns.rules.PromptBeforeValidationBase
implements DisbursementVoucherConstants

Checks warnings and prompt conditions for dv document.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.kuali.rice.kns.rules.PromptBeforeValidationBase
org.kuali.rice.kns.rules.PromptBeforeValidationBase.ContextSession
 
Nested classes/interfaces inherited from interface org.kuali.kfs.fp.document.DisbursementVoucherConstants
DisbursementVoucherConstants.DocumentStatusCodes, DisbursementVoucherConstants.DvPdpExtractGroup, DisbursementVoucherConstants.PaymentReasonCodes, DisbursementVoucherConstants.RouteLevelNames, DisbursementVoucherConstants.TabByReasonCode, DisbursementVoucherConstants.TabKey
 
Field Summary
 
Fields inherited from class org.kuali.rice.kns.rules.PromptBeforeValidationBase
buttonClicked, event, form, LOG, question
 
Fields inherited from interface org.kuali.kfs.fp.document.DisbursementVoucherConstants
ALIEN_INDICATOR_CHECKED_PARM_NM, ALIEN_PAYMENT_REASONS_PARM_NM, ALLOW_OBJECT_CODE_EDITS, CAMPUSES_TAXED_FOR_MOVING_REIMBURSEMENTS_PARM_NM, CHECK_EMPLOYEE_PAID_OUTSIDE_PAYROLL_PARM_NM, DECEDENT_COMPENSATION_PAYMENT_REASONS_PARM_NM, DEFAULT_DOC_LOCATION_PARM_NM, DOCUMENT_TYPE_CHECKACH, DOCUMENT_TYPE_WTFD, DV_COVER_SHEET_TEMPLATE_ALIEN_PARM_NM, DV_COVER_SHEET_TEMPLATE_ATTACHMENT_PARM_NM, DV_COVER_SHEET_TEMPLATE_BAR_PARM_NM, DV_COVER_SHEET_TEMPLATE_HANDLING_PARM_NM, DV_COVER_SHEET_TEMPLATE_LINES_PARM_NM, DV_COVER_SHEET_TEMPLATE_NM, DV_COVER_SHEET_TEMPLATE_RLINES_PARM_NM, DV_PAYEE_TYPE_EMPLOYEE, DV_PAYEE_TYPE_REVOLVING_FUND_VENDOR, DV_PAYEE_TYPE_SUBJECT_PAYMENT_VENDOR, DV_PAYEE_TYPE_VENDOR, FEDERAL_TAX_PARM_PREFIX, FEDERAL_TAX_TYPE_CODE, FUNCTION_CODE_GLOBAL_RESTRICTION_PARM_NM, INDIVIDUAL_OWNERSHIP_TYPES_PARM_NM, INVALID_DOC_LOC_BY_CAMPUS_PARM, INVALID_DOC_LOC_BY_PAYMENT_REASON_PARM, INVALID_OBJ_CODE_BY_PAYMENT_REASON_PARM, INVALID_OBJ_LEVEL_BY_PAYMENT_REASON_PARM, INVALID_OBJECT_SUB_TYPES_BY_SUB_FUND_GROUP_PARM, INVALID_PAYEE_TYPES_BY_PAYMENT_REASON_PARM, INVALID_SUB_FUND_GROUPS_BY_PAYMENT_REASON_PARM, MAX_NOTE_LINE_SIZE, MOVING_PAYMENT_REASONS_PARM_NM, NO_DOCUMENTATION_LOCATION, NON_VENDOR_EMPLOYEE_PAYEE_TYPE_LABEL_PARM_NM, NONEMPLOYEE_TRAVEL_ACTUAL_MILEAGE_LIMIT_PARM_NM, NONEMPLOYEE_TRAVEL_PAY_REASONS_PARM_NM, NRA_TAX_INCOME_CLASS_FELLOWSHIP, NRA_TAX_INCOME_CLASS_INDEPENDENT_CONTRACTOR, NRA_TAX_INCOME_CLASS_NON_REPORTABLE, NRA_TAX_INCOME_CLASS_ROYALTIES, OBJECT_LEVEL_GLOBAL_RESTRICTION_PARM_NM, OBJECT_SUB_TYPE_GLOBAL_RESTRICTION_PARM_NM, OBJECT_TYPE_GLOBAL_RESTRICTION_PARM_NM, PAYMENT_METHOD_CHECK, PAYMENT_METHOD_DRAFT, PAYMENT_METHOD_WIRE, PAYMENT_REASONS_REQUIRING_TAX_REVIEW_PARM_NM, PERFORM_PREPAID_EMPL_PARM_NM, PO_AND_DV_PAYEE_TYPE_LABEL_PARM_NM, PREPAID_TRAVEL_PAYMENT_REASONS_PARM_NM, RESEARCH_NON_VENDOR_PAY_LIMIT_AMOUNT_PARM_NM, RESEARCH_PAYMENT_REASONS_PARM_NM, REVOLVING_FUND_PAYMENT_REASONS_PARM_NM, STATE_TAX_PARM_PREFIX, STATE_TAX_TYPE_CODE, SUB_FUND_GLOBAL_RESTRICTION_PARM_NM, TAX_CONTROL_CODE_ALLOWS_EMPLOYEES, TAX_CONTROL_CODE_BEGIN_WITHHOLDING, TAX_CONTROL_CODE_HOLD_PAYMENT, TAX_DOCUMENTATION_LOCATION_CODE_PARM_NM, TAX_ID_TYPE_SSN, TAX_PARM_ACCOUNT_SUFFIX, TAX_PARM_CHART_SUFFIX, TAX_PARM_OBJECT_BY_INCOME_CLASS_SUFFIX, TAX_TYPE_FEIN, TAX_TYPE_SSN, TRAVEL_PER_DIEM_MESSAGE_PARM_NM, VALID_DOC_LOC_BY_CAMPUS_PARM, VALID_DOC_LOC_BY_PAYMENT_REASON_PARM, VALID_OBJ_CODE_BY_PAYMENT_REASON_PARM, VALID_OBJ_LEVEL_BY_PAYMENT_REASON_PARM, VALID_OBJECT_SUB_TYPES_BY_SUB_FUND_GROUP_PARM, VALID_PAYEE_TYPES_BY_PAYMENT_REASON_PARM, VALID_SUB_FUND_GROUPS_BY_PAYMENT_REASON_PARM, VALID_VENDOR_OWNERSHIP_TYPES_BY_PAYMENT_REASON, VENDOR_PAYEE_TYPE_CODES
 
Constructor Summary
DisbursementVoucherDocumentPreRules()
           
 
Method Summary
protected  boolean allowTurningOnOfSpecialHandling(DisbursementVoucherDocument dvDocument)
          Allows the automatic turning on of special handling indicator - which will not be allowed at the Campus route level
protected  boolean checkBankCodeActive(DisbursementVoucherDocument dvDocument)
          If bank specification is enabled, prompts user to use the continuation bank code when the given bank code is inactive
protected  boolean checkForeignDraftTabState(DisbursementVoucherDocument dvDocument)
          Returns true if the state of all the tabs is valid, false otherwise.
protected  boolean checkNonEmployeeTravelTabState(DisbursementVoucherDocument dvDocument)
          This method checks non-employee travel tab state is valid
protected  void checkSpecialHandlingIndicator(DisbursementVoucherDocument dvDocument)
          If the special handling name and address 1 fields have value, this will mark the special handling indicator for the user.
protected  boolean checkWireTransferTabState(DisbursementVoucherDocument dvDocument)
          This method returns true if the state of all the tabs is valid, false otherwise.
protected  void clearForeignDraftValues(DisbursementVoucherWireTransfer dvForeignDraft)
          This method sets foreign currency type code and name to null for passed in disbursement foreign draft object
protected  void clearWireTransferValues(DisbursementVoucherWireTransfer dvWireTransfer)
          This method sets all values in the passed in disbursement wire transfer object to null
 boolean doPrompts(org.kuali.rice.kns.document.Document document)
          Executes pre-rules for Disbursement Voucher Document
protected  String getValidPaymentReasonsAsString(List<String> validPaymentReasonCodes)
          put the valid payment reason codes along with their description together
protected  boolean hasForeignDraftValues(DisbursementVoucherWireTransfer dvForeignDraft)
          Returns true if foreign draft tab contains any data in any fields.
protected  boolean hasNonEmployeeTravelGeneralValues(DisbursementVoucherNonEmployeeTravel dvNonEmplTrav)
          Returns true if any values are not blank on non employee travel tab
protected  boolean hasNonEmployeeTravelPerDiemValues(DisbursementVoucherNonEmployeeTravel dvNonEmplTrav)
          Returns true if non employee travel tab contains data in any of the fields in the per diem section
protected  boolean hasNonEmployeeTravelPersonalVehicleValues(DisbursementVoucherNonEmployeeTravel dvNonEmplTrav)
          Returns true if non employee travel tab contains data in any of the fields in the personal vehicle section
protected  boolean hasNonEmployeeTravelValues(DisbursementVoucherNonEmployeeTravel dvNonEmplTrav)
          Returns true if non-employee travel tab contains any data in any of its fields
protected  boolean hasWireTransferValues(DisbursementVoucherWireTransfer dvWireTransfer)
          Returns true if wire transfer tab contains any data in any fields.
 
Methods inherited from class org.kuali.rice.kns.rules.PromptBeforeValidationBase
abortRulesCheck, askOrAnalyzeYesNoQuestion, processPrompts
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DisbursementVoucherDocumentPreRules

public DisbursementVoucherDocumentPreRules()
Method Detail

doPrompts

public boolean doPrompts(org.kuali.rice.kns.document.Document document)
Executes pre-rules for Disbursement Voucher Document

Specified by:
doPrompts in class org.kuali.rice.kns.rules.PromptBeforeValidationBase
Parameters:
document - submitted document
Returns:
true if pre-rules execute successfully
See Also:
org.kuali.rice.kns.rules.PromptBeforeValidationBase#doRules(org.kuali.rice.kns.document.MaintenanceDocument)

checkSpecialHandlingIndicator

protected void checkSpecialHandlingIndicator(DisbursementVoucherDocument dvDocument)
If the special handling name and address 1 fields have value, this will mark the special handling indicator for the user.

Parameters:
dvDocument - submitted disbursement voucher document

allowTurningOnOfSpecialHandling

protected boolean allowTurningOnOfSpecialHandling(DisbursementVoucherDocument dvDocument)
Allows the automatic turning on of special handling indicator - which will not be allowed at the Campus route level

Parameters:
dvDocument - the document to allow turning on of special handling for
Returns:
true if special handling can be automatically turned on, false otherwise

checkNonEmployeeTravelTabState

protected boolean checkNonEmployeeTravelTabState(DisbursementVoucherDocument dvDocument)
This method checks non-employee travel tab state is valid

Parameters:
dvDocument - submitted disbursement voucher document
Returns:
true if the state of all the tabs is valid, false otherwise.

hasNonEmployeeTravelValues

protected boolean hasNonEmployeeTravelValues(DisbursementVoucherNonEmployeeTravel dvNonEmplTrav)
Returns true if non-employee travel tab contains any data in any of its fields

Parameters:
dvNonEmplTrav - disbursement voucher non employee travel object
Returns:
True if non employee travel tab contains any data in any fields.

hasNonEmployeeTravelGeneralValues

protected boolean hasNonEmployeeTravelGeneralValues(DisbursementVoucherNonEmployeeTravel dvNonEmplTrav)
Returns true if any values are not blank on non employee travel tab

Parameters:
dvNonEmplTrav - disbursement voucher non employee travel object
Returns:
True if any values are found in the non employee travel tab

hasNonEmployeeTravelPerDiemValues

protected boolean hasNonEmployeeTravelPerDiemValues(DisbursementVoucherNonEmployeeTravel dvNonEmplTrav)
Returns true if non employee travel tab contains data in any of the fields in the per diem section

Parameters:
dvNonEmplTrav - disbursement voucher non employee travel object
Returns:
True if non employee travel tab contains data in any of the fields in the per diem section

hasNonEmployeeTravelPersonalVehicleValues

protected boolean hasNonEmployeeTravelPersonalVehicleValues(DisbursementVoucherNonEmployeeTravel dvNonEmplTrav)
Returns true if non employee travel tab contains data in any of the fields in the personal vehicle section

Parameters:
dvNonEmplTrav - disbursement voucher non employee travel object
Returns:
True if non employee travel tab contains data in any of the fields in the personal vehicle section

checkForeignDraftTabState

protected boolean checkForeignDraftTabState(DisbursementVoucherDocument dvDocument)
Returns true if the state of all the tabs is valid, false otherwise.

Parameters:
dvDocument - submitted disbursemtn voucher document
Returns:
true if the state of all the tabs is valid, false otherwise.

hasForeignDraftValues

protected boolean hasForeignDraftValues(DisbursementVoucherWireTransfer dvForeignDraft)
Returns true if foreign draft tab contains any data in any fields. NOTE: Currently does not validate based on only required fields. Checks all fields within tab for data.

Parameters:
dvForeignDraft - disbursement foreign draft object
Returns:
True if foreign draft tab contains any data in any fields.

clearForeignDraftValues

protected void clearForeignDraftValues(DisbursementVoucherWireTransfer dvForeignDraft)
This method sets foreign currency type code and name to null for passed in disbursement foreign draft object

Parameters:
dvForeignDraft - disbursement foreign draft object

checkWireTransferTabState

protected boolean checkWireTransferTabState(DisbursementVoucherDocument dvDocument)
This method returns true if the state of all the tabs is valid, false otherwise.

Parameters:
dvDocument - submitted disbursement voucher document
Returns:
Returns true if the state of all the tabs is valid, false otherwise.

checkBankCodeActive

protected boolean checkBankCodeActive(DisbursementVoucherDocument dvDocument)
If bank specification is enabled, prompts user to use the continuation bank code when the given bank code is inactive

Parameters:
dvDocument - document containing bank code
Returns:
true

hasWireTransferValues

protected boolean hasWireTransferValues(DisbursementVoucherWireTransfer dvWireTransfer)
Returns true if wire transfer tab contains any data in any fields.

Parameters:
dvWireTransfer - disbursement voucher wire transfer
Returns:
true if wire transfer tab contains any data in any fields.

clearWireTransferValues

protected void clearWireTransferValues(DisbursementVoucherWireTransfer dvWireTransfer)
This method sets all values in the passed in disbursement wire transfer object to null

Parameters:
dvWireTransfer -

getValidPaymentReasonsAsString

protected String getValidPaymentReasonsAsString(List<String> validPaymentReasonCodes)
put the valid payment reason codes along with their description together

Parameters:
validPaymentReasonCodes - the given valid payment reason codes
Returns:
the valid payment reason codes along with their description as a string


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