This directory contains sample programs using the EIP JavaBeans. Most of these samples are general, and will work either directly to a content server or federated, using federated entities and search templates defined using EIP administration.
All samples can be executed using the EIP environment. To setup:
AIX, Solaris
Execute the cmbenv81.sh
command. (On AIX, this command may be located in the /usr/lpp/cmb/cmgmt directory.) This script sets up the PATH and CLASSPATH correctly for compiling and running the samples.
Samples that use CMBDocumentServices will also requires X Server. (The document conversions within CMBDocumentServices use the AWT, which requires X11 Graphics Session.) A root user can enable the use of its X11 Graphics Session using the command:xhost +
This gives permission to all users. Each user can then set the DISPLAY environment variable:
set DISPLAY 0:0
export DISPLAY
Windows NT, 2000
Launch the EIP development window -- Start | Programs | Enterprise Information Portal | Development Window. This runs the cmbenv81.bat script which sets up the PATH and CLASSPATH correctly for compiling and running the samples.
There are three types of samples in this directory:
Note: These samples are not demo or turn-key programs that will run without any customization. The user is expected to do some customization to make them run in his/her environment. The main purpose of these sample programs is to provide sample code for the user to browse, so that he/she can have a clear example how to do a certain task using the EIP JavaBeans.
These samples are interactive, prompting for information from the user. The following table describes each sample class in more detail.
These samples require a federated connection.
Class Name | Description |
DemoConnect | Performs a connect and disconnect. Demonstrates the use of the CMBConnection bean. |
DemoConnectUsingEvent | Demonstrates connection using request/reply events. |
DemoSchema | Demonstrates CMBSchemaManagement bean functionality. |
DemoAsynchSearch | Demonstrates asynchronous search using search templates (obtained form CMBSchemaManagement) and iterating through search results (using CMBSearchResults). |
DemoDataMgt | Demonstrates CMBDataManagement bean functionality. |
DemoSimpleAppl | A simple sample application, to demonstrate using nonvisual beans to build a simple command-line application. |
UtilSimpleUI | Provides simple command line user interface methods. |
UtilPersistent | Saves and restores bean state using Java serialization. |
These samples demonstrate creating visual beans that work with the nonvisual beans using request and reply events. Several sample visual beans are provided.
These samples require a federated connection.
Class Name | Description |
SampleGuiLogon | Provides logon panel for the CMBConnection bean. |
SampleGuiSchema | Provides a list of search templates. |
SampleGuiTemplate | Provides a query interface for a search template. |
UtilTableModel | Provides a Swing table model for search results. |
TemplateChangeEvent | An event fired from the SampleGuiSchema bean when a template is selected. |
TemplateChangeListener | The listener for the TemplateChangedEvent, implemented by SampleGuiTemplate. |
SampleFocusAdapter | Provides serialization to FocusAdapter |
These samples perform various tasks using the beans without interaction. All parameters to the samples are provided as arguments.
These samples can be used either directly to the specified server type, or indirectly using a federated connection.
Class Name | Description |
TListDataSources | Lists the servers available. |
TConnect | Performs connect and disconnect from the server. |
TConnectionPool | Demonstrates the use of connection pool to get and free connections. |
TChangePassword | Change password on server. |
TListEntities | Lists entities and their attributes as defined on the server. Recurses to show subentities (child component types). |
TListTemplates | Lists search templates as defined on the server. |
TSearch | Searches using a query string. Also displays contents of folders and attributes on child components. |
TAsynchSearch | Similar to TSearch, but performs an asynchronous search. |
TCreateItem | Creates an item, specifying the attributes, including child components if any. |
TImport | Imports a document or resource item, specifying attributes and content. |
TExport | Writes document or resource item content to a file. |
TView | Searches, retrieves and views documents with conversion. |
TLock | Locks a document |
TUnlock | Unlocks a document |
TEditAttributes | Changes values of item attributes. Also, adds, updates, or removes child components on an item. |
TReindex | Reindexes item, moving it to another entity. |
TUpdate | Updates the content of an item (replacing the content with a new document). |
TCreateFolder | Creates a folder. |
TAddToFolder | Adds an item to a folder. |
TListRefFolders | Lists folders that an item belongs to. |
TRemoveFromFolder | Removes an item from a folder. |
TAddLink | Creates a link between items. |
TRemoveLink | Removes a link between items. |
TListLinks | Lists links between items. |
TDelete | Deletes an item. |
TAddAnnotation | Adds a text annotation to a document or folder. |
TUpdateNotelog | Appends text to the note log on a document or folder. If a note log does not exist, one is created. |
TListVersions | Displays information about the versions of one or more items. |
TPlay | Retrieves metadata about a streamable audio or video and launches the browser to play it. |