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 /***
22 * PageFragment is a volatile wrapper around a
23 * {@link org.apache.jetspeed.om.page.Page} metadata
24 * object for use in rendering. As with
25 * the {@link org.apache.jetspeed.om.page.Fragment} object,
26 * <code>Page</code> objects are persistent, single-instance
27 * metadata objects that should not be used to hold per-request
28 * content. ContentPage solves this by providing a thin, wrapper
29 * interface that can be used for rendering requested content associated
30 * with the wrapped page relative to the currect user-request.
31 *
32 * @author weaver@apache.org
33 *
34 */
35 public interface ContentPage extends Page
36 {
37 /***
38 * Provides access to a per-request safe ContentFragment.
39 * ContentFragments add the additional ability to temporarily
40 * store rendered content of the current request along with
41 * original, persistent metadata of the Fragment itself.
42 *
43 * @return ContentFragment wrapping the actual root Fragment.
44 */
45 ContentFragment getRootContentFragment();
46
47 void setRootContentFragment(ContentFragment frag);
48
49 /***
50 * Returns a ContentFragment that wraps the actual
51 * Fragment metadata represented by the id argument.
52 * @param id unique id of the Fragment we want to retrieve.
53 * @return
54 */
55 ContentFragment getContentFragmentById(String id);
56
57
58
59 /***
60 * Returns a list of ContentFragment that wrap the actual
61 * Fragment metadata represented by the name argument.
62 * @param name name of the Fragments we want to retrieve.
63 * @return
64 */
65 List getContentFragmentsByName(String name);
66
67
68
69 /***
70 * Overridden to to indicate that the {@link Fragment} returned
71 * must also be an instance of ContentFragment.
72 *
73 * @param id the fragment id to look for
74 * @return the found ContentFragment object or null if not found
75 */
76 Fragment getFragmentById(String id);
77
78
79
80 /***
81 * Overridden to to indicate that the list of {@link Fragment}
82 * instances returned must also be instances of ContentFragment.
83 *
84 * @param name the fragments name to look for
85 * @return the list of found ContentFragment object or null if not found
86 */
87 List getFragmentsByName(String name);
88
89
90
91 /***
92 * Overridden to to indicate that the {@link Fragment} returned
93 * must also be an instance of ContentFragment.
94 *
95 * @return the base Fragment object for this page.
96 */
97 Fragment getRootFragment();
98 }