Sun Java logo     Previous      Contents      Index      Next     

Sun logo
Sun Java System Portal Server 6 2004Q2 Desktop Customization Guide 

Chapter 3
Understanding the Sample Portal

This chapter describes the sample portal that you can choose to install on your system during the Sun Java System Portal Server installation. See the Installation Guide for more information on installing the sample portal.

This chapter assumes that the sample portal is installed. It contains the following sections:


Overview of the Sample Portal

The sample portal consists the following elements:

The Sample Desktop

This section provides an outline of the sample portal sample containers, each of which produces a different looking Desktop. A container is a channel that is able to hold and organize content from other channels.

Sample Containers for the Sample Portal

The sample portal is created from the following containers:

JSPTabContainer    

Creates a Desktop that contains multiple containers selected using different tabs. Normally, each tab is constructed by using the corresponding PredefinedTabPanelContainer. This container is JSP-based. Its provider is JSPTabContainerProvider.

JSPTableContainer    

Creates a Desktop that arranges a maximum of five sub-containers into the channel arrangement. This container is JSP-based. Its provider is JSPTableContainerProvider.

TemplateTabContainer    

Creates a Desktop that contains multiple containers selected using different tabs. Normally, each tab is constructed by using the corresponding PredefinedTemplatePanelContainer. This container is template-based. Its provider is TemplateTabContainerProvider.

TemplateTableContainer    

Creates a Desktop that arranges a maximum of five sub-containers into the channel arrangement. This container is template-based. Its provider is TemplateTableContainerProvider.

FrameTabContainer    

Creates a Desktop using frames. The left-hand frame enables you to navigate, and the right-hand frame displays the channels. This container is JSP-based. Its provider is JSPTabContainerProvider.

For more information on each container, see the appropriate section in this chapter.

Deriving the Sample Desktop

The container architecture uses the various containers, and JavaServer Pages™ (JSP™) or template files, to display the Desktop, and to build a hierarchy of containers that organize the Desktop content. Channels are defined at the global display profile level and are referenced by all the containers.

Determining the User’s Default Desktop

The Portal Server software determines the user’s default container by examining the Default Channel Name attribute for the Desktop page in the Identity Server software administration console.

When you install the sample portal, by default, the default channel is set to JSPTabContainer. Users can view this portal by typing:

http://hostname:port/portal/dt

You can easily view each sample portal Desktop by typing in the appropriate URL.


Note

The Desktop service uses a dynamic attribute, SunPortalDesktopDefaultChannelName, to specify the default channel to execute when accessing the Desktop. This attribute is displayed as Default Channel Name in the administration console. This attribute is only used when the provider=name URL parameter is not specified. The default channel service attribute can be overridden by passing to the Desktop servlet the provider parameter and setting it to the name of a channel. Once the provider=parameter is passed to the Desktop, this value becomes the new default channel. The service attribute is no longer used for the duration of the current user’s session.

Setting the service attribute for the default channel is useful in simple scenarios when you need to set a default channel per organization or per role. In situations where you need to set the default channel based on some programmatic logic, you should use a routing container.

A routing container is a channel that reads a display profile property specifying the user’s preferred default Desktop channel to determine the Desktop to present. See the Portal Server Developer’s Guide for more information on developing a custom routing container.


Guidelines for Using the Sample Portal

Editing the Default Sample Portal Files

Do not directly edit any of the files that make up the sample portal (display profile XML, JSP, and template files). Instead, make a copy of the sample portal to a new directory and then modify those copied files. In this way you preserve the integrity of the sample portal. Additionally, if you later apply a patch to the portal server, you won’t loose any changes you might have made to the sample portal files, as the patch would only overwrite the initially installed sample files.

Changing the Desktop Type

You should also create a custom Desktop type for your users. The Desktop type attribute of the Desktop service is a comma-separated string. It is still a string type, but the Desktop uses it as an ordered Desktop type list. The list is used by the Desktop lookup operation when searching for templates and JSPs. The lookup starts at the first element in the list and each element represents a sub directory under the Desktop template base directory. If a template is not found in the first directory, then it proceeds to the next one in the list. This continues until the item is found (or not), for all Desktop type elements in the list.

