001: /*
002: * Copyright 2002 Sun Microsystems, Inc. All
003: * rights reserved. Use of this product is subject
004: * to license terms. Federal Acquisitions:
005: * Commercial Software -- Government Users
006: * Subject to Standard License Terms and
007: * Conditions.
008: *
009: * Sun, Sun Microsystems, the Sun logo, and Sun ONE
010: * are trademarks or registered trademarks of Sun Microsystems,
011: * Inc. in the United States and other countries.
012: */
013: package com.sun.portal.providers.containers;
014:
015: import java.util.List;
016:
017: import com.sun.portal.providers.context.ContainerProviderContext;
018:
019: import com.sun.portal.providers.ProviderException;
020:
021: /**
022: * <code>ContainerProvider</code> defines the interface for
023: * implementing a container provider.
024: *
025: * A container provider is a provider that generates its views primarily
026: * by being a client of other provider objects. Here, a container provider
027: * is defined as a provider that has a selected and available channels list,
028: * and allows getting and setting of these lists.
029: *
030: * Selected channels are those that are visible on the portal page.
031: * Available channels are those that are available to
032: * be activated on the portal page.
033: * A selected channels list should only contain channels that are visisble
034: * when the containers displays its main view.
035: *
036: * @see com.sun.portal.providers.Provider
037: */
038:
039: public interface ContainerProvider {
040: /**
041: * Gets the list of selected channel names.
042: *
043: * Selected Channels are channels that are visible on the portal page.
044: *
045: * @return The list of selected channel names, a list of string names.
046: *
047: * @exception ProviderException If the list of channel names cannot be
048: * returned.
049: */
050: public List getSelectedChannels() throws ProviderException;
051:
052: /**
053: * Gets the list of available channel names.
054: *
055: * Available Channels are channels that are available to be added to the portal page.
056: *
057: * @return The list of available channel names, a list of string names.
058: *
059: * @exception ProviderException If the list of channel names cannot be
060: * returned.
061: */
062: public List getAvailableChannels() throws ProviderException;
063:
064: /**
065: * Sets the list of selected channel names.
066: *
067: * @parem sel The new list of channel names.
068: *
069: * @exception ProviderException If the list of channel names cannot be
070: * set.
071: */
072: public void setSelectedChannels(List sel) throws ProviderException;
073:
074: /**
075: * Sets the list of available channel names.
076: *
077: * @parem sel The new list of channel names.
078: *
079: * @exception ProviderException If the list of channel names cannot be
080: * set.
081: */
082: public void setAvailableChannels(List avail)
083: throws ProviderException;
084:
085: /**
086: * Gets the window state of the channel.
087: *
088: * This method returns the window state for the channel passed in.
089: *
090: * @param channelName channel for which window state is requested.
091: * @return The window state
092: * @exception ProviderException If the window state cannot be returned.
093: *
094: * @see com.sun.portal.providers.containers.ContainerProvider#setWindowState()
095: */
096: public int getWindowState(String channelName)
097: throws ProviderException;
098:
099: /**
100: * Sets the window state of the channel.
101: *
102: * @param channelName channel for which window state needs to be set
103: * @param windowState The new window state.
104: *
105: * @exception UnsupportedWindowStateException If the window state cannot be set or
106: * if the window state passed in is not in supported window states.
107: *
108: * @see com.sun.portal.providers.containers.ContainerProvider#getWindowState()
109: * @see com.sun.portal.providers.containers.ContainerProvider#getSupportedWindowStates()
110: */
111: public void setWindowState(String channelName, int windowState)
112: throws UnsupportedWindowStateException;
113:
114: /**
115: * Gets the supported window states.
116: *
117: * This method returns an integer array of Window States supported
118: *
119: * @return Supported Window States as an integer array.
120: *
121: * @exception ProviderException If the window states cannot be returned.
122: *
123: * @see com.sun.portal.providers.containers.ContainerProvider#getWindowState()
124: * @see com.sun.portal.providers.containers.ContainerProvider#setWindowState()
125: */
126: public int[] getSupportedWindowStates() throws ProviderException;
127:
128: }
|