edu.utexas.its.eis.tools.qwicap.servlet
Class FormDataSetFilterResponse

java.lang.Object
  extended by edu.utexas.its.eis.tools.qwicap.servlet.FormDataSetFilterResponse

public class FormDataSetFilterResponse
extends Object

Defines the actions Qwicap is to take after executing a FormDataSetFilter implementation. By default, instances of this class specify no actions, and therefore cause nothing to happen. By invoking the public methods of an instance, you construct a sequential list of actions to be performed when your FormDataSetFilter.filter(edu.utexas.its.eis.tools.qwicap.servlet.FormDataSet, edu.utexas.its.eis.tools.qwicap.servlet.FormDataSetFilterContext, edu.utexas.its.eis.tools.qwicap.servlet.FormDataSetFilterResponse) method exits. Consider, however, that not all combinations of actions will produce useful, desirable or comprehensible results. For instance, having more than one goBack... action in a response would be senseless, and should not be considered a supported option. (Going backward, in sequence, through a series of pages would work, but would produce exactly the same result as going back directly to the final page in the series. Going backward out of sequence would produce an exception.)

Author:
Chris W. Johnson

Method Summary
 FormDataSetFilterResponse clear()
          Removes all actions from this response.
 FormDataSetFilterResponse goBackOnePage()
          Instructs Qwicap to go back to the previous page that is "in play".
 FormDataSetFilterResponse goBackToFirstPage()
          Instructs Qwicap to back to the first (earliest) page that is still "in play".
 FormDataSetFilterResponse goBackToPage(Class<?> PromptClass, String PromptMethodName)
          Instructs Qwicap to go back to a page that is still "in play".
 FormDataSetFilterResponse goBackToPage(String MarkupName)
          Instructs Qwicap to go back to a page that is still "in play".
 FormDataSetFilterResponse ignoreDataSet()
          Instructs Qwicap to ignore the current form data set.
 FormDataSetFilterResponse proceedNormally()
          Instructs Qwicap to process the current form data set normally, and to ignore any further actions specified in this response object.
 FormDataSetFilterResponse run(FilterRunnable RunMe)
          Instructs Qwicap to invoke the run method of the supplied object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

clear

public FormDataSetFilterResponse clear()
Removes all actions from this response.

Returns:
A reference to this object.

goBackToFirstPage

public FormDataSetFilterResponse goBackToFirstPage()
                                            throws QwicapException
Instructs Qwicap to back to the first (earliest) page that is still "in play".

Returns:
A reference to this object.
Throws:
QwicapException - Thrown if something goes wrong, like there being no pages "in play" at all.

goBackToPage

public FormDataSetFilterResponse goBackToPage(String MarkupName)
                                       throws QwicapException
Instructs Qwicap to go back to a page that is still "in play". The page is identified by the name of the markup it is using.

Parameters:
MarkupName - The name of the markup used by the page to which Qwicap should return.
Returns:
A reference to this object.
Throws:
QwicapException - Thrown if something goes wrong, like there being no "in play" page whose markup has the specified name.

goBackToPage

public FormDataSetFilterResponse goBackToPage(Class<?> PromptClass,
                                              String PromptMethodName)
                                       throws QwicapException
Instructs Qwicap to go back to a page that is still "in play". The page is identified by the class, and the name of the method, that implements the page's prompt pattern.

Parameters:
PromptClass - The class containing the method that implements the page's prompt pattern.
PromptMethodName - The name of the method in PromptClass that implements the page's prompt pattern. Note that the name of constructors is always "<init>".
Returns:
A reference to this object.
Throws:
QwicapException - Thrown if something goes wrong, like there being no "in play" page whose implementing class and method name match those supplied to this method.

goBackOnePage

public FormDataSetFilterResponse goBackOnePage()
                                        throws QwicapException
Instructs Qwicap to go back to the previous page that is "in play".

Returns:
A reference to this object.
Throws:
QwicapException - Thrown if something goes wrong, like there being no "in play" page whose markup has the specified name.

run

public FormDataSetFilterResponse run(FilterRunnable RunMe)
Instructs Qwicap to invoke the run method of the supplied object. That method is allowed to do anything that the rest of your client application's code can do. That includes prompting with a new page.

Parameters:
RunMe - The object whose run method should be invoked.
Returns:
A reference to this object.

ignoreDataSet

public FormDataSetFilterResponse ignoreDataSet()
Instructs Qwicap to ignore the current form data set. Ultimately, this is accomplished by clearing the current form data set.

Returns:
A reference to this object.

proceedNormally

public FormDataSetFilterResponse proceedNormally()
Instructs Qwicap to process the current form data set normally, and to ignore any further actions specified in this response object.

Returns:
A reference to this object.