If the default directory is not included in the list, it will be added at the end of the list implicitly. For example, if the Desktop type is sampleportal, the target template will be searched in the sampleportal sub directory, then the default sub directory.

By default, if the sample portal is installed, then the Desktop type attribute, sunPortalDesktopType, is set to sampleportal, meaning files are retrieved from the sampleportal subdirectory. If the sample portal is not installed, then the Desktop type attribute value is set to default. The authless user is created as part of the sample portal, and the Desktop type for the authless user is set to anonymous,sampleportal.

You can define a new set of templates by creating a new directory under the /etc/opt/SUNWps/desktop/ directory, placing your template files in this directory, and making this directory the Desktop Type attribute for that organization.

    To change the Desktop type
  1. Create a new subdirectory in the /etc/opt/SUNWps/desktop directory, or whatever directory templateBaseDir specifies in the desktopconfig.properties file.
  2. For example:

    mkdir /etc/opt/SUNWps/desktop/sesta

  3. Manually copy only the template files that you wish to modify to the new directory location.
  4. For example, if your Desktop type will modify content.jsp file for JSPProvider, copy this file to /etc/opt/SUNWps/desktop/sesta/JSPProvider/content.jsp, and customize the file for the new Desktop type in that location.

  1. Use the Identity Server software administration console to change the value of the Desktop Type attribute for the subdirectory created in Step 1.
  2. As this attribute is dynamic, you need to change it everywhere that it appears (organization, sub-organization, role, and user). Changing the Desktop Type at the organization level will not necessarily be reflected at the user level. This will be the case only if the user has not overwritten the Desktop Type in which case the Desktop Type value will be inherited from the organization level. If the user defines the Desktop Type at the user level, the value will remain the same even if the Desktop Type is changed at the organization level.

See the Portal Server Administration Guide for more information on editing Desktop attributes.

Restoring the Default Sample Portal Settings

To re-load the default (original) display profile for the sample portal providers, the dp-providers.xml and dp-org.xml files (in portal-server-install-root/SUNWps/samples/desktop directory) must be reloaded. The dp-providers.xml file goes in the global level and the dp-org.xml file goes in the organization level. For example, type:

portal-server-install-root/SUNWps/bin/dpadmin modify -u "uid=amAdmin,ou=People,dc=sesta,dc=com" -w password -g portal-server-install-root/SUNWps/samples/desktop/dp-providers.xml

portal-server-install-root/SUNWps/bin/dpadmin modify -u "uid=amAdmin,ou=People,dc=sesta,dc=com" -w password -d "dc=sesta,dc=com" portal-server-install-root/SUNWps/samples/desktop/dp-org.xml

Sample Portal Installation Directories

If you choose to install the sample portal, the installer locates the appropriate files in the following directories:

portal-server-install-root/SUNWps/samples/desktop

This directory contains the following display profile documents:

dp-org.xml

Contains the display profile definitions for channels and containers.

dp-anon.xml

Contains the display profile definitions for channels and containers for the authlessanonymous and anonymous users in the default organization.

/etc/opt/SUNWps/desktop/sampleportal

Contains the JSP, template, and other support files for the Portal Server software sample portal.

/etc/opt/SUNWps/desktop/anonymous

Contains the JSP, template, and other support files for the Portal Server software Desktop anonymous user.


Note

The sample portal has a dependency on the base Desktop and other components and cannot be installed if the base Desktop and other components are not installed. The base Desktop and other components are installed in the /etc/opt/SUNWps/desktop/default directory.



JSP-Based Desktop

Desktops based on JSPs enable a customization process without the necessity of changing the provider Java classes. The implementation of the JSP-based Desktop uses a tag library which Portal Server software supplies (see Appendix D for more information on the tags). Not all Desktop channels need to be JSP-based.

JSPTabContainer

The JSPTabContainer provides a JSP-based tabbed Desktop.

Sample Desktop

Default Layout

By default, the sample portal Desktop based on the JSPTabContainer (see Figure 3-1) includes five tabs, My Front Page, Samples, Search, Collaboration, and Sample Portlet which includes the following channels:

Default Actions

