Oracle Business Intelligence Beans Sample

Displaying BI Reports in Oracle Application Server Portal

Overview

This sample shows how BI reports can be integrated into Oracle Application Server Portal. It is implemented as a portlet displaying either the contents of a BI Catalog folder or a single BI report (view). The views use cached data stored within BI Catalog. A simple utility called 'CacheUpdate' is provided for creating and refreshing data cache from a live OLAP Services query.

BIView is a Servlet-based implementation of the portlet renderer, which is made available to portal via a web-style provider. Please refer to Oracle Portal documentation for more information on portlet renderers and portlet providers. BIView supports two Portlet modes: 'Show' (also used for 'Show Details') and 'Edit' (also used for 'Edit Defaults'). The 'Show' mode displays contents of a particular BI folder or report, while the 'Edit mode' allows users to pick a folder or report and an application that will be launched for a report's detailed analysis. The application that will be launched is specified in the web.xml file.

view.jsp is the JSP application that shows the details of the selected report.

Setup Requirements

This portlet requires Oracle Application Server Portal 9.0.2 (or later) with PDK-Java Framework (JPDK), an instance of BI Beans Catalog with a presentation named Presentation1, and a special OC4J instance on Oracle Application Server for deployment. Look on OTN in the OC4J technical notes for "Setting Up a Separate OC4J Instance for a BIBeans Application - iAS on Windows" or "Setting Up a Separate OC4J Instance for a BIBeans Application - iAS on Unix."

Open the workspace portal\portal.jws under the samples directory within JDeveloper. All the necessary files for this sample can be found in the portal.jpr project under the portal.jws workspace.

Code Highlights

This sample uses UIX components to render both 'Show' and 'Edit' Portal modes. UIX component trees in the sample are shared among all users. They are created only once after the Servlet is loaded. The init() method creates UINodes and defines binding for their dynamic properties. Such approach makes it easy to switch from dynamically allocating UIX components to defining them within a UIX document. Actual rendering is performed in renderShow() and renderEdit(). This is also where dynamic properties are determined and where stateful thin beans are managed.

The portlet uses BI Catalog Explorer Bean to enable catalog navigation for the portlet 'Edit' mode. For the 'Show' mode, portlet uses Thin BI Crosstab and Thin BI Graph beans. The sample also shows how ThinGraph instances can be pooled.

The portlet uses DataviewCacheUtils helper class to retrieve cached view definition along with its cached data. The same helper class is used by CacheUpdate to store cached views.

The portlet uses a custom Render Manager named BIPortalRenderer to give the portlet (servlet) greater control over the rendering of the different Cabo components.

Under /public_html/WEB-INF/web.xml, there is a list of external applications that can be called from the portlet. External application is just a URL launched to analyze a given report. This URL may include a [NAME] macro, which will be substituted at run time with a BI Catalog path for the selected report. Each external application's URL should be followed by a description text. URLs and descriptions should be separated by a semicolon (';'). For example,

 
<param-name>applications</param-name> <param-value>/biview/view.jsp?event=bi_select&source=view_Presentation1&bi_fpName=[NAME];Demo Application;javascript:openNewWindow('/biview/view.jsp? event=bi_select&source=view_Presentation1&bi_fpName=[NAME]');Demo Application in a New Window</param-value>

How To Run

To run this portlet:

Please refer to Oracle Portal and PDK-Java Framework (JPDK) documentation for information on how portlet providers are registered.

The parameters for CacheUpdate command line this utility are:

  1. group ID for storing view cache (use 'default')

  2. BI Catalog folder containing views to be cached

  3. optional -r parameter indicating that search for views should be recursive

For example, java CacheUpdate default "" will cache all reports in the root folder.
java CacheUpdate default "private" will cache all reports in the private folder.

oracle logo  
Copyright © 2002, 2003 Oracle. All Rights Reserved.

Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.