Sun Java System Portal Server 7.1 Technical Reference

Introduction

There are three basic types of objects in the display profile: channels, providers, and properties. Every object in the display profile is associated with a DN. The channels, providers, and properties display profile objects are used to group other display profile objects. These grouping objects are loosely referred to as “bags.” These bags add more structure to the display profile XML documents.

Channel Object

A channel object represents a single display element. The objects contained by a channel object can be thought of as properties for the channel. The channel definition includes a symbolic reference to the provider. You only need to include channel-specific properties when the provider defaults are not appropriate.


Example 15–1 Example Channel Object XML Syntax


<Channel name="SampleXML" provider="XMLProvider">
    <Properties>
        <String name="refreshTime" value="600"/>
        <String name="title" value="XML Test Channel"/>
        <String name="description" value="This is a test of the
			XML Provider system"/>
        <String name="url" value="file:///var/opt/SUNWportal/portals
			/<portal_id>/desktop/
			default/SampleXML/getQuotes.xml"/>
        <String name="xslFileName" value="/var/opt/SUNWportal/
			portals/<portal_id>/desktop/
			default/SampleXML/html_stockquote.xsl"/>
    </Properties>
</Channel>

Container Object

A container object is identical to a channel object, except that it primarily generates its content by aggregating the content of other (its child) channels. A container object allows for available and selected channel lists and can contain leaf channel definitions. A leaf channel is typically aggregated on a page with other channels and generates its own content. A container channel primarily generates content by aggregating the content of one or more leaf channels. Both leaf and container providers are building blocks in that they can be extended (through their public interfaces) to create new or custom providers.


Example 15–2 Example Container Object XML Syntax


<Container name="JSPTableContainer" provider="JSPTableContainerProvider">
    <Properties>
        <String name="title" value="JSP Based Table Container Channel"/>
        <String name="contentPage" value="toptable.jsp"/>
        <String name="description" value="This is a test for front table containers"/>
        <String name="Desktop-fontFace1" value="Sans-serif"/>
        <Collection name="categories">
            <String value="Personal Channels"/>
            <String value="Sample Channels"/>
            <String value="News Channels"/>
        </Collection>
        ...
    </Properties>

        <Channels> ...leaf definitions go here...</Channels>

</Container>

Provider Object

The provider is a programmatic entity responsible for fetching and displaying content in a channel. The XML tag for defining a provider object is <Provider name=“providerName” class=“providerClass”>.

A provider object is a pointer to the display profile provider definition. The provider is a contract between ProviderContext and channel instance (provider object).

The display profile stores provider definitions that are available to the channel and containers to implement their content generation behavior. The display profile provider definition contains the information necessary for a client of the display profile to construct the provider object, namely, the Java class name. The class that implements the provider’s behavior is defined in the provider attribute. Channels use the name attribute values to refer to the provider.

The provider definition sets default property values for all channels that point to this provider. Channel-specific properties are only necessary when the provider defaults are not appropriate. The provider display profile object should contain default values for all properties that are used in the provider Java object. For example, if the provider Java code contains:


getStringProperty("color")

the provider display profile object should have a default value for color.


Example 15–3 Example Provider Object XML Syntax


<Provider name="XMLProvider" class="com.sun.portal.providers.xml.XMLProvider">
    <Properties>
        <String name="title" value="*** XML Provider ***"/>
        <String name="description" value="*** DESCRIPTION ***"/>
        <String name="width" value="thick"/>
        <String name=”color” value=”blue”/>
        <String name="refreshTime" value="0" advanced="true"/>
        <Boolean name="isEditable" value="false" advanced="true"/>
        <String name="helpURL" value="desktop/xmlchann.htm" advanced="true"/>
        <String name="fontFace1" value="Sans-serif"/>
        <String name="productName" value="Sun Java System Portal Server"/>
        <String name="url" value="file:///var/opt/SUNWportal/portals/<portal_id>/
			desktop/default/xml/getQuotes.xml"/>
        <String name="xslFileName" value="html_stockquote.xsl"/>
        <Integer name="timeout" value="100"/>
        <String name="inputEncoding" value="iso-8859-1"/>
        <String name="urlScraperRulesetID" value="default_ruleset"/>
        <Boolean name="cookiesToForwardAll" value="true"/>
        <Collection name="cookiesToForwardList">
        </Collection>
    </Properties>
</Provider>

Property object

A property value that can be specified for a channel. Individual properties are grouped within the <Properties></Properties> tags inside a channel definition.

Like display profile objects are grouped within their appropriate XML tag pairs. That is, providers are grouped within <Providers></Providers> tags, channels within <Channels></Channels> tags, properties within <Properties></Properties> tags.

Because you can have multiple display profile documents defined at different LDAP nodes, at runtime, the system merges these multiple display profile documents to deliver a particular Desktop to the user. This process of merging display profile documents affects the final display profile object values.