The sample JSPTabContainer channel, by default, includes:

Default Display Profile Settings

The provider responsible for generating the JSPTabContainer channel is JSPTabContainerProvider. The provider profile is the template which decides the properties for a container channel, but the container channel profile will ultimately decide the values for the container channel attributes.

The properties that make up JSPTabContainer work as follows by default.

contentPage

Set to tab.jsp. This draws the Content Page for the tab container.

editPage

Set to tabedit.jsp. This displays the Edit page for the tab container where new tabs can be added, and existing tabs removed or renamed.

startTab

Sets the tab that opens first on the Desktop as MyFrontPageTabPanelContainer.

maxTabs

Allows six tabs to be created. As there are currently five tabs, one more can be added.

makeTabProvider

Used when creating a new tab from scratch.

channelNumber

Specifies that a number is appended to a newly created tab as the channel name. This number is increased each time a new tab is created, so that the new tab will have unique name. For example, to create a new tab based on MyFrontPageTabPanelContainer in JSPTabContainer, the new tab channel name would be JSPTabContainer/MyFrontPageTabPanelContainer1. (The new tab name is actually the channelName property in the display profile plus the value of the channelNumber property. The channelNumber is incremented by one each time a new tab is created.)

contentChannel

Specifies JSPContentContainer as the content channel that provides the Content page displaying channels to add to a user-created tab.

presetThemeChannel

Specifies JSPPresetThemeContainer as the channel that is displayed in the Theme - Preset Theme page.

customThemeChannel

Specifies JSPCustomThemeContainer as the channel that is displayed in the Theme - Custom Theme page.

TabProperties

This collection has <Collection name=> entries for each of the available tab defined in JSPTabContainer.

Available

This list describes all available channels for this container. The available channels are displayed in the Content Preference page for users to select from.

Selected

This list describes selected channels for this container. Only selected channels are displayed on the Desktop.

JSPTabContainer Architecture

Figure 3-2 shows the JSPTabContainer architecture. In this figure, tab.jsp is the top-level JSP file. The tab.jsp file makes include calls to the header.jsp, availableTabs.jsp, menubar.jsp, and footer.html files. The availableTabs.jsp file makes an include call to the selectedTab.jsp and tabs.jsp files.

Figure 3-2  JSPTabContainer Architecture

This is a diagram to show the JSPTabContainer architecture.

JSP Files Used by JSPTabContainer

The Portal Server software uses JSP files for a channel’s presentation layer. JSPTabContainer references two main JSPs, tab.jsp and tabedit.jsp, through the contentPage and editPage properties.

Content template is responsible for the front page of the container channel and the file name for the tab container channel is tab.jsp. The tab.jsp file extensively uses the Desktop taglibs.

The Edit page is where you can add, remove, and rename tabs. The tabedit.jsp is used to display this page.

JSPTableContainer

The JSPTableContainer provides a JSP-based table Desktop.

Sample Desktop

Default Layout

By default, the sample portal Desktop based on the JSPTableContainer (see Figure 3-3) contains the following channels:

Default Actions

The sample JSPTableContainer channel, by default, includes:

Default Display Profile Settings

The provider responsible for generating the JSPTableContainer channel is JSPTableContainerProvider. The provider profile is the template which decides the properties for a container channel, but the container channel profile will ultimately decide the values for the container channel attributes. The default properties that make up JSPTableContainer work as follows:

contentPage

Set to toptable.jsp. This draws the Content Page for the table container.

categories

This collection defines the categories under which the available channels in the JSPTabContainer will be grouped in the Content page. Here there are three categories: Personal Channels, Sample Channels, and News Channels.

channelsRow

This collection and values that appear in this collection, contain the row number value for channels in this container. For example, the mail check channel is defined as row 4.

channelsIsRemovable

This collection defines a collection to contain the isRemovable value for channels in this container. Only one channel, user information, is defined, with a value of false, so that it cannot be removed.

Available

This list describes all available channels for this container. The available channels are displayed in the content preference page for users to select from.

Selected

This list describes selected channels for this container. Only selected channels shows up in the Desktop.

JSPTableContainer Architecture

