1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.om.page;
18
19 import java.util.List;
20
21 import org.apache.jetspeed.om.folder.MenuDefinition;
22 import org.apache.jetspeed.om.folder.MenuExcludeDefinition;
23 import org.apache.jetspeed.om.folder.MenuIncludeDefinition;
24 import org.apache.jetspeed.om.folder.MenuOptionsDefinition;
25 import org.apache.jetspeed.om.folder.MenuSeparatorDefinition;
26
27 /***
28 * This interface represents a complete page document used by Jetspeed
29 * to layout a user-customizable portal page.
30 *
31 * @version $Id: Page.java 516448 2007-03-09 16:25:47Z ate $
32 */
33 public interface Page extends Document, java.io.Serializable
34 {
35 String DOCUMENT_TYPE = ".psml";
36
37 /***
38 * Returns the name of the default skin that applies to this
39 * page.
40 *
41 * @return the page default skin name
42 */
43 String getSkin();
44
45 /***
46 * Modifies the skin for this page.
47 *
48 * @param skinName the name of the new skin for the page
49 */
50 void setSkin(String skinName);
51
52 /***
53 * Returns the name of the default decorator as set here or
54 * in parent folders that applies in this page to fragments
55 * of the specified type.
56 *
57 * @param fragmentType the type of fragment considered
58 * @return the decorator name for the selected type
59 */
60 String getEffectiveDefaultDecorator(String fragmentType);
61
62 /***
63 * Returns the name of the default decorator that applies in this page
64 * to fragments of the specified type
65 *
66 * @param fragmentType the type of fragment considered
67 * @return the decorator name for the selected type
68 */
69 String getDefaultDecorator(String fragmentType);
70
71 /***
72 * Modifies the default decorator for the specified fragment type.
73 *
74 * @param decoratorName the name of the new decorator for the type
75 * @param fragmentType the type of fragment considered
76 */
77 void setDefaultDecorator(String decoratorName, String fragmentType);
78
79 /***
80 * Retrieves the top level fragment of this page. This Fragment should
81 * never be null.
82 *
83 * @return the base Fragment object for this page.
84 */
85 Fragment getRootFragment();
86
87 /***
88 * Sets the top level fragment of this page. This Fragment should
89 * never be null.
90 *
91 * @return the base Fragment object for this page.
92 */
93 void setRootFragment(Fragment fragment);
94
95 /***
96 * Retrieves the fragment contained within this page, with the
97 * specified Id.
98 *
99 * @param id the fragment id to look for
100 * @return the found Fragment object or null if not found
101 */
102 Fragment getFragmentById(String id);
103
104 /***
105 * Removes the fragment contained within this page, with the
106 * specified Id.
107 *
108 * @param id the fragment id to remove
109 * @return the removed Fragment object or null if not found
110 */
111 Fragment removeFragmentById(String id);
112
113 /***
114 * Retrieves the fragments contained within this page, with the
115 * specified name.
116 *
117 * @param name the fragment name to look for
118 * @return the list of found Fragment objects or null if not found
119 */
120 List getFragmentsByName(String name);
121
122 /***
123 * getMenuDefinitions - get list of menu definitions
124 *
125 * @return definition list
126 */
127 List getMenuDefinitions();
128
129 /***
130 * newMenuDefinition - creates a new empty menu definition
131 *
132 * @return a newly created MenuDefinition object for use in Page
133 */
134 MenuDefinition newMenuDefinition();
135
136 /***
137 * newMenuExcludeDefinition - creates a new empty menu exclude definition
138 *
139 * @return a newly created MenuExcludeDefinition object for use in Page
140 */
141 MenuExcludeDefinition newMenuExcludeDefinition();
142
143 /***
144 * newMenuIncludeDefinition - creates a new empty menu include definition
145 *
146 * @return a newly created MenuIncludeDefinition object for use in Page
147 */
148 MenuIncludeDefinition newMenuIncludeDefinition();
149
150 /***
151 * newMenuOptionsDefinition - creates a new empty menu options definition
152 *
153 * @return a newly created MenuOptionsDefinition object for use in Page
154 */
155 MenuOptionsDefinition newMenuOptionsDefinition();
156
157 /***
158 * newMenuSeparatorDefinition - creates a new empty menu separator definition
159 *
160 * @return a newly created MenuSeparatorDefinition object for use in Page
161 */
162 MenuSeparatorDefinition newMenuSeparatorDefinition();
163
164 /***
165 * setMenuDefinitions - set list of menu definitions
166 *
167 * @param definitions definition list
168 */
169 void setMenuDefinitions(List definitions);
170 }
171