1
2
3
4
5 package net.sf.wfnm;
6
7 /***
8 * Defines the navigation context.<br> Concrete implementations of this interface allow to harvest information such as:
9 *
10 * <ul>
11 * <li>
12 * keys of objects inserted/removed into/from the http session
13 * </li>
14 * <li>
15 * the webflow name and its default ownership, if any new is created
16 * </li>
17 * <li>
18 * the ownership of single objects, if any have been defined
19 * </li>
20 * <li>
21 * whether the current page has be to ignored from server side history
22 * </li>
23 * <li>
24 * whether the framework has to be resetted
25 * </li>
26 * <li>
27 * if a previous webflow has to be forced
28 * </li>
29 * </ul>
30 *
31 *
32 * @author <a href="mailto:malbari@users.sourceforge.net">Maurizio Albari</a>
33 * @version 1.0.6
34 */
35 public interface NavigationContext {
36 /***
37 * Sets an attribute.
38 *
39 * @param container the attribute container
40 * @param objectKey the object key
41 */
42 void setAttribute(AttributeContainer container, String objectKey);
43
44 /***
45 * Sets the webflow default ownership.
46 *
47 * @param defaultOwnership the webflow default ownership
48 */
49 void setDefaultOwnership(int defaultOwnership);
50
51 /***
52 * Returns true if the framework has to be resetted.
53 *
54 * @return true if the framework has to be resetted
55 */
56 boolean isFrameworkToReset();
57
58 /***
59 * Sets whether the page has to be ignored.
60 *
61 * @param ignorePage true if the page has to be ignored
62 */
63 void setIgnorePage(boolean ignorePage);
64
65 /***
66 * Indicates if the page has to be ignored.
67 *
68 * @return true if the page has to be ignored
69 */
70 boolean isIgnorePage();
71
72 /***
73 * Force the previous webflow.
74 *
75 * @param webflowName the previous webflow to force
76 */
77 void setPreviousWebflowToForce(String webflowName);
78
79 /***
80 * Sets the webflow name.
81 *
82 * @param webflowName the webflow name
83 */
84 void setWebflowName(String webflowName);
85
86 /***
87 * Adds a deferred ownership.
88 *
89 * @param objectKey the object key
90 * @param objectOwnership the object ownership
91 */
92 void addOwnership(String objectKey, int objectOwnership);
93
94 /***
95 * Notify that a page has been reached.
96 *
97 * @param container the attribute container
98 * @param url the url of the page
99 */
100 void notifyPage(AttributeContainer container, String url);
101
102 /***
103 * Removes an attribute.
104 *
105 * @param container the attribute container
106 * @param objectKey the object key to remove
107 */
108 void removeAttribute(AttributeContainer container, String objectKey);
109
110 /***
111 * Reset the Webflow Navigation Manager framework.
112 */
113 void resetFramework();
114 }