Class PromptBeforeValidationBase

java.lang.Object
org.kuali.rice.kns.rules.PromptBeforeValidationBase
All Implemented Interfaces:
PromptBeforeValidation, BusinessRule

@Deprecated public abstract class PromptBeforeValidationBase extends Object implements PromptBeforeValidation
Deprecated.
Only used in KNS classes, use KRAD.
This class simplifies requesting clarifying user input prior to applying business rules. It mostly shields the classes that extend it from being aware of the web layer, even though the input is collected via a series of one or more request/response cycles. Beware: method calls with side-effects will have unusual results. While it looks like the doRules method is executed sequentially, in fact, it is more of a geometric series: if n questions are asked, then the code up to and including the first question is executed n times, the second n-1 times, ..., the last question only one time.
  • Field Details

    • LOG

      protected static org.apache.logging.log4j.Logger LOG
      Deprecated.
    • question

      protected String question
      Deprecated.
    • buttonClicked

      protected String buttonClicked
      Deprecated.
    • event

      protected PromptBeforeValidationEvent event
      Deprecated.
    • form

      protected KualiForm form
      Deprecated.
  • Constructor Details

    • PromptBeforeValidationBase

      public PromptBeforeValidationBase()
      Deprecated.
  • Method Details

    • doPrompts

      public abstract boolean doPrompts(Document document)
      Deprecated.
      Implementations will override this method to do perform the actual prompting and/or logic They are able to utilize the following methods:
    • processPrompts

      public boolean processPrompts(org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, PromptBeforeValidationEvent event)
      Deprecated.
      Description copied from interface: PromptBeforeValidation
      Callback method from Maintenance action that allows checks to be done and response redirected via the PreRulesCheckEvent
      Specified by:
      processPrompts in interface PromptBeforeValidation
      Parameters:
      form -
      request -
      event - stores various information necessary to render the question prompt
      Returns:
      boolean indicating whether the validation (and if validation successful, the action) should continue. If false, the values within the event parameter will determine how the struts action handler should proceed
    • abortRulesCheck

      public void abortRulesCheck()
      Deprecated.
      This bounces the user back to the document as if they had never tried to routed it. (Business rules are not invoked and the action is not executed.)
    • askOrAnalyzeYesNoQuestion

      public boolean askOrAnalyzeYesNoQuestion(String id, String text) throws org.kuali.rice.kns.rules.PromptBeforeValidationBase.IsAskingException
      Deprecated.
      This method poses a Y/N question to the user. If the user has already answered the question, then it returns whether the answer to the question was yes or no Code that invokes this method will behave a bit strangely, so you should try to keep it as simple as possible.
      Parameters:
      id - an ID for the question
      text - the text of the question, to be displayed on the screen
      Returns:
      true if the user answered Yes, false if the user answers no
      Throws:
      org.kuali.rice.kns.rules.PromptBeforeValidationBase.IsAskingException - if the user needs to be prompted the question