1
2
3
4
5
6
7
8
9
10 package com.sri.emo.wizard;
11
12
13 import com.jcorporate.expresso.core.controller.ErrorCollection;
14 import com.jcorporate.expresso.core.dbobj.ValidValue;
15
16 import java.io.Serializable;
17
18 /***
19 * Interface for a wizard page.
20 *
21 * @author Michael Rimov
22 */
23 public interface WizardPage {
24 /***
25 * Every page must have an id that is serializable.
26 *
27 * @return Serializable.
28 */
29 Serializable getId();
30
31 /***
32 * Retrieve the data associated with the page.
33 *
34 * @return the data instance
35 */
36 Serializable getData();
37
38
39 /***
40 * Retrieve the data in a printable fashion. (For labels, etc.)
41 *
42 * @return String
43 */
44 String getPrintableData();
45
46
47 /***
48 * Sets the data associated with the page.
49 *
50 * @param newData the new data for the page.
51 * @throws WizardException upon error.
52 */
53 void setData(Serializable newData) throws WizardException;
54
55 /***
56 * Retrieve the metadata associated with the page.
57 *
58 * @return PageMetadata instance.
59 */
60 PageMetadata getMetadata();
61
62 /***
63 * Retrieve the picklist value for the map.
64 *
65 * @return ValidValue[]
66 */
67 ValidValue[] getMenu();
68
69 /***
70 * Retrieve an error collection (if any) that is associated with this page.
71 * May return null if there are no errors.
72 *
73 * @return ErrorCollection
74 */
75 ErrorCollection getPageErrors();
76
77 /***
78 * Clear all errors associated with the page.
79 */
80 void removeErrors();
81
82 /***
83 * Adds an error to be associated with the current page.
84 *
85 * @param message String
86 */
87 void addError(String message);
88
89 }