Enterprise Information Portal APIs

Enterprise Information Portal

This documentation describes the classes composing the EIP JavaBeans.

See:
          Description

Packages
com.ibm.mm.beans  
com.ibm.mm.beans.gui  
com.ibm.mm.beans.util  
com.ibm.mm.beans.workflow  
com.ibm.mm.beans.workflow.event  
com.ibm.mm.viewer  
com.ibm.mm.viewer.annotation  

 

This documentation describes the classes composing the EIP JavaBeans. The JavaBeans consist of several sets of classes:

The EIP JavaBeans are designed to ease development of end-user, applications. The beans follow JavaBeans conventions, with default constructors, properties and events. Also, the beans include associated BeanInfo classes, which aids their use in visual builder environments.

The following table describes the packages and jars containing these classes:

Classes Packages JAR
Nonvisual beans

com.ibm.mm.beans
com.ibm.mm.beans.util
com.ibm.mm.beans.workflow

cmb81.jar
Visual beans com.ibm.mm.beans.gui cmb81.jar
Java viewer toolkit com.ibm.mm.viewer
com.ibm.mm.viewer.annotation
cmbview81.jar

Nonvisual Beans

The nonvisual beans are useful in building Web Applications, application environments where the application developer wants complete control over the user interface provided, and applications where no interface is provided, such as in a custom server application.

When used in Web Applications, the beans typically serve as the model in a Model-View-Controller architecture. Servlets, written by the application developer or provided with EIP, act as the controller. Java Server Pages (JSP's) act as the view. This architecture provide separation of application logic form presentation logic, however, other architectures are possible when building Web Applications, such as JSP's-only, which would both act as the controller and view, using the nonvisual beans as the model. Both of these types of Web Applications are supported with the EIP nonvisual beans. Please see the Application Programming Guide for more information on the EIP servlet toolkit and JSP tag library, which are also useful in building Web Applications with EIP.

The packages comprising the nonvisual beans are com.ibm.mm.beans, com.ibm.mm.beans.util, and com.ibm.mm.beans.workflow. Below is a brief description of each of the beans:

CMBConnection
This bean maintains the connection to the federated database and content servers. By default, a connection is made to a federated database, but a direct connection can also be made to a content server.
CMBConnectionPool
This bean maintains a pool of CMBConnection instances. It provides a performance optimization for server applications in situations where the same user ID is used by multiple users by avoiding a disconnect and reconnect when the a CMBConnection instance for the same user ID is reused.
CMBSchemaManagement
This bean provides access to available search templates, entities and attributes. An instance of this bean can be obtained from CMBConnection, in which case it returns schema information about the server or database connected to by CMBConnection. Alternatively, you can create an instance separate from CMBConnection, to gain access to schema information for any content server.
CMBDataManagement
This bean provides services to retrieve data on documents and folders stored on content servers. You can obtain an instance of this bean from CMBConnection.
CMBUserManagement
This bean provides capabilities to view and modify the content server user ID mapping associated with an EIP federated user ID.
CMBQueryService
This bean provide query capabilities, either by search template or by using a query string.
CMBSearchResults
This bean maintains search results that are generated by searches performed using CMBQueryService or CMBSearchTemplate.
CMBDocumentServices
This bean provides rendering and conversion of documents for thick and thin clients (see Document Viewing Services below).
CMBWorkFlowDataManagement
This bean provides services to retrieve workflow data.
CMBWorkFlowQueryService
This bean provides workflow query capabilities.
CMBDocRoutingDataManagementICM
This bean provides services to manage CM Version 8 document routing data.
CMBDocRoutingQueryServiceICM
This bean provides CM Version 8 document routing query services.
CMBTraceLog
This utility bean can be used to provide common trace event handling for the nonvisual beans. It can write the trace messages to a log file or display them in a window. For Version 8, this bean can write trace to a common log file with Java API classes, for ease in debugging problems.
CMBExceptionHandler
This utility bean can be used to provide common exception handling for exception events generated by other nonvisual beans.

There are command line samples showing the use of the nonvisual beans in the <cmbroot>/samples/Java/beans and <cmbroot>/samples/Java/beans/workflow directories.

Additional Classes

There are additional classes in the nonvisual beans, that are used in conjunction with the beans for data modeling:

CMBEntity
This class represents a single entity definition. An entity is an item type, index class, application group, database table.
CMBAttribute
This class represents a single attribute definition. This is an attribute on an item type, index class, application group. For relational database sources, it is a column on a data base table.
CMBSearchTemplate
This class represents a search template defined on the Federated database, or an OnDemand folder when direct-connected to an OnDemand server.
CMBSTCriterion
This class represents a single criterion on a search template.
CMBItem
This class represents a single item on the server. This is typically a document or folder. For database sources, this will be a row in a database table. For CM Version 8, this can also be a resource or non-resource item, or a child component of an item.
CMBObject
This represents a single part of a document. For multipart documents, or documents with annotation and note, each part on the server for the content of the document or annotations or note will be represented with a CMBObject.
CMBAnnotation
Annotation parts have additional information that is represented using this class.

Threading Usage Guidelines

An single instance of the CMBConnection bean does not support multithreaded use. Other beans, with the exception of CMBConnectionPool, contain a reference to the CMBConnection bean. This means that an entire set of beans, a CMBConnection bean and all beans that reference it, can only be used on a single thread at any time.

The lack of multithread support in CMBConnection does not imply that the beans can not be used in a multithreaded environment. Quite the contrary. Web application environments are typically multithreaded, and the beans are used in this environment. But, they are managed in such a way as to only allow a single thread to use any set of beans (CMBConnection and associated beans) on any single thread at any point in time.

For web applications, this is usually achieved by placing an instance of CMBConnection and associated beans in the session scope of the web application. Also, it requires that only a single servlet be executing for a session at a time, which can be achieved by serializing on CMBConnection.

CMBConnectionPool can assist in managing connections in a multithreaded environment. When a connection is needed, it can be obtained from CMBConnectionPool, and then returned to CMBConnectionPool when it is no longer needed.

Visual Beans

The EIP visual JavaBeans can be used to rapidly build Swing-based Java applications using the search capabilities of EIP. These classes will work both with Federated and when connected directly to the native server, although some beans only provide function when connected to a particular server (because of features only available on that server). The classes comprising the visual beans are contained in Java package com.ibm.mm.beans.gui. Below is a brief description of each of the beans:

CMBLogonPanel
This bean displays a panel for logging onto the federated database. It also provides the capability to modify the userids and passwords on the content servers.
CMBSearchPanel
This bean provides an interface for launching searches based on an entity and its attributes. The entity depends on the platform: Item Type (CMv8), Index Class (CMv7), Application Group (OnDemand).
CMBSearchTemplateList
This bean displays a list of available search templates and allows selection of a template.
CMBSearchTemplateViewer
This bean displays a search template. It provides fields for search criteria to be entered. It also performs a search.
CMBSearchResultsViewer
This bean displays the results of a search. In situations where folders are returned, use this bean to "drill-down" into the folder to see its contents. Items in the search results or folders can be selected and opened for viewing or attribute editing.
CMBFolderViewer
This bean displays the contents of one or more folders. You can use it in situations where a folder that is not returned from a search needs to be viewed.
CMBVersionsViewer
For versioned documents, this bean displays all versions of a document. Attributes related to each version: userid and time created, userid and time last updated are displayed. This bean works with documents from CM Version 8, though the connection may be to either Fed or CM.
CMBDocumentViewer
This bean provides display of of document contents and display and update of annotations on those documents. Also, for documents from OnDemand, the OnDemand client (in view-only) mode is launched to view the document and provide view and addition of notes. By changing the cmbmime2app.properties, alternative viewers can be launched to display documents of particular content types.
CMBItemAttributesEditor
This bean displays the attributes of an item and provides the ability to reindex of the item and change attribute values. When it is not possible to update attributes or reindex, these fields will be disabled. However, even in this case, the bean is still useful for displaying the values of the attributes of an item.

Each of the visual JavaBeans has a Connection property. This property must reference an instance of CMBConnection, the nonvisual bean that maintains the connection to the content servers. Therefore, any application built with the EIP visual beans must also contain an instance of the CMBConnection nonvisual bean.

The visual beans can be used to build Java Applets. However, since the visual beans use the nonvisual beans, which in turn use the Java API, the applet will either need to communicate directly with the content server, database, or to an RMI server. They cannot be used as part of a Web Application that also requires connection to content servers in the middle tier.

A sample stand-alone Java application showing the use of the visual beans in the <cmbroot>/samples/Java/beans/gui directory.

Java Viewer Toolkit

Package com.ibm.mm.viewer contains classes comprising the Java viewer toolkit. This toolkit provides both a Swing-based document viewer with annotations editing capabilities, and nonvisual document conversion and rendering.

The Java viewer toolkit is used in the CMBDocumentServices nonvisual bean and the CMBDocumentViewer visual bean, and provides most of the function of those two beans. The Java viewer classes are separated from the beans so that they can be used in situations where the beans would not be used, such as in a viewer applet or document conversion servlet that does not require connection to a content server, i.e. works with files or data streams.

The following are some of the key classes in the Java viewer toolkit:

CMBStreamingDocServices
This class provides functions for converting documents and pages of documents to browser displayable formats. It is very similar to the CMBDocumentServices nonvisual bean, except that it works with streams rather than referring to other beans classes.
CMBAnnotationServices
This class provides functions to parse, add, modify, delete, render, and save CM graphical annotations.
CMBGenericDocViewer
This class is the main panel of a Java Swing based document viewer, with capabilities to scale, rotate, and enhance document pages, create, modify, and save annotations. It also provides toolbars and a pages thumbnails view.
CMBDocument
This class represents a document being processed by CMBStreamingDocServices or displayed by CMBGenericDocViewer.
CMBPage
This class represents a page of a document.
CMBAnnotationSet
This class represents a set of annotations associated with a document.
CMBPageAnnotation
This class represents an annotation on a page of a document.

The classes comprising the Java viewer are in the cmbview81.jar in packages com.ibm.mm.viewer and com.ibm.mm.viewer.annotation. Samples showing the use of the viewer toolkit to convert documents and view documents are provided, in the <cmbroot>/samples/Java/viewer directory.

Writing Document Engines

The capabilities of the Java viewer toolkit can be extended, by writing document engines. These engines extend the CMBDocumentEngine abstract.

There are three capabilities that a document engine can provide:

  1. Converting the entire document from one format to another. For example, an engine could be added to convert an XML document in an HTML document by invoking XSL translation.
  2. Paginating the document, and extracting and converting individual pages. This is useful for large documents, and especially for multipage imaged document formats such as TIFF. To convert and send the entire document to the browser may take a long time. The engine can provide function to extract individual pages and transform each page to a browser renderable format, such as GIF, JPEG, or HTML.
  3. Recomposing a multipart document. Even if no translation of the document is to be performed, sometimes the document consists of multiple parts, or has shared resources, such as preprinted forms images. To export the document, all parts of the document must be recomposed. Document engines perform this function as well.

The list of document engines is defined using setEngineProperties method of CMBStreamingDocServices.


EIP JavaBeans

(c) Copyright International Business Machines Corporation 1996, 2002. IBM Corp. All rights reserved.