|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.portal.providers.ProviderAdapter
com.sun.portal.providers.ProfileProviderAdapter
com.sun.portal.providers.jsp.JSPProvider
com.sun.portal.providers.containers.JSPContainerProviderAdapter
com.sun.portal.providers.containers.jsp.tab.JSPTabContainerProvider
This class provides the implementation for JSPTabContainerProvider
and extends JSPContainerProviderAdapter
and
implements TabContainer
A TabContainer provider is a container provider that generates its views primarily
by being a client of table container objects.The Tab Container displays one of its
contained channels at a time. The tab container allows table containers to be arranged
onto virtual pages. The container can then switch between these pages allowing them to
be physically viewed one at a time.
It allows the user to switch logically separate row-column displays.
Viewing this with container glasses on, each page is a table container.
The tab container then contains multiple table containers, one for each page.
Each tab in tab container corresponds to a table container.
Here, a Tab container provider is defined as a container
provider that has a selected and available channels list,
and allows getting and setting of these lists.
Tab container uses the selected channels list to hold the names of the tabs
that the user has configured on their desktop.
The available channels list is used to hold the list of tab topics,
or the tabs that the user can add to their desktop.
This does not adhere to the semantics of the getSelectedChannels
defined in ContainerProvider.
Selected Tabs are the container channels that are considered "active" on the
portal page. Available Tabs are those that are available to
be added to the portal page from the edit page.
TabContainer
,
JSPContainerProviderAdapter
Field Summary |
Fields inherited from interface com.sun.portal.providers.ProviderWidths |
WIDTH_FULL_BOTTOM, WIDTH_FULL_TOP, WIDTH_THICK, WIDTH_THIN |
Fields inherited from interface com.sun.portal.providers.ProviderEditTypes |
EDIT_COMPLETE, EDIT_SUBSET |
Constructor Summary | |
JSPTabContainerProvider()
|
Method Summary | |
void |
addTab(java.lang.String name,
java.lang.String title)
Adds the tab back to the desktop that has been removed before |
java.util.List |
getAvailableChannels()
Gets the list of tab topics that are available to be added to the portal page. |
java.util.List |
getAvailableTabs()
Gets the List of available tab topics. |
java.lang.StringBuffer |
getContent(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Gets the provider's content by executing a JSP. |
java.net.URL |
getContentURL(ModifiableTab tab,
javax.servlet.http.HttpServletRequest req)
Gets the ContentPage URL. |
UnmodifiableTab |
getMakeTab()
Gets the make tab, the tab spec to be used for 'Make My Own tab' creation by the user . |
java.lang.String |
getMakeTabName()
Gets the make tab channel Name, the tab spec to be used for 'Make My Own tab' creation by the user . |
java.lang.String |
getMakeTabProviderName()
Gets the make tab provider Name, the tab spec to be used for 'Make My Own tab' creation by the user . |
int |
getMaxTabs()
Gets the maximum number of tabs allowed on the user's desktop. |
java.util.List |
getSelectedChannels()
Gets the list of tab names that are available on the portal page. |
UnmodifiableTab |
getSelectedTab()
Gets the selected tab, the current selected tab in the user's session . |
java.lang.String |
getSelectedTabName()
Gets the selected tab Name, the current selected tab in the user's session . |
java.util.List |
getSelectedTabs()
Gets the List of selected tabs. |
UnmodifiableTab |
getStartTab()
Gets the start tab, the tab to be displayed when the user logs in. |
java.lang.String |
getStartTabName()
Gets the start tab Name, the name of the tab to be displayed when the user logs in. |
int[] |
getSupportedWindowStates()
Gets the supported window states. |
UnmodifiableTab |
getTab(java.lang.String name)
Gets a tab. |
java.net.URL |
getTabURL(UnmodifiableTab tab,
javax.servlet.http.HttpServletRequest req)
Gets the Tab URL. |
int |
getWindowState(java.lang.String channelName)
Gets the window state of the channel. |
void |
init(java.lang.String n,
javax.servlet.http.HttpServletRequest req)
Initializes the TabContainerProvider. |
java.net.URL |
processEdit(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Process a form for this provider. |
void |
removeTab(java.lang.String name)
Removes the tab. |
void |
setAvailableChannels(java.util.List avail)
Sets the list of available channel names. |
void |
setSelectedChannels(java.util.List sel)
Sets the list of selected channel names. |
void |
setSelectedTab(ModifiableTab t)
Sets the selected tab Name in the session. |
void |
setSelectedTabName(java.lang.String tabName)
Sets the selected tab Name in the session |
void |
setStartTabName()
Sets the start tab Name, the name of the tab to be displayed when the user logs in. |
void |
setStartTabName(java.lang.String name)
Sets the start tab Name, the name of the tab to be displayed when the user logs in. |
void |
setStartTabName(UnmodifiableTab t)
Sets the start tab Name, the name of the tab to be displayed when the user logs in. |
void |
setTab(ModifiableTab t)
Sets a tab. |
void |
setTab(ModifiableTab t,
boolean selected)
Sets a tab. |
void |
setWindowState(java.lang.String channelName,
int windowState)
Sets the window state of a channel. |
Methods inherited from class com.sun.portal.providers.containers.JSPContainerProviderAdapter |
getAvailableAndUserDefinedChannels, getContainerProviderContext, getRefreshTime |
Methods inherited from class com.sun.portal.providers.jsp.JSPProvider |
getContentPage, getEdit, getEditPage, getExistingJSPPath, getMostSpecificJSPPath, getProcessPage, includeJspPage, isPresentable |
Methods inherited from class com.sun.portal.providers.ProviderAdapter |
getContent, getDescription, getEdit, getEditType, getHelp, getHelp, getName, getProviderContext, getResourceBundle, getResourceBundle, getTitle, getWidth, isEditable, isPresentable, processEdit |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JSPTabContainerProvider()
Method Detail |
public void init(java.lang.String n, javax.servlet.http.HttpServletRequest req) throws ProviderException
init
in interface Provider
init
in class JSPProvider
n
- Unique name identifying this TabContainerprovider. This value
should always be returned from getName()
.req
- The HTTP request object corresponding to the HTTP request
that caused this provider object ot be created. This request may be
used to extract session or user information that could be used to
gain access to external resources.
ProviderException
- If there was an error initializing the
TabContainerProvider. How this exception is handled is up to the client of the
TabContainerProvider object.Provider.getName()
public java.util.List getSelectedChannels() throws ProviderException
getSelectedChannels()
in ContainerProvider. This method returns the names of the tabs that
the user has configured on their desktop.
getSelectedChannels
in interface ContainerProvider
getSelectedChannels
in class JSPContainerProviderAdapter
ProviderException
- If the list of channel names cannot be
returned.public java.util.List getAvailableChannels() throws ProviderException
getAvailableChannels
in interface ContainerProvider
getAvailableChannels
in class JSPContainerProviderAdapter
ProviderException
- If the list of channel names cannot be
returned.public void setSelectedChannels(java.util.List sel) throws ProviderException
setSelectedChannels
in interface ContainerProvider
setSelectedChannels
in class JSPContainerProviderAdapter
sel
- The new list of channel names.
ProviderException
- If the list of channel names cannot be
set.public void setAvailableChannels(java.util.List avail) throws ProviderException
setAvailableChannels
in interface ContainerProvider
setAvailableChannels
in class JSPContainerProviderAdapter
avail
- The new list of channel names.
ProviderException
- If the list of channel names cannot be
set.public int getMaxTabs() throws ProviderException
getMaxTabs
in interface TabContainer
ProviderException
- If the maximum number of tabs cannot be
returned.public java.util.List getSelectedTabs() throws ProviderException
getSelectedTabs
in interface TabContainer
ProviderException
- If the list of selected tabs cannot be
returned.UnmodifiableTab
public java.util.List getAvailableTabs() throws ProviderException
getAvailableTabs
in interface TabContainer
ProviderException
- If the list of available tabs cannot be
returned.UnmodifiableTab
public UnmodifiableTab getStartTab() throws ProviderException
getStartTab
in interface TabContainer
UnmodifiableTab
.
ProviderException
- If the start tab cannot be
returned.UnmodifiableTab
public java.lang.String getStartTabName() throws ProviderException
getStartTabName
in interface TabContainer
String
.
ProviderException
- If the start tab name cannot be
returned.public UnmodifiableTab getMakeTab() throws ProviderException
getMakeTab
in interface TabContainer
UnmodifiableTab
.
ProviderException
- If the make tab cannot be
returned.UnmodifiableTab
public java.lang.String getMakeTabName() throws ProviderException
getMakeTabName
in interface TabContainer
String
.
ProviderException
- If the make tab name cannot be
returned.public java.lang.String getMakeTabProviderName() throws ProviderException
getMakeTabProviderName
in interface TabContainer
String
.
ProviderException
- If the make tab provider name cannot be
returned.public java.lang.String getSelectedTabName() throws ProviderException
getSelectedTabName
in interface TabContainer
String
.
ProviderException
- If the selected tab name cannot be
returned.public UnmodifiableTab getSelectedTab() throws ProviderException
getSelectedChannels()
in ContainerProvider and gets the active tab on the portal page.
getSelectedTab
in interface TabContainer
UnmodifiableTab
.
ProviderException
- If the selected tab cannot be
returned.UnmodifiableTab
,
ContainerProvider
public UnmodifiableTab getTab(java.lang.String name) throws ProviderException
UnmodifiableTab
for the named channel.
getTab
in interface TabContainer
name
- The name of the channel for which the tab Object is requested.
UnmodifiableTab
.
ProviderException
- If the tab cannot be
returned.UnmodifiableTab
public void setTab(ModifiableTab t) throws ProviderException
setTab
in interface TabContainer
ProviderException
- If the tab cannot be setUnmodifiableTab
,
ModifiableTab
public void setTab(ModifiableTab t, boolean selected) throws ProviderException
setTab
in interface TabContainer
selected
- If true sets the tab to the current
selected tab on the user's desktop.
This method adds the ModifiableTab to the selected tabs list
ProviderException
- If the tab cannot be setUnmodifiableTab
,
ModifiableTab
public void setStartTabName() throws ProviderException
setStartTabName
in interface TabContainer
ProviderException
- If the start tab name cannot be
returned.public void setStartTabName(UnmodifiableTab t) throws ProviderException
setStartTabName
in interface TabContainer
t
- A UnmodifiableTab
Whose tab name needs to be set as the start tab name.
This method sets the start tab name to the name of UnmodifiableTab that was passed in.
ProviderException
- If the start tab name cannot be setUnmodifiableTab
public void setStartTabName(java.lang.String name) throws ProviderException
setStartTabName
in interface TabContainer
name
- The name of the channel which needs to be set as the start tab.
This method sets the start tab to the name passed in..
ProviderException
- If the start tab name cannot be set.public void setSelectedTab(ModifiableTab t) throws ProviderException
setSelectedTab
in interface TabContainer
t
- A ModifiableTab
.Whose tab name needs to be set as the selected tab name.
This method sets the current selected tab name to the name of
ModifiableTab that was passed in.
ProviderException
- If the start tab name cannot be setModifiableTab
public void setSelectedTabName(java.lang.String tabName) throws ProviderException
setSelectedTabName
in interface TabContainer
tabName
- The name of the channel which needs to be set as the selected tab.
This method sets the current selected tab on the user's desktop
to the name passed in..
ProviderException
- If the selected tab name cannot be set.public java.lang.StringBuffer getContent(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws ProviderException
JSPProvider
contentPage
attribute has a value, it is
used as the name of a JSP to execute per the search algorithm
defined above. The body of the response is returned as the
value for the method. If the contentPage
attribute
is blank, the superclass method is called.
The following values from the request are passed on to the JSP servlet:
getContent
in interface Provider
getContent
in class JSPProvider
ProviderException
- If there was an error generating the
content. Upon catching this error, the desktop application will
attempt to fetch a cached copy of the content. If a cached copy
does not exist, then an error message will be displayed in the body
of the provider.ProviderAdapter.getContent(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
public java.net.URL processEdit(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws ProviderException
Form data, passed into this method in the request, has been decoded into Unicode.
When the desktop servlet receives a request where the action is "process", it looks at the parameters to identify which provider will handle the action, through this method. The request passed in contains the parameters.
After calling this method, the desktop servlet will re-direct to the URL
returned from this method. Therefore, the result of a provider post
can be any desktop serlvet action, or the content of an arbitrary URL.
For more information on constructing desktop serlvet URLs, see
DesktopSerlvet
.
processEdit
in interface Provider
processEdit
in class JSPProvider
ProviderException
- If there was an error processing
the edit form. How this exception is handled is up to the client of the
provider object.Provider.getEdit(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
,
Provider.isEditable()
,
InvalidEditFormDataException
,
DesktopServlet
public java.net.URL getTabURL(UnmodifiableTab tab, javax.servlet.http.HttpServletRequest req) throws ProviderException
req
- An HttpServletRequest that contains
information related to this
request for content.
ProviderException
- If the Tab URL cannot be generated.public void removeTab(java.lang.String name) throws ProviderException
ProviderException
- If the tab cannot be removed.public void addTab(java.lang.String name, java.lang.String title) throws ProviderException
ProviderException
- If the tab cannot be added.public java.net.URL getContentURL(ModifiableTab tab, javax.servlet.http.HttpServletRequest req) throws ProviderException
req
- An HttpServletRequest that contains
information related to this
request for content.
ProviderException
- If the ContentPage URL cannot be generated.public int getWindowState(java.lang.String channelName) throws ProviderException
getWindowState
in interface ContainerProvider
getWindowState
in class JSPContainerProviderAdapter
channelName
- channel for which the window state is requested.
ProviderException
ProviderWindowStates.NORMAL
public void setWindowState(java.lang.String channelName, int windowState) throws UnsupportedWindowStateException
setWindowState
in interface ContainerProvider
setWindowState
in class JSPContainerProviderAdapter
channelName
- channel for which the window state needs to be setwindowState
- The new window state
UnsupportedWindowStateException.
UnsupportedWindowStateException
public int[] getSupportedWindowStates() throws ProviderException
getSupportedWindowStates
in interface ContainerProvider
getSupportedWindowStates
in class JSPContainerProviderAdapter
ProviderWindowStates.NORMAL
ProviderException
- If the window states cannot be returned.ProviderWindowStates.NORMAL
,
com.sun.portal.providers.containers.jsp.tab.JSPTabContainerProvider#getWindowState()
,
com.sun.portal.providers.containers.jsp.tab.JSPTabContainerProvider#setWindowState()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |