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

java.lang.Object
  extended by org.kuali.rice.kns.rules.PromptBeforeValidationBase
      extended by org.kuali.kfs.module.purap.document.validation.impl.PurapDocumentPreRulesBase
          extended by org.kuali.kfs.module.purap.document.validation.impl.AccountsPayableDocumentPreRulesBase
              extended by org.kuali.kfs.module.purap.document.validation.impl.PaymentRequestDocumentPreRules
All Implemented Interfaces:
org.kuali.rice.kns.rule.PromptBeforeValidation

public class PaymentRequestDocumentPreRules
extends AccountsPayableDocumentPreRulesBase

Business pre rule(s) applicable to Payment Request documents.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.kuali.rice.kns.rules.PromptBeforeValidationBase
org.kuali.rice.kns.rules.PromptBeforeValidationBase.ContextSession
 
Field Summary
 
Fields inherited from class org.kuali.kfs.module.purap.document.validation.impl.AccountsPayableDocumentPreRulesBase
LOG
 
Fields inherited from class org.kuali.rice.kns.rules.PromptBeforeValidationBase
buttonClicked, event, form, question
 
Constructor Summary
PaymentRequestDocumentPreRules()
          Default Constructor
 
Method Summary
protected  boolean askForConfirmation(String questionType, String messageConstant)
          Prompts user to confirm with a Yes or No to a question being asked.
protected  boolean checkCAMSWarningStatus(PurchasingAccountsPayableDocument purapDocument)
           
 boolean confirmEncumberNextFiscalYear(PaymentRequestDocument preq)
           
 boolean confirmEncumberPriorFiscalYear(PaymentRequestDocument preq)
           
 boolean confirmExpiredAccount(PaymentRequestDocument preq)
           
 boolean confirmPayDayNotOverThresholdDaysAway(PaymentRequestDocument preq)
          Validates if the pay date threshold has not been passed, if so confirmation is required by the user to exceed the threshold.
 boolean confirmUnusedTradeIn(PaymentRequestDocument preq)
           
 String createInvoiceNoMatchQuestionText(AccountsPayableDocument accountsPayableDocument)
          Creates the text for the invoice no match question being asked of the user.
 boolean doPrompts(org.kuali.rice.kns.document.Document document)
          Main hook point to perform rules check.
 String getDocumentName()
          Exists to be overriden by the child class and return the name of the document.
protected  String prepareQuestionText(String questionType, String questionText)
          Creates the actual text of the question, replacing place holders like pay date threshold with an actual constant value.
 
Methods inherited from class org.kuali.kfs.module.purap.document.validation.impl.AccountsPayableDocumentPreRulesBase
confirmInvoiceNoMatchOverride, validateInvoiceTotalsAreMismatched
 
Methods inherited from class org.kuali.kfs.module.purap.document.validation.impl.PurapDocumentPreRulesBase
confirmFixCapitalAssetWarningConditions
 
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

PaymentRequestDocumentPreRules

public PaymentRequestDocumentPreRules()
Default Constructor

Method Detail

doPrompts

public boolean doPrompts(org.kuali.rice.kns.document.Document document)
Main hook point to perform rules check.

Overrides:
doPrompts in class AccountsPayableDocumentPreRulesBase
See Also:
org.kuali.rice.kns.rules.PromptBeforeValidationBase#doRules(org.kuali.rice.kns.document.Document)

askForConfirmation

protected boolean askForConfirmation(String questionType,
                                     String messageConstant)
Prompts user to confirm with a Yes or No to a question being asked.

Parameters:
questionType - - type of question
messageConstant - - key to retrieve message
Returns:
- true if overriding, false otherwise

prepareQuestionText

protected String prepareQuestionText(String questionType,
                                     String questionText)
Creates the actual text of the question, replacing place holders like pay date threshold with an actual constant value.

Parameters:
questionType - - type of question
questionText - - actual text of question pulled from resource file
Returns:
- question text with place holders replaced

confirmPayDayNotOverThresholdDaysAway

public boolean confirmPayDayNotOverThresholdDaysAway(PaymentRequestDocument preq)
Validates if the pay date threshold has not been passed, if so confirmation is required by the user to exceed the threshold.

Parameters:
preq - - payment request document
Returns:
- true if threshold has not been surpassed or if user confirmed ok to override, false otherwise

confirmUnusedTradeIn

public boolean confirmUnusedTradeIn(PaymentRequestDocument preq)

confirmExpiredAccount

public boolean confirmExpiredAccount(PaymentRequestDocument preq)

confirmEncumberNextFiscalYear

public boolean confirmEncumberNextFiscalYear(PaymentRequestDocument preq)

confirmEncumberPriorFiscalYear

public boolean confirmEncumberPriorFiscalYear(PaymentRequestDocument preq)

getDocumentName

public String getDocumentName()
Description copied from class: AccountsPayableDocumentPreRulesBase
Exists to be overriden by the child class and return the name of the document.

Overrides:
getDocumentName in class AccountsPayableDocumentPreRulesBase
Returns:
See Also:
AccountsPayableDocumentPreRulesBase.getDocumentName()

createInvoiceNoMatchQuestionText

public String createInvoiceNoMatchQuestionText(AccountsPayableDocument accountsPayableDocument)
Description copied from class: AccountsPayableDocumentPreRulesBase
Creates the text for the invoice no match question being asked of the user.

Overrides:
createInvoiceNoMatchQuestionText in class AccountsPayableDocumentPreRulesBase
Parameters:
accountsPayableDocument - - to be used by overriding method.
Returns:
See Also:
AccountsPayableDocumentPreRulesBase.createInvoiceNoMatchQuestionText(org.kuali.kfs.module.purap.document.AccountsPayableDocument)

checkCAMSWarningStatus

protected boolean checkCAMSWarningStatus(PurchasingAccountsPayableDocument purapDocument)
Specified by:
checkCAMSWarningStatus in class PurapDocumentPreRulesBase


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