- IBM FileNet 4.0+
- IBM CMIS Prototype for IBM FileNet P8 Content Manager 4.0
- WebSphere Portlet Factory 6.1.2
- WebSphere Portal / WAS / WASCE / Tomcat app servers
In this example, a portlet has been built with WebSphere Portlet Factory that illustrates how to connec t to and expose IBM FileNet Content Management services. The sample uses the new CMIS Prototype API which wraps IBM FileNet APIs and exposes them as a collection of REST services. A basic navigation service is utilised to provide a way of navi gating through folders and documents, providing a user with a simple way of downloading content from IBM FileNet in a native portlet. The portlet is comprised of two models – a service provider that abstracts the REST services provided by IBM FileNet and CMIS, and a service consumer model that utilizes the service provider and is deployed as a portlet.
FileNet feed provider model
This model (FileNetService.model) provides one main service for navigating a FileNet repository. The getContent operation calls the “Service” REST service to retrieve the content held in a document library, folder or the actual document itself. There is no authentication set up in this sample – which means that the FileNet Server did not require authentication here. In reality this would be either handled via Credential Vault integration, LTPA integration (Lightweight Third Party Authentication) or specifying authentication information directly into the builder. The REST service builder uses a variable to hold the runtime value of the feed URL. The value of this variable (the feed URL) is set at runtime as the user clicks through each folder or library. The GetContent service operation wraps the getContentAction action list which implements the logic for calling the service.
FileNet feed consumer
The feed consumer model (FileNetContent.model) is used to render a UI, and it consumes the services provided by the feed provider model. It makes use of a Linked Java Object builder (LJO) – FileNetUtil which exposes helper methods for performing XML processing on the results retrieved from the REST service call. The initial feed URL supplied to the REST service call is loaded in the OnWebAppLoad event handler. The services is called and the data returned is rendered by the Data Page builder “FeedContents”. A link builder is used to generate clickable links either into folders or on documents. The generated link, when clicked, will call a method in the FileNetUtil LJO to help determine what type of content to return (folder or document). The breadcrumb builder creates functionality that allows users to navigate back to where they came from.
Ideas to Consider
The next step for this sample would be to add file upload capabilities. The CMIS REST services for FileNet P8 do support this capability. Other things to consider would also include integration with a realistic FileNet security constraint.
Notes on running the sample and prerequisites
Portlet Factory 6.1.2 is required.
FileNet P8 Content Manager with the CMIS API is required. (CMIS is mandato ry). Please see this article on Alphaworks for details on CMIS for FileNet P8.
Import the attached zip file into your project using the Import WebSphere Portlet Factory Archive command.