The BI Beans Catalog sample application demonstrates how to use various catalog components and APIs in a java client application.
The BICatalog
class extends BIFrame
. The BICatalog
class provides a menu with access to a simple connection dialog, which prompts
a user for security credentials. It then makes the two connections described
above. Once the connections are established, the following functionality is
available through the various menu items:
Setup a sample user folder structure with different levels of access (Tools/Create Folder Structures).
Display the BI Beans Explorer, which allows you to navigate the folders of the BI Beans Catalog (Tools/Explorer).
Export the contents of the BI Beans Catalog to an XML file on the file system (Tools/Export Catalog to file).
Open any of the components stored in the BI Beans Catalog and display them (File/Open).
Open and display the XML representation of any of the components in the BI Beans Catalog (File/Open as XML).
On connect/disconnect, store the user settings in the BI Beans Catalog. The 6 most recently used (MRU) items and the current path are stored in the user settings. The MRUs are also available as separate menu items.
In order to load and save the user settings you will need to register this sample component in the BI Beans Catalog. To do this, use SQL*Plus to connect to the schema in which the BI Beans Catalog is installed and register the Application settings type with the following sql commands:
insert into bism_object_types
values(9001, 'ApplicationSettings');
commit;
You must also make sure that the run time settings are pointing to a remote BI Beans Catalog.
In order to make use of the Open and Open XML menu items, you must have saved or copied some components like graphs and crosstabs in the referenced BI Beans Catalog using the other samples such as the Using the Local and Remote Catalog sample.
Run the sample and select Tools - Create Folders Structures from the application menu. This will create a sample folder structure and allow user settings to be saved for the users: anna, chadwick, henry and yekesa. Note: the newly installed users have no access to any of the folders other then the newly installed folders. As the Schema user using the BI Beans Explorer, you can either grant the users access to other folders or copy some components to their folders. Afterwards, you can connect using the other users such as anna, chadwick, henry and yekesa. Since the sample applicatioin is not authenticating the user, you can leave the password blank for the other users.
See the following methods for interesting usage of BI Beans Catalog / Persistence service API. The method
protected void createFolderStructures()
creates the sample folder structures. The method shows how to create folders and how to set access to the folders. The method
protected void showExplorer()
shows how to create and display the BI Beans Explorer. The method
protected String openObjectChooser()
demonstrates how to create, initialize, and display the ObjectChooser
.
The resulting selected object name is then used in the method
protected void openComponent(String
name, boolean showXML)
to explain how to actually load the component from the BI Beans Catalog and display it or its XML. Exporting the contents of the BI Beans Catalog is demonstrated using the method
protected void
exportCatalog()
protected
void connect()
protected void disconnect()
for an example of how to load (lookup
) and save (bind
)
a component, when the user's settings are loaded and saved.
Also examine
public class ApplicationSettings
because it is a good example of how to make your own components capable of being stored in the BI Beans Catalog. The methods
public
String getXMLAsString()
public boolean setXMLAsString(String xml)
Copyright © 2004 Oracle Corporation. All Rights Reserved. |