01: package wicket.settings;
02:
03: import java.util.List;
04:
05: import wicket.markup.html.WebPage;
06: import wicket.markup.resolver.AutoComponentResolver;
07: import wicket.markup.resolver.IComponentResolver;
08:
09: /**
10: * Interface for page related settings.
11: *
12: * @author Igor Vaynberg (ivaynberg)
13: * @author Eelco Hillenius
14: */
15: public interface IPageSettings {
16: /**
17: * Adds a component resolver to the list.
18: *
19: * @param resolver
20: * The {@link IComponentResolver} that is added
21: */
22: void addComponentResolver(IComponentResolver resolver);
23:
24: /**
25: * Get the (modifiable) list of IComponentResolvers.
26: *
27: * @see AutoComponentResolver for an example
28: * @return List of ComponentResolvers
29: */
30: List getComponentResolvers();
31:
32: /**
33: * Gets whether Wicket should try to support opening multiple windows for
34: * the same session transparently. If this is true - the default setting -,
35: * Wicket tries to detect whether a new window was opened by a user (e.g. in
36: * Internet Explorer by pressing ctrl+n or ctrl+click on a link), and if it
37: * detects that, it creates a new page map for that window on the fly. As a
38: * page map represents the 'history' of one window, each window will then
39: * have their own history. If two windows would share the same page map, the
40: * non-bookmarkable links on one window could refer to stale state after
41: * working a while in the other window.
42: * <p>
43: * <strong> Currently, Wicket trying to do this is a best effort that is not
44: * completely fail safe. When the client does not support cookies, support
45: * gets tricky and incomplete. See {@link WebPage}'s internals for the
46: * implementation. </strong>
47: * </p>
48: *
49: * @return Whether Wicket should try to support multiple windows
50: * transparently
51: */
52: boolean getAutomaticMultiWindowSupport();
53:
54: /**
55: * @return Returns the maxPageVersions.
56: */
57: int getMaxPageVersions();
58:
59: /**
60: * @return Returns the pagesVersionedByDefault.
61: */
62: boolean getVersionPagesByDefault();
63:
64: /**
65: * @param maxPageVersions
66: * The maxPageVersion to set.
67: */
68: void setMaxPageVersions(int maxPageVersions);
69:
70: /**
71: * @param pagesVersionedByDefault
72: * The pagesVersionedByDefault to set.
73: */
74: void setVersionPagesByDefault(boolean pagesVersionedByDefault);
75:
76: /**
77: * Sets whether Wicket should try to support opening multiple windows for
78: * the same session transparently. If this is true - the default setting -,
79: * Wicket tries to detect whether a new window was opened by a user (e.g. in
80: * Internet Explorer by pressing ctrl+n or ctrl+click on a link), and if it
81: * detects that, it creates a new page map for that window on the fly. As a
82: * page map represents the 'history' of one window, each window will then
83: * have their own history. If two windows would share the same page map, the
84: * non-bookmarkable links on one window could refer to stale state after
85: * working a while in the other window.
86: * <p>
87: * <strong> Currently, Wicket trying to do this is a best effort that is not
88: * completely fail safe. When the client does not support cookies, support
89: * gets tricky and incomplete. See {@link WebPage}'s internals for the
90: * implementation. </strong>
91: * </p>
92: *
93: * @param automaticMultiWindowSupport
94: * Whether Wicket should try to support multiple windows
95: * transparently
96: */
97: void setAutomaticMultiWindowSupport(
98: boolean automaticMultiWindowSupport);
99: }
|