Oracle9iAS Portal Developer Kit
Database Provider Starter Examples

The database provider starter examples provide a detailed template for creating your own database providers and portlets.  The code is well commented.

This document explains:

CONTENTS

This section describes the files included in the starter example.  There are package specifications (*.pks), package bodies (*.pkb), and a bare-bones installation script.

Files

Documentation


SETUP

To give you a good understanding of what goes on behind the scenes, these instructions describe how to install the database provider starter examples manually.

Installing the Packages

  1. Find provsyns.sql and change to that directory (e.g. c:\portal30\webdb30\admin\plsql\wwc). Later, you will run this script to grant permission to call Oracle9iAS Portal APIs.
  2. Create the schema where you will install the example.
  3. Grant your schema permission to call Oracle9iAS Portal APIs
  4. Install the starter example
The insintpr.sql script runs each of the PL/SQL package scripts in turn.  After completing these steps, all the logic needed to run your starter database provider and portlets resides in the database.

Registering Your Provider

In order for Oracle9iAS Portal to display the Starter Provider (and for your users to see your portlets), you need to register this new provider:

  1. Login to Oracle9iAS Portal as a portal administrator.
  2. Click the Administer tab.
  3. Under the Administer tab, click on Add a Portlet Provider within the portlet called Provider.
  4. Fill out Provider information for the Sample.

    5.  Click OK.

Note: This registration can also be done programmatically.  Please see the PL/SQL API Reference for more information.


PORTLETS

The portlets in the Starter Provider are meant to serve as a guide for developing PL/SQL portlets.  They have been refined to reflect the best practices in PL/SQL portlet development.

Hello World Portlet

The Hello World Portlet is designed to illustrate a basic portlet framework which you can fill.  It uses all the portlet show modes and in doing so it exposes all the different ways a portlet can be used.  The main show mode is MODE_SHOW, which you see on the portlet itself.  

The links on the portlet banner expose other show modes (Help - MODE_SHOW_HELP, About - MODE_SHOW_ABOUT, Customize - MODE_SHOW_EDIT).  If you click on the title of the portlet, you see MODE_DETAILS which brings you to interface the portlet would show if it could use the entire screen.

Two other modes which can be seen elsewhere are MODE_PREVIEW and MODE_EDIT_DEFAULTS for customizing the settings of this portlet for all Portal users.  You can see MODE_PREVIEW by clicking on the portlet title before adding it to a page.  Access MODE_EDIT_DEFAULTS when you customize a page: the portlet placeholder shows a link "Edit Defaults".

Snoop Portlet

The Snoop Portlet is builds on the model of the Hello World Portlet and adds a listing the what is inside the Portlet Runtime Record.  This record contains all the information needed for a portlet to both react and interact with its environment.


Revision history: