|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.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
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(String name,
String title)
Adds the tab back to the desktop that has been removed before |
List |
getAvailableChannels()
Gets the list of tab topics that are available to be added to the portal page. |
List |
getAvailableTabs()
Gets the List of available tab topics. |
StringBuffer |
getContent(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Gets the provider's content by executing a JSP. |
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 . |
String |
getMakeTabName()
Gets the make tab channel Name, the tab spec to be used for 'Make My Own tab' creation by the user . |
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. |
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 . |
String |
getSelectedTabName()
Gets the selected tab Name, the current selected tab in the user's session . |
List |
getSelectedTabs()
Gets the List of selected tabs. |
UnmodifiableTab |
getStartTab()
Gets the start tab, the tab to be displayed when the user logs in. |
String |
getStartTabName()
Gets the start tab Name, the name of the tab to be displayed when the user logs in. |
UnmodifiableTab |
getTab(String name)
Gets a tab. |
URL |
getTabURL(UnmodifiableTab tab,
javax.servlet.http.HttpServletRequest req)
Gets the Tab URL. |
void |
init(String n,
javax.servlet.http.HttpServletRequest req)
Initializes the TabContainerProvider. |
URL |
processEdit(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Process a form for this provider. |
void |
removeTab(String name)
Removes the tab. |
void |
setAvailableChannels(List avail)
Sets the list of available channel names. |
void |
setSelectedChannels(List sel)
Sets the list of selected channel names. |
void |
setSelectedTab(ModifiableTab t)
Sets the selected tab Name in the session. |
void |
setSelectedTabName(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(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. |
Methods inherited from class com.sun.portal.providers.containers.JSPContainerProviderAdapter |
getContainerProviderContext, getRefreshTime |
Methods inherited from class com.sun.portal.providers.jsp.JSPProvider |
getEdit, isPresentable |
Methods inherited from class com.sun.portal.providers.ProviderAdapter |
getContent, getDescription, getEdit, getEditType, getHelp, getHelp, getName, getProviderContext, getResourceBundle, getResourceBundle, getTitle, getWidth, isEditable, processEdit |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JSPTabContainerProvider()
Method Detail |
public void init(String n, javax.servlet.http.HttpServletRequest req) throws ProviderException
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 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 class JSPContainerProviderAdapter
ProviderException
- If the list of channel names cannot be
returned.public List getAvailableChannels() throws ProviderException
getAvailableChannels
in class JSPContainerProviderAdapter
ProviderException
- If the list of channel names cannot be
returned.public void setSelectedChannels(List sel) throws ProviderException
setSelectedChannels
in class JSPContainerProviderAdapter
sel
- The new list of channel names.ProviderException
- If the list of channel names cannot be
set.public void setAvailableChannels(List avail) throws ProviderException
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 List getSelectedTabs() throws ProviderException
getSelectedTabs
in interface TabContainer
ProviderException
- If the list of selected tabs cannot be
returned.UnmodifiableTab
public 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 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 String getMakeTabName() throws ProviderException
getMakeTabName
in interface TabContainer
String
.ProviderException
- If the make tab name cannot be
returned.public String getMakeTabProviderName() throws ProviderException
getMakeTabProviderName
in interface TabContainer
String
.ProviderException
- If the make tab provider name cannot be
returned.public 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(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
ModifiableTab.
- Tab that needs to be set.
This method adds the ModifiableTab to the selected tabs list.ProviderException
- If the tab cannot be setUnmodifiableTab
,
ModifiableTab
public void setTab(ModifiableTab t, boolean selected) throws ProviderException
setTab
in interface TabContainer
ModifiableTab.
- Tab that needs to be set.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 listProviderException
- 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
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(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
ModifiableTab.Whose
- tab name needs to be set as the selected tab name.
This method sets the active tab name on the user's desktop to the name of
ModifiableTab that was passed in.ProviderException
- If the start tab name cannot be setModifiableTab
public void setSelectedTabName(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 active tab on the user's desktop
to the name passed in..ProviderException
- If the selected tab name cannot be set.public 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 class JSPProvider
com.sun.portal.providers.jsp.JSPProvider
request
- An HttpServletRequest that contains information related to this
request for content.response
- An HttpServletResponse that allows the provider to influence the
overall response for the desktop page (besides generating the content).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 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 class JSPProvider
request
- An HttpServletRequest that contains
information related to this
request for content.response
- An HttpServletResponse that allows the
provider to influence the
overall response for the desktop page (besides generating the content).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 URL getTabURL(UnmodifiableTab tab, javax.servlet.http.HttpServletRequest req) throws ProviderException
UnmodifiableTab
- tab. The tab used in generating the URL
to be used to switch the selected tab to the passed in tab on the user's desktop.req
- An HttpServletRequest that contains
information related to this
request for content.ProviderException
- If the Tab URL cannot be generated.public void removeTab(String name) throws ProviderException
name.
- Name of the tab to be removed.
This method removes the tab from the selected channels list if predefined
and removes the tab from the selected and available lists and deletes the
corresponding table container if user created.ProviderException
- If the tab cannot be removed.public void addTab(String name, String title) throws ProviderException
name.
- Name of the tab.title.
- displayname of the tab.ProviderException
- If the tab cannot be added.public URL getContentURL(ModifiableTab tab, javax.servlet.http.HttpServletRequest req) throws ProviderException
ModifiableTab
- tab. The tab used in generating the URL
to be used to redirect to when the
user is making a tab from scratch in the Make New Tab Page..req
- An HttpServletRequest that contains
information related to this
request for content.ProviderException
- If the ContentPage URL cannot be generated.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |