1 package com.explosion.expfmodules.wizard;
2
3 import java.util.Map;
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 /***
26 * Created on 01-Dec-2004
27 *
28 * This interface lays out the basic api for a visual or non visual wizard.
29 * The wizard interface has been designed to work with implementations which wrk as follows:
30 *
31 * A backwards and forwards chain of execution with forward branches with no iterations, no concurrency and
32 * nothing fancy in terms of workflow.
33 *
34 * The wizard collections information from the user and then an action is eventually performed as one of the steps..
35 *
36 * Values collected will be held by the implementors of the wuzard and accessed using the setValue and getValue
37 * accessors.
38 * @author Stephen Cowx
39 */
40 public interface Wizard
41 {
42 /***
43 * Returns the first step of this wizard. This step will have a reference to the other steps
44 * that follow on from it.
45 * @return
46 */
47 public Step getFirstStep();
48
49 /***
50 * Returns the name of this wizard (display name)
51 */
52 public String getName();
53
54 /***
55 * This method returns the current step which the wizard is on.
56 * @return
57 */
58 public Step getCurrentStep();
59
60 /***
61 * Returns a map of the step definitions used by this wizard
62 * keyed by StepDefinitionId
63 * @return
64 */
65 public Map getStepDefinitions();
66
67 /***
68 * Called when the wizard is to be completed
69 */
70 public void finish();
71
72 /***
73 * Called to instruct the wizard to go back a step
74 */
75 public void back();
76
77 /***
78 * Called to indicate to the wizard that it should move to the next step
79 */
80 public void next();
81
82 /***
83 * Called to indicate to the wizard that it should stop executing and not make any changes
84 */
85 public void cancel();
86
87 /***
88 * Called to indicate to the wizard that it should begin execution
89 */
90 public void start();
91
92 /***
93 * These values will be populated by each step in the wizard as it progresses so that at the end of the wizard
94 * the values collected can be used by the action performed
95 * @return
96 */
97 public Map getWizardDataValues();
98
99 /***
100 * Returns true if this wizard is finshed
101 * @return
102 */
103 public boolean isFinished();
104
105
106 }