Previous Contents Index Next |
iPlanet Portal Server Reference Guide |
Chapter 5 Content Provider API
Content Provider Overview
The iPlanet Portal Server software allows multiple sources of information, applications, and services to be displayed within a single page or set of pages that the user can view in a browser. The page in which the content is included is known as the desktop. The various sources of content are displayed in rectangular areas arranged in rows and columns within the desktop called channels. A Java class, called a provider, is responsible for converting the content in a file, or the output of an application or service into the proper format for a channel. A number of providers are shipped with the Portal Server including a bookmark provider, an application provider, and a notes provider. As the desktop is imaged, each provider is queried in turn for the content of its associated channel. Some providers are capable of generating multiple channels based upon their configuration. This chapter details the basics of developing new content channels for the desktop and introduces a sample provider.
Content Provider Functionality
The iPlanet Portal Server desktop is designed to have four possible content layouts, with various combinations of `thick' and `thin' columns. The main desktop layout template consists of basic HTML to define the look (colors, logo, etc.) of the page, and tags designed to be replaced with the content for each of the columns.The content for the columns will be provided by providers, which are custom Java classes. The Java classes are invoked by the desktop Servlet and the output is inserted into the output of the entire desktop for display. Each provider may define the look of the content section of part, or, the whole layout.
Channels can define their width as either thick or thin. This loosely defines the amount of horizontal screen real estate for the channel; a thick channel subjectively gets more horizontal screen real estate than a thin one. The absolute width is dependent upon the size of the browser window. A channel will expand veritcally as needed; there is no restriction on vertical sizing of a channel. Providers designed for the `thin' column should not be placed in the `thick' column and vice-versa.
Using the Sample Providers
The iPlanet Portal Server package includes several sample Content Providers in the SUNWips package. The following sections explain the process to compile the providers, and add them to an existing iPlanet Portal Server installation.See the iPlanet Portal Server Administration Guide for information on adding custom providers.
Tip See Appendix B, "Putting Code Together", an iPlanet Portal Server desktop provider sample application that touches on the public APIs available for integrating an application with the iPlanet Portal Server desktop.
Compiling Sample Provider Code
Before compiling the sample provider code, set certain environment variables:
setenv PATH $PATH:/usr/java/bin:/usr/ccs/bin
To compile the Sample Providers, use the following process:JAVA_HOME to the Java directory (usually /usr/java)
IPS_BASE to the product installation directory (usually /opt)
Change to the top level of the samples directory.
Implementing the Content Provider API
To use the Content Provider API, develop classes that implement or extend the ProfileProviderAdapter, or the ProviderAdapter.
Note Complete documentation for all methods and classes is in the Javadocs, available in the installation at: http://yourserver:port/docs/en_US/javadocs
Provider Sample Code
The following sample code implements a minimal Provider (HelloWorld). Compile this code as above, then use the process documented above to add this provider to the Portal Server system.
Previous Contents Index Next
Copyright © 2000 Sun Microsystems, Inc. Some preexisting portions Copyright © 2000 Netscape Communications Corp. All rights reserved.
Last Updated May 04, 2000