For our project we needed to make use of IBM Web Content Manager as a 'lightweight' document store, or Library, so users can search for their documents using search criteria. To allow us to do this we create a prof of concept using the Query API.
For the purpose of this blog I'm assuming you have a good understanding of how to create WCM ContentItems, Authoring Templates and the like, and that you're familiar with the terminology. You must also have a licensed Portal 8.0 with WCM 8.0 installation to play with.
For the purpose of this blog I'm assuming you have a good understanding of how to create WCM ContentItems, Authoring Templates and the like, and that you're familiar with the terminology. You must also have a licensed Portal 8.0 with WCM 8.0 installation to play with.
Accessing WCM content
IBM Web Content Manager 8.0 has different means of accessing WCM Content:
- Via the WCM REST API (out-of-the-box): WCM comes with a REST API that gives you access to most of the concepts, including content items, site areas and the like. For WCM 8.0 though, no facility is available to access or search by Categories.
- Using the Java API: The Java API allows a lot more flexibility, including searching by categories. It is also a lot faster than the 'chatty' REST service. It includes Workspace 'findxxx' methods, or for more advanced cases, a Query API.
- Using a WCM Content Viewer Portlet with Presentation template: This solution works fine for 'normal' content on the site. We wanted a completely custom UI though, and also surface the items in other standalone applications.
Content (library) requirements for the POC
We created some sample content in WCM to showcase the following:
- Search for content by keywords, or
- Search for content by categories, or
- Search for content by name(s), then
- Search for or limit results based on custom elements (e.g. text element)
Demo portlet
To make it easy to play with, we created a JSR286 Portlet with a simple JSP, deployed as a WAR directly on a Portal 8.0 environment (same virtual portal/portal as the WCM Library).
The demo code listed at the end of the blog demonstrates the following usage of the WCM Query API and Workspace.
- Use a WCM Workspace for a specific logged in user;
- Limit search results to a given WCM Library;
- Search for Content (Items) by category(ies), keyword(s) or name(s) - these are built-in fields or profile abilities of ContentItems;
- Filter the results on a custom Element (a text element) value (the Query API doesn't seem to support searching on Element in Documents directly).
Getting the project to work in your environment
Content
Before creating the portlet, be sure to have some WCM ContentItems with keywords, categories and the like available in a WCM Library where the user has access.
WAR
You will need to create a WAR with a JSR286 Portlet, with the appropriate Portal WCM jar (ilwwcm-api.jar), which should come with your Portal installation and be available in RAD or eclipse with Portal 8 Development stubs. So, your project should either have the correct maven dependencies or the Portal 8 libraries attached.
Once set up, you can copy the code into your portlet java class and your own JSP, deploy it and test.
References
WCM Query API:
Using the more base Workspace find facilities (code recipes):
Code listing
You can get the code as Gist here as well.
Thanks for this great post! - This provides good insight. You might also be interested to know more about generating more leads and getting the right intelligence to engage prospects. Techno Data Group implements new lead gen ideas and strategies for generating more leads and targeting the right leads and accounts.
ReplyDeleteIBM Content Manager Users Email & Mailing List
Nice and good article. It is very useful for me to learn and understand easily. Thanks for sharing your valuable information and time. Please keep updating mulesoft Online Training
ReplyDeleteucuz takipçi
ReplyDeleteucuz takipçi
tiktok izlenme satın al
binance güvenilir mi
okex güvenilir mi
paribu güvenilir mi
bitexen güvenilir mi
coinbase güvenilir mi
MMORPG OYUNLAR
ReplyDeleteINSTAGRAM TAKİPCİ SATİN AL
tiktok jeton hilesi
tiktok jeton hilesi
antalya saç ekimi
referans kimliği nedir
İNSTAGRAM TAKİPÇİ SATIN AL
Mt2 Pvp
INSTAGRAM TAKİPÇİ SATIN AL
perde modelleri
ReplyDeletesms onay
Mobil Odeme Bozdurma
Nft Nasıl Alınır
ankara evden eve nakliyat
trafik sigortası
dedektör
web sitesi kurmak
Aşk Romanları