1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.apache.pluto.portalImpl.aggregation;
21
22 import java.io.IOException;
23 import java.util.Collection;
24
25 import javax.servlet.ServletException;
26 import javax.servlet.http.HttpServletRequest;
27 import javax.servlet.http.HttpServletResponse;
28
29 import org.apache.pluto.portalImpl.aggregation.navigation.Navigation;
30 import org.apache.pluto.portalImpl.core.PortalURL;
31 import org.apache.pluto.portalImpl.util.Parameters;
32
33 public interface Fragment
34 {
35
36
37 /***
38 * Is called to render the fragment. This may be a page, column or
39 * even a portlet.
40 *
41 * @param request the servlet request
42 * @param response the servlet response
43 * @exception ServletException
44 * @exception IOException
45 */
46 void service(HttpServletRequest request, HttpServletResponse response)
47 throws ServletException, IOException;
48
49 /***
50 * Returns the identifier of this fragment. Mostly this is a name visible
51 * in the Portal URL.
52 *
53 * @return the identifier of this fragment
54 */
55 String getId();
56
57 /***
58 * Returns the parent fragment. If this fragment is the root fragment
59 * the return value is NULL
60 *
61 * @return the parent fragment or NULL if this is the root fragment
62 */
63 Fragment getParent();
64
65 /***
66 * Returns the initialization parameters of this fragment
67 *
68 * @return the init parameters
69 */
70 Parameters getInitParameters();
71
72 /***
73 * Returns a collection of all child fragments
74 *
75 * @return a collection containing objects implementing the interface fragment
76 */
77 Collection getChildFragments();
78
79 /***
80 * Adds an child to the fragment
81 *
82 * @param child the child fragment
83 */
84 void addChild(Fragment child);
85
86 /***
87 * Returns the navigational information linked with this fragment.
88 * The return value may be NULL, if no navigational information is defined.
89 *
90 * @return the navigational information
91 */
92 Navigation getNavigation();
93
94 /***
95 * Creates an URL pointing to this fragment
96 *
97 * @param url the PortalURL object used
98 */
99 void createURL(PortalURL url);
100
101 /***
102 * Returns true if the fragment is part of the URL
103 *
104 * @param url the PortalURL object used
105 * @return true if the fragment is part of the URL
106 */
107 boolean isPartOfURL(PortalURL url);
108
109 }