Package org.kuali.rice.kns.rules
Class PromptBeforeValidationBase
java.lang.Object
org.kuali.rice.kns.rules.PromptBeforeValidationBase
- All Implemented Interfaces:
PromptBeforeValidation,org.kuali.rice.krad.rules.rule.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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDeprecated.This class acts similarly to HTTP session, but working inside a REQUEST parameter. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringDeprecated.protected PromptBeforeValidationEventDeprecated.protected KualiFormDeprecated.protected static org.apache.logging.log4j.LoggerDeprecated.protected StringDeprecated. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.This bounces the user back to the document as if they had never tried to routed it.booleanaskOrAnalyzeYesNoQuestion(String id, String text) Deprecated.This method poses a Y/N question to the user.abstract booleandoPrompts(org.kuali.rice.krad.document.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:abortRulesCheck()askOrAnalyzeYesNoQuestion(String, String)PromptBeforeValidationBase.ContextSession.hasAsked(String)booleanprocessPrompts(org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, PromptBeforeValidationEvent event) Deprecated.Callback method from Maintenance action that allows checks to be done and response redirected via the PreRulesCheckEvent
-
Field Details
-
LOG
protected static org.apache.logging.log4j.Logger LOGDeprecated. -
question
Deprecated. -
buttonClicked
Deprecated. -
event
Deprecated. -
form
Deprecated.
-
-
Constructor Details
-
PromptBeforeValidationBase
public PromptBeforeValidationBase()Deprecated.
-
-
Method Details
-
doPrompts
public abstract boolean doPrompts(org.kuali.rice.krad.document.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:PromptBeforeValidationCallback method from Maintenance action that allows checks to be done and response redirected via the PreRulesCheckEvent- Specified by:
processPromptsin interfacePromptBeforeValidation- 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 questiontext- 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
-