01: /* Copyright 2001 The JA-SIG Collaborative. All rights reserved.
02: * See license distributed with this file and
03: * available online at http://www.uportal.org/license.html
04: */
05:
06: package org.jasig.portal;
07:
08: import org.xml.sax.ContentHandler;
09:
10: /**
11: * An interface presented by a channel to a portal.
12: * A channel is a stateful entity. The main part of the channel lifecycle is
13: * the rendering cycle. The rendering cycle starts with an invokation of the {@link #setRuntimeData} method
14: * for updating channel state, and is eventually followed by a call to the {@link #renderXML} method that
15: * retrieves the current state of the channel. These are the main two methods of the interface.
16: *
17: * @author Peter Kharchenko {@link <a href="mailto:pkharchenko@interactivebusiness.com"">pkharchenko@interactivebusiness.com"</a>}
18: * @version $Revision: 36690 $
19: */
20: public interface IChannel {
21: /**
22: * Passes ChannelStaticData to the channel.
23: * This is done during channel instantiation time.
24: * see org.jasig.portal.ChannelStaticData
25: * @param sd channel static data
26: * @see ChannelStaticData
27: */
28: public void setStaticData(ChannelStaticData sd)
29: throws PortalException;
30:
31: /**
32: * Passes ChannelRuntimeData to the channel.
33: * This function is called prior to the renderXML() call.
34: * @param rd channel runtime data
35: * @see ChannelRuntimeData
36: */
37: public void setRuntimeData(ChannelRuntimeData rd)
38: throws PortalException;
39:
40: /**
41: * Passes an outside event to a channel.
42: * Events should normally come from the LayoutBean.
43: * @param ev PortalEvent object
44: * @see PortalEvent
45: */
46: public void receiveEvent(PortalEvent ev);
47:
48: /**
49: * Acquires ChannelRuntimeProperites from the channel.
50: * This function may be called by the portal framework throughout the session.
51: * @see ChannelRuntimeProperties
52: */
53: public ChannelRuntimeProperties getRuntimeProperties();
54:
55: /**
56: * Ask channel to render its content.
57: * @param out the SAX ContentHandler to output content to
58: */
59: public void renderXML(ContentHandler out) throws PortalException;
60: }
|