Oracle9iAS Portal Developer Kit
A Primer on URL-Based Portlets

PDK Release 2 (9.0.2 and later)

The Oracle9iAS Portal Developer Kit currently provides services for Java and PL/SQL. These services allow developers to integrate Java classes and servlets, Java Server Pages, and PL/SQL as portlets within Oracle9iAS Portal using Portal APIs. The PDK provides samples, utilities, and articles to easily develop portlets in PL/SQL and Java. To simplify developing portlets in any language, the Oracle9iAS Portal Developer Kit also provides a framework for building URL-based portlets.

URL-based portlets allow developers to take any application written in any language and easily create integrated portlets. The PDK simply takes the URL of an application, parses the content, and uses the java-based framework to create a portlet. This process allows each mode of your portlet to be rendered from different applications and/or languages. For example, you may consider a portlet whose show mode is rendered using PERL, edit mode is rendered using ASP, help mode is rendered using HTML, details mode is rendered using JSP, etc. The increased flexibility of URL-based portlets offers many advantages:

· Eliminates the learning curve for Developers integrating their services with Oracle 9iAS Portal.

· Enables the use of existing web sites and content.

· No requirement to learn or use the Oracle9iAS Portal APIs.

· Allows developers not familiar with PL/SQL, Java, Java Servlets, JSPs, or XML to easily integrate with Oracle9iAS Portal.

· Allows multiple language rendering within a single portlet.

· Allows portlet definition within a single file.

The current PDK framework allows developers to define and list portlets through the provider.xml file and limits the amount of programming required. Creating URL-based portlets involves the same configuration steps needed to create Web portlets with a few exceptions. The following are a few basic steps to create a URL portlet.

· Create your application in any language.

· Configure your application to be accessible through a URL.

· Define your application through the provider.xml by providing a URL.

· Register your provider as a "Web" provider through Oracle9iAS Portal.

· Add the portlet to a page.

ARCHITECTURE

The current PDK framework consists of the Web Provider Adapter, Web Provider Interfaces, Web Provider Runtime, and provider.xml. The framework for URL-based portlets continues to use the existing PDK classes and only extends the framework for rendering content from a URL. This section describes the extensions to the existing PDK framework that are relevant to rendering URL-based portlets.

The framework for URL-based portlets takes advantage of the ease and simplicity of creating Web portlets by allowing you to define and list your URL portlets within the provider.xml file. It also eliminates the need to do any additional programming by including a default runtime that handles portlet creation, integration, and communication with Oracle9iAS Portal. The three main areas of the framework are the Interface, the Runtime, and the provider.xml.

Interface

The interface of the PDK framework specific to URL rendering are:

- oracle.portal.provider.v2.render.ContentFilter - specifications for filtering URL content.

Runtime

The runtime for the URL-based portlet framework extends classes from the current Web Provider Runtime to adapt to the new URL rendering capabilities. This runtime consists of the following classes:

· oracle.portal.provider.v2.http.URLProviderInstance extends the Web Provider Runtime class DefaultProviderInstance. It contains information about the registered instance of a provider (on a specific portal instance).

· oracle.portal.provider.v2.http.URLProviderDefinition extends the Web Provider Runtime class DefaultProviderDefinition. This class serves the purpose of holding metadata information of the provider instance (typically information about the registered portlets under it)

· oracle.portal.provider.v2.http.URLPortletDefinition extends the Web Provider Runtime class DefaultPortletDefinition. Contains the metadata needed to represent this portlet. Apart from standard portlet properties, it defines two additional attributes i.e., access control and if it is an instance of registration portlet.

· oracle.portal.provider.v2.security.URLSecurityManager implements the Web Provider Interface declared by PortletSecurityManager. This class manages portlet access and security.

· oracle.portal.provider.v2.render.http.URLRenderer extends the Web Provider Runtime class BaseManagedRenderer. The URLRenderer allows you to use the URL to render the content of a request.

· oracle.portal.provider.v2.render.BaseContentFilter an abstract class which implements the Web Provider Interface declared by ContentFilter. This filter defines basic and extensible filtering operations which are common across filters.