Figure 3-4 shows the JSPTableContainer architecture. In this figure, toptable.jsp is the top-level JSP file. The toptable.jsp file makes include calls to the header.jsp, launchPopup.jsp, leafWrapper.jsp, and menubar.jsp files.

Figure 3-4  JSPTableContainer Architecture

This diagram shows the JSPTableContainer architecture.

JSP Files Used by JSPTableContainer

The Portal Server uses JSP files for a channel’s presentation layer. JSPTableContainer references one main JSP, toptable.jsp, through the contentPage property.

Content template is responsible for the front page of the container channel and the file name for the tab container channel is toptable.jsp. The toptable.jsp file extensively uses the Desktop taglibs.


Template-based Desktop

TemplateTabContainer and TemplateTableContainer use the original template mechanism from iPlanet™ Portal Server 3.0. TemplateTableContainer is the same as the normal Desktop from iPlanet Portal Server 3.0, and TemplateTabContainer is the same as the tabbed Desktop from iPlanet Portal Server 3.0.


Frame-based Desktop

FrameTabContainer

The FrameTabContainer provides a frame-based table Desktop.

Sample Desktop

Default Layout

By default, the sample portal Desktop based on the FrameTabContainer provides a frame-based table Desktop consisting of two frames, My Front Page and Samples, with the following channels:

Default Actions

The sample FrameTabContainer channel, by default, includes:

Default Display Profile Settings

The provider responsible for generating FrameTabContainer channel is JSPTabContainerProvider. The provider profile is the template which decides the properties for a container channel, but the container channel profile will ultimately decide the values for the container channel attributes. The properties that make up FrameTabContainer work as follows:

contentPage

Set to frametab.jsp. This draws the Content Page for the frame container.

editPage

Set to frametabedit.jsp. This displays the Edit page for the frame container where new pages can be added, or existing pages removed or renamed.

startTab

Sets the page that opens first on the Desktop as MyFrontPageFramePanelContainer.

maxTabs

Allows four pages to be created. As, by default, there are two pages, two more can be added.

makeTabProvider

Specifies JSPFrameCustomTableContainerProvider as the provider to create a new page on the Desktop.

channelNumber

Specifies that a number is appended to a newly created page as the channel name. This number is increased each time a new page is created, so that the new page will have unique name. For example, to create a new page based on MyFrontPageFramePanelContainer in FrameTabContainer, the new page channel name would be FrameTabContainer/MyFrontPageFramePanelContainer1. (The new page name is actually the channelName property in the display profile plus the value of channelNumber property. The channelNumber property value is incremented by one each time a new page is created.)

contentChannel

Specifies JSPContentContainer as the content channel that provides the Content page displaying channels to add to a user-created page.

TabProperties

This collection has entries for each of the four containers that are available in the FrameTabContainer.

Available

This list describes all available channels for this container. The available channels are displayed in the content preference page for users to select from.

Selected

This list describes selected channels for this container. Only selected channels shows up in the Desktop.

FrameTabContainer Architecture

Figure 3-6 shows the FrameTabContainer architecture. In this figure, frametab.jsp is the top-level JSP file. The frametab.jsp file makes include calls to the frametabmenu.jsp, header.jsp, banner.jsp, selectedTab.jsp, menubar.jsp, frameset.jsp, and footer.html files.

FrameTabContainer is made up of two sub-containers, MyFrontPageFramePanelContainer and SamplesFramePanelContainer, as represented by Page 1 (tablecontainer) in the figure.

Figure 3-6  FrameTabContainer Architecture

This diagram shows the FrameTabContainer architecture.

JSP Files Used by FrameTabContainer

The Portal Server uses JSP files for a channel’s presentation layer. FrameTabContainer references two main JSPs, frametab.jsp and frametabedit.jsp, through the contentPage and editPage properties.

Content template is responsible for the front page of the container channel and the file name for the tab container channel is frametab.jsp. The frametab.jsp file extensively uses the Desktop taglibs.

The Edit page is where you can add, remove, and rename pages. The frametabedit.jsp is used to display this page.



Previous      Contents      Index      Next     


Copyright 2004 Sun Microsystems, Inc. All rights reserved.