View Javadoc

1   package com.sri.emo.wizard;
2   
3   
4   import com.jcorporate.expresso.core.controller.ControllerException;
5   import com.jcorporate.expresso.core.controller.ExpressoRequest;
6   import com.jcorporate.expresso.core.controller.ExpressoResponse;
7   import com.sri.emo.dbobj.WizDefinition;
8   
9   
10  /***
11   * Common interface for all wizard managers regardless of wizard type.
12   * The <tt>WizardGateway</tt> object dispatches to the wizard managers
13   * based on the data entered in the Wizard definition object.  Essentially
14   * it provides a sort of <tt>Strategy</tt> object to allow multiple types of
15   * wizards to be hooked under a common management interface.
16   *
17   * @author Michael Rimov
18   * @version 1.0
19   */
20  public interface IWizardManager {
21  
22      /***
23       * Begins an 'add' end-user transaction to create a new wizard.
24       *
25       * @param request  ExpressoRequest the request object.
26       * @param response ExpressoResponse the response object.
27       * @throws ControllerException
28       */
29      public void add(ExpressoRequest request, ExpressoResponse response) throws ControllerException;
30  
31  
32      /***
33       * Begins an 'edit' end-user transaction to edit an existing wizard.
34       *
35       * @param wizard   The WizardDefinition to edit.
36       * @param request  ExpressoRequest the request object.
37       * @param response ExpressoResponse the response object.
38       * @throws ControllerException upon error.
39       */
40      public void edit(WizDefinition wizard, ExpressoRequest request, ExpressoResponse response) throws
41              ControllerException;
42  
43  
44      /***
45       * Runs the wizard that the manager is associated with.
46       *
47       * @param wizard   WizDefinition
48       * @param request  ExpressoRequest
49       * @param response ExpressoResponse
50       * @throws ControllerException
51       */
52      public void run(WizDefinition wizard, ExpressoRequest request, ExpressoResponse response) throws
53              ControllerException;
54  
55  }