1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.desktop;
18
19 import org.apache.jetspeed.headerresource.HeaderResourceFactory;
20 import org.apache.jetspeed.request.RequestContext;
21
22 /***
23 * Jetspeed Desktop
24 *
25 * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
26 * @version $Id: $
27 */
28 public interface JetspeedDesktop
29 {
30 String DESKTOP_ENABLED_REQUEST_ATTRIBUTE = "desktop.enabled";
31
32 String DESKTOP_ENCODER_REQUEST_PARAMETER = "encoder";
33 String DESKTOP_ENCODER_REQUEST_PARAMETER_VALUE = "desktop";
34
35 String DEFAULT_DESKTOP_PIPELINE_PATH = "/desktop";
36 String DEFAULT_DESKTOP_ACTION_PIPELINE_PATH = "/action";
37 String DEFAULT_DESKTOP_RENDER_PIPELINE_PATH = "/render";
38 String DEFAULT_DESKTOP_CONFIGURE_PIPELINE_PATH = "/dtconfigure";
39
40 /***
41 * Render a desktop theme.
42 *
43 * @param request
44 */
45 void render(RequestContext request);
46
47 /***
48 * Indicates whether /desktop is enabled for the current portal request.
49 * Located here due to range of jetspeed components which need this information and
50 * already have a DecorationFactory reference.
51 *
52 * @param requestContext current portal request.
53 *
54 * @return true if /desktop is enabled for the current portal request, otherwise false
55 */
56 boolean isDesktopEnabled( RequestContext requestContext );
57
58 /***
59 * Retrieve the header resource factory
60 *
61 * @return header resource factory
62 */
63 HeaderResourceFactory getHeaderResourceFactory();
64
65 /***
66 * Desktop servlet path ( e.g. /desktop )
67 *
68 * @return portal base url
69 */
70 public String getDesktopServletPath();
71
72 /***
73 * Portal base url ( e.g. http://localhost:8080/jetspeed )
74 *
75 * @return portal base url
76 */
77 public String getPortalBaseUrl( RequestContext requestContext );
78
79 /***
80 * Portal base url ( e.g. http://localhost:8080/jetspeed )
81 *
82 * @return portal base url
83 */
84 public String getPortalBaseUrl( RequestContext requestContext, boolean encode );
85
86 /***
87 * Portal base url with relativePath argument appended ( e.g. http://localhost:8080/jetspeed/javascript/dojo/ )
88 *
89 * @return portal base url with relativePath argument appended
90 */
91 public String getPortalResourceUrl( RequestContext requestContext, String relativePath );
92
93 /***
94 * Portal base url with relativePath argument appended ( e.g. http://localhost:8080/jetspeed/javascript/dojo/ )
95 *
96 * @return portal base url with relativePath argument appended
97 */
98 public String getPortalResourceUrl( RequestContext requestContext, String relativePath, boolean encode );
99
100 /***
101 * Portal base servlet url ( e.g. http://localhost:8080/jetspeed/desktop/ )
102 *
103 * @return portal base servlet url
104 */
105 public String getPortalUrl( RequestContext requestContext );
106
107 /***
108 * Portal base servlet url ( e.g. http://localhost:8080/jetspeed/desktop/ )
109 *
110 * @return portal base servlet url
111 */
112 public String getPortalUrl( RequestContext requestContext, boolean encode );
113
114 /***
115 * Portal base servlet url with relativePath argument appended ( e.g. http://localhost:8080/jetspeed/desktop/default-page.psml )
116 *
117 * @return portal base servlet url with relativePath argument appended
118 */
119 public String getPortalUrl( RequestContext requestContext, String relativePath );
120
121 /***
122 * Portal base servlet url with relativePath argument appended ( e.g. http://localhost:8080/jetspeed/desktop/default-page.psml )
123 *
124 * @return portal base servlet url with relativePath argument appended
125 */
126 public String getPortalUrl( RequestContext requestContext, String relativePath, boolean encode );
127
128 }