Skip Headers
Oracle® Fusion Middleware Portlet Development Guide for Oracle WebLogic Portal
10g Release 3 (10.3.4)

Part Number E14244-05
Go to Documentation Home
Home
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

Go to previous page
Previous
View PDF

A Oracle Enterprise Pack for Eclipse Portlet Database Data

This appendix describes how portlet data is managed by databases, and contains the following sections:

A.1 Database Structure for Portlet Data

When a portlet's data is loaded into the database, the portlet XML is parsed and a number of tables are populated with information about the portlet, including PF_PORTLET_DEFINITION, PF_MARKUP_DEFINITION, PF_PORTLET_INSTANCE, PF_PORTLET_PREFERENCE, L10N_RESOURCE, and L10N_INTERSECTION.

PF_PORTLET_DEFINITION is the master record for the portlet and contains columns for properties that are defined for the portlet, such as the definition label, the forkable setting, edit URI, help URI, and so on. The definition label and web application name are the unique identifying records for the portlet. Portlet definitions refer to the rest of the actual XML for the portlet that is stored in PF_MARKUP_DEF.

In the Development phase, you use Oracle Enterprise Pack for Eclipse to create portlets and place them onto a portal. In the Staging phase, you use the Administration Console to add portlets to portal desktops. Each time you add a portlet to a desktop, you create an instance of that portlet. Portlet instances allow for multiple variations of the same portlet definition.

The following four types of portlet instances are recorded in the database for storing portlet properties:

PF_PORTET_INSTANCE contains properties for the portlet for attributes such as DEFAULT_MINIMIZED, TITLE_BAR_ORIENTATION, and PORTLET_LABEL.

If a portlet has portlet preferences defined, those are stored in the PF_PORTLET_PREFERENCE table.

Finally, portlet titles can be internationalized. Those names are stored in the L10N_ RESOURCE table which is linked using L10N_INTERSECTION to PF_PORTLET_DEFINITION.

A.1.1 Removing Portlets from Production

If a portlet is removed from a newly deployed portal application and it has already been defined in the production database, it is marked as IS_PORTLET_FILE_DELETED in the PF_PORTLET_DEFINITION table. It displays as grayed out in the WebLogic Administration Portal, and user requests for the portlet, if it is still contained in a desktop instance, return a message indicating that the portlet is unavailable.

A.2 Portlet Resources in the Database

During the development phase, the .portlet files for portal web projects are stored as XML in the portal web application. As a developer creates new .portlet files, a file polling thread monitors changes and loads the development database with the .portlet information. When a portlet's data is loaded into the database, the portlet XML is parsed and a number of tables are populated with information about the portlet. Changes that you make using the WebLogic Portal Administration Console are directly reflected in the database.

This section contains the following sections:

A.2.1 Types of Database Tables

Separate database tables store information about portlet resources, including the following:

  • Definitions – Portlet definition properties including creation date, content URI, whether the portlet is forkable or cacheable, whether it has a backing file, and so on.

  • Instances (including a subset of tables for WSRP) – Instance properties indicate whether the portlet is minimized by default, title bar orientation (top, left, right, bottom), the parent portlet instance if applicable, and so on.WSRP portlet properties include proxy portlet instance values.

  • Categories – Portlet categories provide for the classification of portlets, which is useful when organizing a large collection of portlets into meaningful groupings. The database stores values for the category ID and creation/modification dates.

  • Category definitions – The database stores values for the category ID and creation/modification dates, parent category, and so on.

  • Preferences – Preference properties, such as whether or not the preference can be multi-valued or whether it is modifiable, are stored in this table.

  • Preference values – The database stores the actual value of portlet preferences.

  • User properties – The database table maintains values of portlet user properties for WSRP user profile propagation.

    Tip:

    The tool you use to manipulate these resources varies according to the resource, and the phase of development you are in; for example, you can change portlet preferences using either Oracle Enterprise Pack for Eclipse or the WebLogic Portal Administration Console, but you must use the Administration Console to create portlet categories.

A.2.2 Management of Portlet Data

When a portlet is loaded into the database, the portlet XML is parsed and a number of tables are populated with information about the portlet, including PF_PORTLET_DEFINITION, PF_MARKUP_DEFINITION, PF_PORTLET_INSTANCE, PF_PORTLET_PREFERENCE, L10N_RESOURCE, and L10N_INTERSECTION.

PF_PORTLET_DEFINITION is the master record for the portlet and contains rows for properties that are defined for the portlet, such as the definition label, the forkable setting, edit URI, help URI, and so on. The definition label and web application name are the unique identifying records for the portlet. Portlet definitions refer to the rest of the actual XML for the portlet that is stored in PF_MARKUP_DEF.

PF_MARKUP_DEF contains stored tokenized XML for the .portlet file. This means that the .portlet XML is parsed into the database and properties are replaced with tokens. For example, the following code fragment shows a tokenized portlet:

<netuix:portlet $(definitionLabel) $(title) $(renderCacheable) $(cacheExpires)>

These tokens are replaced by values from the master definition table in PF_PORTLET_DEFINITION, or by a customized instance of the portlet stored in PF_PORTLET_INSTANCE.

The following four types of portlet instances are recorded in the database for storing portlet properties:

  • Primary – Properties defined in development and stored in the .portlet file.

  • Library – Properties defined in the Portal Library, which you can change using the WebLogic Portal Administration Console.

  • Admin – A customized instance of the portlet in a desktop. This allows you to customize a portlet in a particular way for a desktop without affecting other instances of the portlet in other desktops.

  • User – User-customized instances of the portlet defined in the Visitor Tools.

PF_PORTET_INSTANCE contains properties for the portlet for attributes such as DEFAULT_MINIMIZED, TITLE_BAR_ORIENTATION, and PORTLET_LABEL.

If a portlet has portlet preferences defined, those are stored in the PF_PORTLET_PREFERENCE table.

Finally, portlet titles can be internationalized. Those names are stored in the L10N_ RESOURCE table which is linked using L10N_INTERSECTION and PF_PORTLET_DEFINITION.

A.2.3 How the Database Shows Removed Portlets

If a portlet is removed from a deployed portal project, and it has already been defined in the production database, the portlet is marked as IS_PORTLET_FILE_DELETED in the PF_PORTLET_DEFINITION table. The portlet displays as grayed out in the Administration Console, and user requests for the portlet (if it is still contained in a desktop instance) return a message indicating that the portlet is unavailable.

For detailed information about the content of WebLogic Portal database tables, refer to the Oracle Fusion Middleware Database Administration Guide for Oracle WebLogic Portal.