Sun Java System Portal Server 7.1 Technical Reference

Chapter 16 Document Priorities

This chapter contains the following sections:

Overview

At runtime, when a user logs in, the system determines the set of documents that makes up the user’s display profile document set. The Desktop internal implementation of the display profile (the part that interprets the display profile) determines this set by looking at all of the LDAP nodes that the user belongs to. This can be the organization DN (dc=sesta.com), suborganizations, role DNs (cn=Role1,dc=sesta.com), and uid (uid=user,ou=People,cn=Role1,dc=sesta.com), as well as the global display profile. The display profile documents from each of these LDAP nodes and global display profile are then read (if it exists there), and all of the documents are put into a set. The system sorts the set according to the document priorities. A lower number represents a lower priority. For example, a 1 is a lower priority than a 2. The documents are then sorted from lower number to higher number. See Process of Merging for more information on this process.

The user level document (uid=amAdmin,ou=People,...) is a special case referred to as the base document. Think of the base document as a priority equal to infinity. Thus, it is always the highest number (and hence highest priority). All of the mergers are associated with the base document in sorted order, and the priority setting on a user document is always the highest. The priority attribute used in the <DisplayProfile> tag takes the special keyword user to indicate that the current display profile is the user level display profile.

When a merge occurs, it starts at the lowest priority document (lowest number) and proceeds in increasing priority number, until it arrives at the user (base) document.

Thus, the implication of display profile document priorities is that what really matters is the priority number. For example, an organization level document can have a higher priority than a role level document, but it does not have to. It depends on how you need to prioritize these documents for your site.

Specify the display profile document priority in the XML file with the <DisplayProfile priority= syntax> tag. You can change the priority by directly editing the display profile XML by using the Sun Java System Portal Server console or by using the psadmin command to load the display profile.


Note –

Do not assign the same priority to two display profile documents. Doing so causes the Desktop to not appear properly. However, the product does not check for duplicate document priorities.


Examples

The examples provided below shows the display profile documents for organization and a bill.

Example 1

This example uses two display profiles, one for the organization example and one for the uid bill. When Bill logs in (uid=bill) to the Desktop, the bookmark channel titled “Bill’s Bookmarks” is displayed with the following three bookmarks (in that order):


Example 16–1 Display Profile Document for the Organization (dc=acme.com)


<DisplayProfile version="1.0" priority="10">
...
<Channel name="Bookmark" provider="BookmarkProvider" merge="fuse">
    <Properties>
        <String name="title" value="My Bookmarks" merge="replace"
 			lock="false" propagate="true"/>
        <String name="refreshTime" value="600" merge="replace"
			lock="false" propagate="true"/>
        <Collection name="targets" merge="fuse" lock="false"
			propagate="true">
            <String value="ACME home page|http://www.acme.com"
				 merge="replace"
				lock="false" propagate="true"/>
        </Collection>
    </Properties>
</Channel>
...
</DisplayProfile>

Display Profile Document for the uid=Bill,ou=people,o=acme.com


<DisplayProfile version="1.0" priority="10"> ... <Channel name="Bookmark"
provider="BookmarkProvider" merge="fuse"> <Properties> <String name="title"
value="Bill’s Bookmarks" merge="replace" lock="false" propagate="true"/>
<Collection name="targets" merge="fuse" lock="false" propagate="true"> 
<String value="Amazon|http://www.amazon.com" merge="replace" lock="false" 
propagate="true"/> <String value="EBay|http://www.ebay.com" merge="replace"
lock="false" propagate="true"/> </Collection> </Properties> </Channel> ... 
</DisplayProfile>

Example 2

This example uses three display profiles, the global display profile, the display profile for the organization acme, and the display profile for the role hradmin. When the user who is assigned to the hradmin role logs in to the Desktop, the JSPTableContainer appears with the following channels:


Example 16–2 Global Display Profile Document


<DisplayProfile version="1.0" priority="0">
...
<Container name="JSPTableContainer" provider="JSPTableContainerProvider" merge="fuse">
    <Properties>
        ...
    </Properties>
    <Available>
        ...
    </Available>
    <Selected merge="fuse" lock="false">
        <Reference value="UserInfo"/>
    </Selected>
    <Channels/>
</Container>
...
</DisplayProfile>

Display Profile Document for the Organization (dc=acme.com)


<DisplayProfile version="1.0" priority="0"> ...
 <Container name="JSPTableContainer"
provider="JSPTableContainerProvider" merge="fuse">
<Properties> ... </Properties>
<Available> ... </Available> <Selected merge="fuse"
lock="false"> <Reference value="UserInfo"/>
<Reference value="Notes"/> </Selected> <Channels/>
</Container> ... </DisplayProfile>

Display Profile Document for the hradmin Role


<DisplayProfile version="1.0" priority="0">
...
<Container name="JSPTableContainer" provider="JSPTableContainerProvider" merge="fuse">
    <Properties>
        ...
    </Properties>
    <Available>
        ...
    </Available>
    <Selected merge="fuse" lock="true">
        
        <Reference value="SampleSimpleWebService"/>
    </Selected>
    <Channels/>
</Container>
...
</DisplayProfile>

Summary

A display profile document has a low or high priority depending on whether you consider the merge order or the ability to lock as the defining factor.

Without considering locking, the lower numbered display profile document has a lower priority. The lower numbered display profile document gets merged first so the value of a higher priority document overrides the value of a lower priority document. In this sense, the lower numbered document has a lower priority.

However, the lower numbered display profile document can also lock an object so it cannot be affected by a higher numbered document. In this sense, the lower numbered document has a higher priority.