· oracle.portal.provider.v2.render.XMLFilter extends the URL-based portlet runtime class BaseContentFilter. This filter converts the HTML contents received from a URL into XHTML and transforms the content using a style (.xsl) sheet.

· oracle.portal.provider.v2.render.HtmlFilter extends the URL-based portlet runtime class BaseContentFilter. This filter manipulates the HTML content and can be used to do basic filtering operations and makes it Oracle9iAS compliant HTML. For more information read corresponding how-to articles.

- DefaultXhtml.xsl is a default stylesheet that converts XHTML to Oracle9iAS Portal compliant XHTML.

Provider.xml

The current provider.xml stores information by hierarchy and is used to define and list available portlets. The provider.xml is associated with only one provider. The default provider within the xml file, which holds meta-data information of the provider, is oracle.portal.provider.v2.http.DefaultProviderDefinition. However, in order to take advantage of the URL-based portlets, you will need to specify oracle.portal.provider.v2.http.URLProviderDefinition. URLProviderDefinition holds the additional/updated tags within the provider.xml file. URLProviderDefintion is a subclass of DefaultProviderDefintion supplied with the PDK where in the former is capable of dealing with java as well as URL rendering related tags. The following tags have been added or modified within the provider.xml:

- provider tag - the following are tags that have been added or modified within the provider tag.

o authentication is a required tag that has been added to the provider tag. It holds information about the type of authentication used.

o proxyInfo is an optional tag and holds proxy server information.

o httpsProxyInfo is an optional tag and holds https proxy server information.

o subscriberDetails is an optional tag that handles subscriber information for subscription billing.

portlet tag - the following are tags that have been added or modified within the portlet tag.

o registrationPortlet is an optional tag and specifies whether this portlet is a registration portlet for the provider.

o accessControl is an optional tag and indicates whether this portlet is publicly available or available only to registered users.

o renderer is a required tag that handles rendering portlets in all show modes.

o securityManager is a tag that handles portlet security.

o personalizationManager is an optional tag which can be used to store URLServices specific portlet customization data.

The table given below compares different provider.xml tags in PDK 3.0.9 and PDK 9.0.2.

Tag Name | Syntax in 3.0.9 | Syntax in 9.0.2
provider | <provider class="oracle.portal.provider.v1.http.URLProvider" session="true"> | Divided into two parts URLProviderDefinition - for containing meta data information. URLProviderInstance - for managing the portlets owned by this provider instance. <provider class="oracle.portal.provider.v2.http.URLProviderDefinition"> <providerInstanceClass> oracle.portal.provider.v2.http.URLProviderInstance </providerInstanceClass>
authentication | <authentication class="oracle.portal.provider.v1.http.Authentication"> | <authentication class="oracle.portal.provider.v2.security.Authentication">
proxyInfo | <proxyInfo class="oracle.portal.provider.v1.http.ProxyInformation"> | <proxyInfo class="oracle.portal.provider.v2.ProxyInformation">
httpsProxyInfo | <httpsProxyInfo class="oracle.portal.provider.v1.http.ProxyInformation"> | <httpsProxyInfo class="oracle.portal.provider.v2.ProxyInformation">
portlet | <portlet class="oracle.portal.provider.v1.http.URLPortlet"> | <portlet class="oracle.portal.provider.v2.http.URLPortletDefinition">
render | <renderer class="oracle.portal.provider.v1..RenderManager"> | <renderer class="oracle.portal.provider.v2.render.RenderManager">
showPage | <showPage class="oracle.portal.provider.v1.http.URLRenderer"> | <showPage class="oracle.portal.provider.v2.render.http.URLRenderer">
filter | <filter class="oracle.portal.provider.v1.http.HtmlFilter"> | <filter class="oracle.portal.provider.v2.render.HtmlFilter">
securityManager | <securityManager class="oracle.portal.provider.v1.http.URLSecurityManager"> | <securityManager class="oracle.portal.provider.v2.security.URLSecurityManager">

For more information and in-depth descriptions refer to the following articles:

- Understanding the URL-based portlet Runtime

- Understanding the provider.xml for URL-based Portlets

Revision History:

· October 03, 2001.

· July 12, 2001.

· December 19, 2001.