1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.decoration;
18
19 import java.util.Collection;
20 import java.util.Set;
21
22 import org.apache.jetspeed.om.page.Fragment;
23 import org.apache.jetspeed.om.page.Page;
24 import org.apache.jetspeed.request.RequestContext;
25
26 /***
27 * Theme provides a simple aggregation of all of the decorations
28 * within the current "page."
29 *
30 * @author <href a="mailto:weaver@apache.org">Scott T. Weaver</a>
31 *
32 */
33 public interface Theme
34 {
35 /***
36 *
37 * @return Set of all of the stylesheets needed to properly
38 * render of the decorations in this theme.
39 */
40 Set getStyleSheets();
41
42 /***
43 * Returns a a Decoration for the requested fragment.
44 *
45 * @param fragment whose decoration we want to retrieve.
46 * @return Decroration for this fragment.
47 *
48 * @see Decoration
49 * @see Fragment
50 */
51 Decoration getDecoration(Fragment fragment);
52
53 /***
54 * Get a list of portlet decoration names used by
55 * portlets on the current page.
56 *
57 * @return unmodifiable list for portlet decoration names.
58 *
59 * @see Decoration
60 * @see Fragment
61 */
62 Collection getPortletDecorationNames();
63
64
65 /***
66 * Returns the the top most, "root" layout fragment's
67 * decoration.
68 *
69 * @return the the top most, "root" layout fragment's
70 * decoration.
71 */
72 LayoutDecoration getPageLayoutDecoration();
73
74 /***
75 * Initialize a page theme
76 *
77 * @param context
78 */
79 void init(Page page, DecorationFactory decoration, RequestContext context);
80
81 boolean isInvalidated();
82
83 void setInvalidated(boolean flag);
84 }