|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.kns.rules.PromptBeforeValidationBase
public abstract class PromptBeforeValidationBase
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 | |
---|---|
class |
PromptBeforeValidationBase.ContextSession
This is a description of what this class does - wliang don't forget to fill this in. |
Field Summary | |
---|---|
protected String |
buttonClicked
|
protected PromptBeforeValidationEvent |
event
|
protected KualiForm |
form
|
protected static org.apache.log4j.Logger |
LOG
|
protected String |
question
|
Constructor Summary | |
---|---|
PromptBeforeValidationBase()
|
Method Summary | |
---|---|
void |
abortRulesCheck()
This bounces the user back to the document as if they had never tried to routed it. |
boolean |
askOrAnalyzeYesNoQuestion(String id,
String text)
This method poses a Y/N question to the user. |
abstract boolean |
doPrompts(Document document)
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)
#hasAsked(String) |
boolean |
processPrompts(org.apache.struts.action.ActionForm form,
javax.servlet.http.HttpServletRequest request,
PromptBeforeValidationEvent event)
Callback method from Maintenance action that allows checks to be done and response redirected via the PreRulesCheckEvent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static org.apache.log4j.Logger LOG
protected String question
protected String buttonClicked
protected PromptBeforeValidationEvent event
protected KualiForm form
Constructor Detail |
---|
public PromptBeforeValidationBase()
Method Detail |
---|
public abstract boolean doPrompts(Document document)
abortRulesCheck()
askOrAnalyzeYesNoQuestion(String, String)
#hasAsked(String)
document
-
public boolean processPrompts(org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, PromptBeforeValidationEvent event)
PromptBeforeValidation
processPrompts
in interface PromptBeforeValidation
event
- stores various information necessary to render the question prompt
public void abortRulesCheck()
public boolean askOrAnalyzeYesNoQuestion(String id, String text) throws org.kuali.rice.kns.rules.PromptBeforeValidationBase.IsAskingException
id
- an ID for the questiontext
- the text of the question, to be displayed on the screen
IsAskingException
- if the user needs to be prompted the question
org.kuali.rice.kns.rules.PromptBeforeValidationBase.IsAskingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |