Oracle9i Application Developer's Guide - XML Release 1 (9.0.1) Part Number A88894-01 |
|
This chapter describes the following sections:
Oracle9iAS Portal is a component of Oracle9i. It offers the security, reliability, and scalability of Oracle9i Application Server (Oracle9iAS) and Oracle9i database. It is comprised of easy-to-use portal software and a suite of products for application development, data warehousing, business intelligence, application integration, and mobile computing.
A portlet is a contained region on an Oracle Portal web page. Portlets can be considered as "web components" that display excerpts of other web sites and generate summaries of key information. Portlets can be placed on the same page with other portlets so that users have easy access to frequently used sites and information.
Portlets are rendered by web browsers just like any other part of a web page. Typically, portlets use standard HTML to display information to users, but their interfaces can be extended using other browser-capable technologies such as Cascading Style Sheets (CSS), eXtensible Style Language (XSL), JavaScript, and even Java applets.
Portlets can be used to access nearly any type of web-accessible information --- from files stored on the corporate intranet and reports on data managed by corporate applications to news and stock quotes from the Internet. Because of their dynamic nature, portlets are often used to highlight important information, alert users to new developments, and summarize key data.
There are three types of portlets:
Here are some common applications for portlets:
Oracle Portal Development Kit (PDK) includes services and tools for extending the Oracle9iAS Portal framework by developing portlets. These services include:
PDK Integration Services (PDKIS) is one of the services offered by Oracle9iAS Portal. PDKIS allow you to pull content into portlets directly from URLs, including URLs requiring authentication before viewing. PDKIS can do either of the following tasks:
PDKIS can pull content into your portal, and then modify the default XSL stylesheet to select what to display and how to display it.
You can extend the JPDK (PDK for Java) to create URL-based portlets in any language. Create portlets using any existing application without altering any code. These services can be installed on any machine using JPDK 1.4 or later.
You need the following to run URL Services:
Oracle Portal Development Kit (PDK) 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 Oracle 9iAS Portal using Portal APIs. The PDK and JPDK (PDK Services for Java) provide samples, utilities, and articles to easily develop portlets in PL/SQL and Java, but do not provide a simple solution for developers who have applications written in any other language like C, C++, Perl, ASP,... To simplify developing portlets in any language, Oracle Portal Development Kit provides PDK URL Services.
PDK URL Services allow developers to take any application written in any language and easily create integrated portlets. The URL Services takes the URL of an application, parses the content, and uses the JPDK framework to create a portlet. This process allows each 'show mode' of your portlet to be rendered from different applications and/or languages. For example, a portlet can have 'show mode' rendered using PERL,' edit mode' rendered using ASP, 'help mode' rendered using HTML, 'details mode' rendered using JSP, and so on.
provider.xml
file and limits the amount of programming required.
To create a URL portlet, follow these main steps:
A Web Provider is one that is written as a Web application. It is installed and hosted in a Web server and is remote from Oracle Portal. A Web Provider also owns and manages a set of portlets.
PDK Java Services offers a Provider Runtime called DefaultProvider that implements the functions of a provider. DefaultProvider owns and manages a set of portlets. It uses a initialization file to manage the set of portlets, called provider.xml
.
The file, provider.xml,
is a static file that stores information about a provider and its portlets. Understanding the configuration of provider.xml
allows you to create your own file to list and describe your Web portlets.
URL Services uses existing JPDK classes and extends the framework where required for rendering content from a URL. PDK URL Services allows you to define and list your URL portlets within the provider.xml
file.
URL Services also eliminates the need for additional programming by including a default runtime that handles portlet creation, integration, and communication with Oracle 9iAS Portal. The three main components of PDK URL Services are:
URL Services Interface is additions to the Web Provider Interface included in JPDK. The interface specific to URL rendering is oracle.portal.provider.v1.ContentFilter, specifications for filtering URL content.
URL Services Runtime extends classes from the current Web Provider (JPDK) Runtime to adapt to the new URL rendering capabilities. URL Services Runtime is comprised of the following set of runtime classes:
DefaultXhtml.xsl
is a default stylesheet that converts XHTML to Oracle 9iAS Portal compliant XHTML.
provider.xm
l stores information by hierarchy and defines and lists available portlets. provider.xml
is associated with only one provider. The default provider in the XML file is oracle.portal.provider.v1.http.DefaultProvider.
To take advantage of URL Services, you need to specify oracle.portal.provider.v1.http.DefaultURLProvider
. DefaultURLProvider
parses the additional/updated tags within provider.xml
file. The DefaultURLProvider
can handle standard provider.xml
tags, but DefaultProvider cannot handle tags within the provider.xml
that contain URL Services information.
Table 15-1 lists provider.xml tags that have been added or modified in the provider.xml
:
Provider.xml
is a declarative file containing descriptive informatio. It is used to list and display portlets. DefaultProvider parses provider.xml to gather information from the file. It creates a portlet instance (Java object) for each portlet listed in provider.xml. DefaultProvider also retrieves the render modes, personalization, and security information from provider.xml. It attaches this information to each of the portlet instances it creates and pushes the information to the other class files.
DefaultProvider pushes the information about render modes to the PortletRender. It pushes the information about personalization to the PortletPersonalizationManager. Finally, it pushes security information to the PortletSecurityManager. This allows each class to retrieve information from provider.xml
without knowing its name or location.
Once DefaultProvider parses provider.xml
, it stores the information until the instance is shut down. When updating, adding, or removing information from provider.xml, you must stop and restart the Oracle HTTP Server and also refresh the Portal repository.
XML parser preserves whitespace surrounding XML elements that contain text, so you must take care with the use of whitespace and line feeds when editing provider.xml.
Consider the example:
<showEdit> true </showEdit> <showEditDefault> true </showEditDefault> <hasHelp> true </hasHelp>
Here, the boolean string values in these tags would not be recognized because of the surrounding whitespace and therefore would be evaluated as false. The tags should be specified as follows:
<showEdit>true</showEdit> <showEditDefault>true</showEditDefault> <hasHelp>true</hasHelp>
provider.xml
stores information that is used by the Web Provider. It stores information by hierarchy and its hierarchical nature starts with "Provider". The file is organized to simplify the process required by the DefaultProvider to parse the file. provider.xml
file is also organized for readability.
This section describes the information in provider.xml.
When creating your own provider.xml
, you must follow the hierarchy and syntax required for the DefaultProvider to properly parse the file.
The provider tag is the first tag within provider.xml. It specifies the class that implements oracle.portal.provider.v1.Provider. This specification points the Provider Adapter to a corresponding Provider. The provider tag has two attributes:
session is an optional attribute and is used to disable the initSession method within the DefaultProvider. If this session is disabled, the DefaultProvider does not create a servlet session. The default for this attribute is true.
Below is a sample of the provider tag from provider.xml
. In the sample, the provider tag declares DefaultProvider as the class that implements oracle.portal.provider.v1.Provider and that DefaultProvider creates a servlet session.
<provider class="oracle.portal.provider.v1.http.DefaultProvider" session="true">
The provider tag manages a single tag: useOldStyleHeaders is a optional. Set this to true if you are using Oracle Portal 3.0.6.6.5 with JPDK 1.3 and later, your provider's portlets support Customize/Help/About links and you want to retain the 'old 3.0.6 style' headers and footers.
For example, include the following line under the provider
tag: <useOldStyleHeaders>true</useOldStyleHeaders>
Web Provider has a tag called portlet. There is one portlet tag for each portlet that the provider manages. The portlet tag declares the class that implements oracle.portal.provider.v1.Portlet. The tag lists and describes a set of portlets that this provider manages. The portlet tag has three attributes:
version is an optional attribute and specifies the PDK version that the portlet implements. It is the version of the Portlet interface the portlet relies on. Currently, the value must be 1 and the attribute defaults to 1 if no version is specified.
Below is a sample of the portlet tag with three attributes from provider.xml.
In the sample, the portlet tag declares DefaultPortlet as the class that implements Portlet, declares a resource bundle called HelloWorldBundle and a version of 1.
<portlet class="oracle.portal.provider.v1.http.DefaultPortlet" resource="oracle.portal.sample.devguide.helloworld.resource.HelloWorldBundle" version="1" >
Portlet tag has twenty tags that it manages. Each tag describes an attribute of the portlet. Table 15-2 lists these tags.
See Also:
|
You can seamlessly integrate Oracle9iAQ Portal with technologies not natively included with Oracle 9iAS Portal, such as
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|