Untitled Document
Table of contents | Next | Previous
WCM and beyond
WCM features can be extended using the WCM APIs and JSP files.
This article discusses the following topics:
WCM APIs introduction
The Lotus Web Content Management API is focused on processing the content
programmatically. It is an alternative way to access a Web content management
(WCM) site. It allows content and other WCM objects to be created, edited,
deleted, and rendered entirely by using Java code. Additionally, clients can
manipulate their site and integrate WCM with other applications in a way that
was not previously possible.
The API offers only a subset of Lotus Web Content Management's
functionality, although it is a very useful subset.
Typical API scenarios may include the following examples:
- Create a taxonomy from a comma delimited file
- Bulk resource import
- Content search
- Perform search and retrieval operations, such as finding a given object
by name, or finding content based on a workflow stage
- Integrate WCM with third-party applications.
WCM API
The Lotus Web Content Management API provides a way to programmatically
access the core Web content management (WCM) classes. The Lotus Web Content
Management API but provides a means to access the core classes, which, in turn,
access the repository of content, components, categories, and so on.
The following figure illustrates the way in which the WCM repository is
accessed.

Following are the limited set of functions available when using the IBM
® Lotus Web Content Management™ API.
- Moving or copying items within a library.
- Moving or copying items between libraries.
- Search iterators of item IDs:
- Find item of given type by name.
- Find items of given type.
- Find library components by name.
- Find content by authoring template.
- Find content by category.
- Find content by path.
- Find content by workflow stage.
- Find content modified since date.
- Find content modified between dates.
- Content search (similar to the Menu Component search criteria but using
item parameters as ids).
- Retrieve via item IDs.
- The ability to create, delete and save the following items:
- Content
- Sites
- Site Areas
- File Resource components
- HTML components
- Image components
- Date and Time components
- Link components
- Number components
- Rich text components
- Style Sheet components
- Short text components
- Text components
- User Selection components
- The ability to retrieve the following items:
- Content
- Sites
- Site areas
- Taxonomies and categories
- Workflows
- Components
- The ability to retrieve the following items from searches, (but NOT as an
item):
- Authoring Template ID (Authoring Template)
- Presentation Template ID (Presentation Template)
- Workflow Stage ID
- The ability to approve or reject content items in a workflow stage. Other
item-types do not support this function.
The following features are not available using the API:
- The creation, update or deleting of workflows, workflow stages, workflow
actions, taxonomies, categories, syndicators, subscribers, presentation
templates, authoring templates, and components not specified above.
New features in the WCM 6.1 API
- Create custom workflow actions - More details are covered in the section on creating a custom workflow.
- Set of API to allow custom code to be invoked as part of the WCM
Workflow process e.g. To create workflow actions such as Achieve, more email
notifications, etc.,
- Dynamic workflow approvers
- New methods are added to com.ibm.workplace.wcm.api.Content to change
approvers
- Approvers can be added or removed
- Approver access can be checked
- Library Services
- The library service exposes APIs to create, save, copy, export and
import WCM libraries
- Library Document list
- Enables to export a list of information about all web content
artifacts in a library
- Manage syndication
- Set of API to allow dynamic control of syndication
New Workspace Methods
- New set of findBy methods to simplify retrieval of content by
workflow state (published, draft, expired, and any combination of these) are
added.
- New methods to build better performing solutions are also added.
Optimized retrieval of items for rendering and read operations when asReference
is set to true
- getById(DocumentId id, boolean asReference)
- getByIds(DocumentIdIterator documentIterator, boolean
asReference)
- Choice to use common name (default) or distinguished name to use with
workspace. This is also configurable in WCMConfigService.properties file by the
property api.use.dn = false. Each workspace can override this by setting
calling useDistinguishedNames (boolean distinguishedNames).
Dynamic workflow approvers
- New methods are added to com.ibm.workplace.wcm.api.Content to change
approvers
- Allows approvers can be added or removed.
- addApprovers(String[] approvers)
- removeApprovers(String[] approvers)
- Allows to check for approver access
Library Management API
Library Management APIs allows easier management of libraries through the
WCM Admin UI and WCM API. WCM Admin UI could be used to delete library and for
reporting. WCM Library management API could be used to create copy, save,
delete, export, import, set library access, output document list to stream
com.ibm.workplace.wcm.api.WebContentLibraryService enables
access to Web Content Library methods through Portal services.
WebContentLibraryService is available as a service and can be retrieved as
below
WebContentLibraryService webContentLibraryService =
(WebContentLibraryService)
ctx.lookup("portal:service/wcm/WebContentLibraryService");
Library Document List
Method outputDocumentListToStream on the
com.ibm.workplace.wcm.api.WebContentLibraryService can be used to
export a list of information about the web content artifacts in a library. And
the output can be directed to a CSV file with each document in a single row
using the com.ibm.workplace.wcm.api.CSVDocumentListWriter. Example
output of the document list would look like below

Custom writer can also be written by implementing the
com.ibm.workplace.wcm.api.DocumentListWriter. One application of this
API is to write a tool to compare exported lists from a syndicator and a
subscriber to check if all expected items are syndicated to the subscriber
system.
Syndication API
The main purpose of this API is to dynamically control syndication. Main
functionalities of this API would include –
- Enable, disable syndicators and subscribers
- Start full or partial updates
- Dynamically check syndication updates to see if its running
- View syndicator or subscriber details – Name, libraries being syndicated
- Last Syndication details – Items updated, saved, modified, removed
com.ibm.workplace.wcm.api.SyndicationService enables access to
control syndication between syndicator and subscriber .
SyndicationService is available as a service and can be retrieved as below
SyndicationService syndicationService = (SyndicationService)
ctx.lookup("portal:service/wcm/SyndicationService");