Sun Java System Portal Server 7.1 Developer's Guide

Creating XML Fragments for Display Profile

A provider must be defined in the display profile before it can be used. This definition associates the provider with its class file implementation and includes the provider’s properties. That is, the provider’s display profile fragment should include default values for all the properties that are used in the provider.java file. For example, if the provider.java file contains getStringProperty(“color”), the provider’s display profile fragment should include a default value for color.

The provider’s XML fragment in the display profile must adhere the following structure:


<DisplayProfile>
	<Providers>
		<Provider name=”
			providername”
				class=”
			provider class name”>
				<Properties>...</Properties>
		</Provider>
	</Providers>
</DisplayProfile>

The provider definition is the template that decides the properties for the provider’s channels. However, the display profile definition for the channel ultimately decides the values for the channel’s properties. When a channel sets a property, the property is set in the channel and not in the provider’s properties. When defining channel properties in the display profile, include only those properties where the provider defaults are not applicable.

The provider’s channel XML fragment in the display profile must adhere the following structure:


<DisplayProfile>
	<Channels>
		<Channel name=”
			channelname” provider=”
			providername”>
				<Properties>...</Properties>
		</Channel>
	</Channels>
</DisplayProfile>

The channel definition in the display profile need not have the <Container> tag unless the channel is defined within a container. Channel definitions in the display profile can be encapsulated inside a container. The advantage of this is that it provides name scoping so that channels with the same name do not collide.

Unless a channel is referenced directly from the DesktopServlet URL, in which case it need not be encapsulated inside a container, you must reference a channel from some container in order to see it.

The container within which the channel will operate must adhere the following structure:


<DisplayProfile>
	<Channels>
		<Container>
			<Properties>...</Properties>
			<Available>...</Available>
			<Selected>...</Selected>
			<Channel>...</Channel>
		</Container>
	</Channels>
</DisplayProfile>

To upload display profile changes, use the psadmin add-display-profile or psadmin modify-display-profile sub command. See Sun Java System Portal Server 7.1 Command Line Reference for more information on the psadmin command and see the Portal Server 7.1 administration console online help for more information on administering the display profile.