Producing and consuming ATOM/RSS feeds with Lotus Web Content

IBM Software Group
An IBM Proof of Technology
Producing and consuming ATOM/RSS feeds
Lab Exercise
© 2008 IBM Corporation
Catalog Number
© Copyright International Business Machines Corporation 2007, 2008. All rights reserved.
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP
Schedule Contract with IBM Corp.
IBM
Contents
LAB 1
1.1
LAB 2
2.1
2.2
APPENDIX A.
APPENDIX B.
APPENDIX C.
APPENDIX D.
Contents
OVERVIEW ...................................................................................................................................... 5
OBJECTIVES ....................................................................................................................................... 5
TIME ESTIMATE .............................................................................................................................. 5
PREREQUISITES............................................................................................................................. 5
GETTING STARTED ........................................................................................................................ 5
PRODUCING AND CONSUMING ATOM/RSS FEEDS .................................................................. 6
PRODUCING ATOM FEEDS .................................................................................................................. 6
CONSUME FEEDS ..............................................................................................................................24
SUMMARY .....................................................................................................................................35
END OF EXERCISE .......................................................................................................................35
PRODUCING OTHER ATOM AND RSS FEEDS ..........................................................................36
FIXED PORTAL PAGE ATOM FEED ....................................................................................................36
STANDALONE WEB SITE ATOM FEED .................................................................................................37
RSS FEED .......................................................................................................................................38
SETTING UP THE PERSONALIZATION FEEDS RESOURCE ....................................................40
NOTICES ........................................................................................................................................55
TRADEMARKS AND COPYRIGHTS ............................................................................................57
Page 1
THIS PAGE INTENTIONALLY LEFT BLANK
IBM
Producing and consuming ATOM/RSS feeds
Page 3
IBM
Lab 1
1.1
Overview
Objectives
The purpose of this lab is to demonstrate how to produce ATOM/RSS feeds to existing Lotus Web
Content Management site areas, and how to consume existing feeds.
After completion of the lab, the IT specialist will be able to add feeds into his existing web site managed
by Lotus Web Content Management and integrate existing feeds into their portal sites.
Time Estimate
The IT Professional should be able to complete this lab in 60 minutes.
Prerequisites
Appropriate Skill Level:
You need to have a basic understanding on how to build WCM web sites.
A good understanding of the format of ATOM and RSS feeds will help you to more easily follow all steps,
but we will introduce you these topics.
Image Requirements:
This lab exercise uses the STEW 2008 image labeled WTS Image 1.
Hardware Requirements:
PC Hardware with a minimum of 2 gigabytes of RAM and 25 gigabytes of free disk space.
Software Requirements:
VMware Workstation version 6.
Getting Started
In order to start the lab, open the VMware image file labeled WTS Image 1 in the VMware Workstation
application and start the image.
Producing and consuming ATOM/RSS feeds
Page 5
Lab 2
Producing and consuming ATOM/RSS feeds
2.1
Producing ATOM feeds
__1.
In the first part of this lab, you will add an ATOM feed to your existing web site. You will do this
as an example in the Intranet site that is preinstalled with WebSphere Portal, but you should be
able to easily add this to other WCM managed web sites as well. The feed will basically be
managed by an ATOM Feed Menu Component that will create the ATOM feed for the existing
site area. It will be linked to in the 'List' presentation template of the content. The ATOM Feed
Menu Component needs some control elements. Two 'CDATA' Text Components are needed to
control rich text in the feed. If you want to display your content on different pages, you need a
page URL mapping that refers to the page where the content needs to be shown.
Normally, you would put these design elements in a specific design library, but to keep this lab
applicable to any new Portal 6.1 installation you will put it in the standard library 'Intranet 6.1.0'
available with Portal installation.
__a. Have a look at the existing Jumpstart first. Open Mozilla Firefox (as this browser has a builtin feed reader) and go to http://portal.ibm.com:10040/wps/portal/intranet:
This shows you the 'Intranet' home page with latest news, announcement and events lists.
'Intranet' is the page name. You will add an ATOM feed to announcements in this example,
so people can subscribe to this list and use their favorite feed reader to get updated on any
new announcements. As you can notice from the URL, a Virtual Portal mapping of 'intranet'
exists for this page.
IBM
__b. Now first site the PageURLMapping element in the site area for which your want to use the
feed. Log in first as a WCM designer, in this environment, user=wpadmin,
password=passw0rd.
__c. And then go to the main portal, with URL http://portal.ibm.com:10040/wps/myportal:
__d. Go to 'Applications' – 'Content' – 'Web Content Management' as shown.
Producing and consuming ATOM/RSS feeds
Page 7
__e. Then change the library from the default 'Internet Web Content 6.1.0' to 'Intranet Web
Content 6.1.0' and navigate to the Content to verify that you have an 'Intranet' site with
underlaying 'Home' – 'Announcements' site area. In this site area, you should see the
'Announcement List' that controls the list view, and two announcement entries 'Employee
Achievements' and 'Company Milestones'.
__f. Now go back one level to 'Home' and select 'Announcements' on the right. Click
'Edit'.
__g. Select 'Manage Elements'.
IBM
__h. Select a 'Short Text' element type and name it 'PageURLMapping' with display title 'Page
URL Mapping'. Click 'Add' and 'OK'.
__i. Then set the new element to 'intranet' as this is the portal page where the announcement
as shown. Click 'Save and Close'. You may repeat this for the other site areas 'News' and
'Events'.
__2.
In the feed, you need to be able to add rich text in your feeds. This is controlled by putting the
rich text into '<![Data[' and ']]>' text. However, this cannot be edited directly in the menu, as it will
be encoded into something like '<...'. Therefore, you will put this text in text components and
add these components into your menu component.
Producing and consuming ATOM/RSS feeds
Page 9
__a. Create a new text component. Select 'New' – 'Component' – 'Text'. Give it the name and
display title 'CData Start' and put '<![CDATA[' in the text element field.
__b. Add access to all users (including anonymous). Go to the ‘Access’ section and add ‘[all
users]’ to the contributor role.
IBM
__c. Click 'Save’ and then ‘Save as' to create another text component. Name it now 'CData End'
and add ']]>' in the text element:
__d. This should have the same access settings as the one you copied from. Click 'Save and
Close' to store it.
__3.
Now create a new Menu Component. Select in menu 'New' – 'Component' - 'Menu'.
Producing and consuming ATOM/RSS feeds
Page 11
__a. Set the name and display title to 'ATOM Feed Menu'. Set the description to 'Menu that
creates an ATOM feed for an existing site area'.
Then select 'Site Areas' in 'Menu Element Query'. Select 'Exclude current content from
results', unselect both 'Include ancestors' and 'Include descendants'. Open 'Further Options'
and select 'Current content'. This will have the menu search in the current's content's site
area for all content found. You will use the list content 'Announcement List' in our example,
as the context for this menu, and this should not appear as an item in the feed.
IBM
__b. Add the following code in the header. For your convenience, you may import this from
'C:\Lab Files\FeedsLab\ATOMFeedMenu.html'
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title><IDCmpnt context="current" type="content"
field="title"/></title>
<link rel="self" href="<PathCmpnt type="base"/>/wps/portal/<Element
context="current" type="sitearea"
key="PageURLMapping"/>?WCM_GLOBAL_CONTEXT=<URLCmpnt context="current"
type="content" mode="standalone"/>"></link>
<updated><HistoryCmpnt context="current" type="content"
field="lastmodifieddate" format="yyyy-MM-dd'T'hh:mm:ss'Z'"/></updated>
<author>
<name><IDCmpnt context="current" type="content" field="authors"
format="cn"/></name>
</author>
<id><PathCmpnt type="base"/>/wps/myportal/<Element context="current"
type="sitearea" key="PageURLMapping"/>?WCM_GLOBAL_CONTEXT=<URLCmpnt
context="current" type="content" mode="standalone"/></id>
<generator
uri="http://www.ibm.com/software/lotus/products/webcontentmanagement">Lotu
s Web Content Management</generator>
__c. Based on the current context, the default content for a site area, it will create this example
code:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Announcements List</title>
<link rel="self"
href="http://portal.ibm.com:10040/wps/myportal/intranet?WCM_GLOBAL_CONTEXT=/wps/
wcm/myconnect/Intranet+Web+Content+6.1.0/IntranetSite/Home/Announcements/Announc
ementsList"></link>
<updated>2008-06-24T12:24:57Z</updated>
<author>
<name>uid=xyzadmin,o=defaultWIMFileBasedRealm</name>
</author>
<id>http://portal.ibm.com:10040/wps/myportal/intranet?WCM_GLOBAL_CONTEXT=/wps/w
cm/connect/Intranet+Web+Content+6.1.0/IntranetSite/Home/Announcements/Announceme
ntsList</id>
<generator
uri="http://www.ibm.com/software/lotus/products/webcontentmanagement">Lotus Web
Content Management</generator>
Producing and consuming ATOM/RSS feeds
Page 13
__d. Now enter the following code in 'Design for each menu search result:'
<entry>
<title type="text"><IDCmpnt context="autoFill" type="content" field="title"/></title>
<link rel="alternate" type="text/html" href="<PathCmpnt
type="base"/>/wps/myportal/<Element context="current" type="sitearea"
key="PageURLMapping"/>?WCM_GLOBAL_CONTEXT=<URLCmpnt context="autoFill"
type="content" mode="standalone"/>"></link>
<id><PathCmpnt type="base"/>/wps/myportal/<Element context="current" type="sitearea"
key="PageURLMapping"/>?WCM_GLOBAL_CONTEXT=<URLCmpnt context="autoFill"
type="content" mode="standalone"/></id>
<published><WorkflowCmpnt context="autoFill" type="content" field="publishdate"
format="yyyy-dd-MM'T'hh:mm:ss'Z'"/></published>
<updated><HistoryCmpnt context="autoFill" type="content" field="lastmodifieddate"
format="yyyy-dd-MM'T'hh:mm:ss'Z'"/></updated>
<summary type="html"><Element context="autoFill" type="content"
key="Summary"/></summary>
<content type="html"><Component name="CData Start" htmlencode="false"/><Element
context="autoFill" type="content" key="Description"/><Component name="CData End"
htmlencode="false"/></content>
<category term="<ProfileCmpnt context="autoFill" type="content" field="categories"/>"
></category>
<author>
<name><IDCmpnt context="current" type="content" field="authors" format="cn"/></name>
</author>
</entry>
__e. It uses content stored in the elements 'Summary' and 'Description'. If this is different in your
authoring template(s), you may need to change that. This generates the following example
content:
<entry>
<title type="text">Company Milestones</title>
<link rel="alternate" type="text/html"
href="http://portal.ibm.com:10040/wps/myportal/intranet?WCM_GLOBAL_CONTEXT=/wps/
wcm/myconnect/Intranet+Web+Content+6.1.0/IntranetSite/Home/Announcements/Compan
yMilestones"></link>
<id>/wps/wcm/myconnect/intranet+web+content+6.1.0/intranetsite/home/announcements/c
ompanymilestones</id>
<published>2008-30-04T10:41:42Z</published>
<updated>2008-05-06T12:33:00Z</updated>
<summary type="html">Has your company released a new product or reached financial
milestone? Post announcements that celebrate your company's progress.</summary>
<content type="html"><![CDATA[<BR>Has your company released a new product or
reached financial milestone? Post announcements that celebrate your company's
progress.]]></content>
<category term="" ></category>
IBM
<author>
<name>uid=xyzadmin,o=defaultWIMFileBasedRealm</name>
</author>
</entry>
__f. Finally enter in the footer the code to end the feed:
</feed>
__4.
You should now have the following:
Producing and consuming ATOM/RSS feeds
Page 15
__5.
Click 'Save' and you should see that the component tags will have an ID added:
If this is not added, please verify if you used the right names for these components and correct if
necessary.
__6.
Allow this menu to be read by all users (also anonymous ones). Go to the ‘Access’ section and
add [all users] to User Defined users, as shown.
__7.
Now test your ATOM Feed Menu first.
__a. Click 'Preview'.
IBM
__b. Then select in the 'Intranet Web Content 6.1.0' library, the site 'Intranet', site area 'Home' –
'Announcement' and then content 'Announcement List'.
Producing and consuming ATOM/RSS feeds
Page 17
__c. This should show the follow feed subscription to Announcements.
IBM
__d. If you do not see this, you may want to check that you are using Mozilla Firefox and no
other browser. If you have any other problems in generating your feed, you may want to
use a markup validator, such as the W3C Markup Validation Service:
http://validator.w3.org/#validate_by_input. Click 'Subscribe Now' and keep the selection
'Bookmarks Toolbar Folder'. Click 'OK'.
__e. Go back to the previous browser window and notice that the feed is now available in your
browser. By clicking on it, it will load the latest list of announcements.
__f. You may want to change the URL of this feed to anonymous access. Click right on the
“Announcement List” and select “Properties”. Remove the “my” from myconnect in the URL
as show. Click “OK” to save. Normally, if you use feeds for your internet access, these
URLs are generated correctly automatically.
__8.
Now you will add the ATOM Feed Menu to your content, in this case the list contents for the
different site areas announcements, events, etc. In this example, this is managed with the
presentation template of the 'Announcement List' content, 'List'.
Producing and consuming ATOM/RSS feeds
Page 19
__a. Select 'Web Content'.
__b. Then go to 'Presentation Templates', select 'List' and click 'Edit'.
__c. Add the code in red to the existing presentation template code. For your convenience, you
may import the modified design directly from 'C:\Lab Files\FeedsLab\ListPT.html:
<html>
<head>
<link rel="alternate" type="application/atom+xml" title="<IDCmpnt context="current"
type="content" field="title"/>" href="<URLCmpnt context="current" type="content"
mode="standalone"/>?srv=cmpnt&source=library&cmpntname=Intranet+Web+Content+6.1.
0/ATOM+Feed+Menu" />
</head>
<body TEXT="Black" BGCOLOR="White" BACKGROUND="" LEFTMARGIN="0"
RIGHTMARGIN="0" TOPMARGIN="0" BOTTOMMARGIN="0">
<Component
id="f4717b00456c4c529a399f68831e096e:NC9pbnRyYW5ldCB3ZWIgY29udGVudCA2LjE
uMC9zdHlsZXM=" name="intranet web content 6.1.0/styles"/>
<script type="text/javascript" language="JavaScript" src="<Component
IBM
id="89e40980456ed79099d4fd85f14ced10:NC9pbnRyYW5ldCB3ZWIgY29udGVudCA2LjE
uMC9saXN0c2NyaXB0cw==" name="intranet web content 6.1.0/listscripts"/>"></script>
<Element context="current" type="content" key="Header"/>
<a href="<URLCmpnt context="current" type="content"
mode="standalone"/>?srv=cmpnt&source=library&cmpntname=Intranet+Web+Content+6.1.
0/ATOM+Feed+Menu" />Subscribe</a>
<Element context="current" type="content" key="List"/> <Element context="current"
type="content" key="Footer"/>
</body>
</html>
__d. It should look like the following:
The link in the header adds a link to the feed producer that will be displayed on the right of
the name bar of Mozilla. The A HREF adds a link to the 'Subscribe' text and opens the
same feed producer for the current content managed by the 'ATOM Feed Menu' menu
component. You may wish to change the 'Subscribe' text to a feed image component.
__9.
Now you will configure the intranet site to receive the links from the feed and test it directly in the
site.
Producing and consuming ATOM/RSS feeds
Page 21
__a. Go to the intranet site again http://portal.ibm.com:10040/wps/portal/intranet. Notice that
each list (Latest News, Announcement and Event) now has the 'Subscribe' option. Click on
the top right of the 'Announcement' portlet to make it receive links from other portlets and
specially from the feed.
IBM
__b. Click 'Edit Shared Settings'.
Producing and consuming ATOM/RSS feeds
Page 23
__c. In the links section, select 'Other portlets and this portlet' to receive links from. Click 'Ok'.
Click on 'Subscribe' in the 'Announcement' portlet. Then in the feed list, click on 'Company
Milestones'. This should bring you back to the intranet portal page and open this
announcement directly.
In Appendix A, you will learn how to create ATOM feeds that will show the feed content in a fixed portal
page and in a web page, instead of a portal. You will also learn how to create RSS feeds.
You have successfully added feeds to your existing web site. You are now ready to consume it directly in
your web site.
2.2
Consume Feeds
In this section of the lab, you will learn how to consume or integrate any ATOM or RSS feed into your
existing web sites. You will first use the 'Feed Reader' portlet for this, then you will use the WebSphere
Portal Personalization resource collection to use ATOM feeds within Lotus Web Content Management.
__10.
You will first consume your freshly created feed into the Feed Reader portlet.
__a. Click the '>' on the top right to open the portlet pallette.
IBM
__b. Search any portlet that starts with 'feed' and drag and drop this portlet to your page as
shown:
Producing and consuming ATOM/RSS feeds
Page 25
__c. Now you need to configure it. Select 'Feed Settings'.
IBM
__d. Enter the Feed URL of your 'Announcement List' with anonymous access (connect and not
myconnect)
http://portal.ibm.com:10040/wps/wcm/connect/Intranet+Web+Content+6.1.0/IntranetSite/Ho
me/Announcements/AnnouncementsList?srv=cmpnt&source=library&cmpntname=Intranet+
Web+Content+6.1.0/ATOM+Feed+Menu
You can find it again, by clicking on the 'Subscribe' link in the 'Announcement' portlet. The
address of your new page is the link. Name it and give it a description. All other settings can
be kept as default.
Producing and consuming ATOM/RSS feeds
Page 27
IBM
__e. This should give you the following content in your 'Feed Reader' portlet:
You have now successfully consumed a feed using the Feed Reader portlet in your portal site. Now you
will use the WebSphere Portal Personalization resource collection to use ATOM feeds. In Appendix B,
you will learn how to set up this resource collection. For your convenience, we have already set this up in
the image.
__11.
First build a feed rule for your own created ATOM feed.
Producing and consuming ATOM/RSS feeds
Page 29
__a. Go to the main portal, http://portal.ibm.com:10040/wps/myportal/, 'Applications' 'Content' - 'Personalization' - 'Business Rules'.
__b. Click 'New' – 'Rule', name it 'Announcement' and enter your announcement URL (corrected
for anonymous use, using “connect” instead of “myconnect”):
http://portal.ibm.com:10040/wps/wcm/connect/Intranet+Web+Content+6.1.0/Int
ranetSite/Home/Announcements/AnnouncementsList?srv=cmpnt&source=library&cm
pntname=Intranet+Web+Content+6.1.0/ATOM+Feed+Menu
IBM
__c. Click 'Save' and 'Preview'. This should show the
following
__12.
Create a WCM Personalization component pointing to the rule.
__a. Go to 'Web Content Management' and verify that you are in the 'Intranet Web Content
6.1.0' library. Click 'New' – 'Component' – 'Personalization'.
In the 'Name' and 'Display Title' fields enter 'Announcement Personalization'. Then click
'Search' under 'Personalization Element' and select the 'Announcement' rule you just
created.
Producing and consuming ATOM/RSS feeds
Page 31
__b. In the field 'Header' enter
<H2>Announcement Personalization</H2>
__c. Enter the following in the Design for each menu search result section.
<H3><AttributeResource attributeName="title"/></H3>
<AttributeResource attributeName="content"/>
__d. Click 'OK'. You should see the following:
IBM
__e. Click 'Save' and then 'Preview'. Select the 'Annoucement List' as rendering context, as
shown below.
__f. This shows you the feed:
Producing and consuming ATOM/RSS feeds
Page 33
__13.
Finally, you can add this component anywhere in your design using a component tag that refers
to your personalization component, in this case
<Component name='Intranet Web Content 6.1.0/Announcement Personalization' />
or you will show it directly in the Web Content Viewer. Go to 'Web Content Preview' and select
'Edit Shared Settings'.
__a. Select 'Component' and then from the 'Intranet Web Content 6.1.0' library your new
'Announcement Personalization' component. Then select the 'Announcement List' as
content, as shown.
IBM
__b. Click 'OK' and you will see your feed as Web Content.
You have now successfully integrated an ATOM feed into WebSphere Portal Personalization and Lotus
Web Content Management. You may apply this to any ATOM feed, for example, that coming from Lotus
Quickr places or Lotus Connections.
This is the end of this lab.
Summary
In this lab, you have learned how to produce and consume feeds. If you are interested in more feed
producing options, the appendix gives examples on producing ATOM feeds for a specific portal page and
standalone web sites, as well as RSS feeds
End of Exercise
Producing and consuming ATOM/RSS feeds
Page 35
Appendix A. PRODUCING OTHER ATOM AND RSS FEEDS
In this appendix, you learn how to create ATOM feeds that will show the feed content in a fixed portal
page and in a web page, instead of a portal. You will also learn how to create RSS feeds.
Fixed Portal Page ATOM Feed
__1.
Learn how to use a fixed portal page to show all your feed content. This is a simplified solution
as the one from the lab above.
__2.
Copy the existing ATOM Feed Menu Component to ATOM Portal Feed Menu.
__3.
Change the existing header to (in this case the 'intranet' URL mapping is used, you may change
this to your portal page). A URL mapping needs to exist for this portal page.
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<feed xmlns="http://www.w3.org/2005/Atom" >
<title><IDCmpnt context="current" type="content" field="title"/></title>
<link rel="alternate" type="text/html" href="<URLCmpnt context="current" type="content" mode="portal"
portalTarget="intranet"/>"></link>
<updated><HistoryCmpnt context="current" type="content" field="lastmodifieddate" format="yyyy-ddMM'T'hh:mm:ss'Z'"/></updated>
<author>
<name><IDCmpnt context="current" type="content" field="authors" format="cn"/></name>
</author>
<id><URLCmpnt context="current" type="content" mode="portal" portalTarget="intranet"/></id>
<generator uri="http://www.ibm.com/software/lotus/products/webcontentmanagement">Lotus Web
Content Management</generator>
IBM
__4.
Then change the Menu Design to
<entry>
<title type="text"><IDCmpnt context="autoFill" type="content" field="title"/></title>
<link href="<URLCmpnt context="autoFill" type="content" mode="portal"
portalTarget="intranet"/>"></link>
<id><Placeholder tag="Idnum"/></id>
<id>href="<URLCmpnt context="autoFill" type="content" mode="portal"
portalTarget="intranet"/>"></id>
<published><WorkflowCmpnt context="autoFill" type="content" field="publishdate"
format="yyyy-dd-MM'T'hh:mm:ss'Z'"/></published>
<updated><HistoryCmpnt context="autoFill" type="content" field="lastmodifieddate"
format="yyyy-dd-MM'T'hh:mm:ss'Z'"/></updated>
<summary type="html"><Element context="autoFill" type="content"
key="Summary"/></summary>
<content type="html"><Component name="CData Start" htmlencode="false"/><Element
context="autoFill" type="content" key="Description"/><Component name="CData End"
htmlencode="false"/></content>
<category term="<ProfileCmpnt context="autoFill" type="content" field="categories"/>"
></category>
<author>
<name><IDCmpnt context="current" type="content" field="authors" format="cn"/></name>
</author>
</entry>
__5.
Save and preview it with your WCM content that will show in the 'intranet' page, e.g.
'Announcement List'.
Standalone web site ATOM Feed
The following example allows you to add feeds to standalone web sites.
__1.
Copy the ATOM Feed Menu again and name it 'ATOM Standalone Feed Menu'. Replace in the
existing header the URL component tage as shown here:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<feed xmlns="http://www.w3.org/2005/Atom" >
<title><IDCmpnt context="current" type="content" field="title"/></title>
<link href="<PathCmpnt type="base"/><URLCmpnt context="current" type="content"
mode="standalone"/>"></link>
<updated><HistoryCmpnt context="current" type="content" field="lastmodifieddate" format="yyyy-ddMM'T'hh:mm:ss'Z'"/></updated>
<author>
<name><IDCmpnt context="current" type="content" field="authors" format="cn"/></name>
</author>
<id><PathCmpnt type="base"/><URLCmpnt context="current" type="content"
mode="standalone"/></id>
Producing and consuming ATOM/RSS feeds
Page 37
<generator uri="http://www.ibm.com/software/lotus/products/webcontentmanagement">Lotus Web
Content Management</generator>
__2.
Change the 'Design for each menu search result' again with the URL component tag.
<entry>
<title type="text"><IDCmpnt context="autoFill" type="content" field="title"/></title>
<link rel="alternate" type="text/html" href="<PathCmpnt type="base"/><URLCmpnt context="autoFill"
type="content" mode="standalone"/>"></link>
<id><PathCmpnt type="base"/><URLCmpnt context="autoFill" type="content"
mode="standalone"/></id>
<published><WorkflowCmpnt context="autoFill" type="content" field="publishdate" format="yyyy-ddMM'T'hh:mm:ss&'Z'"/></published>
<updated><HistoryCmpnt context="autoFill" type="content" field="lastmodifieddate" format="yyyy-ddMM'T'hh:mm:ss'Z'"/></updated>
<summary type="html"><Element context="autoFill" type="content" key="Summary"/></summary>
<content type="html"><Component name="CData Start" htmlencode="false"/><Element
context="autoFill" type="content" key="Description"/><Component name="CData End"
htmlencode="false"/></content>
<category term="<ProfileCmpnt context="autoFill" type="content" field="categories"/>" ></category>
<author>
<name><IDCmpnt context="current" type="content" field="authors" format="cn"/></name>
</author>
</entry>
RSS Feed
__1.
Finally, you will learn how to build RSS feeds using a Menu Component.
__2.
Again, copy the ATOM Feed Menu component and name it RSS Feed Menu. Change the
header to:
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><IDCmpnt context="current" type="content" field="title"/></title>
<link><PathCmpnt type="base"/><URLCmpnt context="current" type="content"
mode="standalone"/></link>
<description><IDCmpnt context="current" type="content" field="description"/></description>
<pubDate><HistoryCmpnt context="current" type="content" field="lastmodifieddate" format="EEE, dd
MMM yyyy hh:mm:ss z"/></pubDate>
<copyright>Copyright 2008 IBM Corporation.</copyright>
__3.
Then change the 'Design for each menu search result' by
IBM
<item>
<title><Placeholder tag="title"/></title>
<description><Component name="CData Start"/><Element context="autoFill" type="content"
key="Summary"/><Component name="CData End"/></description>
<link><PathCmpnt type="base"/><URLCmpnt context="autoFill" type="content"
mode="standalone"/></link>
<category><ProfileCmpnt context="autoFill" type="content" field="categories"/></category>
</item>
__4.
For the RSS feed producer, you need to change the footer to:
Producing and consuming ATOM/RSS feeds
Page 39
Appendix B.
</channel>
</rss>
SETTING UP THE PERSONALIZATION FEEDS RESOURCE
In this appendix, you will learn how to set up the WebSphere Portal Personalization resource collection
that uses an ATOM feed, coming from this developerWorks article 'Extending WebSphere Portal V6
personalization capabilities: Part 4. Deploying a resource collection that uses an ATOM feed':
http://www.ibm.com/developerworks/websphere/library/tutorials/0702_brunn4/0702_brunn4.html
In 6.1, the setup procedure is slightly different and described here.
You need to set up the feed libraries for Personalization and Lotus Web Content Management first.
__1.
Start the WebSphere Application Server. Select 'Start' - 'All Programs' - 'IBM WebSphere' 'Application Server Network Deployment V6.1' - 'Profiles' - 'wp_profile' - 'Start the server'. Once
this is running, start the administrative console, using 'Start' - 'All Programs' - 'IBM WebSphere' 'Application Server Network Deployment V6.1' - 'Profiles' - 'wp_profile' - 'Administrative console'.
This opens the following URL: http://localhost:10001/ibm/console that then redirects to
https://localhost:10003/ibm/console/logon.jsp. Click 'OK' to accept to view the page over a
secure connection:
IBM
__2.
Then proceed opening the page. Click 'Yes'.
__3.
Then log on with the administrator account (wpadmin, passw0rd) here.
Producing and consuming ATOM/RSS feeds
Page 41
__4.
Navigate to 'Environment' - 'Shared Libraries'.
__5.
Click 'New'.
IBM
__6.
Set the scope to 'Node=node1, Server=WebSphere_Portal'.
Producing and consuming ATOM/RSS feeds
Page 43
__7.
Click 'New' and enter under then Name 'FeedsLib', and under Classpath enter:
'${WPS_HOME}/pzn/prereq.pzn/feeds'
__8.
Click 'OK'.
IBM
__9.
Navigate to 'Applications' - 'Enterprise Applications'. To ease the navigation, set in Preferences
the Maximum rows to 200. Click 'Apply'.
Producing and consuming ATOM/RSS feeds
Page 45
__10.
Find 'Personalization Workspace 6' in the list of Enterprise Applications, and click on it.
IBM
__11.
Click on 'Shared library references'. Then select the application first and click 'Reference shared
libraries'.
__12.
Select FeedsLib from the available list and click the '>>' button to move it to the selected
libraries. Click OK and OK again.
Producing and consuming ATOM/RSS feeds
Page 47
__13.
Do the same for the module so both have the FeedsLib selected as shown:
__14.
Repeat steps j through n for the Enterprise Applications called 'Personalization Lists 6',
'PA_WCMLocalRendering', 'PA_WCM_Authoring_UI', and 'wcm'. Then Click 'Save' to persist the
changes.
IBM
__15.
Open your browser to http://incubator.apache.org/abdera/, and download Abdera version 0.2.2
for Java 1.4.2. Extract all the JARs, including those in the lib directory, from abdera.0.2.2incubating.jdk142.zip to C:/IBM/WebSphere/PortalServer/pzn/prereq.pzn/feeds (create the feeds
directory). Extract 'pznfeeds.jar' from the ZIP file in the article in the same directory. See the
screenshot of the directory below for reference.
__16.
In the eGA version of Portal 6.1, you also need to correct a small issue that stops you from
creating new resource collections. Edit
C:\IBM\WebSphere\PortalServer\pzn\prereq.pzn/pznauthorportlet.ear/Personalization_Workspac
e_6.ear/pznauthorportlet.war/WEBINF/plugins/com.ibm.websphere.personalization.ui/jsp/editors/item/collection/custom/edit.jsp,
and removing the four lines that contain the string "FileNet". Then save the file.
__17.
Restart your portal server to pick up the new shared library.
Producing and consuming ATOM/RSS feeds
Page 49
__18.
Open your browser to WebSphere Portal and navigate to 'Application' – 'Content' –
'Personalization'.
__19.
Go to 'Business Rules'.
IBM
__20.
Click 'New' - 'Resource Collection'.
Producing and consuming ATOM/RSS feeds
Page 51
__21.
For the Resource Collection name enter: 'Feed Content'. Select 'Standard Resource Collection'.
For the Resource Class enter: 'com.ibm.websphere.personalization.feeds.FeedResource'. For
the Manager Class and Domain Class enter:
'com.ibm.websphere.personalization.feeds.FeedResourceManager' as shown:
__22.
Click 'Save'. So far, you have defined a resource collection to Personalization.
IBM
__23.
Now test the content feed. Create a content feed rule. Click 'New' - 'Rule' to create a new rule.
Enter 'Select IBM images' as the rule name, select 'Feed Content' as the Resource Collection
and for the URL, enter
'http://www.flickr.com/services/feeds/photos_public.gne?tags=IBM&format=ATOM'.
Producing and consuming ATOM/RSS feeds
Page 53
__24.
Click 'Save' and the 'Preview' and verify you have a list of photos about IBM. The exact list will
vary depending on when you look at the results because the results are coming in real time from
the feed.
You have successfully set up the WebSphere Portal Personalization resource collection that uses an
ATOM feed.
IBM
Appendix C. Notices
This information was developed for products and services offered in the U.S.A.
IBM may not offer the products, services, or features discussed in this document in other countries.
Consult your local IBM representative for information on the products and services currently available in
your area. Any reference to an IBM product, program, or service is not intended to state or imply that
only that IBM product, program, or service may be used. Any functionally equivalent product, program, or
service that does not infringe any IBM intellectual property right may be used instead. However, it is the
user's responsibility to evaluate and verify the operation of any non-IBM product, program, or service.
IBM may have patents or pending patent applications covering subject matter described in this
document. The furnishing of this document does not grant you any license to these patents. You can
send license inquiries, in writing, to:
IBM Director of Licensing
IBM Corporation
North Castle Drive
Armonk, NY 10504-1785
U.S.A.
For license inquiries regarding double-byte (DBCS) information, contact the IBM Intellectual Property
Department in your country or send inquiries, in writing, to:
IBM World Trade Asia Corporation
Licensing
2-31 Roppongi 3-chome, Minato-ku
Tokyo 106-0032, Japan
The following paragraph does not apply to the United Kingdom or any other country where such
provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES
CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some
states do not allow disclaimer of express or implied warranties in certain transactions, therefore, this
statement may not apply to you.
This information could include technical inaccuracies or typographical errors. Changes are periodically
made to the information herein; these changes will be incorporated in new editions of the publication.
IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this
publication at any time without notice.
Any references in this information to non-IBM Web sites are provided for convenience only and do not in
any manner serve as an endorsement of those Web sites. The materials at those Web sites are not part
of the materials for this IBM product and use of those Web sites is at your own risk.
IBM may use or distribute any of the information you supply in any way it believes appropriate without
incurring any obligation to you.
Any performance data contained herein was determined in a controlled environment. Therefore, the
results obtained in other operating environments may vary significantly. Some measurements may have
been made on development-level systems and there is no guarantee that these measurements will be
the same on generally available systems. Furthermore, some measurements may have been estimated
through extrapolation. Actual results may vary. Users of this document should verify the applicable data
for their specific environment.
Appendix
Page 55
Information concerning non-IBM products was obtained from the suppliers of those products, their
published announcements or other publicly available sources. IBM has not tested those products and
cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM
products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of
those products.
All statements regarding IBM's future direction and intent are subject to change or withdrawal without
notice, and represent goals and objectives only.
COPYRIGHT LICENSE:
This information contains sample application programs in source language, which illustrate programming
techniques on various operating platforms. You may copy, modify, and distribute these sample programs
in any form without payment to IBM, for the purposes of developing, using, marketing or distributing
application programs conforming to the application programming interface for the operating platform for
which the sample programs are written. These examples have not been thoroughly tested under all
conditions. IBM, therefore, cannot guarantee or imply reliability, serviceability, or function of these
programs.
IBM
Appendix D. Trademarks and copyrights
The following terms are trademarks of International Business Machines Corporation in the United States,
other countries, or both:
IBM
Cube Views
Informix
Rational
System z
AIX
DB2
Lotus
Redbooks
Tivoli
CICS
developerWorks
Lotus Workflow
Red Brick
WebSphere
ClearCase
DRDA
MQSeries
RequisitePro
Workplace
ClearQuest
IMS
OmniFind
System i
System p
Cloudscape
IMS/ESA
Adobe, Acrobat, Portable Document Format (PDF), and PostScript are either registered trademarks or
trademarks of Adobe Systems Incorporated in the United States, other countries, or both.
Cell Broadband Engine is a trademark of Sony Computer Entertainment, Inc. in the United States, other
countries, or both and is used under license therefrom.
Java and all Java-based trademarks and logos are trademarks of Sun Microsystems, Inc. in the United
States, other countries, or both. See Java Guidelines
Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft Corporation in the
United States, other countries, or both.
Intel, Intel logo, Intel Inside, Intel Inside logo, Intel Centrino, Intel Centrino logo, Celeron, Intel Xeon, Intel
SpeedStep, Itanium, and Pentium are trademarks or registered trademarks of Intel Corporation or its
subsidiaries in the United States and other countries.
UNIX is a registered trademark of The Open Group in the United States and other countries.
Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both.
ITIL is a registered trademark and a registered community trademark of the Office of Government
Commerce, and is registered in the U.S. Patent and Trademark Office.
IT Infrastructure Library is a registered trademark of the Central Computer and Telecommunications
Agency which is now part of the Office of Government Commerce.
Other company, product and service names may be trademarks or service marks of others.
Trent Notes:
Image 1A
Appendix
Page 57