Sun Java System Portal Server 7.1 Technical Reference

Chapter 21 Display Profile Properties: Leaf Building-Block Provider Properties

This chapter describes the display profile definitions and the properties of the leaf building-block providers. Leaf building-block providers generate their own content. They include:

JSPProvider

JSPProvider uses JSPs. JSPProvider obtains content from one or more JSP files. A JSP file can be a static document (HTML only) or a standard JSP file with HTML and Java code. A JSP can include other JSP files. However, only the topmost JSP can be configured through the display profile. The topmost JSP files are defined through the contentPage, editPage, and processPage properties. See the Sun Java System Portal Server 7.1 Developer’s Guide for more information on how JSPProvider uses these JSPs. See also Chapter 27, JSPs in the default Directory for the complete list of JSPProvider Communication channels.

If you need to make other customizations, you do so in the JSP files themselves. The list of properties specific to JSPProvider and their description are:

String name="contentPage"

Specifies the JSP that is used to generate the channel content (by using the getContent method).

String name="editPage"

Specifies the JSP that is used to generate the Edit page content (by using the getEdit method).

String name="processPage"

Specifies the JSP that is used to process the results of an Edit page (by using the processEdit method).

Boolean name="showExceptions"

If true, makes JSPProvider show exceptions generated while processing the JSP as the channel output for the getContent and getEdit methods. This can be useful for developing and troubleshooting your portal.

URLScraperProvider

URLScraperProvider 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 and the content received contains the presentation markup (if applicable).

The list of the properties specific to URLScraperProvider and their description are:

String name="url"

Specifies the URL to be scraped. The default value is /desktop/ipinfo.html.

String name="urlScraperRulesetID"

Specifies the ID of the ruleset to be used by the Rewriter for rewriting content.

Boolean name="cookiesToForwardAll"

Specifies whether to forward cookies.

String name="inputEncoding"

Specifies the input encoding to be used by URLScraperProvider to encode the scraped content.

Collection name="cookiesToForwardList"

Specifies the list of cookies to be forwarded by URLScraperProvider if cookiesToForwardAll is set to false.

Integer name="timeout"

Specifies the timeout for which the provider should wait to fetch content before displaying the timed out message.

The isEditable property for URLScraperProvider cannot be turned on (set to true) as this channel is, by default, not editable. There are no getEdit() and processEdit() methods defined for this provider. If you want edit functionality for URLScraperProvider, define another provider that extends URLScraperProvider. In so doing, you would need to implement the getEdit() and processEdit() methods, and also define the editType property. See the Portal Server Developer’s Guide for more information on extending the URLScraperProvider.

XMLProvider

XMLProvider transforms an XML document into HTML using an XSLT (XML Style Sheet Language) file. You must create the appropriate XSLT file to match the XML document type. XMLProvider is an extension of URLScraperProvider. This provider uses the JAXP 1.1 JAR files that come with Sun Java System Web Server software.


Note –

This guide does not discuss XML and XSL technologies. See http://www.w3.org/TR/xslt for more information.


The list of properties specific to XMLProvider and their description are:

String name="url"

Specifies the URL that XMLProvider is to transform.

String name="xslFileName"

Specifies the path to the local file to be used as the XSL style sheet.

The provider code tries to pick up the XSL file either from the XML channel directory (that is, /var/opt/SUNWportal/portals/<portal_id>/desktop/default/SampleXML), or if not specified here, from the XML provider directory (/var/opt/SUNWips/desktop/default/XMLProvider/xml).

String name="urlScraperRulesetID"

Specifies the ID of the ruleset to be used by the Rewriter for rewriting content.

Boolean name="cookiesToForwardAll"

Specifies whether to forward cookies.

String name="inputEncoding"

Specifies the input encoding to be used by XMLProvider to encode the scraped content.

Collection name="cookiesToForwardList"

Specifies the list of cookies to be forwarded by URLScraperProvider if cookiesToForwardAll is set to false.

Integer name="timeout"

Specifies the timeout for which the provider should wait to fetch content before displaying the timed out message.

In the URLScraperProvider, the attributes added to the providerDP are:

<String name="title" value="UrlScraper Channel"/>
<String name="description" value="This is a test for urlscraper"/>
<Boolean name="isEditable" value="false" advanced="true"/>
<String name="editType" value="edit_subset" advanced="true"/>
<Boolean name="enableUBT" value="false" advanced="true"/>
<String name="urlScraperRulesetID" value="default_ruleset"/>
<String name="width" value="thick"/>
<Collection name="cookiesToForwardList">
</Collection>
		<Integer name="timeout" value="100"/>
		<String name="formData" value="" advanced="true" />
		<Boolean name="isHttpAuth" value="false"  advanced="true" />
		<String name="loginUrl" value="" advanced="true" />
		<String name="loginFormData" value="" advanced="true" />
		<String name="uid" value="" advanced="true" />
		<String name="password" value="" advanced="true" />
	</Properties>
