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.
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.
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>
To run this portlet:
In JDeveloper, make sure the Portal library contains the JPDK JAR files and JAZN JAR file (i.e. pdkjava.jar and ptlshare.jar under PDK's /pdk/libcommon/portal/jlib directory, jazn.jar under OC4J's /j2ee/home directory). Right-click portal.jpr and select Project Settings. Select Libraries and select Portal under Selected Libraries. Click Edit and then add the three jar files into the classpath of this library.
Modify the BIDesigner design and runtime settings in the project to your BI Beans environment (i.e. connection to OLAP and BI Beans Catalog) (similar to "Update the sample project settings" under Installing and Configuring the Samples). On the BI Beans Settings dialog, select the Runtime settings tab, then make sure you are using a remote BI Beans Catalog at runtime and there is a presentation called Presentation1 in the Catalog (follow the Using the Catalog sample to copy presentations to the remote Catalog if necessary)
Rebuild the project which will create new configuration files for the project. Test the project by running view.jsp within JDeveloper. You should see Presentation1 in a browser.
Test the PDKProviderAdapter of the application using the following URL:
http://<host>:<port>/biview/providers
For example:
http://138.1.203.137.8988/biview/providers
You should see a success page.
Log on to the Portal Builder page and register a new portlet provider with
the following provider information:
Name: MyBIViewProvider
Display Name: My BI View Provider
Timeout: 1000
Timeout Message: My BI View Timed Out
Implementation Style: Web
URL: http://<host>:<port>/<application contex root>/providers
Create a page in Oracle Portal and add the new biview portlet.
View page in Oracle Portal.
By default, in Show Mode, you will see the list of presentations in the root folder. You can click on each presentation to open the JSP application (view.jsp) to show the presentation.
Click Customize to go to Edit Mode. You can select a different folder or presentation to display in Show mode. Click OK to go back to Show mode.
If you selected a different folder, you will see the list of presentations in that folder. If you selected a presentation, you will see a cached presentation if its data has been cached using CacheUpdate and an Analyze link to open the view.jsp application.
To demonstrate CacheUpdate, the project portal.jpr in JDeveloper has been setup to run CacheUpdate with the following parameters: default "". In JDeveloper, run portal.jpr to create data caches for the presentations in the root folder so that users can see the presentations in Show mode when they have been selected in Edit Mode.
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:
group ID for storing view cache (use 'default')
BI Catalog folder containing views to be cached
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.
![]() |
|
---|---|
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. |