01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
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: * @return Set of all of the stylesheets needed to properly
37: * render of the decorations in this theme.
38: */
39: Set getStyleSheets();
40:
41: /**
42: * Returns a a Decoration for the requested fragment.
43: *
44: * @param fragment whose decoration we want to retrieve.
45: * @return Decroration for this fragment.
46: *
47: * @see Decoration
48: * @see Fragment
49: */
50: Decoration getDecoration(Fragment fragment);
51:
52: /**
53: * Get a list of portlet decoration names used by
54: * portlets on the current page.
55: *
56: * @return unmodifiable list for portlet decoration names.
57: *
58: * @see Decoration
59: * @see Fragment
60: */
61: Collection getPortletDecorationNames();
62:
63: /**
64: * Returns the the top most, "root" layout fragment's
65: * decoration.
66: *
67: * @return the the top most, "root" layout fragment's
68: * decoration.
69: */
70: LayoutDecoration getPageLayoutDecoration();
71:
72: /**
73: * Initialize a page theme
74: *
75: * @param context
76: */
77: void init(Page page, DecorationFactory decoration,
78: RequestContext context);
79:
80: boolean isInvalidated();
81:
82: void setInvalidated(boolean flag);
83: }
|