</Provider>

Copy the following code, which is the URLScraperProvider property from Portal Server 7.0 to Upgrade install.

<Provider advanced="false" class="com.sun.portal.providers.
urlscraper.URLScraperProvider" container="false"
lock="false" merge="fuse"
name="URLScraperProvider" version="2">
	<Properties advanced="false" lock="false" merge=
	"fuse" name="_properties"
	propagate="true">
		<String advanced="false" lock="false" merge=
		"replace" name="title"
		propagate="true" value="UrlScraper Channel"/>
		<String advanced="false" lock="false" merge="
		replace" name="description"
		propagate="true" value="This is a test for 
		urlscraper"/>
		<Boolean advanced="true" lock="false" merge=
		"replace" name="isEditable"
		propagate="true" value="false"/>
		<Boolean advanced="true" lock="false" merge=
		"replace" name="isTopLevel"
		propagate="true" value="false"/>
		<String advanced="true" lock="false" merge=
		"replace" name="editType"
		propagate="true" value="edit_subset"/>
		<Boolean advanced="true" lock="false" merge=
		"replace" name="enableUBT"
		propagate="true" value="false"/>
		<String advanced="false" lock="false" 
		merge="replace"
		name="urlScraperRulesetID" propagate="true"
		 value="default_ruleset"/>
		<String advanced="false" lock="false" merge=
		"replace" name="width"
		propagate="true" value="thick"/>
		<String advanced="true" lock="false" merge=
		"replace" name="refreshTime"
		propagate="true" value="0"/>
		<String advanced="true" lock="false" merge=
		"replace" name="helpURL"
		propagate="true" value="en/desktop/urlscrpr.htm"/>
		<String advanced="false" lock="false" merge=
		"replace" name="url"
		propagate="true" value=""/>
		<String advanced="false" lock="false" merge=
		"replace" name="fontFace1"
		propagate="true" value="Sans-serif"/>
		<String advanced="false" lock="false" merge=
		"replace" name="productName"
		propagate="true" value="Sun JavaTM System 
		Portal Server 7"/>
		<Boolean advanced="false" lock="false" 
		merge="replace"
		name="cookiesToForwardAll" propagate="true"
		 value="true"/>
		<String advanced="false" lock="false" merge=
		"replace"
		name="inputEncoding" propagate="true" value="UTF-8"/>
		<Collection advanced="false" lock="false" 
		merge="fuse"
		name="cookiesToForwardList" propagate="true"/>
		<Integer advanced="false" lock="false" merge=
		"replace"
		name="timeout" propagate="true" value="100"/>
		<String advanced="true" lock="false" merge=
		"replace"
		name="formData" propagate="true" value=""/>
		<Boolean advanced="true" lock="false" merge=
		"replace"
		name="isHttpAuth" propagate="true" value="false"/>
		<String advanced="true" lock="false" merge=
		"replace" name="loginUrl"
		propagate="true" value=""/>
		<String advanced="true" lock="false" merge=
		"replace"
		name="loginFormData" propagate="true" value=""/>
		<String advanced="true" lock="false" merge=
		"replace" name="uid"
		propagate="true" value=""/>
		<String advanced="true" lock="false" merge=
		"replace" name="password"
		propagate="true" value=""/>
		<ConditionalProperties advanced="false" 
		condition="client" lock="false"
		merge="fuse" propagate="true" value="HTML">
			<ConditionalProperties advanced="false" 
			condition="locale" lock="false"
			merge="fuse" propagate="true" value="en">
				<String advanced="true" lock="false" 
				merge="replace" name="helpURL"
				propagate="true" value="en/desktop/urlscrpr.htm"/>
				<String advanced="false" lock="false"
				 merge="replace" name="url"
				propagate="true" value=""/>
			</ConditionalProperties>
				<String advanced="true" lock="false"
				 merge="replace" name="helpURL"
				propagate="true" value="en/desktop/urlscrpr.htm"/>
				<String advanced="false" lock="false"
				 merge="replace" name="url"
				propagate="true" value=""/>
			</ConditionalProperties>
			<ConditionalProperties advanced="false" 
			condition="locale" lock="false"
			merge="fuse" propagate="true" value="en">
				<String advanced="false" lock="false" 
				merge="replace" name="title"
				propagate="true" value="UrlScraper Channel"/>
				<String advanced="false" lock="false" merge=
				"replace" name="description"
				propagate="true" value="This is a test for
				 urlscraper"/>
			</ConditionalProperties>
		</Properties>
</Provider>