1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.container.state;
18
19 import javax.portlet.PortletMode;
20 import javax.portlet.WindowState;
21 import javax.servlet.http.HttpServletRequest;
22
23 import org.apache.jetspeed.container.url.PortalURL;
24
25 /***
26 * NavigationalState
27 *
28 * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
29 * @version $Id: NavigationalStateComponent.java 516448 2007-03-09 16:25:47Z ate $
30 */
31 public interface NavigationalStateComponent
32 {
33 /***
34 * Creates a navigational state.
35 * Depending on the implementation, a navigational state context can be retrieved from
36 * a persistence store to recover the state of a page such as portlet modes
37 * and window states of portlets on a page.
38 *
39 * @return A new navigational state. This method will never return <code>null</code>
40 * @throws FailedToCreateNavStateException if the nav state could not be created. Under normal
41 * circumstances, this should not happen.
42 */
43 NavigationalState create();
44
45 /***
46 * Creates a Portal URL representing the URL of the request.
47 *
48 * @param request The ubiqitious request.
49 * @param characterEncoding String containing the name of the chararacter encoding
50 * @return A new Portal URL. This method will never return <code>null</code>;
51 * @throws FailedToCreatePortalUrlException if the portelt url could not be created. Under normal
52 * circumstances, this should not happen.
53 */
54 PortalURL createURL(HttpServletRequest request, String characterEncoding);
55
56 /***
57 * Given a window state name, look up its object.
58 * Ensures that we always use the same objects for WindowStates
59 * allowing for comparison by value.
60 *
61 * @param name The string representation of the window state.
62 * @return The corresponding WindowState object
63 */
64 WindowState lookupWindowState(String name);
65
66 /***
67 * Given a portlet mode name, look up its object.
68 * Ensures that we always use the same objects for Portlet Modes
69 * allowing for comparison by value.
70 *
71 * @param name The string representation of the portlet mode.
72 * @return The corresponding PortletMode object
73 */
74 PortletMode lookupPortletMode(String name);
75
76 /***
77 * Creates a Desktop Portal URL representing the URL of the request.
78 *
79 * @param request The ubiqitious request.
80 * @param characterEncoding String containing the name of the chararacter encoding
81 * @return A new Portal URL. This method will never return <code>null</code>;
82 * @throws FailedToCreatePortalUrlException if the portelt url could not be created. Under normal
83 * circumstances, this should not happen.
84 */
85 PortalURL createDesktopURL(HttpServletRequest request, String characterEncoding);
86 }