|
|
| Sun ONE Portal Server 6.0 Desktop Customization Guide |
Chapter 3 Display Profile Channel Definitions
This chapter contains information on the channel display profile definitions that ship with Sun ONE Portal Server.
This chapter contains the following section:
Display Profile Definitions for Existing Channels
The provider definition is the template that decides the properties for a channel. However, the display profile channel definition ultimately decides the values for the channel attributes. The display profile channel definition can define properties that overwrite the properties defined by the provider definition.
To facilitate understanding of what display profile channel definitions look like and how they work, this chapter contains the display profile channel definitions for the following channels that ship with the product:
Bookmark Channel
The bookmark channel enables users to store URLs.
Code Example 3-1 shows the display profile definition for the bookmark channel.
Table 3-1 lists the properties specific to the bookmark channel. This two column table lists the properties in the first column and the values in the second column.
These channel-defined properties overwrite the corresponding properties in BookmarkProvider. Properties not defined in the channel are picked up from BookmarkProvider. See "BookmarkProvider" for more information.
Notes Channel
The notes channel enables users to post messages to other users' notes channel on their Desktop.
Code Example 3-2 shows the display profile definition for the notes channel.
Table 3-2 lists the properties specific to the notes channel. This two column table lists the properties in the first column and the values in the second column.
Table 3-2    Notes Channel Specific Properties
Property
Value
Notes Channel Description, which appears in the Content page.
These channel-defined properties overwrite the corresponding properties in NotesProvider. Properties not defined in the channel are picked up from NotesProvider. For example, NotesProvider sets the isEditable property to false, so that no edit view is provided and users cannot customize the channel. NotesProvider also sets the help URL. See "NotesProvider" for more information.
The notes themselves are stored and read in a text file in the following format:
where | is the delimiter and date is long value which denotes the time elapsed in milliseconds since Jan. 1, 1970. Here is a sample of what may be included in the notes.txt file:
User1|1007159465858|Message to Portal Desktop Team : Lets meet today at 2PM
User2|1007159465858|Information related to the project is availble at home page
Applications List Channel
The applications list channel enables a user to add or remove applications from a list of applications.
Code Example 3-3 shows the display profile channel definition for the applications list channel.
Table 3-3 lists the properties specific to the applications list channel. This two column table lists the properties in the first column and the values in the second column.
Table 3-3    Applications List Channel Specific Properties
Property
Value
These channel-defined properties overwrite the corresponding properties in AppProvider. Properties not defined in the channel are picked up from AppProvider. For example, AppProvider sets the isEditable property to true, so an edit view for the channel is provided and user can customize the channel. AppProvider also sets the help URL. See "AppProvider" for more information.
User Information Channel
The user information channel displays a greeting, the user's name, time zone, locale and has access to the user's IMAP and SMTP data. The user information channel enables users to view and edit user information.
Code Example 3-4 shows the display profile definition for the user information channel.
In this example, only refreshTime, title, and description properties are defined. All other properties for the user information channel are defined in UserInfoProvider. See "UserInfoProvider" for more information.
Mail Check Channel
The mail check channel gives information about a user's mail status.
Code Example 3-5 shows the display profile definition for the mail check channel.
Table 3-4 lists the properties specific to the mail check channel. This two column table lists the properties in the first column and the values in the second column.
Table 3-4    Mail Check Channel Specific Properties
Property
Value
These channel-defined properties overwrite the corresponding properties in MailCheckProvider. Properties not defined in the channel are picked up from MailCheckProvider. For example, MailCheckProvider sets the defaultConfigParameter property to true, which causes the server name, user ID and password to be read from the NetMail service definition. MailCheckProvider also sets the help URL. See "MailCheckProvider" for more information.
URL Scraper Channel
The URL scraper channel takes a URL, opens a connection to the URL, and reads the contents into a buffer. The contents are then sent to the Desktop Servlet, which displays it. URLScraperProvider uses the Rewriter to construct the URL information as long as the MIME type of the file is one that the Rewriter supports. (Rewriter rules are expressed using an XML document but the URL scraper channel does not use an XML file to describe how to display it.)
Code Example 3-6 shows the display profile definition for the URL scraper channel.
Table 3-5 lists the properties specific to the URL scraper channel. This two column table lists the properties in the first column and the values in the second column.
These channel-defined properties overwrite the corresponding properties in URLScraperProvider. Properties not defined in the channel are picked up from URLScraperProvider. For example, URLScraperProvider sets the isEditable property to false; no edit view for users is provided, as the URL scraper channel is not editable and there are no getEdit() and processEdit() methods defined for this provider. See "URLScraperProvider" for more information.
Creating a URL scraper channel is a quick and simple way to add content to the Desktop, as no coding is required. However, the following scenarios are inappropriate for the URL scraper channel:
If the site being scraped requires HTTP basic authentication.
If an edit function is required so that users can customize the channel.
If the data comes form a non-HTML, non-web server source, for example, a database or mail server.
If the data needs to be reformatted in some way for the channel.
If a more efficient solution is required. The URL scraper channel does a request and look up for every Desktop display and user. For situations similar to these, use the PAPI. See the Sun ONE Portal Server 6.0 Developer's Guide for more information.
RSS Channel
The RSS channel uses an XSLT (style sheet) file to transform the RSS XML file into HTML. By using different XSL files the same output can be changed and presented differently for different channels.
Code Example 3-7 shows the display profile definition for the RSS channel.
Table 3-6 lists the properties specific to the RSS channel. This two column table lists the properties in the first column and the values in the second column.
Table 3-6    RSS Channel Specific Properties
Property
Value
file:///etc/opt/SUNWps/desktop/default/SampleRSS/SampleRSS.rss
The RSS channel sets many more properties than most channels, due to the fact that there is no RSS provider and the channel uses XMLProvider. Because of this, the RSS channel needs to override most of the properties set by XMLProvider. See "XMLProvider" for more information.
You cannot set isEditable to true for the RSS channel, as the channel is not editable and there are no getEdit() and processEdit() methods defined.
XML Channel
The XML channel provides a flexible way to include XML content in the Desktop, enabling an XML document to be transformed into HTML using an XSL (style sheet) file.
Code Example 3-8 shows the display profile definition for the XML channel.
Table 3-7 lists the properties specific to the XML channel. This two column table lists the properties in the first column and the values in the second column.
Table 3-7    RSS Channel Specific Properties
Property
Value
file:///etc/opt/SUNWps/desktop/default/SampleXML/getQuotes.xml
These channel-defined properties overwrite the corresponding properties in XMLProvider. Properties not defined in the channel are picked up from XMLProvider. For example, XMLProvider sets the isEditable property to false; no edit view for users is provided, as the XML channel is not editable and there is no getEdit() and processEdit() methods defined for this provider. See "XMLProvider" for more information.
JSP Channel
A JSP channel uses JSP pages rather than Desktop templates to define the channel. You can therefore make changes to the channel and the provider without having to restart the server.
Code Example 3-9 shows the display profile definition for the JSP channel.
Table 3-8 lists the properties specific to the JSP channel. This two column table lists the properties in the first column and the values in the second column.
Table 3-8    JSP Channel Specific Properties
Property
Value
These channel-defined properties overwrite the corresponding properties in JSPProvider. Properties not defined in the channel are picked up from JSPProvider. For example, JSPProvider sets the JSPs needed by the provider. See "JSPProvider" for more information.
Search Channel
The search channel can provide three interfaces:
Basic search - Enables users to type keywords in a search box. Document and category matches are then displayed.
Advanced search - Enables users to search for documents based on author, title, and URL. Users can also search on the last-modified date of a document. Advanced search is a more complex user interface, and supports customization. See Chapter 7 "Customizing the Search Provider" for more information.
Browse - Enables users to browse the category tree and search within categories. Code Example 3-9 shows the display profile definition for the search channel.
Table 3-9 lists the properties specific to the search channel. This two column table lists the properties in the first column and the values in the second column.
Table 3-9    Search Channel Specific Properties
Property
Value
By default this is empty; you would fill in the name of the Search server.
These channel-defined properties overwrite the corresponding properties in SearchProvider. Properties not defined in the channel are picked up from SearchProvider. For example, SearchProvider sets what type of search is available to the user. See "SearchProvider" for more information.
Simple Web Service Channel
The Simple Web Service channel makes simple web services available to an end user channel. This preconfigured channel is always bound to a single web service and associated method by using channel initialization properties. This channel type enables end users to cache (or store) default values for the web service input parameters by using the Edit button functionality on the channel.
Code Example 3-11 shows the display profile definition for the simple web service channel.
Table 3-10 lists the properties specific to the simple web service channel. This two column table lists the properties in the first column and the values in the second column.
These channel-defined properties overwrite the corresponding properties in SimpleWebServiceProvider. Properties not defined in the channel are picked up from SimpleWebServiceProvider. For example, SearchProvider sets the channel refresh time. See "SimpleWebServiceProvider" for more information.
Simple Web Service Configurable Channel
The Simple Web Service Configurable channel is similar to the Simple Web Service channel, except that it permits users to use the Edit function to change URLs and methods, hence, it is configurable. This channel does not enable end users to cache (or store) default values for the web service input parameters.
Code Example 3-12 shows the display profile definition for the simple web service configurable channel.
Table 3-11 lists the properties specific to the simple web service configurable channel. This two column table lists the properties in the first column and the values in the second column.
Table 3-11    Simple Web Service Configurable Channel Specific Properties
Property
Value
file:///etc/opt/SUNWps/desktop/default/SampleSimpleWebServiceConfigurable/CurrencyExchangeService.wsdl
These channel-defined properties overwrite the corresponding properties in SimpleWebServiceConfigurableProvider. Properties not defined in the channel are picked up from SimpleWebServiceConfigurableProvider. For example, SimpleWebServiceConfigurableProvider sets the channel refresh time. See "SimpleWebServiceConfigurableProvider" for more information.
Login Channel
The login channel shows up in the anonymous user's Desktop, enabling users to log in. You can select one out of the three methods to enable users to log in: LDAP, Membership, or Unix.
Code Example 3-12 shows the display profile definition for the login channel.
Table 3-12 lists the properties specific to the login channel. This two column table lists the properties in the first column and the values in the second column.
Table 3-12    Login Channel Specific Properties
Property
Value
These channel-defined properties overwrite the corresponding properties in LoginProvider. Properties not defined in the channel are picked up from LoginProvider. For example, LoginProvider sets the isEditable property to true, so an edit view for the channel is provided and user can customize the channel. See "LoginProvider" for more information.
Previous Contents Index Next
Copyright 2002 Sun Microsystems, Inc. All rights reserved.
Last Updated August 29, 2002