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.channels.DLMUserPreferences;
07:
08: import org.jasig.portal.ChannelRuntimeData;
09: import org.jasig.portal.ChannelRuntimeProperties;
10: import org.jasig.portal.ChannelStaticData;
11: import org.jasig.portal.IPrivilegedChannel;
12: import org.jasig.portal.PortalControlStructures;
13: import org.jasig.portal.PortalEvent;
14: import org.jasig.portal.PortalException;
15: import org.xml.sax.ContentHandler;
16:
17: /** <p>A base class for a CUserPreferences state.</p>
18: * @author Peter Kharchenko, peterk@interactivebusiness.com
19: * @version $Revision: 35641 $
20: */
21:
22: class BaseState implements IPrivilegedChannel {
23: protected CUserPreferences context;
24: protected IPrivilegedChannel internalState;
25:
26: public BaseState() {
27: }
28:
29: public BaseState(CUserPreferences context) {
30: this .context = context;
31: }
32:
33: public BaseState(IPrivilegedChannel state) {
34: internalState = state;
35: }
36:
37: public BaseState(CUserPreferences context, IPrivilegedChannel state) {
38: internalState = state;
39: }
40:
41: public void setPortalControlStructures(PortalControlStructures pcs)
42: throws PortalException {
43: }
44:
45: public void setRuntimeData(ChannelRuntimeData rd)
46: throws PortalException {
47: // analyze header parameters, reset states, etc.
48: }
49:
50: public void setStaticData(ChannelStaticData sd)
51: throws PortalException {
52: };
53:
54: public void renderXML(ContentHandler out) throws PortalException {
55: // render header controls
56: }
57:
58: public void receiveEvent(PortalEvent ev) {
59: }
60:
61: // these two functions are never really called
62: public ChannelRuntimeProperties getRuntimeProperties() {
63: return new ChannelRuntimeProperties();
64: }
65:
66: public void setState(IPrivilegedChannel state) {
67: this .internalState = state;
68: }
69:
70: public void setContext(CUserPreferences context) {
71: this.context = context;
72: }
73: }
|