Professional Documents
Culture Documents
Cali Clarke
Stuart Crump
Dineshbabu Ramakrishnan
Raul Munoz Serrano
Hebba Soliman
Rayomand Sui
Narla Vasudevamurthy
Wei-Dong (Jackie) Zhu
Preface
Important Note about referencing the latest information
This PDF document represents the overall Building a sample website with IBM Web Content
Manager 7.0.
In addition to the information contained in this document, also refer to the complete Lotus
Redbooks Wiki at the following URL:
http://www-
10.lotus.com/ldd/portalwiki.nsf/xpViewCategories.xsp?lookupName=Redbooks%3A%2
0Building%20a%20Sample%20Website%20Using%20IBM%20Web%20Content%20M
anager%207.0
IBM Lotus and IBM Redbooks have partnered together to show you how the fictitious
company River Bend Tea and Company Inc (River Bend) uses IBM Web Content
Manager to build their website. See how they developed the architecture, deployed the
system, designed the site, and went live with dynamic content.
Web Content Manager provides a sophisticated web content management tool and
platform that is designed to accelerate the delivery and management of critical business
information. It enables a collaborative approach to content creation for individuals and
teams. It allows for approval of processes, management, and assets. Web Content
Manager is an extremely powerful and sophisticated tool that is remarkably easy to use.
This wiki addresses specific technical aspects of Web Content Manager, by discussing its
underlying architecture, features, and capability. This wiki focuses specifically on Web
Content Manager Version 7, but much of what is discussed here applies to earlier
versions of the product as well.
To support users in the initial stages of learning about the product, this wiki explains how
to build a sample site from the initial concepts to asset creation and final delivery. To
illustrate the steps in building the site, the wiki builds the sample site for the fictitious
company, River Bend Tea and Coffee Company. The wiki then expands upon this
experience and explores additional and more sophisticated areas of the product,
including where there are opportunities for customization. In addition to discussing
specific technical features, the wiki discusses the key concepts and best practices for
creating an accurate information architecture and site framework.
DISCLAIMER: This wiki outlines an example of building a basic website using a sample
site, River Bend. This sample is not intended as a best practice for development,
configuration, architecture, or any other aspect, such as scalability or performance. No
warranty or support is implied for the example site or sample code used.
2 of 439
The team who wrote this wiki
This wiki was produced by a team of technical specialists from around the world working
together in remote fashion.
3 of 439
Hebba Soliman is a Senior Application Developer in IBM
Egypt, Global Delivery Center (EGDC). She has been
working as a developer and designer in many IBM Web
Content Manager and WebSphere Portal projects in the
last couple of years.
4 of 439
Thanks to the authors of the previous editions of this wiki.
Authors of the second edition, Building a Web Site using IBM Web Content Management,
published in 2008, were:
John Bergland
Joesephine E Justin (Joyce)
Hebba Soliman
Stuart Crump
Raul Munoz Serrano
Erasmus Tapera
Narla Vasudevamurthy
Rayomand Sui
Become a contributor
Join us for a two- to six-week residency program! Share your knowledge with peers in the
industry and learn from others. Help create content about specific products or solutions,
while getting hands-on experience with leading-edge technologies. You will have the
opportunity to team with IBM technical professionals, Business Partners, and Clients.
Your efforts will help increase product acceptance and customer satisfaction. As a bonus,
you will develop a network of contacts in IBM development labs, and increase your
productivity and marketability.
Find out more about the residency program, browse the residency index, and apply
online at:
http://www.ibm.com/redbooks/residencies.html
Use the commenting feature with in the wiki. Login and add comments, located at the
bottom of each page.
Provide feedback in the Web form located at:
http://www-12.lotus.com/ldd/doc/cct/nextgen.nsf/feedback?OpenForm
5 of 439
Part 1. Introduction
Part 1 covers the following topics:
DISCLAIMER: This guide outlines an example of building a basic website using a sample
site, River Bend. This sample is not intended as a best practice for development,
configuration, architecture, or any other aspect, such as scalability or performance. No
warranty or support is implied for the example site or sample code used.
IBM Web Content Manager (WCM) provides a sophisticated web content management
tool and platform that is designed to accelerate the delivery and management of critical
business information. It enables a collaborative approach to content creation for
individuals and teams. It allows for approval of processes, management, and assets.
WCM is an extremely powerful and sophisticated tool that is remarkably easy to use.
This guide addresses specific technical aspects of the WCM product, by discussing its
underlying architecture, features, and capability. This guide focuses specifically on WCM
V7.0, but much of what is discussed here applies to earlier versions of the product as
well.
To support users in the initial stages of learning about the product, this guide explains
how to build a sample site from the initial concepts to asset creation and final delivery. To
illustrate the steps in building the site, we build the sample site for the fictitious company,
River Bend Coffee and Tea Company (River Bend). The guide then expands upon this
experience and explores additional and more sophisticated areas of the product,
including where there are opportunities for customization. In addition to discussing
6 of 439
specific technical features, this guide discusses the key concepts and best practices for
creating an accurate information architecture and site framework.
DISCLAIMER: This guide outlines an example of building a basic website using a sample
site, River Bend. This sample is not intended as a best practice for development,
configuration, architecture, or any other aspect, such as scalability or performance. No
warranty or support is implied for the example site or sample code used.
Website
A website is a collection of all of the text, graphic images, links, sounds, and other
content elements that make up a presence on the web. The goal is to present content
and information in the most dynamic, up-to-date method possible. Each individual
document is called a web page. Web sites have three basic components:
A home page - The home page is the top-most page in a web site.
Web pages - Local and remotely stored web pages linked to the home page.
Content - Content includes text, graphic images, and sounds.
Home page
A web site's home page is the first page that users see when they access a web site. It
creates the first impression for users and sets the tone for organization and content in the
site. A home page usually contains a header at the top that gives the name of the source
for the site. Some headers are very simple and contain only text, while others have
designs that incorporate graphic images.
Links
Users access local and remotely stored web pages linked to the web page by clicking on
links. Links can:
Take users to other web pages at the same site.
Move users to other web pages at different sites.
Jump the cursor to another place on the same page.
Cause a file to be downloaded or copied from the website to the user's computer.
Connect the user to other Internet resources, such as e-mail.
7 of 439
Content
Content is the substance of a website. It can take many forms, including:
Text documents
Graphic images
Sounds
Downloadable movie clips
Links to other related sites
This change can be partially attributed to a growing number of users called "digital
natives". They are people who have grown up with technology such as the Internet,
digital cameras, and computers. This group expects more from a website than just static
information that is poorly laid out and difficult to find. This group speaks digital as though
it were a second language. But digital natives are not the only reason for this. There are
many others.
8 of 439
Today, the web is used as a natural medium that allows individuals and business to
conduct transactions, especially the buying and selling of goods and services.
Businesses use websites and portals to deliver efficiencies, with faster access to
information and people and easier consumption of knowledge and education. In essence,
there is much more reliance upon the web and websites than there could have ever been
realized five to ten years ago.
Not having the right balance of the website design and content
With a few exceptions, the balance of design versus content must be maintained.
Too much in either direction might mean that the website is perceived as looking
great but with no substance or value, or as a great source of information but difficult
to use. Content and design are key elements for ensuring that the initial experience
and perception of the website is good and that repeat consumer visits can be
expected.
Not having new content to attract repeat visitors
Content is king. Whether for textual, applications, video, and audio reasons,
consumers of a website revisit because their initial experience was good and their
expectations were met. Consumers of the site will only return if the site is updated
with new content. A consumer might look elsewhere when the content shows signs of
being out of date or no longer relevant. Maintenance of the site especially its content
is key to its success and should be planned and budgeted for as part of a website
project.
9 of 439
While websites fail for other reason also, focusing upon these five areas help to ensure
that the website has a healthy start.
1.3.1. Introduction
Building and maintaining a website using a content management system such as IBM
Web Content Manager (WCM) is not a task to be undertaken by a single individual. It is
not that this is an impossible task, rather this task requires skills, experience, and
knowledge that usually come from many individuals working in a collaborative
environment. Typically, we bring together individuals from three areas (business,
technology, and information) and four distinctive groups (business, technical, content,
and design (or layout). Depending on the size of the business and situation, it is possible
for the same person to be split across positions in these groups.
10 of 439
Typical members of this group include members of the management board, a project
sponsor or sponsors (which is sometimes shared), business owners, and process
leaders.
Typical members of this group include members of the IT and architecture board, IT
management and experts from third parties (ISPs and CMS technical experts if skills do
not already exist), infrastructure engineers, and operations.
Typical members of this group include representatives from the various specialized
content areas of the business (products and within, marketing, corporate
communications, and so on).
Typical members of this group include web layout designers, developers, UX subject
matter experts, and associated test groups.
11 of 439
Note: These groups are key to building and maintaining the process and groups that
persist along with the longevity of the website. While omitted here is the consumer or
visitor, this group is vital for obvious reasons and can be logically grouped with the design
or layout team because they will be responsible for the experience provided by the
website. We talk about the consumer in a another section.
1.3.3. Roles
The user roles consist of business owners, corporate communications and marketing
personnel, graphic designers, information architects, infrastructure engineers and
operations, content authors, subject matter experts, and approvers, and consumers.
Business owners
As mentioned previously, the delivery of a content management system-based website is
one where we can typically bring together individuals under four distinctive groups that
collaborate together on a single goal, for the website. The business group has the vision
for the website. They know the line of business requirements and can define the success
criteria of the project among other responsibilities.
Members of the management board and executive team perform the following tasks:
Set and announce the key business objectives.
Set the business context.
Define the project sponsors (because this can be shared).
Authorize the process leaders.
Set the project budgets and the time line.
The project sponsor or sponsors (part of the organization that is driving the project)
perform the following tasks:
12 of 439
Work with business owners and content owners to define the information
architecture.
Define key concepts and terminology.
Steer the decision process.
Manage the project.
The corporate communications and marketing team performs the following tasks:
Ensures information consistency.
Verifies that the general delivery of the product, service, or corporate information is
clear.
Approves information style and language, as well as access.
Graphic designers
The design and layout group is responsible for delivering the complete user experience
for the website visitor. The responsibilities include layout, styling, corporate branding, and
accessibility, for example, in addition to the areas mentioned in the following list.
The design, layout, and development team performs the following tasks:
Helps to create and stamp the corporate design on the website.
Ensures that styling and layout provide a flexible user experience for the visitor.
Liaises with subject matter experts where necessary to address accessibility needs.
Works with the IT team to technically implement the corporate design.
Helps to create the author's template environment.
Information architects
Aligned with the group for IT, the information architect (sometimes known as information
designers ) team closely works with individuals from the group and are responsible for
the delivery of the structure to the content, categorization, placement, and alignment with
the visitors' expectations of information placement.
13 of 439
Help define the taxonomy in association with the content authors and subject matter
experts.
Define the content structure and groupings with the design team.
Information architects can be seen as an extension of the design and user experience
group. Because common elements are shared across both areas, it is important to keep
communicating and working in a collaborative partnership.
The infrastructure engineers and operations team performs the following tasks:
Designs the content management systems to fit with previously defined network and
system architectural standards.
Establishes processes to monitor and maintain the system.
Works with the business to align budget with standards (resilience, scalability, and so
on).
Content authors, subject matter experts, and approvers perform the following tasks:
Provide content expertise and writing.
Help define the taxonomy with the information architects.
Help define the content structure with the information architects.
Provide first-level template support.
Consumers
Today, information, products, and services are acquired over the Internet through
websites that are built with Web Content Manager. Web sites are a vehicle to unite
consumers with products or information, and as such, the consumer plays the lead role.
Consumers switch between competitive websites with the click of a mouse button if they
do not find what they want within seconds of their visit. This is also the case with
procurement of services and products. Sales are quickly lost if a consumer's mental
model of how their interaction should take place is not aligned with how the website
works. Clearly, consumers are important.
For new websites, all consumer feedback is important. Getting the website wrong costs
time, money, and consumers' trust. However, there is difficulty with getting it right the first
14 of 439
time if you do not have user feedback to work with. The question is: how do you get that
feedback before your website goes live? There are several answers to this question. One
that stands out is to solicit the expertise of user experience, information architects, and
user centered practitioners, along with a targeted sample of willing participants from the
general community. This is typically a standard practice among the methods used by
these professions.
For websites that are already in place and perhaps transitioning to a new experience,
such as a portal or new design, it is becoming common practice to offer certain groups
within the websites' core user base to have access to a live beta version of the site to
gain feedback. This approach can be advantageous where there is a need to ensure
business as usual.
Consumers in a role that assists the organization perform the following tasks:
Provide live and relevant website feedback.
Can validate use case scenarios, check, and balance.
Help eliminate overlap and misinterpretations of new design elements.
Provide usability feedback, crucial with accessibility.
Approve content.
These roles and their functions are typically brought together in a collaborative
environment when building a site.
15 of 439
Enterprise content management has the following objectives:
Provide an efficient and secure solution for managing content within the enterprise,
including enterprise-wide content storage, access, search, distribution, and retention.
This is especially true with the current focus on corporate accountability and
regulatory compliance.
Build knowledge-based environments to leverage corporate know-how and expertise.
Value is the knowledge that you add before you offer something. Business value is based
on the information that you share. This concept is true both for the production and for
knowledge and service industries. Looking at where this information exists, you find that it
is often divided and decentralized throughout organizations. Information is stored
frequently as content. For example, critical information can include product descriptions,
instructions, policies, key customer issues, competitive strategies, and so forth. The
effectiveness of the information you offer, and in many cases the value that you provide,
depends directly upon the ability to distribute that information in a timely and efficient
manner.
Going forward, we explain this concept in greater detail and discuss the advantages of
handling the content and the design of the content separately.
There are two approaches to creating, managing, and publishing web content:
Static web content
Dynamic web content
Static web content solutions often require someone within an IT department, or a person
who possesses web design and some web IT skills, to translate content into HTML
before it can be posted to a web site or a portal. Accordingly, static web content is more
difficult to use within a dynamic web site, which changes frequently and requires up-to-
date information to deliver maximum value. Additionally, static web content is often
impossible to reuse due to its embedded design.
16 of 439
Dynamic web content
Rather than embedding the information directly together with the design, dynamic web
content treats the content and the presentation of the content as two distinct entities. By
separating the web content from the presentation layer, you can manage and deliver
content quickly and efficiently, independent of its presentation. The ability to manage both
content and its presentation layer as separate entities is enabled most frequently by
using web content management systems.
With IBM Web Content Manager, companies or organizations can put the information in
the right people easily and efficiently, which is a key component in sustaining a
competitive advantage. Authors do not need to handle the technical side of web
technologies. Content that is created can be integrated with multiple uses and processes,
distributed or shared throughout and beyond an organization. For example, a single
product sheet can contain complete pricing information, including internal prices that you
only share within your organization. By taking advantage of the multi-publishing feature,
you can publish a subset of the same document for your customers, without needing to
maintain separate documents.
17 of 439
The focus for today's businesses
To manage the exponential growth of business-critical information, respond faster to the
market place, and increase employee productivity, a content management system must
address three key areas:
Responsiveness
Streamlining operations and providing an integrated view of all forms of information
can improve your customer relationships and enable your employees, partners, and
suppliers to work together more efficiently. It can also help you reduce costs and
capitalize on new opportunities.
Productivity
When employees spend more time looking for information they need to perform their
jobs, such as documents, e-mail, reports, web content, they spend less time working
and generating business. If they are not working with the latest information, they can
miss opportunities and make costly mistakes. When customers cannot find what they
are looking for on a web site, they leave frustrated and dissatisfied, no matter how
good the information or prices might be. That can add up to a lot of wasted hours and
missed opportunities. The effort to bring visitors back again is costly. Companies that
give their employees a simplified, personalized, and easily accessible user interface
to access and share critical information enjoy a competitive advantage.
Compliance
Effectively manage your content to address the increasing demands of government
and industry regulations. Keep focused on your business goals and use compliance
as a lever for change to affect process improvement and business transformation.
When looking at existing enterprises, specialized applications and databases are often
established when it comes to business-critical information. IBM Web Content Manager
becomes increasingly important for companies and organizations to leverage the
complete spectrum of data assets within their enterprise and share it electronically
among suppliers, customers, partners, and employees. Content that is created and
managed from authors for the purpose of web publishing becomes only one component.
Enterprise Content Management (ECM) provides a basis for the next generation of data
management, enabling customers to collect, manage, and distribute all forms of business
information. For example, an employee of a human resources department who updates a
phone number in an internal application, has actually executed a step within a greater
content management context. The changed number is simultaneously published to the
web. It is mandatory to integrate content from a broad range of existing data sources.
Open standards for content exchange are the key.
18 of 439
Separation of content and presentation
As a foundation for understanding the benefits of IBM Web Content Manager, we must
first distinguish between content and the presentation of the content. When a clear
separation is made between content and how it is presented, you can understand how a
single piece of content can potentially be rendered in multiple ways. For example, a
single item of content, such as a news article, can be presented in any of the following
ways:
On a web page in a variety of formats, based on user preferences and
personalization
In a PDF file
Downloaded to a smart phone
Streamed as an RSS feed
The content is the same, but the presentation can be adapted to best meet users' needs
within the context of their specific roles or preferences. This approach also guarantees a
consistent view and usage of a web site. If the design changes, the content parts remain
unaffected. Additionally, the content creators do not have to worry about the presentation
of their content. This is important because content creators usually do not have
significant knowledge of HTML.
Moving forward with this idea, key concepts and functional areas that apply to IBM Web
Content Manager can be grouped in terms of dynamic presentation or content
management.
Workflow
The accuracy, relevancy, and recency of content is assured by automating the content
life cycle, from creation to review, approval, delivery, and archival.
Management
Content becomes an asset as control of the web site is placed back in the hands of the
users who understand the subject and customers best.
Content publication
After content is authored and approved, the content publication stage is where the
content is released for delivery to the live site. The delivery can be a simple process,
such as making a file available on a file system to a web server and advertising the URL.
Or it can be a more complex procedure such as moving content through a complex
workflow and into a production environment.
19 of 439
Content aggregation
Content aggregation occurs when content from various sources is brought together. In a
simple web site, this occurs manually during the content creation phase. In a more
dynamic and data-driven environment, the aggregation occurs at an application server
level.
Content integration
Aggregation, transactional integration, and performance enhancing caching enrich the
user experience.
Content delivery
Content must be delivered to the user in the appropriate (or desired) format. Most
frequently, this implies delivery via HTTP by using browsers and similar devices.
Alternatively, content delivery can refer to other publish-and-subscribe methods, data
feeds, or web service protocols.
With the content creation, approval and delivery process being the top capability that
benefits from a web content management system, there are other areas that can lend
weight to using a web content management system.
Ensuring that the web site has a consistent look and feel (branding) is extremely
important, for brand awareness and for ensuring that visitors to the web site are familiar
with the layout, presentation, and navigation to content. A web content management
system provides a structured approach and framework to allow the separation of content
and design while ensuring consistency where required. Componentization is also an area
that the web content management framework offers. Componentization allows a higher
degree of reuse and helps you to build more with less. This is another clear area where a
web content management is a good choice.
20 of 439
Content and design are just two important aspects of any web site (intranet or Internet)
that benefit from a web content management system. The following aspects are
important to a web site:
Content: The creation, approval, and delivery process streamlined to take advantage
of your organization's distribution of knowledge and skills.
Design: Separation of design from content to allow for the design process (in-house
or agency) to deliver consistent branding of your business, its products, and services.
Componentization: Reuse of assets to allow the business to deliver more with less,
and save money.
Standards: A system to employ best practices where accessibility is required.
Integration and delivery: Providing a framework from which a business can
integrate with systems, services, and information including growth from Web sites to
portals and beyond.
21 of 439
With these concepts in mind, you can be reassured that you are making the right decision
to use a web content management (WCM) system. While there might be many factors to
consider, the following decision tree can guide you and provide a starting point to expand
upon.
22 of 439
1.5. Key new features in IBM Web Content Manager V7.0
IBM Web Content Manager (WCM) has added many areas of improved functionality in
Version 7.0.
This section describes some of the key improvements in Version 7.0 of the product.
23 of 439
Different view structures
Within the authoring portlet navigation, you can choose between flat or tree views:
Flat view:
Tree view:
24 of 439
Improved quick navigation
Along the top of the navigation within the authoring portlet, users now have access to a
mechanism for more quickly navigating through the items within the libraries. This allows
for more user friendly experience.
25 of 439
Improved filtering capabilities
When navigating through many items in the same view, it is often easier to find what you
are looking for by filtering the items within the view. Web Content Manager has added an
improved filter selection interface:
Favorites
The updated authoring portlet allows users to select favorite items and views. This makes
it easier to access these items in the future.
To mark an item a favorite is very easy. The heart allows you to select and deselect an
item as a favorite.
Syndication API
Web Content Manager now allows some syndication operations to be performed using
the Web Content Manager API. Users can retrieve status, view the numbers of items in
the last syndication event, push an update or a rebuild event to the syndicator and
subscriber objects.
26 of 439
Query API
Web Content Manager Version 7.0 has added a great deal of functionality with the new
query API. It is now possible to retrieve Web Content Manager objects using the API by
creating queries to run against the repository. In the past versions, you could do very
simple retrieval such as selecting by exact name or all items of a specific type. Now,
there are many more options of how to retrieve items, as well as the availability to sort
the results.
Folders is a way to group items within the authoring portlet. You can group authoring
templates, presentation templates, and library components within folders. This makes
managing content easier for authors, as it is possible to group items within the same
library under folders.
Projects on the other hand provide more than just the ability to group items in a common
location. One of the difficulties that content authors have had is the challenge of
publishing a group of items all at the same time. For example, if you have an
announcement concerning a new product launch, there may be many Web Content
Manager assets that are related to this announcement. It may be difficult to line up all of
these items to publish at the same time, because some items may have to go through
workflow and some do not, so it is not possible to set future publish date. Also, there is no
guarantee that all items related to the announcement would be ready by announcement
time.
Projects solve this problem by allowing multiple items to be placed within the same
project. Then, when the condition to publish the project is complete, all items within the
project will be published. The project owner has control over how the project will be
27 of 439
published, whether manually, automatically (when all items in the project are pending
publish), or based on a specific date. See the infocenter for more information on Projects.
The end result of this is that links directly to the embedded file resource element can be
returned instead of the link to the content itself. This functionality is useful when trying to
generate lists of links to files stored within Web Content Manager.
Multiple drafts
In Version 7.0, Web Content Manager now allows content authors to create more than
one draft version of a published object. In the past, only one draft object was allowed at a
time. Now, you can have multiple drafts of the same workflow item:
28 of 439
Reject to prior stage
Since its inception, Web Content Manager has allowed workflow items to be rejected.
However, that always meant that the item would return to the first stage in the workflow.
Now, workflows have been enhanced to allow content to be sent back to the prior stage,
instead of only back to the first stage in the workflow. You will be able to sent to the prior
stage or still reject or restart the workflow.
To use this functionality, the workflow stage must be configured to allow items to return to
the previous stage:
See the infocenter for more information on the previous stage button.
WSRP
In the past, to retrieve content from a remote Web Content Manager server involved the
Web Content Manager remote rendering portlet. This involved additional configuration
above and beyond a typical portlet configuration. Now, the JSR286 portlet can take
advantage of WSRP to retrieve content from a remote server.
29 of 439
Friendly URL
The JSR286 portlet allows for friendly URLs to Web Content Manager content to be
processed and rendered through the portlets. Constructing Web Content Manager
friendly URLs is a powerful and complex to explain. Check the infocenter for more
information on this process.
Portlet caching
The JSR286 portlet can store information in the portlet cache. The portlet configuration
allows administrators to determine what caching options will be used for a particular
portlet, including the cache timeout behavior, and whether the cache should be shared
across users, or specific to individual users.
1.5.8. WebDAV
Web Content Manager has added the ability to manipulate some items within Web
Content Manager using WebDAV. This allows you to create, delete, and modify Web
Content Manager assets using operating system tools, instead of using the Web Content
Manager authoring interface.
1.5.9. JMS
Web Content Manager has added the functionality of generating JMS Messages to allow
for notification of various events within Web Content Manager. This allows applications to
be alerted when specific actions take place within Web Content Manager, mostly items
being changed. Check the infocenter for more information on enabling JMS within Web
Content Manager.
30 of 439
31 of 439
Part 2. Architecture and design
Part 2 covers the following topics:
2.7 Use case sample site infrastructure: River Bend Tea and Coffee Company
This section combines all the concepts that are described in the environment type and
sample physical architecture of a website sections and build an example infrastructure
for the River Bend Coffee and Tea Company (River Bend).
DISCLAIMER: This guide outlines an example of building a basic website using a sample
site, River Bend. This sample is not intended as a best practice for development,
configuration, architecture, or any other aspect, such as scalability or performance. No
warranty or support is implied for the example site or sample code used.
32 of 439
2.1. Product architecture and key components
This section provides an overview of the IBM Web Content Manager (WCM) product architecture
and introduces its key components including the WCM Server, content repository, authoring portlet,
connect portlet, rendering portlet, and public API.
The IBM Web Content Manager 7.0 application is fully integrated with WebSphere Portal
7.0. As such, all required components of the IBM Web Content Manager application are
installed with WebSphere Portal 7.0.
The following figure shows the high level overview of where IBM Web Content Manager
fits into the WebSphere Portal infrastructure.
The key components in the architecture figure above are explained as follows.
33 of 439
WCM Content Server
The IBM Web Content Manager Server is the core of the IBM Web Content Manager
application. All requests for content are ultimately processed by the content server.
The WCM Server leverages Virtual Member Manager as its user repository. This
repository is used for both authentication as well as determining group membership for
authenticated users.
If necessary, you can switch your WCM content repository to any of the supported
databases listed at https://www-304.ibm.com/support/docview.wss?uid=swg27007791
Note: If you choose to store your content in IBM Content Manager you can still reference
items stored in IBM Content Manager within WCM using the Federated Components.
As the list of supported databases is subject to change, refer to the WebSphere Portal
7.0 product documentation for details on the latest supported versions and platforms,
which is available at:
https://www-304.ibm.com/support/docview.wss?uid=swg27007791
In addition, refer to each product's documentation for details on the specific hardware and
software requirements for these databases.
The WCM authoring portlet is the user interface for interacting with WCM. Content
creators use the portlet to create (author) content. Content approvers use this same
portlet for managing the content. The website developers use this portlet to create
technical assets, for example, presentation templates, workflows, and syndication
components.
Important: Even if you only use the connect servlet to deliver stand-alone (non-portal)
websites, the core WCM application always runs on WebSphere Portal.
34 of 439
The web content viewer portlet (JSR 286) can be configured to display web content on
the same portal server as the instance where WCM is installed or configured to display
web content on a different portal server than the instance where WCM is installed.
The following link explains how web content viewer (JSR 286) portlet can be configured
to render content residing on a remote WCM Server:
http://www-
10.lotus.com/ldd/portalwiki.nsf/dx/Rendering_Web_Content_Viewer_portlet_consumed_from_Rem
ote_IBM_Web_Content_Manager_V7_using_WSRP.__Setup_and_troubleshooting_guide.
Tip: Be aware of your infrastructure when using the web content viewer portlet (JSR 286)
to render content residing on a remote WCM server.
Note: WCM API does not expose all the capabilities of WCM. Review the JavaDocs for a
complete set of the features available using the API. The Javadoc HTML files are located
under the was_profile_root\installedApps\nodename\wcm.ear\ilwwcm.war\webinterface\
folder.
In this path name, was_profile_root is the profile root for WebSphere Portal Server.
Restriction: WCM API only supports Java code running in the same Java Virtual
Machine as WCM itself. If you wish to access the WCM API remotely, you will need to
build some type of service layer on the WCM server to broker your requests. The most
common solution to this issue is to develop a web service to perform this function.
Restriction: Because the JSP Tags rely on the WCM API for functionality, they must run
in the same Java Virtual Machine as the WCM server.
For more details on the API and JSP Tags, see the IBM Web Content Manager Product
documentation.
35 of 439
2.2. Architectural frameworks for content
The architectural frameworks for content in WCM consist of portal, traditional, internal
facing, and external facing.
This section describes the various architectural frameworks for content in WCM.
2.2.1. Portal
Portal provides the basic framework services for content aggregation, role-based access,
personalization, and security.
The underlying J2EE platform provides low-level middleware services such as enabling
security through a user registry and session management. These underlying services
coupled with the basic portal framework services can provide content life cycle
management in terms of content authoring and content delivery. Different roles, such as
author, reviewer, and approver, can move content from authoring to delivery.
The content management and delivery framework embedded in portal can be used in
tandem with other features, such as personalization and content aggregation, which
provides an effective presentation layer in the architecture. The portal framework allows
the delivery of pages and sites that combine content from the CMS and other kinds of
portal content from back-end systems.
2.2.2. Traditional
In the traditional architectural framework, content is prepared in pure HTML format by
using different HTML editors, and the content is hosted on a web server for presentation.
The URLs are exchanged with the reviewers and approvers for verification and validation
over e-mail. The hosting platform does not provide content management. The dynamic
applications came into existence with CGI scripts but had many limitations. The evolution
of the J2EE platform brought new ways to display content on web sites: Static web
content can be coupled with the dynamic content that is generated through servlets and
JavaServer Pages (JSPs). However, the traditional framework still lacks in content
management functionality.
Internal sites typically provide access to content and applications that employee access
on a frequent basis. Often, key applications or content are delivered that attract
employees to visit the sites. Such entities include news, alerts, and role-specific content.
Intranet users can benefit greatly if the sites provide applications that are useful for day-
to-day activities, such as sales management, defect tracking, customer relationship
management, or technical support.
The integration of Web Content Manager and Portal allows content to be interspersed
amongst other portal artifacts (pages, portlets, gadgets and widgets).
36 of 439
2.2.4. External facing
External facing sites are sites designed for and used for by general public or partners of
an organization.
On external facing sites, the content should be clear, relevant and up-to-date and be
easily and quickly accessed by users. Users' opinion of a website may directly influence
the image of the associated organizations in the public eye.
The site should be engaging and easy to use. Users want a site where the content they
are looking for is easily found through navigation or search. The site should be fast and
responsive, making use of caching techniques at various levels to enhance the response
times for a variety of scenarios. A user may want to register with the site using a unique
ID, content can then be personalized according to the profile of each user. The design of
such a framework should consider how the content is managed, searched, cached, and
personalized for users, with the goal of attracting and keeping the attention of the users.
When designing a website, always organize the site in a way that is easily accessible by
users. The structure in which information is organized is called the information
architecture. In this section, we describe an approach for determining the information
architecture for the top levels of your web site.
In IBM Web Content Manager (WCM), content is structured and organized within the site
framework. The site framework can then provide navigation for the site. We outline the
decision making process by defining the information architecture, describing key
considerations,decision processes, and information design. Additionally, we describe how
to define criteria for site acceptance.
It is important to understand the relationship between the information architecture and the
site framework. The site framework structures the information about a website and is
closely integrated with the website navigation. To begin with, you define an initial site
framework with primary and secondary site areas. The site framework is a prerequisite
for the design and development of the content management system. In addition, you
must develop an initial layout of the home page based on the primary and secondary site
areas.
Both the framework and the home page layout require review and validation with
business stakeholders, from both an authoring and general site use viewpoint.
Easy access to the right content on an intranet can have a direct impact on an
organization's overall productivity. If users can find the information they are looking for
37 of 439
almost before they are even aware that they are searching for the information, then you
have accomplished the goal of organizing the information correctly and effectively for
users. The primary reason for sharing information on a web site is to make it available for
users. However, it is often the central reason why websites fail, which may also include
the following reasons:
The information architecture defines how the information on a web site should be
organized and linked so that users can access content. An organization should
investigate, analyze, design, and implement the information architecture for a site. Then,
it must face the challenge of presenting an image that enhances the way in which the
user experiences the information.
There may be reasons why a specific path to information supports your business needs.
The experience that a user has can be the key to success and often reflects the
organizations philosophy. Frequently, an organization builds its success on a unique
customer experience that cannot be ignored when architecting a web site. In addition, the
audience can vary such that it becomes necessary to separate users into categories to
provide a tailored experience for different types of users. For example, consider the
following diverse offerings:
A food company might offer both traditional, home style food and more contemporary
fast food.
A vehicle manufacturing company might have diverse offerings that range from
passenger cars, to industrial trucks, to motorcycles, such as BMW.
A technology company might offer a range of products and services, from technical
consulting services to consumer electronics, such as Hewlett-Packard.
Because of this diverse range of products, brands may require their own web sites with a
specific information architecture and web address (URL). In this case, a master (parent)
web site, which includes links to seperate web sites to represent the specific branding, is
the best choice. Defining the information architecture is often the most underestimated
part of a content management project. Organizations frequently spend more time finding
the right content management system than on developing the right information
architecture for that system.
When planning the information architecture, an organization must determine the following
information:
38 of 439
The information architecture determines the structure of the site, how navigation is
derived, and therefore the ease of navigating the site. The following aspects of
information architecture are considered when designing the content management
system:
Site framework
Category hierarchy
Document type hierarchy
Defining the information architecture lays much of the groundwork for how content is
organized on a site. Regardless of where the content resides, you need a good
understanding of what content needs to be presented.
Tip: A good information architecture team includes representatives of all content areas
that are included on the web site. It is also beneficial to have a single person lead the
team who is willing to take a leadership role and to make the required decisions.
Here, we present an example of a good information architecture and discuss the features
that make these examples special. The examples discussed in this section include the
sample River Bend Tea and Coffee website.
The River Bend Coffee and Tea Company (River Bend) is a virtual company that we use
for this wiki to give a simple example of a basic information architecture. This fictitious
company sells coffee and tea in different locations around the world. They have a public
Internet site to share information with their customers. These customers include both
individuals and businesses.
River Bend wants to provide each user a personalized experience of content based on
their user profile. After each user registers on the site, they will have a profile that
includes demographic and personal information that will allow the company to generate
and display targeted campaigns specific to them.
By using the profile information provided, along with additional personal information such
as region, age, sex, and buying and viewing trends of the site, River Bend hopes to be
able to increase revenues by making recommendations and posting custom campaigns
on their site.
River Bend has identified the following top levels of site areas or containers for content
that are directly accessible from the home page:
39 of 439
Products
Company
Locations
News
Contact
From these top levels, a secondary site area allows users to specify the topic that they
are looking for within that area. For example, the secondary site area for products
includes coffee or tea. This architecture provides an obvious separation that users can
comprehend that leads them to the information they want to find.
The third level site area offers more content on the chosen topic. For example, under tea,
users can find black tea, green tea, and herbal tea.
From both levels 2 and 3, the site offers detailed search capabilities for specific items that
the user might be looking for and tailored campaign content based on the site area and
user profile information.
Page layout
To determine the structure and layout of the site it is important to create basic diagrams
to help users to better understand how content will be structured. Likewise, it is important
to agree on a navigational model. One method of building a website is to create basic
wireframe diagrams.
Wireframes are like blueprints for a website page layout. They show how the framwork of
a website look like. You can use drawing, graphics, or presentation tools to draw the
wireframe diagrams. Wireframes connect the underlying information architecture.
40 of 439
In a wireframe, it shows where the content or navigational item lay on a page and the
functions that the page provides. For example, in the following figure, it shows where the
content item, content menu, and link menu will be placed on a page. It also shows where
the navigations and search capability will be provided on the page.
The following figure illustrates a sample home page also known as the landing page. This
page is the starting point for site visitors. The page contains the following items:
1. Offers Menu - To tempt visitors into navigating to new product offerings such as a
new coffee blend.
2. Four link images - To help users to quickly access to the important information
(Content item A, B, C, and D). This can be for example, Coffee, Tea, News, and
Company information.
3. Footer with short links - To provide contact, policy and site map information.
41 of 439
The following figure shows the main or general page which provides access to all
parts of the site:
4. Navigational elements expanded - To show sub areas of the site - one parent and
one child node deep.
5. Offers Menu re-used - Perhaps slightly re-arranged (by date).
6. Main part of the page - Used as the primary content delivery area, with inline editing
tools when available. A Rate button is shown which uses an API function.
7. Search bar - To allow users to perform search in the website.
8. Campaign area - To deliver targeted information depending upon season or date (for
example, eggnog or cinnamon coffee at Christmas, iced teas and coffee in the
summer).
9. Links Menu - To show links to other content with a suggest button.
10. Foot - Re-used footer to display contact, policy, and site map information.
Note: The wireframe diagrams listed above are for illustrative purposes only. They do
not represent the actual wireframes for the River Bend site.
Any web content management project should highlight the consequences of poor
information architecture. For example, an inadequate information architecture may show
up as inconsistent website structures and a poor user experience. Websites that spread
information over several areas do not follow a consequent architecture. In these cases,
users lose themselves in the site, be unable to navigate back to the home page and be
unable to easily find the information they seek.. An inadequate information architecture
may mean the website does not consider the needs of first-time and occasional users as
well as regular, experienced users.
Another easily overlooked aspect is that of the overall experience of the user, considering
42 of 439
not just the content and page layout but also the potential screen resolution, browser
type, mobile access from smart phones, tablets and other devices as well as language
and any accessibility and disability considerations. You should ensure that all of the
relevant aspects are reflected in the user scenarios you develop. We'll talk more about
this later in this chapter.
Whilst we have stressed the importance of considering and developing the information
architecture for your site as early as possible you may find that changes need to be made
later in the process. This can be due to changes in the project scope or feedback from
usability testing. Ensure that due consideration is given to the existing IA, any decisions
based from this and the impact of the proposed changes by someone familiar with the
architecture before any fundamental changes are made.
Consideration should also be given to whether the site will be delivered through a portal
or traditional website as these will likely drive differences in the information architecture
as a portal site will need to consider what other tools, applications and capabilities are to
be delivered alongside the web content.
Introduction
How easily content can be found on an intranet can directly impact an organization's
overall productivity. Organizations recognize the importance of information architecture
as both the primary prerequisite for designing and developing a new content
management system and as the means to organize information in a way that is readily
accessible to customers or employees.
One example is a call center that responds to customers by using an intranet portal to
maintain contracts and to give information. For this call center, the range of time that is
required for an agent to find the corresponding information and to fulfill the required steps
ranges from under two minutes to four and a half minutes. Thus, if 80 attempts per day
are made to find information and each requires two minutes more than necessary, this
call center loses 160 minutes or 2.5 hours in productivity. Even without considering the
costs that result from lost productivity, the customer satisfaction will decrease. When
users cannot obtain the information that they need the organization has a dissatisfied
customer or, worse, a lost customer. The effort to win back these customers is significant.
43 of 439
In addition to content accessibility, design flexibility becomes a key success factor for the
information architecture of a website. One task is to conduct workshops with business
stakeholders, including corporate communications and process area representatives.
Given that the website will evolve as more business users provide input and, more
importantly, contribute content, the site architecture can be expected to evolve as well. It
is critical that the site framework be developed with flexibility for modification as a key
goal.
These considerations translate to tasks that you perform and they guide you in the
website design and decision process.
Web content management projects should be driven by defined business objectives and
the primary project goal needs to accomplish those requirements. When the project
starts, the business objective is often exposed to discussion as more users provide input,
because content providers have a better understanding of the information that the
website provides. However, this understanding can mislead content providers into
believing that they also have a better understanding of the business needs. You need
clear communication from the business constituency to monitor the motivation of the core
team and the joint content provider. Unfortunately, web content management projects
often are delayed because of misconceptions between the core team, the content
providers, and the users.
Before starting a website project, everyone involved should understand the defined
business goals and the user goals of the project. The challenge is to involve content
owners in the definition and to remain focused on the essentials. The user goals should
be related to the users of your site (internal or external) and the experience that you want
them to achieve when visiting the site.
These two sets of objectives, that is the business goals and user goals, must be weighed
against what is achievable in terms of budget, scope, and other limitations. When the
organization understands both goals, there is a much higher chance that the content
management project will be successful.
44 of 439
In our example of the River Bend Coffee and Tea Company (River Bend), the business
goals and users goals are clearly defined after two studies were conducted and the core
team completed a conceptual review. The sample findings of these tasks are outlined in
the following sections.
As stated in the beginning of this section, the only reason to share information through a
website is to make it available to users. The usability of a website is an essential aspect,
good usability ensures the audience can use the site to meet their goals. Usability can is
achieved by meeting the needs and expectations of the target audience.
A good web content management product offers the flexibility to set user expectations.
By using traffic analysis, you can better understand the interests and proceedings of
users.
In the case of River Bend the company conducted a workshop that captured the needs of
the user community through a survey of their user customer base. Several key items
came out of this survey:
Another common mistake that occurs in projects such as these is that either the
questions or the answers are left to be too vague. Obviously, this leads to assumptions
being made that may or may not be correct. For example, in the previous example, the
45 of 439
results of "the existing site was too hard to navigate" is ambiguous. It leads to other
questions, such as what specifically was "hard" about the navigation? Consider for
example the following additional questions:
Upon doing a follow-up survey, the previous points were then further defined so that they
were useful:
Organization
When navigating the site, it is easy to loose where you are
The grouping of content (teas versus coffees) was not clear
"I didn't feel that the site was specific to my needs"
Other sites offer recommendations and recipe ideas
Navigation
The menus were sometimes 4 or 5 levels deep, too hard to keep track of
Some content was too lengthy, a lot of scrolling needed
Search
There was no intuitive way to search for specific coffees
Objectives and key success indicators might include the following examples:
46 of 439
The site framework should also be flexible and easy to modify:
Ensure clear communication to those involved with the project. Involve content
owners in the defining process but remain focused on the essentials.
Get feedback from different groups of users from everyday content creators through
site managers to occasional end users.
Ensure varied groups and users review the content and site, avoid having a single
user or department review as their perspective may be skewed.
Appoint an overall lead for the project to ensure decisions get made and the project
moves forward.
Ensure that the content is easy to find.
Ensure good knowledge of the audience's website experience.
Make a distinction between different types of users.
Set a realistic time frame.
In our example of the River Bend, a workshop was conducted with the key business
stakeholders. They defined business objectives based on the feedback from their
customer user community and the current state of the business. The following key items,
among others, resulted from that workshop:
In our example of the River Bend, after the survey of the customer end user community
was completed and the output from the line of business stakeholders was reviewed, the
core project team conducted a review session to agree on the overall project plan.
First they decided on the 'key' application. In our example, there were two. The first
application was defined as being the recommendation component. It constantly makes
new recommendations of teas and coffees that the user has not yet tried but has a high
probability of liking based on their buying and viewing trends. The second application was
the campaign portion of the site where targeted promotions were presented based on
user profile information.
After you determine the business goals and define the audience for your website, start
thinking about how visitors will use your site and how the design can ensure high
usability. User Centered Design (UCD) ensures that the objectives of users are taken into
account when designing the site. A characteristic of a UCD approach places the user at
the center of all design decisions when building a website. UCD also includes design in
the manner of structure and information architecture.
One common complaint from users may be that they cannot find what they need on the
intranet. This does not mean necessarily that the site is designed poorly, but that the
47 of 439
spectrum of users is comprised of linear and non-linear thinkers. A linear approach, a
non-linear approach, and a combination of these two approaches are equally valid. To
accommodate the broadest community of users, IBM recommends that you develop
three discrete design directions, focusing on page layout and navigation. Then present
the design directions to a focus group that is comprised of a cross-section of users. The
users will provide feedback regarding specific direction about how you should design the
site and the content that you should highlight. A facilitator, which can be a qualified
person within the content owners, should be engaged to conduct the session, and the
session should be scripted with specific questions to ask the group.
A website with a high score in terms of usability includes the following characteristics:
As discussed in the section above, Understanding your audience, you might need to
classify the audience into groups with individual needs. You can divide these groups of
users at least into two subgroups:
First-time users
Experienced, repeat users
In addition, include a second involved target group when it comes to UCD. Consider the
following experts who will work with the web content management system:
The success of a web content management project also depends on the usability for the
every day editor's work. Their environment should be intuitive and consistently structured
as well.
48 of 439
In our example of the River Bend, there were five use case scenarios:
This users has a level of Tea Leaf, which implies that this user gets an automatic 5%
discount based on buying pattern.
A top-down approach investigates the content to be displayed on the site, plus the
needs of the audience that is accessing the site. This approach helps to formulate the
scope of the site and supports our understanding of how the overall site will be
structured.
A bottom-up assessment is performed, which starts from the most basic level of the
website, the content page. This process determines which metadata, including
categories and keywords, to use to profile documents.
The goal of this analysis is to determine the structure of the site and, consequently, the
49 of 439
navigation of the site. During this process, the following core facets of the information
architecture are developed:
Site framework
Category hierarchy
Authoring template type hierarchy
Site framework
There are two ways to organize the content on a website, hierarchical and cross linking.
Hierarchical organization
Hierarchical organization of content is represented in the following figure. Each piece of
content has a physical location at a level in the site. Because content is usually accessed
from a single entry point (for example, the home page), hierarchical organization of
content is particularly well suited to websites.
Hierarchically structured content works best if you have well organized content that can
be easily sorted into different levels on your site. Most visitors to a website understand
the concept of hierarchies, such as chapters in a book. Therefore, this is a common
navigational aid. It provides at a glance an idea of the site's structure. This type of content
organization may be better suited to a less technical audience.
Cross-linking
Cross-linking content is illustrated in the following figure. With cross linking, any page can
be linked to any other page on the site, regardless of its location within a hierarchy. This
type of content organization works well in web sites that enclose many hierarchal levels
and allows content that is located on a deeper level within the website to be presented at
a higher level.
Cross-linked content is well suited to a more experienced user and is intuitive to use only
if the linking follows a content context that the audience easily understands. Frequently,
50 of 439
only the Back button of the browser allows the user to revisit pages.
In traditional, flat HTML websites, the site framework is an artificial concept based on
links between pages. In IBM Web Content Manager, the site framework is defined first,
and the links between the pages are generated dynamically. The different sections of a
website are defined in site areas, and content is grouped under different site areas.
Navigators are based on the site framework. By clicking a navigator, a user can access
all content in a specific area. Menus display lists of content that can be located in any
area of the site. Menus usually show content grouped by category, although menus can
use a variety of search criteria, including site framework and content type.
A category usually refers to the general subject matter of the content or its attributes, for
example news or even the product type black tea .
When creating a taxonomy of categories, the main goal is to make it easy for content to
be appropriately categorized so website users and search engines can find specific
content. An added benefit is that an organization can begin to apply standard practices
around the classification of content inside the organization.
51 of 439
The number of levels to create
If you find that you have so many documents covering various topics that when searching
for a document based on a category, an exhaustive list is returned, it is time to think
about creating new categories. You might want to assign a category to do the following
tasks:
Make it easier and more effective to find the information for which you are looking.
Enable more effective searching on content (either within the site or by search
engines).
Two main standards groups are doing work in the area of categorization:
The Dublin Core Metadata Initiative includes specifications of the terms to be used
when creating metadata. You can find information at: http://dublincore.org.
The World Wide web Consortium's Resource Description Framework (RDF) provides
recommendations about the way to represent resources on the web. You can find
information at: http://www.w3.org.
The initiatives of these two organizations provide companies with the ability to
standardize the metadata tags that they used on their site. These initiatives provide
standards for terminology to be used in category taxonomy. However, they provide little
assistance in the creation of the taxonomy itself.
If you base a menu on a top-level category, all content profiled with categories
belonging to that top-level category and their children appears in the menu.
If you base a menu on a parent-level category, all content profiled with the parent
level category, its children, or its parents appear in the menu.
If you base a menu on a child-level category, all content profiled with the child
category or its parents is returned by the menu.
We recommend that, in most cases, you use only child-level categories to profile content
to allow more control over what displays in menus.
Taxonomies cannot be used in Web Content Manager menu searches. If you want a
menu to return results based on content that is profiled with any category in taxonomy,
create a single, top-level category and base the menu on the top-level category. For our
fictitious website for the River Bend Coffee and Tea Company, we organized the content
by the five sections Products, Company, Locations, News and Contact, as shown in the
following figure. Our reference implementation site structure reflects this organization.
52 of 439
The secondary site areas allow the user to specify an item to search on in this area. The
secondary area for Products includes coffee or tea . The separation is obvious, and users
can comprehend intuitively and exactly what they can expect to find here.
When it comes to defining the required document types, it is common to hear content
owners requesting a content type for every purpose. For example, the sales team wants
a content type for products, human resources want a content types for career
information, and marketing sees a need for a content type for news and company
information. From a technical perspective, these requirements can be achieved using
fewer authoring templates because they are essentially quite similar.
Instead of creating a new template for every content type on the website, templates can
differ by page design, such as page layout, page style, and components. Then, you can
apply these templates to the many content types that you create so that the content
purpose is separated from its layout, making content and presentation flexible. Proper
construction of the site ensures maximum reuse, flexibility, and performance.
Formulating ideas about other components to be used in the website, such as graphics,
menus, navigators, and so on, is also helpful. You can find details on designing the
website and implementing it in the "Building the sample site" section.
53 of 439
descriptive information that is structured in such a way that allows web pages to be
properly searched and processed. Metadata is often keywords about the content of digital
material in the form of labels that are only visible in the HTML code that builds the web
page. The metadata will often come from the keywords or categories that a user
associates with the content.
In our example, we plan to generate metadata for WCM pages by specifying standard
metadata fields. The search supports the metadata fields that are described in the
following table.
The metadata is created automatically for each web page. Refer to the search methods
detailed in the "Search" section of this wiki.
54 of 439
The River Bend website is built using five components:
The chosen navigation shows all top levels of the River Bend site which makes it easy for
users to navigate the site. The navigator expands downward and can be used to support
further site areas.
Creating a workflow
Workflows can be used within IBM Web Content Manager to review, approve and
authorize content published to the website. Normally at least two stages, Draft and
Published are needed for a workflow.
A recommended workflow contains the stages Draft, Approval, Published, and Archived.
As the content passes through each stage the change is logged in the content history
which makes traceability easier. IBM Web Content Manager offers various options to
configure more dedicated workflows to serve further needs including custom workflow
actions which allow integration with external workflow or process systems.
Often the dynamics of a site require other workflow options such as a quick publish, no
approval workflow. This workflow, available only to certain authorized users, allows
content to be quickly pushed through to the publish stage without having to go through a
multi-step approval process. This can be useful for quickly making changes to existing
content or publishing time critical new content.
55 of 439
Using syndication
Syndication is the method used by an IBM Web Content Manager location to exchange
(replicate) data from one IBM Web Content Manager library to another. Syndication is not
involved in the process of approving content. Syndication is only responsible for
replication of IBM Web Content Manager assets across multiple locations.
When creating a syndication process, IBM Web Content Manager allows you two choices
for the granularity of items to be syndicated:
All Items
When configured with this setting, all elements of the IBM Web Content Manager
location are replicated to the other location, including draft and expired content.
Typically, authoring and development locations need access to all types of content
for testing purposes. This setting is common when syndicating between distributed
authoring locations or between an authoring location and a development location.
All Live Items
As opposed to the All Items setting, this option replicates only live content. Live
content is defined as content that has been approved via workflow (live) but that is
not yet past its expiration date. Typically, a production location only receives live
data, so this setting is common when syndicating from authoring to staging or staging
to production.
Tip: Syndication always syndicates copies of your technical assets (for example,
presentation templates, authoring templates, library components, and so forth). By
default, there is no setting to stop this syndication. You can configure IBM Web Content
Manager to workflow these items.
Introduction
A critical component of information architecture is its design, which addresses content
access through the site interface. Page layout, links, menus, navigators, taxonomy, site
breadcrumbs, search, identity standards and graphics are all components of web
information design. Users have different preferred means for accessing information so an
effective information design provides users with multiple ways of accessing information.
Site navigators
Direct feature links
Embedded hyperlinks
Site menus
Search
All are valid and we recommend that you leverage all the site components from IBM Web
Content Manager (WCM) when designing and building a site to enhance user
56 of 439
experience. To provide a relevant context for these components and to illustrate specific
examples, we use the River Bend sample site referred to throughout this wiki.. We use
these throughout this book, because we believe that they represent good information
architecture and good site design.
It is possible to pair different page designs (presentation templates) with one authoring
template in different site areas. This means one piece of content can be displayed in
multiple ways depending on the site area currently displayed -- called multipublishing.
Different uses of multipublishing can be helpful. You should create one content that
includes a full set of information, for example, product information. This content can
contain confidential material that is published in an intranet or extranet. If the same
content is taken and published in the Internet, different presentation templates allow you
not only to have a different design but also to share a subset of the original content
securely. You can create content with the same type of authoring template but publish it
with different presentation templates, depending on the department, brand, location, or
language.
To increase the reuse and decrease the maintenance effort, components are used.
Presentation templates can contain different kinds of components that are used
depending on the site area where content is published. Thus, when news is separated
into categories, depending on the site area, a different title logo (component) is chosen
instead of creating a presentation template for every news category.
Related to the usability considerations, you should also consider the performance of
navigation. To save space or because it might seem more high tech, navigators are used
that encompass all available navigation levels by clicking or mouse over. This kind of
navigation often requires complex handling and cannot be easily overlooked when web
accessibility is a big issue. Consideration should be given to the accessibility of websites
for all users, particularly public sites.
Because IBM Web Content Manager is used to manage dynamic sites over many years,
navigation should allow the site to expand dynamically.
57 of 439
Note: Navigators are not menus. Menus are a list of hyperlinks that take you to specific
pages, but navigators are organized differently. Navigators present the logical
arrangement of a web site, while menus are a list of related web pages that might appear
anywhere in your site and use search criteria to present the links.
Using menus
A menu is ultimately a search mechanism that groups together lists and related
documents based on specific criteria, such as categories, site areas, or keywords for
display and access to users. The image below displays links as images, icons with text,
links with a summary, or many other combinations. These menus combine elements
based on content from more than one site area, not possible with navigators. To users,
menus and navigators provide the same functionality allowing a user to navigate around
the site or to locate particular content.
Through the use of menus, and leveraging categories, parameters can be set to bring the
timeliest content to the home page. In addition, individual pieces of content can be
categorized, or a category can be associated with a specific content template so that all
content created with that template has the specified category. Content can have one or
more categories. These categories then can be presented dynamically by direct feature
links such as News, Products, Events, or Promotions.
These direct feature links are embedded as rich text components and are central
managed enabling any site developer to re-use the same links wherever they are
applicable.
We recommend that every site include the "Search", "Contact", and "About us" direct
feature links to provide the user with a good web experience.
Alternatively the new site may open in a separate window. Often, embedded hyperlinks
are used to define a word or phrase that is mentioned (much like a cross reference in a
book).
58 of 439
The figure below shows the embedded hyperlinks marked by red square boxes.
Another usage of embedded hyperlinks is in WebSphere Portal where they can be used
to reference corresponding content or applications, depending or related information.
This WebSphere Portal feature is called Click-to-action. The click-to-action capability lets
you send information from one portlet to another automatically. This capability leverages
the way that web content and web applications interact and leads to more powerful
dynamic workplaces. For example, if a user clicks on a specific topic in a Topic List
portlet, click-to-action allows an adjacent portlet to limit the postings shown to just those
in the specified topic, based on the criteria selected in the Topics portlet.
Using search
Searching a website is one of the most used features and is particularly useful to users
who do not have time to learn the site structure. Visitors expect the search to return
exactly what they are looking for, particularly when they know that the information is
there. Because of this high expectation, search results need to be high quality. To return
effective search results it is critical that content categories and keywords are defined and
applied to each page prior to publication. See for information related to the search setup
and configuration. So, how should a search work from an information design
perspective? There are two options possible.
First, the search function should be ntuitive to use. The user can enter words in an input
field, and the results deliver all content that include the searched parameters, sorted by
relevance. Relevance normally means it starts with the content that includes all words
searched for and continues with single words found.
The second option is advanced search. Advanced search options may included Boolean
combinations using AND, OR and NOT as well searching by Date, Author, Keywords or
other metadata.
Search results can also have a different approach. Search results will usually offer a URL
to the web page that includes the cited content. Search results may also include a short
abstract of the content as part of the result. This abstract offers a specified number of
words from the content or additional metadata fields. Details of the results can be saved
for download or can be printed.
59 of 439
For a multilingual site, consideration should be given to the default language of the
search as well as parameters controlling which language content is to be returned.
WebSphere Portal implements rule based content delivery through a feature known as
personalization. By using personalization, websites can customize content automatically
for each user. Personalization can recognize a specific user based on a profile. It can
also determine characteristics of a user based on previous purchases, products, or pages
viewed and then select content that is appropriate for that profile.
In the case of the River Bend Coffee and Tea Company (River Bend) site, a simple
personalization rule is implemented to better illustrate the concept. The personalization
rule implemented is based on dates. If the dates for accessing the site are within a range
of defined "Summer dates", then the home page illustrates a summer-based image of a
refreshing iced coffee drink, as shown in the following figure. If the dates for accessing
the site are within a range of defined "Winter dates", then the home page illustrates a
winter-based image of a hot coffee drink.
60 of 439
2.3.5. Site acceptance and information architecture
workshop
This section provides recommendation for site acceptance and also recommendations for
preparing and conducting information architecture workshop.
One challenge constantly voiced by technical teams is the lack of site use by many of
organization's staff and the lack of content contribution by the business stakeholders. We
recommend a few basic actions to help build support for the web site. These
recommendations are as follows.
61 of 439
Demonstration
Part of the communication plan should include a demonstration that illustrates the site
navigation. In that demonstration, very simple action settings should be enabled for
demonstrating the multiple ways of providing information. Not all information access
methods need to be demonstrated. Open and agreed areas should be identified and
marked. In meetings with business users, demonstrations such as this require little
preparation time but are effective in communicating accessibility and usability concepts.
Workshop preparation
Information architecture workshops require preparation in order to be effective. Prior to
conducting any workshops, we recommend that organizations develop a test site with
IBM Web Content Manager to gain hands-on experience with the product and to develop
an understanding of the capabilities of the tool. This training helps the team to connect
user requirements or wishes with the capability of the tool to support them. With that
understanding, stakeholder requests that are technically complex or time consuming can
be identified immediately, so that expectations can be set correctly. Alternatives can be
discussed on the spot.
After a workshop is scheduled with the stakeholders of a process area, the organizations
team should thoroughly review that area of the site. Site areas and a sampling of specific
pieces of content should be identified and documented. Separate documented notes by
content type or site area but make no additional marking on them prior to the workshop.
Introduce the goals and objectives of the workshop, and the overall IBM Web Content
Manager project.
Identify basic terms (grid, banner, header, navigator, and menu) used to produce a
work product for this process area.
62 of 439
Have the business stakeholders validate the site areas and content identified in the
preparation.
Group like content types together, and arrange the groupings on the whiteboard
within the grid.
Use a system of dots to identify site levels (one dot for the top, two for the next, and
so forth).
Capture the raw output of the workshop on digital camera.
Work products
The workshop outputs should include:
When planning the information architecture an organization must determine the following
information:
Information architecture determines the structure of the site, how navigation is derived,
and the ease of navigating the site. The following Content Management System
constructs are developed when designing a system:
Site framework
Category hierarchy
Content type hierarchy
Defining the information architecture lays much of the groundwork for how content is
organized on a site. Regardless of where the content resides, you need a good
understanding of the content.
63 of 439
architecture, and to begin modelling the initial structure and design of your site, refer to
the following sections in this wiki:
The most common means of accessing information are through the following ways:
Site navigators
Direct feature links
Embedded hyperlinks
Site menus
Search
These are all valid ways of accessing information. We recommend that you leverage a
variety of site components from WCM when designing and building a site to enhance
user experience. To provide a relevant context for these components and to illustrate
specific examples, we draw upon examples from River Bend sample site referred to
throughout this wiki, and other relevant sites. We use these throughout this book because
we believe that they represent good information architecture and good site design.
Make a clear and intuitive navigation model for the site. Make it obvious so that users
know
- Where they are now
- Where they have been
- Where they can go
Keep the navigation model consistent throughout all pages and components of the
site
Use direct embedded text hyperlinks effectively and include sub-text (mouse over
text) to make it obvious where the link will take the user.
64 of 439
Defining accessibilty
As a starting point, what exactly do we mean by the term "accessibility"?
Making a site accessible is about removing the barriers that might limit the groups of
people that can receive the information provided; removing these barriers is what make a
web site accessible. It's important to realize that the Internet and website are growing and
involving more and more areas of our society. When you think about accessibility, it's
easy to think about how your website is presented to those with disabilities, people who
are partially sighted or blind and those who require assisting hardware to access IT.
However, easily overlooked are those perhaps new to IT, mature users of the Internet or
someone who's a non-native language speaker. It's important when considering the
accessible web to think broadly and encompass the widest possible audience.
WCM provides the platform and components to build your accessible website. Using your
existing skills and tooling the IBM WCM platform provides you with a foundation and
management system to facilitate accessible web design and development.
Standards
Making websites accessible and meeting accessibility requirements often requires
adhering to standards such as the WAI (Web Accessibility Initiative) and it's guideline
document, and Section 508 . In addition specific local country regulations need to be
understood and applied appropriately.
WAI
The Web Accessibility Initiative (WAI) of the World Wide Web Consortium (W3C) is
focused on addressing the requirements for web accessibility. WAI provides a repository
of the latest web accessibility guidelines and tools.
The WCAG guidelines are primarily intended for 4 main focus groups:
65 of 439
The WCAG documentation provides guidelines as to how to make web content
accessible to people with disabilities, that's the text, images, forms, sounds, etc.. that are
part of any web page or web application. WCAG is part of a series of accessibility
guidelines, including the Authoring Tool Accessibility Guidelines (ATAG) and the User
Agent Accessibility Guidelines (UAAG).
Note: WCAG 1.0, was completed in 1999, is it's scope is HTML & CSS. In December
2008 the WCAG 2.0 guidelines were published as a W3C recommendation. Unlike
WCAG 1.0, which was limited to HTML & CSS, WCAG 2.0 will be principle based in order
to be applicable to all Web technologies. Here is a mapping of the two guidelines.
Section 508
Section 508 of the US Rehabilitation Act Amendments of 1998 requires all US federal
agencies to make their information technology accessible to their employees and
customers with disabilities. Important to web content management is that Section 508
also applies to Web sites that are produced for government agencies.
Testing tools
Both the WAI and Section 508 websites make reference to several tools to assist the
content contributor or web designer with their efforts to ensure that standards and
guidelines are implemented successfully. In addition to tools provides by the standards
bodies noted previously, IBM has also developed its own tools to assist with the testing of
accessible websites and social information.
aDesigner
aDesigner is a disability simulator that helps web designers ensure that their content and
applications are accessible and usable by the visually impaired.
Voice browsers and screen readers read aloud the text on web pages and are used by
visually impaired people. However, these devices are less effective with certain kinds of
content, such as highly graphical material. Web developers can use aDesigner to test the
accessibility and usability of Web pages for low-vision and blind people.
66 of 439
aDesigner also helps users to check accessibility of ODF documents and Flash content.
It also has accessibility information (MSAA/IA2) inspection functions.
The Accessibility Edition helps ensure website user accessibility by monitoring for over
170 accessibility checks. It helps determine the site's level of compliance with
government standards and displays results in user-friendly dashboards and report.
This section describes the various environment types, their usage, and how to move
content between them using workflow and syndication.
67 of 439
Typically, these servers perform one of the following roles within the WCM infrastructure:
Authoring
Staging or preview server
Production (live) or delivery
Authoring environment
The authoring environment is where you develop and unit test the WCM technical assets
such as presentation templates, HTML components, menus, and navigators. In addition,
this server can be the first place you install patches and fix packs to ensure that they do
not negatively impact your servers. Typically, you syndicate changes to the staging
environment to roll out changes. These changes are, in turn, syndicated or replicated to
the production or live environments after appropriate testing.
Note: WCM currently does not support selective replication. That is, you cannot have
WCM to syndicate only design changes from the authoring server to other servers in your
environment. Be careful when syndicating content to or from an authoring server. One
approach is to set the syndicator to syndicate only live content and delete all content (via
the API) prior to syndication. Another similar approach is to configure syndication the
same way but have no live content in the authoring server. Regardless of your preferred
approach, be careful when syndicating from the authoring server to other servers.
Content authors and approvers create, edit, preview, approve, and expire content in the
Authoring environment which can be distributed if required. For example, if you have
offices across the globe, it might make sense to have authors work on a server closer to
their physical location as opposed to a centralized authoring system.
Staging environment
The staging environment is sometime perceived as merely "nice to have", but a staging
environment is highly recommended as a safety net. A staging environment provides a
chance to review changes in the context of your whole site before they are syndicated
into the live environment. This can include previewing the web content and integrating it
with other applications. A staging environment is particularly useful if you are pushing out
a
large number changes simultaneously.
A staging environment can also tie into your test environment, depending on the relevant
testing that is part of your content management and WebSphere Portal Development life
cycles. From a best practices perspective, the staging environment should use all
functional elements found in the production (live) environment. For example, if your
production environment contains a cluster for IBM Web Content Manager servers, your
staging environment should too.
68 of 439
Designing your staging environment in this manner provides two potential benefits:
Testing
If you need to test a new configuration, install a patch/fix, and so forth, you need a
place to test such changes prior to implementation on the production servers. If the
Staging environment mirrors your Production environment you can confirm such
changes in Staging.
Performance testing
In an ideal environment, Staging would be an exact duplicate of the Production
environment. If this were the case you could easily do performance testing in the
Staging environment. If the Staging environment contains all elements of Production
but on a smaller scale you can still use this environment to run performance testing,
but you will have to extrapolate the results, which could lead to incorrect performance
expectations.
Testing environment
If you need to test a new configuration, install a patch or fix or make other changes you
need a place to test such changes prior to implementation on the production servers. If
the staging environment mirrors your production environment you can confirm such
changes in staging. Otherwise or if resources are available, considering to have a
designated testing environment.
69 of 439
Workflow
Workflow controls the creation, approval, and run-time (live) access to an item. A
workflow consists one or more stages.
Tip: Normally content will not be seen by visitors on the published site (live) until the
content is approved.
Syndication
Syndication is the method used by WCM Server to replicate data from one WCM Server
to another. Unlike workflow, syndication is not involved in the process of approving
content. Syndication is only responsible for replication of WCM assets across multiple
servers. Its intended use is as an ongoing process to keep a receiving server or
subscriber up to date with the latest content and design changes from the transmitting
machine, which is also known as the syndicator. In versions of WCM prior to V6, a
Syndicator spans the entire data store. From version 6 onwards, it is possible to partition
a data store into multiple (virtual) libraries.
You can configure a Syndicator to syndicate single or multiple libraries. When creating a
Syndicator, you have choices for the granularity of items to be syndicated:
All items: When configured with this setting, all elements of the WCM Server are
replicated to the other server, including draft and expired content. Typically authoring
and development servers need access to all types of content for testing purposes.
This setting is common when syndicating between distributed authoring servers or
between an authoring server and a development server.
All live Items: As opposed to the "All items" setting, this option only replicates live
content. Live content is defined as content that has been approved via workflow
(live), but is not yet past its expiration date. Typically a production server only
receives live data, so this setting is common when syndicating from authoring to
staging or staging to production.
Tip: Syndication will always syndicate technical assets; presentation and authoring
templates, components etc. By separating out design assets into their own library you
can syndicate them independently of content.
Attention: You can use the architectural designs described in this section to build the
environments described in 2.5 Environment type. In practice, you combine a number of
these architectures across various environments. In real-world installations of IBM Web
Content Manager solutions, a variety of common infrastructure designs take place.
70 of 439
The primary differences in these designs are due to variations in the basic assumptions:
Important: As you look at these various architectures, remember that these are only
representative architectures based on practical experience in deploying IBM Web
Content Manager. Many other architectural combinations can be built based on your
organizations needs. Use these architectures as a baseline from which to build your
environment.
In the basic architecture, a single WCM Server is responsible for all IBM Web Content
Manager activities. Site visitors access this single server for content when they visit the
web site.
An HTTP server is placed in the DMZ to receive all requests for site content. This HTTP
server acts primarily as a proxy to shield the IBM Web Content Manager server from
direct access. If you use IBM HTTP Server (or Apache), the WebSphere Portal and IBM
Web Content Manager server can generate an HTTP plug-in to ease configuration of the
HTTP server. While this architecture is technically feasible, there are a variety of issues
that make it sub-optimal.
71 of 439
Design advantages
Design advantages include simplicity. This design is simple to implement due to the
limited number of components that are involved.
Design disadvantages
This architecture has the following design disadvantages:
In the intermediate architecture, multiple WCM servers share the responsibility for IBM
Web Content Manager activities. Site visitors can access any of these servers for content
when they visit the web site. Multiple HTTP servers are placed in the DMZ to receive
requests for site content.
Proxy: The HTTP servers act as a proxy to shield the IBM Web Content Manager
servers from direct access. If you use IBM HTTP Server (or Apache), the WebSphere
Portal and IBM Web Content Manager server can generate an HTTP plug-in to ease
configuration of the HTTP Server.
Load balancing: The HTTP plug-in can be configured to provide load balancing
based on a variety of algorithms. If your IBM Web Content Manager servers are not
72 of 439
similar in processing capabilities, you can set up the plug-in to load balance traffic
according to server capacity.
While this architecture improves upon the basic architecture, there are still several issues
that make it sub-optimal for larger environments.
Design advantages
The intermediate architecture has the following design advantages:
Design disadvantages
The intermediate architecture has the following design disadvantages:
Administration: As more IBM Web Content Manager servers are added to the
infrastructure, the maintenance effort to make changes increases in a linear fashion.
Changes must be manually made to each server because the servers are not
clustered in this design.
Failover: While we have redundancy with this design, there is no automated failover
in the event that a specific component fails. If any one part of the system fails, there
is a likelihood that the site is down to subset of site users.
The intermediate architecture still contains one major deficiency. That is, there is no
failover within the environment. To resolve this issue, we look at building a slightly more
complex infrastructure that includes clustering some of the servers.
73 of 439
When you cluster WebSphere Portal servers, they share an identical configuration. This
configuration is managed from a WebSphere Deployment Manager server (not pictured).
The Deployment Manager is responsible for synchronizing the WebSphere Portal
configuration across all servers in the cluster. Thus, when you deploy a IBM Web Content
Manager portlet or create a new portal page, the Deployment Manager synchronizes all
servers in the cluster, which is a reduction in administrative time and effort. In addition,
when you cluster the WebSphere Portal servers, the Deployment Manager can create a
plug-in for IBM HTTP Server and Apache that allows the HTTP servers to gracefully
failover in the event that one of the portal servers stops functioning. While setup and
maintenance of a cluster take time and effort, this effort is typically small compared to the
ongoing benefits provided to the infrastructure.
Design advantages
The WebSphere Portal and IBM Web Content Manager integrated architecture has the
following design advantages:
Load balancing and redundancy: If you are using IBM HTTP Server or Apache, this
environment has basic load balancing capabilities. Because there are duplicates of
all components, a basic level of redundancy exists in this design.
Failover: With the addition of a cluster, the HTTP Server can provide failover for the
WebSphere Portal servers. If any one part of the system fails, the entire site does not
appear to be down.
Maintenance: With multiple servers available to deliver content, site maintenance can
be performed without the entire site becoming unavailable.
Web Content Viewer JSR 286 portlet: If IBM Web Content Manager is running on all
portal servers, you can use the Web Content Viewer JSR 286 portlet. By not having
to communicate with an external IBM Web Content Manager server (as required with
the WSRP for remote rendering), you eliminate a potential performance bottleneck.
Administration: As more IBM Lotus Web Content Manager servers are added to the
infrastructure, the maintenance effort to maintain the infrastructure does not increase
significantly. Changes to server configurations are performed from the central
Deployment Manager console.
74 of 439
Design disadvantages
The WebSphere Portal and IBM Web Content Manager integrated architecture has the
following design disadvantages:
Complexity: This design is fairly complex. The learning curve for installing and
administering a clustered environment servers should not be underestimated.
Cost: Enabling IBM Web Content Manager on every WebSphere Portal server
quickly increases your infrastructure cost.
As with the other advanced architecture, this configuration clusters the portal servers.
However, in this configuration, we create a separate cluster for the IBM Web Content
Manager servers.
When you cluster the WebSphere Portal or IBM Web Content Manager servers, they
share identical configurations within their respective cluster. This configuration is
managed from a WebSphere Deployment Manager server (not pictured). The
Deployment Manager is responsible for synchronizing the configuration across all servers
in each cluster. This means that, when you deploy an updated IBM Web Content
Manager portlet or create a new portal page, the Deployment Manager synchronizes all
servers in the appropriate cluster, resulting in a reduction in administrative time and
effort. In addition, when you cluster the WebSphere Portal or IBM Web Content Manager
75 of 439
servers, the Deployment Manager can create a plug-in for IBM HTTP Server or Apache
that allows the HTTP Servers to gracefully failover in the event that one of the portal
servers stops functioning. This is how both sets of HTTP Servers can provide failover for
WebSphere Portal and IBM Web Content Manager requests.
Note: It is technically possible to have a single set of HTTP Servers act as the front end
for all IBM Web Content Manager and WebSphere Portal servers. This requires a manual
modification to the plug-in that combines elements from the plug-ins created by each
cluster. Because there are duplicates of all components, a basic level of redundancy
exists in this design.
Design advantages
The WebSphere Portal and IBM Web Content Manager separated architecture has the
following design advantages:
Failover: The addition of a cluster allows the HTTP Server to provide failover for each
cluster. If any one part of the system fails, the entire site does not appear to be down.
Maintenance: With multiple servers available to deliver content, site maintenance can
be performed without the entire site becoming unavailable.
Administration: As more WebSphere Portal or IBM Web Content Manager servers
are added to the infrastructure the maintenance effort to maintain the infrastructure
does not increase significantly. Changes to server configurations are performed from
the central Deployment Manager console.
Design disadvantages
The WebSphere Portal and IBM Web Content Manager separated architecture has the
following design disadvantages:
Complexity: This design is fairly complex. The learning curve for installing and
administering a clustered environment servers should not be underestimated.
Remote Rendering Portlet: If IBM Web Content Manager is running on a separate set
of servers for all portal servers, you must use the Remote Rendering Portlet.
Because this portlet communicates with an external IBM Web Content Manager
server, there is a potential performance bottleneck if the network connection is poor.
Note: There is a cost-benefit analysis with regard to clustering stand-alone IBM Web
Content Manager servers. The Deployment Manager automatically creates the plugin for
the HTTP Server. This plug-in makes for easy setup of failover within the IBM Web
Content Manager tier. If the clustering issues lead you toward not clustering the IBM Web
Content Manager servers, other techniques can provide failover for the IBM Web Content
Manager server tier. For example, several vendors make hardware that can perform this
task. Of course, the hardware has additional costs and configuration issues. No single
answer is work for all scenarios.
76 of 439
2.7. Use case sample site infrastructure: River Bend Tea
and Coffee Company
This section combines all the concepts that are described in 2.5 Environment type and
2.6 Sample physical architecture of a website and build an example infrastructure for the
River Bend Coffee and Tea Company (River Bend).
Note: Because River Bend is a fictitious company, all of the assumptions and
requirements are created solely for the purpose of this discussion. In a real world
situation, there are far more issues to take into consideration when designing a web site
infrastructure.
DISCLAIMER: This wiki outlines an example of building a basic website using the sample
site, River Bend. This sample is not intended as a best practice for development,
configuration, architecture, or any other aspect, such as scalability or performance. No
warranty or support is implied for the example site or sample code used.
Authoring: River Bend has a single office location and a small number of content
creators (approximately 10 content creator). All content creation and management is
handled by employees at this location. With this requirement in mind, a single
authoring server is sufficient for the needs of River Bend. Due to the small number of
developers (two of them) at the River Bend's office location, this same server also
serves as the development environment.
Staging: The staging environment is used by River Bend for content reviewing and
performance testing of the overall infrastructure. With this requirement in mind, the
staging environment must mirror all functional elements of the staging environment,
including the cluster and failover implementation.
Production: River Bend wants to build a production infrastructure with redundancy
across each element in an effort to avoid downtime. With this requirement in mind,
River Bend builds a clustered environment. Because the majority of all content on the
site comes from IBM Web Content Manager, River Bend implements IBM Web
Content Manager and IBM WebSphere Portal in an integrated fashion.
77 of 439
The following figure illustrates the sample physical infrastructure for River Bend.
Note: This design forces all employees through the HTTP server as opposed to going
directly to the IBM Web Content Manager server. If you have to perform maintenance on
the IBM Web Content Manager server, you must ensure that people do not attempt to
access the IBM Web Content Manager server during such maintenance. By using the
HTTP server, you have this control. During site maintenance, you can either shut down
the HTTP server (effectively making the site appear to be down) or place a message
page on the HTTP Server. In either event, you will not accidentally have people
accessing the IBM Web Content Manager server at inappropriate times.
Staging environment
The syndicated content from Authoring environment is tested for its functionality, integrity
and also systems integrations testing is performed at this stage.
Production environment
River Bend wants to provide for a reasonable amount of failover and redundancy within
78 of 439
their infrastructure. Furthermore, River Bend wants to implement typical security best
practices to secure their infrastructure.
When the HTTP servers receive a request for IBM Web Content Manager content, they
pass the request through the second firewall to the IBM Web Content Manager servers.
The second firewall is configured to allow traffic to the IBM Web Content Manager
servers only from the HTTP servers. This stops site visitors from directly accessing
servers in the trusted network.
The HTTP servers have a plug-in file provided to them by the WebSphere Portal and IBM
Web Content Manager cluster Deployment Manager. This plug-in automatically
configures the HTTP servers to handle requests for the WebSphere Portal and IBM Web
Content Manager servers. In addition, the plug-in provides basic failover capabilities in
the event that one of the IBM Web Content Manager servers crashes.
Internet
The Internet is where site visitors initiate requests for the River Bend site. Our DMZ must
be properly configured to allow access to the HTTP servers from the Internet and any
other valid source location such as the company intranet.
2.7.2. Syndication
Syndication is used to move our IBM Web Content Manager content between the various
environments in the infrastructure. The syndication flow for our infrastructure is fairly
straightforward.
Authoring to staging
Because we have a single authoring server, we must set up syndication from this server
to each staging server. The staging server is not a place for content modification. We
only syndicate live content to the staging servers.
79 of 439
As content is approved and new technical assets are created, the staging environment
collects syndicated changes from the authoring environment. During normal operation,
the syndication from authoring to staging is enabled.
Staging to production
When content is reviewed in the staging area, we need to syndicate this content from the
staging server to our production servers. To facilitate this, we configure one of the staging
servers to syndicate its content out to all production servers.
Because the staging environment collects syndicated changes from authoring server in
real time, we do not want to set up a similar syndication pattern from staging to
production. If we do, approved content on the authoring server would syndicate to staging
and then to production automatically, which defeats the purpose of having the staging
environment.
To stop this from happening is to set up the syndication from staging to production but
then disable the syndicator. When the web master is ready to confirm a set of changes,
they perform the following process:
1. Disable syndication from authoring to staging. When the web master starts to review
the content and design changes, you do not want additional data showing up in the
middle of the testing process.
2. Review content in staging as needed.
3. Enable syndication from staging to production. By doing this, the reviewed and
approved changes can syndicate to the production servers where they can be
accessed by the site visitors.
4. Disable syndication from staging to production. When the content is pushed out to
the production servers, you want to disable this syndication to ensure that no
additional content syndicates to production accidentally.
5. Enable syndication from authoring to staging. When the production servers are
updated, we want to start aggregating the next set of changes on the staging server.
Important: Syndication is an important process. You should plan out your syndication
strategy carefully prior to implementation.
80 of 439
Part 3. Building a website - River Bend Tea and Coffee
Company
Part 3 covers the following topics:
3.1 Overview of key concepts and terminology for IBM Web Content Manager
components
3.2 Steps to build the River Bend Tea and Coffee Company website
3.3 Managing the publishing process
3.4 Personalizing your site
3.5 Internationalization
3.6 Search - Integrating with portal search
For the purpose of providing a realistic business context to this part, we use the River
Bend Tea and Coffee Company as the basis for the development scenario. River Bend
Coffee and Tea Company (River Bend) is a fictitious company that uses IBM Web
Content Manager (WCM) software.
DISCLAIMER: This wiki outlines an example of building a basic website using a sample
site, River Bend. This sample is not intended as a best practice for development,
configuration, architecture, or any other aspect, such as scalability or performance. No
warranty or support is implied for the example site or sample code used.
The figures below illustrate highlights of the site and provide a brief overview of the
components we build in this section.
81 of 439
The figure shown below illustrates the home page that a user sees when first entering
the site. It also show seasonal products and currently featured (promoted) products.
82 of 439
The figure shown below illustrates the Coffee product area of the site.
83 of 439
The figure shown below illustrates the Community page of the site.
84 of 439
The figure shown below shows the About Us page within the site.
85 of 439
The following figure shows the River Bend Coffee and Tea Company website.
This approach of separating the creation and presentation of content also guarantees
that a website has a consistent look and feel. If the design changes, the content parts are
unaffected. Additionally, the separation supports specialization of roles and skills.
Content owners can focus on content creation and site developers can manage the look
and feel through HTML and other web skills.
For our use case example, the River Bend website shows a Product list of tea types
86 of 439
offered. In this list the content documents are displayed as a list showing the item title as
a link (see the following figure).
The link opens the document so the user can read the product details. When the product
item is open, the title, summary, and body are displayed (see the following figure). This
shows how the same product item can be displayed using different presentation layouts.
The Product Menu shows only the title and a short description of the item. The detail
layout shows the title, rating, summary and body fields as well as the tags. This illustrates
how the separation of content from presentation allows the easy re-purposing and reuse
of content.
87 of 439
3.1.2. Componentization and the page design concept
One of the many strengths of IBM Web Content Manager (WCM) is its
componentization . The elements of a web page are created as distinct units and are
pulled together in a variety of ways. Flexible web pages can be easily created by content
authors and maintained by administrators. Elements can be reused on other pages and
by other elements. Consideration to potential reuse should be given when designing
components.
For our use case example, the River Bend website, the following figure illustrates one of
its web page where some typical component types are highlighted. Notice that the Offers
Menu component shown here is also reused on the home page.
The figure below illustrates the relationship between components and shows how a web
page is a composite of design and content components. A typical web page can be
constructed from the following elements:
Presentation layer
The layout and design that controls how the page should be presented. Aspects
include:
- What device or type of browser is intended for displaying the information
- Font, color and other graphical components to be displayed
Content layer
The content itself and information about the content. Aspects include:
- Content input using a template
- Tools for accessing content, such as authentication (sign in) and search
Information architecture layer
How the content fits into the overall site information structure. Aspects include:
- Navigational aids, such as a navigator, menus, and breadcrumbs.
88 of 439
Componentization of objects and items occurs across the system. Responsibility for
different aspects of authoring, site design and ongoing maintenance can all be devolved
to specific users and roles.
Use a descriptive naming convention for the objects to make it easier for other
developers to identify objects for reuse. The River Bend website uses prefixes such
as NAV for navigators and Menu for menus.
Identify the different types of pages in the site to specify common elements between
the pages.
Remember that users can further customize a web page by adding additional
components to the page.
A site can often be broken down into a set of page styles, such as the home page,
content pages, and menu pages.. You can deploy these pages across the site to
maximize reuse.
89 of 439
Attention: While components can be reused many times, do not nest them too deeply or
else it would become cumbersome to maintain. In addition, remember that nesting
components can impact page rendering and site performance.
Tips:
Preferrably, all objects should be modular so that they do not rely on any other
object to close a table tag or to put script tags around it.
You should be able to change a component slightly without having to change any
other elements that rely on that component. All functionality should remain within
the component that needs it (either coded directly in the component or in the
form of another complete component).
IBM Web Content Manager uses its own terminology for objects. Most individual objects
such as authoring and presentation templates, site areas, content, workflow, folders and
projects are referred to as items , authoring templates, presentation templates, site areas,
workflow and components as a whole are referred as item types. Anything in the
Component Library is a component, for example Images, HTML, File Resources. Each
content item consists of one or more elements. The elements stored are determined by
the authoring template used to create the content item. Elements on an authoring
template can include; date and time, HTML, file reference, Image, number, menus,
navigators and selection elements such as component reference, option selection and
user selection elements.
Identification fields
- Name: Required field to enter the item's name that is used in the authoring
environment.
- Display Name: Appears in the authoring portlet navigation as well as in references
between items and components.
Attention: Content items in the River Bend example website use a Display Title field.
This field is shown on the website while the Name field is not. It is not required to
have identical values for Name and Display Title. However, doing so eases
administrative tasks.
Description: A brief description to describe the purpose of the field This is an optional
field.
Authors: Additional authors for item. This field is not a security feature. If you need
security features, use security options. This field is used to reference items with ID
component tags. Author and Owner fields can be used as a search or filter
parameter.
Owners: Additional owners for item. This field is similar to the Authors field, but for
owners.
90 of 439
Item and component security
Every item and component is access protected. A five-level security model (Live, Read,
Edit, Workflow, and Delete) applies.
WCM items
From a conceptual perspective, a separation between content-centric and architectural
items are made. The content-centric items are used for content creation and
management. The architectural items define the hierarchical structure of the website and
its design.
Content-centric items
Content centric items are created, managed and used by subject matter (SME) authors
and content owners. Content-centric items include the following items:
Authoring template
The authoring template is used by a content creator to create content by entering
text, predefined resources (such as images and files), and components into fields.
Categories and taxonomies
Categories are predefined terms used to manage relationships between items.
Categories are grouped into hierarchical taxonomies. Keywords are somewhat
similar to categories. However, keywords, which are used in an authoring template
field, provide a free form text entry and are not predefined or centrally managed.
Workflow
Because every content item has to pass through a workflow in order to be published,
workflows are essential elements. Workflows control the access to, verification and
approval of items. By default, workflow is enabled for content items but can be
configured for most items and components by inserting the appropriate values in the
aptrixjpe.properties file. Workflows consist of multiple workflow stages and actions.
Content
Content items are any kind of information intended to be published to a website and
are created using authoring templates.
Library
Libraries act as a container for components and contents. They can be used to
separate or group items, for example to manage different sites or organize content
types and design elements across large sites.
Site framework (site areas)
Site areas are used to define the hierarchical site framework. Content items are
saved within the site framework to give content structure and context. The site
framework normally defines the primary site navigation.
Design components
A number of design components are available, such as navigator, menu, and HTML
91 of 439
components, Image and file resources. These design components are stored in the
components section in the authoring portlet.
Presentation template
Presentation templates aggregate all the parts required to render a web page. This
includes the CSS which describes the presentation together with static and dynamic
components, for example, reference to a static HTML component for the footer for all
pagers and a dynamic reference to the body component of the content to be
populated based on the current location
Design components are referenced within the presentation template to form the look of a
web page such as the header or style sheets. Content item fields are referenced to
display text on the web page.
Authoring template
Authoring templates are used for content creation. They provide the editing and authoring
forms for content authors. Similar to document types in document management solutions,
fields for text and metadata are defined in the authoring template. In addition to the
common fields described in Web Content Manager fields , the following sections are
provided:
Profile
Content form properties
Content
These sections contain fields for immediate content input or references to other
components.
Profile
The Profile section contains settings for Categories and Keywords. Both are ways of
profiling content.
A Category refers to the subject matter of your content item. For example, your content
item may be of the category New Products or Latest News. Taxonomies are used to
group categories. Users select from a predefined list of categories when profiling a
Content item. Categories provide quick selection with no misspellings or near-duplicates
but users can only select from pre-defined categories.
Keywords can also be used to profile content. Unlike categories, which are chosen from
a predefined list, you can enter any keywords you like when creating content items. This
has flexibility but can lead to misspelt keywords and multiple, similar keywords.
Categories and Keywords are used as content metadata for search and Menu definitions.
92 of 439
See Menu component for more details about how to use Categories and Keywords in
menus.
The following figure shows the categories and keywords fields in the Profile section of the
authoring template.
Used to specify the characteristics of the item generated from the authoring template,
including the type of item to be created, where it can be saved and version control
strategies.
93 of 439
Content
The Default Content section shows the different elements on the authoring template. All
fields are added to the authoring template using the element manager, as shown in the
following figure.
The fields are defined by a field name and the field type. The field type is selected from a
list that is either a component field, such as a Text, a Rich Text field, or a reference of a
component that defined in the component library allowing the reuse of existing
components. Refer to the following figure for a complete list of available fields in element
manager.
94 of 439
Category management
The category management section of the item navigator defines taxonomies and
categories. These items are an important, and often underestimated, elements for
content that is metadata.
Note: Categories are metadata for content that is used in menus and search.
Taxonomy
A taxonomy defines the collection of terms that form the categories. For distinct term-
sets, you can create independent taxonomies, although it might not be necessary
because the number and depth of categories is nearly unlimited. Authors select
categories and assign them to a content item by clicking a tree of categories. A
reasonable depth of the taxonomy tree helps the user in selecting categories. A
maximum of five to six levels has proven to be a good depth with which to work. You can
adjust taxonomies where necessary.
Category
A category is an informational component that is used to describe what a piece of
content is about. Categories used in content transcend hierarchies of architectural
elements as site or site areas. Changing the navigational hierarchy is difficult, while
categories should reflect business needs and are adjusted as the organization's needs
change.
Do not confuse categories with a site area, which is created to provide a path to that
piece of content. Menu design components can use a category, via search criteria, to
create menus or to create lists of related documents. For example, if the coffee business
faces a boost for Ginger flavored Coffee, River Bend can add the category ginger to the
taxonomy. The overall hierarchy based on site and site areas stays unchanged.
Immediately after adding the ginger category to content documents, searches for ginger
on the River Bend website show results without any development work. In addition, the
ginger category can be removed easily without any influence on the overall navigational
hierarchy of the site at any time.
95 of 439
Another example is that the River Bend website uses categories in a personalization
component to identify content based on the season. The home page displays an image of
the seasonal drink, whether a summer or a winter drink. The drink content itself is
categorized either Summer Drink or Winter Drink categories that are under the Season
Drink Category. In our use case example "Coffee freddochino" was added in the Summer
Drink category. Changing the content belonging to that category will change the image on
the home page that is displaying the summer drink.
Content
So far, we have discussed all the elements that you need to create content: authoring
template, taxonomy and category, and workflow. Creating content for users who rarely
use the authoring interface might be confusing. A common practice to apply security to all
items to make sure that the authoring portlet shows only items that users need to see.
Optionally, the customizable template portlet is a good choice because it allows you to
hide fields that users do not need. The customizable template portlet is very easy to use.
Fields are preselected, such as the authoring template and site area.
If authors tend to be creative with their content, you might want to give them the
opportunity to express the creativity in rich text and image fields. On the other hand,
limiting creativity by providing simple text fields might be the appropriate choice because
all design elements are used in the presentation layer to apply corporate design,
including fonts and font sizes, colors, and alignment. The same principle applies to using
HTML text or PHP.
Many users prefer to use pictures in their web content. Predefined image resources
provide images that fit the design in size and color, which can be used through
component resource fields. However, this use can limit the creativity of content authors to
a reasonable level. You should define the appropriate set of options that are available to
content creators and apply those options to the authoring templates to fit corporate needs
and objectives for using IBM Web Content Manager.
Site framework
A site framework reflects part of the information architecture of a website. A lack of
investment in the information architecture can result in a website that has a poorly
designed site framework. Unfortunately, this situation is often identified after IBM Web
Content Manager projects have already progressed into late stages. Avoid this situation
by invest time and resources to define information architecture early.
A site framework provides a hierarchical structure for the website and is the base for the
final website's navigation. The content is linked to the site framework and is identified for
96 of 439
display on the website using the content's site framework information as search criteria
for navigators and menus.
The navigator and menu design components use the site framework to create a site map
(also a navigator), navigation, breadcrumbs, and menus. Because these elements are
created dynamically at run time, there are no broken links when a site area is changed or
moved.
The following figure shows the site framework of River Bend and the resulting site map
navigator.
Site area
A site area is a unit within a site framework where content items are grouped together.
You have to define the default content for a site area. The default content displays when
the page is opened. Without default content assigned, the page cannot be viewed in the
browser.
Default content, of course, can contain component references that allow individual
designs for different site areas and content pages. In the River Bend website, some
content items reference a menu component. The menu displays content that is found
using the menu's search criteria. (See Menu component for details about menus.)
Before the content can be viewed on a website, each authoring template is paired with a
presentation template. Doing so on the site level underlying site areas can inherit the
pairing. Pairings on site area level can define new pairs for the specific site area and
below.
Site areas allow the use of the element manager to add component fields or component
reference fields to the site area document. (Identical functionality is available in content
97 of 439
items.) Using this feature in site areas allows you to define design or content items to be
displayed on selected site areas.
Creating and maintaining site areas is performed by site administrators rather than by
users or content creators. Site administrators are expected to be more literate and
advanced in using components. Therefore, it might be easier for them to manipulate the
design of site areas than placing the task into content creators' hands who might need
extra guidance to understand the component library philosophy.
Referencing a menu in a site area rather than in a content item has the advantage that
the menu item is predefined in the site, and a content author does not have to know how
to perform the task or which component to reference.
Site areas in a site framework can be classified into parents, siblings, and children, where
the site is the parent for preceding site areas but has no parent or sibling itself because it
is the only root for a site framework. Site areas always have a parent and often siblings
and children.
A site area has the option of making it searchable. This option specifies if the site area
should be searchable through portal search or not.
Having discussed all content-centric and main architectural elements, we now discuss
the design and development components. Design and development components define
the web site's appearance and ensure corporate identity.
Presentation templates
In the presentation template, all the aspects we have discussed and all the components
come together to form the web pages that are viewed by site visitors. The presentation
template combines all layout and design elements needed for the web site appearance.
98 of 439
The general presentation template of River Bend includes a style sheet and several
images to create the overall layout which is consistent for all pages. IBM Web Content
Manager references components in the component library by name, as shown in the
following example:
[Component name="riverbend/html-logo"/]
[Component name="riverbend/search_form"/]
[Component name="riverbend/nav-left"/]
As shown the image component, the search form HTML component as well as the
navigator are referenced the same way. Due to the separation of content from
presentation, the content does not play a role in the layout of a page.
The content is referenced in the presentation template. Content items fields are
referenced from the content library where they are stored and are referenced by the fields
that make up the content. The general presentation template references the Display Title,
Body, Content Image, Menu Component Reference fields using the field names as
identifiers or keys.
All fields are referenced in a current context. The current content is the content item to
which the user has navigate using the navigator on the left side of the page. The type
content states that a content item is referenced, as shown in the following example:
99 of 439
Note: If a referenced component does not have a value to display, nothing is shown on
the web site. For example, the Link field is empty and therefore it does not appear on the
page. Same with the components.
Note: When a new presentation template is created, remember to pair it with the
appropriate authoring template in the site framework.
While creating the presentation template, a user may want to add an image that is stored
as an image components or in the content. There is an Insert Image button that can be
used to add the image instantly in the HTML.
A link can be added using the Insert Link button. You can create links to:
Component library
The component library is the home of all components. Each of them can be referenced
with the component library tag throughout the other items and also in the components
themselves.
Navigator component
A navigator provides a mechanism that allows users to move through the site. A
navigator uses the site framework to automatically create links to different parts of the
site (site areas) or pages (content) in the site. Because it is based on the site framework,
the navigator displays the hierarchy of the information architecture. Thus, when a site
framework or a site area changes, the navigator is updated dynamically, eliminating the
need for re-coding and preventing the possibility of broken URL links.
A menu is ultimately a search mechanism that groups together related documents based
on specific criteria such as categories, keywords, authoring templates, site areas, and so
forth.
To the visitors of the website, menus and navigators provide similar functionality, allowing
the visitors (users) to navigate around the site or to locate specific content. A menu
differs from a navigator in the way it is constructed and in the way it displays the resulting
links. A menu displays content, while a navigator displays site areas for navigation.
Think of a menu as a list of documents grouped by a number of different criteria such as
categories, site areas, and keywords.
When an item is created, changed, or deleted, menus are dynamically updated, and the
list of links displays the recent changes. This eliminates the need for re-coding and
prevents broken links.
100 of 439
Important: Menus are updated automatically to reflect changes in the content library.
Consistency is maintained by the system.
Menus display links as images, icons with text, links with a summary, or other
combinations. See the following figure showing menu construction from various selection
criteria.
Menu options
The following options define a menu.
101 of 439
- Select current content which searches for content that is in the same site areas as
the one being currently rendered.
Enter a query string. The selection would be based on the parameters sent.
Choose to merge selected authoring templates with included authoring templates.
This option merges the content selected by the menu based on the settings made in
this section with those content matching the selected authoring template.
Choose to replace selected authoring templates with included authoring template.
This option overrides the contents found by the menu based on the settings made in
this section over the ones from the selected authoring template.
102 of 439
Menu element query Keywords
Somewhat similar to matching against categories, the Keywords options selects
content profiled with keywords. Matching content using keywords can be more
difficult as keyword entry is free-form, no guidance on keyword spelling is given, and
users do not select from a list of existing keywords.
Further Options provides additional control for the current content and and user:
- The option for selecting current content, searches for contents profiled with the
same keywords used to profile the current rendered content.
- The option for selecting current user, searches for content profiled with the same
keywords as those selected by the current user
An option to exclude the current content from the results returned when applicable is
also available.
The following fields define the design for the menu through
text, tags, and components
Header Design can specify a header text or component to appear before the menu
list.
The appearance for the Menu elements are defined in the Component Design for
each matching Content field.
The footer defines the design below the menu and separator between the menu
element.
The layout if no results are returned defines the layout if there were no matching
content items. No header nor footer will be displayed in that case.
103 of 439
3.1.7. Key WCM definitions - Other components
This section describes other key components within IBM Web Content Manager (WCM)
such as text component, rich text component, file resource component, HTML
component, image component, and JSP component. All examples are based on the
River Bend Tea and Coffee Company (River Bend) website,
Text component
Text components can be used to store text or HTML as reusable text modules. For the
River Bend website, we create text components to describe standardized processes for
coffee and tea production, such as roasting or picking. Note, tea picking is different from
coffee picking. After you define the text components, you can use them as standard text
blocks in the coffee and tea product description pages.
Another example of a file resource component is graphics that are used to add polish to
the River Bend website. For example, the navigators do not use a symbol (such as
arrows) to indicate activated sections. You can store a graphic as a file resource to serve
as indicator for an activated selection.
HTML component
HTML components are very flexible. An HTML component contains HTML code and
often references items, content fields, and components.
Image component
Images that are used throughout the website can be stored directly into image
component fields in the authoring templates. In this case, the author has the option to
define the size of the image, which might or might not fit the overall design. Defining
104 of 439
images as image resources provides identical images for re-usage.
The River Bend website uses multiple image components as consistent design elements
in the presentation templates.
The images are re-used in the different components and presentation templates.
JSP component
The JSP components store the path to a JSP and error message text in case the JSP is
not available. An extended discussion on JSP in combination with the API is found in 4.3
Programming.
Taxonomy component
Taxonomy components are often used together with personalization to allow users to
select categories of interest from a list. Alternatively, you can use the taxonomy
component to display categories for navigation instead of site areas. Be aware that this
option works only for authenticated users.
If your site requires the taxonomy components option for anonymous users, the
implementation is more complex. In this case, you need to create a JSP for an imaginary
user for which the component is displayed.
The taxonomy component displays a list of categories, starting with the selected start
area (in this case, a category), and displaying the depth according to the Depth field. You
can define further selection criteria by using a Profile Search Rule.
The remaining fields are used to format the displayed categories with a header and
footer. The Unselected Components and Selected Component fields contain special
layout for selecting categories, which could be check boxes.
If an anonymous user is using the site, then it displays the Anonymous User Design, or
else the User Component Design, where Anonymous User Design and User
Component Design are the fields that are available in the component form. These fields
contain designs that are based on HTML code or component references.
A good example for a user name component is a welcome message on a website's home
page for an authenticated user. The anonymous user does not see a welcome message.
105 of 439
Perform inline editing of the current content item through a pop-up window or by
navigating to a separate page.
Delete the content item displayed in a web page.
Approve or reject the current content being previewed. These are only visible to
approvers who open a draft content item from a URL sent by an email workflow
action used in a workflow stage.
The River Bend website uses the authoring tool component for the Edit and New
functionality. See the following figure that shows the authoring tool in the tea area.
For more details on authoring tool, refer to 4.1 Personalize the authoring tools.
Link component
A link component stores a reusable link to an IBM Web Content Manager item or to an
external website that you can use in multiple places across the site.
106 of 439
Shuttle control related to current page. For example, next page, previous page, go
last, and go first.
Paging control, showing an index for all the available pages or a continuation link for
the pages.
Jump to page, displaying a text box, where the user can enter the page number if
known beforehand.
Refer to the following figure for the available options for the page navigation component
and the result in the figure after that.
The following html could be added to the footer to display the current page number and
the total number of the pages.
1:
2: <p><strong>Ex: Page 2 of 10 </strong></p>
3: <pre>
4: Page <PageInfo value="currentPage"/> of
<PageInfo value="unknownPages" knowntext=""
unknowntext=""/> <PageInfo
value="totalPages"/>
5: </pre>
Refer to 3.2.7.6 Creating the page navigation component for a complete example of the
page navigation.
107 of 439
3.2. Steps to build the River Bend Tea and Coffee
Company website
In this section, we provide detailed steps of how to build the the portal and IBM Web
Content Manager (WCM) based website for the River Bend Tea and Coffee Company
(River Bend).
Refer to the sections listed below for defining the site information architecture ,
navigational elements and site components:
Access to a library and the resources within the library require security access
permissions to be set. These are defined at the library level during the creation step, and
can be modified afterwards. Creating a library and setting access permissions require an
Administrator level role.
In this section we describe how to create and setting up a library used for the River Bend
site.
1. Log in to the WebSphere Portal, open the Administration page, and navigate to
Portal Content -> Web Content Libraries as shown in the following figure.
108 of 439
2. Click the Create new Library button, and type Riverbend in the Web content library
name field.
3. Type a summary for the library into the Description field, for example: The River Bend
Tea and Coffee company sample site.
4. Select English as the default language from the Language drop-down box.
5. To safeguard our library from being accidentally deleted, select the Prohibit library
from being deleted box.
6. Ensure the checkbox for the library being Enabled is selected as by default.
7. Click the OK button.
The following figure shows the completed steps prior to clicking the OK button.
The newly created library should now be visible in the list of Web Content Libraries as
shown in the figure below.
109 of 439
During the creation of the library, you would have seen an option to Include default items
in the new library, as shown in the second figure. Select this checkbox if you want to
create default content items and associated components in the library. For our case, we
don't want to select that option.
It is important to set the resource permissions appropriately to ensure only the right
access and visibility is given. For example a typical content author/editor should not be
concerned about Presentation Templates.
For a detailed list of the different roles and their respective access rights, refer to IBM
Web Content Manager 7 wiki product documentation.
In order for a user to see the library in the Library Explorer, the User role must be applied
to the appropriate users/groups. The following outlines the steps to apply access for the
wcmadmins, riverbend_ContentCreators, riverbend_ContentApprovers, and
riverbend_Designers groups created previously.
The following table shows the permission access for the library.
Propagation Inheritance
Administrator Yes Yes wcmadmins
Manager Yes Yes
Editor Yes Yes
Contributor Yes Yes riverbend_ContentCreators,
riverbend_ContentApprovers,
110 of 439
riverbend_Designers
User No Yes All_Authenticated_Portal_Users
With the library permissions set, we can now set the permissions to the resources (item
types). Permissions at this level restrict visibility of item types such as authoring
templates and components in the Library Explorer interface.
Propagation Inheritance
Administrator Yes Yes
Manager Yes Yes
Editor Yes Yes
Contributor Yes Yes
User Yes Yes
For content access rights setup:
Roles Allow Allow User / Group
Propagation Inheritance
Administrator Yes Yes
Manager Yes Yes
Editor Yes Yes riverbend_Designers,
riverbend_ContentCreators
Contributor Yes Yes
User Yes Yes
111 of 439
For presentation templates access rights setup:
Propagation Inheritance
Administrator Yes Yes
Manager Yes Yes
Editor Yes Yes riverbend_Designers
Contributor Yes Yes
User Yes Yes
Propagation Inheritance
Administrator Yes Yes
Manager Yes Yes
Editor Yes Yes riverbend_Designers
Contributor Yes Yes
User Yes Yes
Propagation Inheritance
Administrator Yes Yes
Manager Yes Yes
Editor Yes Yes riverbend_Designers
Contributor Yes Yes
User Yes Yes
Propagation Inheritance
Administrator Yes Yes
Manager Yes Yes
Editor Yes Yes riverbend_Designers
112 of 439
Contributor Yes Yes
User Yes Yes
To select the library to be used in Web Content Manager, perform these steps:
4. Using the button move the Riverbend library from the Available Libraries to
the Selected Libraries, click OK.
5. Select the checkbox Show new libraries in the library explorer, This option
removes the need to manually add the libraries to the authoring interface in future.
6. Expand the collapsed User Interface Options section.
7. Set the value of the Maximum rows per table to 25 or higher. This allows you to see
more items on the screen, for example a longer list of content within a site area.
8. Click the OK button to save these preferences,
113 of 439
The current library used now is RiverBend as shown in the following figure.
1. Log in to the WebSphere Portal, open the Administration page, and navigate to
Access > Users and Groups as shown in the following figure.
2. Click the New User button, and type gcloud in the User ID field.
3. Type a suitable password and reconfirm the password in the next field.
4. Type a Glenn in the First Name field.
5. Type a Cloud the Last Name field.
6. Click the OK button to save and create the user.
114 of 439
New user creation
115 of 439
1.
To create a group, perform these steps from the same administrative section as above
(Access > Users and Groups):
1. Click the New Group button, and type riverbend_ContentCreators in the Group ID
field.
2. Click the OK button to save and create the user.
riverbend_ContentCreators
riverbend_ContentCreatorsMarketing
riverbend_ContentCreatorsStoreMgr
riverbend_ContentCreatorsOps
riverbend_ContentApprovers
riverbend_ContentApproversHQ
riverbend_ContentApproversHR
riverbend_ContentApproversLegal
riverbend_Designers
wcmadmins
From the user and groups pages using the Search button, list all groups. You should now
see all the groups created as shown in the figure below.
116 of 439
1. Click the name of the group riverbend_ContentCreators, this will place you inside the
group
2. Click the Add Member button
3. Click the Search button, note the default is to search for Groups
4. Tick the check box beside the groups riverbend ContentCreatorsMarketing, riverbend
ContentCreatorsOps, riverbend ContentCreatorsStoreMgr
5. Click the OK button to save your selection.
For all the groups currently defined we now need to ensure that the Riverbend website
team are assigned correctly. Assigning users to groups is a similar process to that of
above with nested groups:
117 of 439
4. Tick the box beside the user Glenn Cloud.
5. Click the OK button.
Using the table defined below by the Riverbend administrators add the following users to
groups.
Misha Thompkin,
Vivian Hanley, Jim
Lendler, Samantha
Daryn
Approver riverbend_ContentApprovers Paul Clemmons
118 of 439
Larry Moriarty, Paula
Starkey, Paul
Clemmons
Designer riverbend_Designer Glen Cloud
Natalie Olmos
Site wcmadmins Glenn Cloud
Administrator
In the following steps we describe the process for building the site framework.
1. Click on the New button in the Library Explorer, and select Site Area shown in the
following figure.
119 of 439
2. Type in Riverbend for the Name and Display Title fields.
3. Select the Description field and type; Site root for the River Bend Tea and Coffee
Company.
4. Click the Save and Close button. You should now see in the Library Explorer the
newly created site area, shown in the following figure.
After creating the top level Riverbend site area, create the subsequent site areas beneath
using the following steps:
120 of 439
1. Click on the Riverbend site area, you will now see in the breadcrumb menu that you
are inside the Riverbend site area.
2. Click the New button and select Site Area as described previously.
3. Note that the location of your next site area has now defaulted to
RiverBend/Riverbend (Library/Site Area).
4. Type in Home for the Name and Display Title fields.
5. Click the Save and Close button.
6. Repeat steps 1 to 5 to create another site areas with Home, where its Name is
Products, and Display Name is Products also.
At this point you have started to build out the nested site areas of Riverbend as shown in
the figure below. If you expand the site framework view, you see the Home site area
within the navigational hierarchy, as also shown in the figure below.
At this point, you can repeat this process to create the site areas that are shown in Figure
5. Repeat step 1 through 5 again to create the rest of the site areas for this example.
The above figure shows the Library Explorer configured to display the Library Explorer in
a hierarchical view, this has been configured just to emphasise the structure you are
creating for the Riverbend Site Areas. This view is not the default, however can be
enabled by clicking on the button from the Display: menu. Selecting the button
will restore the default at any time.
Note: Selecting either Start or End for the link order determines the sequential
placement of a site area within the list of multiple site areas. If the order of the site areas
listed does not match the exact example that we provide, do not worry. Refer to section
Rearranging the site area order for details about how to re-order site areas.
Tip: Use Save As button to create copies of a site area that is already open in edit
121 of 439
mode.
Hint: The Names you see in Figure 5 are the display names for the Site Area items.
1. In the Library Explorer, expand the site areas until you are at the About Us site area.
2. Tick the selection box to the left of the Careers site area, and from the More Actions
menu, click Move.
122 of 439
3. Expand the Riverbend > Home>About Us site areas.
4. Select Company site area.
5. Choose After from the Placement option at the bottom of the screen shown in the
following figure.
123 of 439
The Careers site area is now displayed after History site area as shown in the following
figure.
Note: Within this section we describe specific steps for rearranging the order site area
items within the overall site framework. Keep in mind that you can use the Move button to
move a specific site areas to any library, or site area within the framework.
This section describes steps to create page templates for the River Bend site.
Page templates are visible from the Portal Administration interface, and listed under
Portal User Interface > Page Templates.
To create the 2 page templates required for River Bend follow the steps outlined below:
124 of 439
The following figure shows the Portlet page template.
Note: Page templates need to have a unique name that is prefixed wps.content.template.
to ensure the Page Template dropdown box is populated correctly when using the New
Page from.. option.
Follow the steps as above, this time using the unique name of riverbend_4layout.
River Bend is using IBM WebSphere Portal and Web Content Manager v7.0.0.1 CFx,
This version allows for pages to be created from pages template via the Administration
Interface, and not the page builder 2 theme.
125 of 439
Adding Web Content Viewer Portlets
When a page template is used to create a new page, the layout, configuration and
importantly the portlets placed on that template are inherited.
The following steps add the Web Content Viewer Portets to the page:
1. Click the Edit Page Layout button for the Riverbend 3 Portlet Layout page
template.
2. From the Edit Layout section of the page, click the Add Portlets
button.
3. Select the Search by: dropdown to Contains in Title, and type in Web Content
Viewer.
4. Tick the checkbox beside the portlet, and click the OK button.
5. Repeat the steps above to add 3 more portlets to the page.
6. Click the Done button to save and close the template.
7. Complete the steps above for the Riverbend 4 Portlet template page. This time
adding one more portlet to the page.
This section describes the steps required to create the portal page hierarchy for the River
126 of 439
Bend site as shown below.
The River Bend page hierarchy is comprised of a main Home page level, this is the
primary entry point to the website. The Products, About Us and Community levels are
portal labels, as such do not contain content. Beneath the labels are pages that contain
specific site area information, for example Coffee, Tea, Locations, and News content.
1. Within the Administration Interface; from the Portal User Interface > Manage
Pages section select the Context Root link.
2. Click the New Page from button.
3. Type in the Title, River Bend Home.
4. Type in riverbend_home for the Friendly URL name.
5. Select the Riverbend 4 Portlet Page Layout from the Page Template dropdown box.
6. From the Web Content Mappings option click the Select link to define the WCM
library / content mapping for the page. Choose the Riverbend library, Riverbend site
area.
7. Click the OK button
You should now see the page you create in the Manage Pages section as shown below.
If you have a number of other pages already defined you may need to navigate to Page 2
using the Next Page button.
127 of 439
Creating labels
Follow these steps to create labels:
1. Select the Riverbend Home title link, this will place you within that page in the portal
page hierarchy.
2. Click the New Label button.
3. Type in Products for the label Title.
4. Type in riverbend_products for the Unique name:.
5. type in products for the Friendly URL name:.
6. Click the OK button.
128 of 439
The following figure shows the page label.
Following steps 2 to 6, create the Labels for the About Us, and Community site area
sections.
Using steps 1 to 7 from the section Creating Site Pages, create the hierarchy of pages
below each of your labels as follows:
Products [label]
- Coffee
- Tea
- Soft Drinks
- Food
About Us [label]
- History
- Locations
- Products
- Careers
Community [label]
- News
- Events
129 of 439
- Blog
- FAQ
1. Within the Administration Interface; from the Portal User Interface > Manage
Pages section select the Context Root link.
2. Navigate from the context root to the Riverbend Home > Products > Tea page.
3. Click the New Page from button.
4. Type in the Title, Tea-Detail.
5. Type in the Unique Name, Tea-Detail.
Note: The unique name is a important variable to set, this name is used when
configuring the Content Viewer Portlet to select content to be broadcast to.
6. Type in the Friendly Name, Tea-Detail.
7. From the Web Content Mappings option click the Select link to define the WCM
library / content mapping for the page. Choose the Riverbend library, and select the
Tea site area.
130 of 439
Content mapping for the detail page
You should now see the page you create in the Manage Pages section, at this stage
we want to place a single Web Content Viewer portlet on the detail page to display
content. As we are within the portal administration interface we can use the Edit Page
Layout button to achieve this. An alternative to this is to use the page Actions
available when using the PageBuilder2 or Rivervend theme (see image below).
As the Riverbend uses several detail pages, use the steps outlined above to complete
detail pages for the following:
Products
- Coffee
- Tea
131 of 439
- Soft Drinks
- Food
Community
- News
- Events
- Blog
- FAQ
Note: The process of building a taxonomy and subsequent nested categories performed
in this section is a key step for creating a informal structure for content metadata. You
should consider this a behind-the-scenes function to provide a method for content
authors to easily organize and tag site content.
1. Log in to WebSphere Portal, open the Applications page, and navigate to Web
Content Management, you should now see your library listed in the Library Explorer
as shown below.
132 of 439
The figure below shows the created taxonomy for River Bend.
While the River Bend sample website only uses a single taxonomy, IBM Web Content
Manager (WCM) allows you to create as many as required to support your needs.
Note: The WCM Library Explorer interface is contextual, this means you are provided
with the most appropriate options first, or selections are defaulted for you. If you have
selected the taxonomy Item within Library Explorer, all categories create subsequently
will default their selected location to this. This is useful in the next steps when creating
numerous categories at once.
133 of 439
1. Click the Riverbend taxonomy you created in the previous steps.
2. Click the New button and select Category. Category should be listed at the top of the
drop-down list as it's contextual to where you are currently located.
3. Type in Career for the Name and Display Title fields.
4. Click the button Save and Close.
5. Repeat steps 2 to 5 to create the following list of categories, noting that some
categories are nested and have sub-categories.
This section provides the steps to create workflow actions, stages, Express workflow and
Approval workflow for the River Bend site.
For additional details on workflow, refer to 3.3.2 Working with workflow - Creating basic
and custom workflows .
Approval - This is the default working mode. Items may have four states (draft,
approval, published and expired
Express: Covers exception items, used primarily to directly publish from draft to
published state
134 of 439
None: No approval or review is required
This diagram shows a graphical representation of the workflows in use at River Bend.
Note: For specific steps on how to create these, refer to the document .
135 of 439
Additional actions are required. Use the steps 2 to 4 above, create the actions outlined
below: 3.3.2 Working with workflow - Creating basic and custom workflows.
For the "Move content on expiry date" action, select Expiry Date from the Date Type list
and choose an appropriate date to see this action, for example tomorrow's date.
For the "Email for rejected Content", select E-mail authors. E-mail Stage Approvers is
selected by default. Add an apology message in Additional e-mail text.
136 of 439
1. Click the New button and select Workflow
2. Type in the Name: field, Express
3. Select Workflow Stages in the Properties section.
4. Click the Add button
5. Select Draft, Published and Expired from the list of workflow stages.
6. Using the arrows to the right of the listed stages, move the stages into the order listed
above in step 5.
7. Click OK button.
The website captures different types of content for different sections areas (e.g. Products,
News,and Events) however not all areas have a 1:1 mapping, generic authoring
templates are used where information can be captured in generically names fields. For
example, Body, Image, Link, Component Reference.
This section provides the steps to create the authoring templates for the River Bend site.
137 of 439
River Bend authoring templates
The River Bend website contains the following authoring templates:
Article
Essential Link
Event
General
Landing Page
Locations
News
Products
Recipe
Vacancy
1. Navigate to the Library Explorer, Applications > Content > Web Content
Management.
2. Select the Riverbend library in the Library Explorer
3. Click the New button, and select Authoring Template (see figure below).
138 of 439
13. The following figure shows the event element types.
14. Click the OK button to save your changes and return to the authoring template.
15. From the Site area selection options:, choose Selected site areas.
16. Using the Add button locate and select the
/Riverbend/Riverbend/Home/Community/Events site area for all content created with this
authoring template to be stored within.
17. From the Form properties section:, choose Collapsible sections for the Content form
layout: option.
18. Select the Default Content Properties tab
19. Open the Workflow section, tick the checkbox to Disable workflow, and Hide
Section.
20. Click the Save and Close button.
Using the steps outlined above for the event authoring template, use the criteria in the
next sections to create the remaining templates.
Article
Element type Name Display title
Rich Text Body Body
Image Image Image
File Resource File File
Link Related Link 1 Related Link 1
Link Related Link 2 Related Link 2
Link Related Link 3 Related Link 3
139 of 439
Essential Link
Element type Name Display title
Link Link Link
General
Element type Name Display title
Rich Text rtf_Body Body
Image img_Image Image
Link link_Link Link
Component Reference cmpt_Navigator Navigator
Component Reference cmpt_Menu Menu
Landing Page
Element type Name Display title
Rich Text Body Body
Component Reference Post Body Component Post Body Component
Component Reference Auxiliary Component Auxiliary Component
Locations
Element type Name Display title
Text txt_Summary Summary
Rich Text rtf_Body Body
Image img_Image Image
Short Text shtxt_TheStoreTeam TheStoreTeam
Option Selection sel_Country Country
Item Properties:
Selected Site Areas = /Riverbend/Riverbend/Home/About Us/Locations
News
Element type Name Display title
Rich Text Details Details
Image ImageLg Large Image
Image ImageTn Small Image
Component Reference Related Related Collateral
Item Properties:
Selected Site Areas = /Riverbend/Riverbend/Home/Community/News
140 of 439
Default Content Properties:
Content form layout = Collapsible Sections
Workflow = Disabled, Hidden
Products
Element type Name Display title
Rich Text Details Details
Image ImageLg Large Image
Image ImageTn Small Image
Component Reference Complimentary Complimentary Items
Component Reference Related Related Products
Item Properties:
Selected Site Areas = /Riverbend/Riverbend/Home/Products/Coffee,
/Riverbend/Riverbend/Home/Products/Tea, and
/Riverbend/Riverbend/Home/Products/Food
Choose saving option for the content author = Allow under multiple site areas
Vacancy
Element type Name Display title
Option Selection Store Store
Option Selection Location Location
Rich Text Details Details
Short Text Contact 1 Contact Name
Short Text Contact 2 Contact Phone
Short Text Contact 3 Contact Email
Item Properties:
Selected Site Areas = /Riverbend/Riverbend/Home/About Us/Careers
141 of 439
5. Click on More Actions > Manage Elements button.
6. Select File Resource from the Element type: dropdown box.
7. Type in the Name: field, Recipe.
8. Type in the Display title: field, PDF Recipe.
9. Click the Add button.
10. Click the OK button to save your changes and return to the authoring template.
You will notice that the within the Item Properties section of the authoring template
the template type is now selectable; choose Resource as the type from the
dropdown box. In addition select Recipe as the File resource Element to use.
142 of 439
11. From the Site area selection options:, choose Selected site areas.
12. Using the Add button locate and select the /Riverbend/Riverbend/Recipes/ site area
for all content created with this authoring template to be stored within.
13. Select the Default Content tab.
14. Click on the field properties icon for the PDF Recipe.
15. Type in the Maximum bytes: size, 153600 (150kb)
16. Type in the Help text: Browse and upload a Recipe in Adobe PDF format.
The following figure shows the properties of the file field resource.
143 of 439
3.2.7. Creating the components
This section provides steps to create various IBM Web Content Manager (WCM)
components used in the River Bend site.
For the River Bend site, we use an image logo specially for River Bend. For your
implementation, you can use a style sheet that reflects your company's corporate design.
Note: You can download the sample images listed below from the Additional Resources
Page.
144 of 439
The following image shows the RiverBend site banner used in the home page of the
River Ben website.
This section provides the steps to create the authoring tool component in the River Bend
site.
For the River Bend site, we create an authoring tool to edit the content and create new
one:
145 of 439
Creating the authoring tool
To create the authoring tool:
146 of 439
6. In the Delete action properties section:
<div><span>
</span><span>
</span></div>
[Component name="riverbend/auth-editcreatedeleteapprove"
compute="always"]
147 of 439
The following image displays the menu component showing the authoring tool in each
item.
In this section, we provide steps on how to build the navigator component for the River
Bend site.
To display the navigator component, add it to the presentation templates of pages below
148 of 439
the home page. To display the navigator, the component reference is added to the three
presentation templates.
To add the site map navigator component, you need to do the following:
Following are the steps for creating the site map component:
<Element name="NAV-siteMap"/>
<div id="leftNav">
</div>
149 of 439
15. Indent each site area level and create a placeholder for the code you will add to
format the site area links.
In the Navigator result design 1 field, enter the following code:
16. Click Save and then Close or click Save and Close.
Repeat steps 1 through 5 to create a new HTML component with the following changes:
<placeholder tag="namelink"/></br>
150 of 439
Attention: Be sure to use single () and double () quotation marks correctly.
Reference the navigator created from the portlet configuration of the Site Map page as
follows:
151 of 439
Following is an image of the site map navigator after being referenced from a portlet in
the Site Map page:
In this section, we provide the steps to create the menu component for the River Bend
site.
152 of 439
Creating menu component using authoring template
For the River Bend website, we create a menu that uses the authoring template as
search criteria. It allows users to find content throughout the website independently of a
site area. The menu that you create in this section appears on the home page displaying
the 4 main site areas using images from the site areas as links.
This content page displays content that has authoring template General assigned, but
may be linked to any site area.
Hints: This is referencing the component stored in the Image field of the content items.
This menu will be displayed when clicking on the "Locations" from the tab About us. The
page will first display the default content of the site area followed by the menu. Refer to
below figure showing a part of the "locations" page.
153 of 439
To create a menu using authoring template and site area as search criteria, follow these
steps:
1. Click New and choose Component Menu. In the name field, enter Menu-Locations.
2. In the Menu Element Query, choose Authoring Templates , and Site Areas.
3. In the Authoring template section, Click on Add Authoring Template.
4. Choose Locations and click OK.
5. In the Site Areas section, click on Add Site Areas.
6. Navigate to Locations by clicking on Home > About Us > Locations.
7. Expand Further Options and select Current content.
8. Add the following html to the header:
<table>
<tr><td> Store Locations: </td></tr>
154 of 439
9. Add the following html to the Design for each menu search result:
1:
2: <tr><td>
3: <b>[Property context="autofill" type="content" field="title"]
</b>
4: </td></tr>
5: <tr><td>
6: [Element context="autofill" type="content" key="txt_Summary"]
7: [Element context="autofill" type="content" key="rtf_Body"]
8: [Element context="autofill" type="content" key="img_Image"]
9: [Element context="autofill" type="content"
key="shtxt_TheStoreTeam"]
10: [Element context="autofill" type="content" key="sel_Country"]
11: </td></tr>
10. Close the table using the following html in the footer:
1: </table>
11. In the Separator, you can either reference an image which represents a line to
separate the result or add a dotted line which could be changed later.
To add an image not already created as an image component, do the following steps:
To see the image that has been added to the library, click on Component > Image. You
will find a new image component added with the file name seperator_490.gif.
Repeat steps 1 through 21 to create the following menu components:
155 of 439
Key = Publish Date
Menu - /Riverbend/Riverbend/Hom Categories =
Featured e/Our Community /Riverbend/Riverbend/
Content Featured (include
descendants)
Display Order =
Decending
Results Primary Sort
Key = Publish Date
Menu - /Riverbend/Riverbend/Hom Display Order =
Latest Events e/Our Community/Events Decending
Results Primary Sort
Key = Publish Date
Menu - Recipe Exclude current
Recipes content from results
Display Order =
Ascending
Results Primary Sort
Key = Publish Date
Menu - Company/Careers with us
Careers
Menu - News News/Promotions
Offers
Menu - News News/Corporate Information
Corporate
Information
Menu - Offers
The Design for the menu would be as follows (no header or footer):
1:
2: <!-- Design Results -->
3: <tr> <td> <a href="<Placeholder tag="href"/>">
4: <Placeholder tag="name"/></a><br>
5: </td>
6: </tr>
156 of 439
Menu - Recipes
The Header, Design and Footer for the menu would be as follows:
1:
2: <!-- Header -->
3: <div class="contentIndex">
4: <div class="body">
5: <h1>Recipes</h1>
6: <ul class="list">
7:
8: <!-- Design Result -->
9: <li class="contentEditContainer item">
10: <div class="itemDetails">
11: <h3 class="itemTitle">
12: [Component name="riverbend/site
images/downloadicon"] <a href="[Element context="autofill"
type="content" key="Recipie"]">[Property context="autofill"
type="content" field="title"]</a>
13: </h3>
14: <div class="itemSummary">
15: [Property context="autofill"
type="content" field="description"]
16: </div>
17: </div>
18: <div class="contentClear"></div>
19: </li>
1:
2: <!-- Footer -->
3: </ul>
4: </div>
5: </div>
1:
2: <!-- Header -->
3: <div class="contentIndex">
4: <div class="body">
5: <ul class="list">
6: <li class="contentEditContainer item first"></li>
157 of 439
1:
2: <!-- Design Result -->
3: <li class="contentEditContainer item">
4: <div class="itemImage">
5: [Element context="autofill" type="content" key="ImageTn"]
6: </div>
7: <div class="itemDetails">
8: <h3 class="itemTitle">
9: <a href="[URLCmpnt context="autofill" type="content"
mode="current"]">[Property context="autofill" type="content"
field="title"]</a>
10: </h3>
11: <span class="itemSubTitle">
12: [Element context="autofill" type="content"
key="Date 1" format="DATE_LONG"] - [Element context="autofill"
type="content" key="Location"]
13: </span>
14: <div class="itemSummary">
15: [Property context="autofill" type="content"
field="description"]
16: </div>
17: <div class="itemLink">
18: [Component name="riverbend/html - read more
link"]
19: </div>
20: </div>
21: <div class="contentClear"></div>
22: </li>
1:
2: <!-- Footer -->
3: </ul>
4: </div>
5: </div>
1:
2: <!-- Header-->
3: <div class="contentIndex">
4: <div class="body">
5: <ul class="list">
6: <li class="contentEditContainer item first"></li>
158 of 439
1:
2: <!-- Design Results-->
3: <li class="contentEditContainer item">
4: <div class="itemImage">
5: [Element context="autofill" type="content" key="ImageTn"]
6: </div>
7: <div class="itemDetails">
8: <h3 class="itemTitle">
9: [Property context="autofill" type="content"
field="title"]
10: </h3>
11: <div class="itemSummary">
12: [Property context="autofill" type="content"
field="description"]
13: </div>
14: <div class="itemLink">
15: [Component name="riverbend/html - read more
link"]
16: </div>
17: </div>
18: <div class="contentClear"></div>
19: </li>
1:
2: <!-- Footer-->
3: </ul>
4: </div>
5: </div>
1:
2: <!-- Header -->
3: <div class="contentIndex">
4: <div class="body">
5: <h1>Products</h1>
6: <ul class="list">
159 of 439
1:
2: <!-- Design Result -->
3: <li class="contentEditContainer item">
4: <div class="itemImage">
5: [Element context="autofill" type="content" key="ImageTn"]
6: </div>
7: <div class="itemDetails">
8: <h3 class="itemTitle">
9: <a href="[URLCmpnt context="autofill" type="content"
mode="current"]">[Property context="autofill" type="content"
field="title"]</a>
10: </h3>
11: <div class="itemSummary">
12: [Property context="autofill" type="content"
field="description"]
13: </div>
14: <div class="itemLink">
15: [Component name="riverbend/html - read more
link"]
16: [Component name="riverbend/auth-
editcreatedeleteapprove" compute="always"]
17: </div>
18: </div>
19: <div class="contentClear"></div>
20: </li>
1:
2: <!-- Footer and Paging -->
3: <div class="foot">
4: <div class="pagingBar">
5: [Component name="riverbend/pn_pagenavigator"]
6: </div>
7: </div>
8: </ul>
9: </div>
10: </div>
This section provides the steps to create the personalization component for the River
Bend site.
For more information about personalization including the different components involved
and where to find them, refer to:
3.4 Personalizing your site
For the River Bend website example, we personalize an image on the home page. This
image changes automatically based on the current season. There are currently two
images, a winter image and a summer image. The winter image showing on the
160 of 439
homepage can be seen in the figure below.
Using personalization rules, the current seasons beverage will be selected and the image
from the content will be displayed.
When creating the personalization component, the following key steps are involved:
1. Navigate to the Personalization page from the Content tab as shown in the below
image and choose Business Rules from the drop down menu.
161 of 439
2. Select New and choose Rule.
3. Enter SummerDrinkRule in the Rule name.
4. Choose Select Action if not already selected.
5. Click on content* and change it to be Web Content.
6. Click on Attribute and change it to be Category.
7. Choose is exactly instead of "is associated with".
8. Click on value*, click on Select category.
9. Navigate to the category Products > Beverages > SeasonDrink > Summer.
10. Click OK and click Save.
11. Repeat steps 2 through 11 to create the Winter Selection Rule. The rule name is
WinterDrinkRule and Category is Winter.
162 of 439
12. Click Save.
If content already exists that matches the categories, we can view the content as shown
in the figure below by clicking on Preview.
163 of 439
A no content screen will be shown until content exists with those categories.
164 of 439
<a href="[Placeholder tag="href"] ">
[Element context="autofill" type="content" key="ImageLg"]</a>
Add a reference to the personalization component from the html component HTML -
Seasonal Product.
The html used for that is as follows:
1:
2: <div class="contentSlideshow">
3: <div class="head">
4: <h2 class="blockHeading">Seasonal Product</h2>
5: </div>
6: [Component name="riverbend/pers-seasons"]
7: </div>
A page navigation component can generate two kinds of page navigation controls:
Shuttle controls provide navigation relative to the current page. This includes
sequential linking to the previous or next page of results and quick linking to the first
and last pages in the set.
Paging controls provide navigation according to the page number of the result set.
A list of page number links is displayed, along with a continuation link for access to
the previous or next set of page numbers, if all page numbers are not displayed.
The section provides the steps to build the page navigation component for the River
Bend site.
When creating the component, there are two key steps involved:
165 of 439
Creating the page navigator
To create page navigator:
<span>
| </span><span>
1:
2: </span>
3: <span>
4: Page [PageInfo value="currentPage" ]
5: [PageInfo value="unknownPages" knowntext="of" unknowntext="of at
least" ]
6: [PageInfo value="totalPages" ].
7: </span>
8: </table>
7. For the rest of the values leave the default values, as shown in the following image:
166 of 439
8. Click Save, and then click Save and Close.
1:
2: <tr><td>
3: <Component name="PN_pageNavigator"/>
4: </td></tr>
167 of 439
The following figure shows the resulting page navigation component displayed on the
product page.
This section describes the process of creating a dojo image slide show on the home
page. The images in the sldie show acts as a gateway to the content.
Storing JSP in custom application and referencing from WCM JSP component
Using WCM component design to drive data to dojo components
Implementing a simple custom cache solution for individual item
168 of 439
DISCLAIMER OF WARRANTIES: The accompanying code provided in this section (and
this wiki) is sample code, created by the authors of this wiki. This sample code is not part
of any standard or IBM product and is provided to you solely for the purpose of assisting
you in the development of your website. The code is provided as is, without warranty of
any kind. IBM shall not be liable for any damages arising out of your use of the sample
code, even if they have been advised of the possibility of such damages.
For the River Bend site, we use a dojox.image.SlideShow to render a slide show of
images. These images come from some of the key products of the sample site. When the
image is clicked, content opens.
169 of 439
Note that we have configured the menu to pull content based on a specific site area, the
/Riverbend/Riverbend/Key Products site area. We have configured it to return a
maximum of 10 results, and we have no need for sorting. We only want to include 1
page, and no need for read ahead.
170 of 439
Menu header
In the menu header, we set up the component to be able to use the dojo assets:
1:
2: <script type="text/javascript">
3: dojo.require("dojo.data.ItemFileReadStore");
4: dojo.require("dojox.image.SlideShow");
5: dojo.require("dojo.parser");
6: var imagestore = new dojo.data.ItemFileReadStore({data:{items:[
We do not describe how dojo works in this section, but the important piece is where we
open the ItemFileReadStore. We leave it open ended so that in each menu match
design, we can add in the relevant information for that particular match.
1:
2: {"linkAttr":"[Placeholder tag="href"]",
"imageLargeAttr":"[Element context="autofill" type="content"
key="ImageLg" format="URL"]","titleAttr":"[Placeholder tag="title"]"}
In summary, what this does is add the relevant information about each match to the
javascript object that will drive the dojo ImageSlider component. We add in the image, the
URL to the content, and the title of the content.
Menu separator
For the menu separator, we only need to include a comma:
1:
2: ,
Menu footer
In the menu footer, we close off the ItemFileReadStore object now that each item has
been placed in. Also, we add the code to display the dojo asset to the page.
171 of 439
1:
2: <script>
3: dojo.addOnLoad(function() {
4: dojo.parser.parse();
5: //Call the setDataStore function, passing it the data store, the
request object,
6: //and the name map.
7: dijit.byId('slideshow1').setDataStore(imagestore,
8: { query: {}, count:20
},
9: {
10:
imageLargeAttr: "imageLargeAttr", linkAttr: "linkAttr", titleAttr:
"titleAttr"
11: }
12: );
13: });
14: </script>
15:
16: <div dojoType="dojox.image.SlideShow" id="slideshow1" > </div>
What we have done here is to drop the dojox.image.SlideShow to the page in the div
tags. This is where dojo renders the image slide show when it is complete. The rest of the
javascript tells that slide show to use the data that will be coming from the menu.
For the dojo, it will be included with the out of the box themes. If you wish to use with a
custom theme, you have to ensure dojo is available.
172 of 439
Creating the custom code package
We will create some custom code for the caching piece, so we need to create a package
to hold this code.
173 of 439
2. In the dialog, name the package com.ibm.riverbend.simplecache, then click finish.
174 of 439
Creating the SimpleCacheObject class
To create the SimpleCacheObject:
1. Right click on the package, and create a new class by select New > Class.
2. Name the new class SimpleCacheObject. Ensure it is in the correct package. Click
Finish.
175 of 439
3. In the class, paste the following code.
1:
2: package com.ibm.riverbend.simplecache;
3: import java.util.logging.Logger;
4:
5: /**
6: *
7: * SimpleCacheObject a wrapper for a simple cache entry
8: */
9: public class SimpleCacheObject
10: {
11: /**
12: * Logger for the class
13: */
14: private static final Logger s_log =
Logger.getLogger(SimpleCacheObject.class.getName());
15:
16: /**
17: * the object in the cache
18: */
19: private Object cacheEntry;
20:
21: /**
22: * the expiration time
23: */
24: private long cacheExpireTime;
25:
26: /**
27: *
28: * Constructor
29: *
30: * @param objectToCache the object to cache
31: * @param cacheExpire the time to cache it for
32: */
33: SimpleCacheObject(Object objectToCache, long cacheExpire)
34: {
35: cacheEntry = objectToCache;
36: cacheExpireTime = cacheExpire;
37: }
38:
39: /**
40: *
41: * getCacheEntry returns the object stored in the cache
42: *
43: * @return the cached object
44: */
45: public Object getCacheEntry()
46: {
47: return cacheEntry;
48: }
49:
50: /**
176 of 439
51: *
52: * setCacheEntry sets the item to store in the cache
53: *
54: * @param p_cacheEntry the item to cache
55: */
56: public void setCacheEntry(Object p_cacheEntry)
57: {
58: cacheEntry = p_cacheEntry;
59: }
60:
61: /**
62: *
63: * getCacheExpireTime returns the cache expiration
64: *
65: * @return the cache expiration
66: */
67: public long getCacheExpireTime()
68: {
69: return cacheExpireTime;
70: }
71:
72: /**
73: *
74: * setCacheExpireTime sets the cache expiration time
75: *
76: * @param p_cacheExpireTime the time to set as cache
expiration time
77: */
78: public void setCacheExpireTime(int p_cacheExpireTime)
79: {
80: cacheExpireTime = p_cacheExpireTime;
81: }
82:
83: /**
84: * override toString
85: */
86: public String toString()
87: {
88: String returnString = "";
89: returnString = "SimpleCacheObject
cached::"+cacheEntry+":: expireTime::"+cacheExpireTime;
90: return returnString;
91: }
92: }
93:
177 of 439
At a high level, the object is a wrapper around another object. We use the wrapper so
that we can also associate an expiration time with it.
1. Right click on the package, and create a new class by select New > Class.
2. Name the new class SimpleCacheImpl. Ensure it is in the correct package. Click
Finish.
178 of 439
3. In the class, paste the following code:
1:
2: package com.ibm.riverbend.simplecache;
3:
4: import java.util.HashMap;
5: import java.util.Map;
6: import java.util.logging.Level;
7: import java.util.logging.Logger;
8:
9: /**
10: *
11: * SimpleCacheImpl a Simple cache
12: */
13: public class SimpleCacheImpl
14: {
15: private static final Logger s_log =
Logger.getLogger(SimpleCacheObject.class.getName());
16: private static long defaultExpirationMinutes = 30;
17: private static SimpleCacheImpl s_theCacheImpl;
18:
19: private static Map<String, SimpleCacheObject>
s_simpleCacheEntries = new HashMap<String, SimpleCacheObject>();
20:
21: /**
22: *
23: * get retrieve the cache object from the cache
24: * Will return null if the item is expired, and will
remove the
25: * item from the cache if its expired
26: *
27: * @param keyValue the key of the item to retrieve
28: * @return
29: */
30: public SimpleCacheObject get(String keyValue)
31: {
32: SimpleCacheObject returnObject = null;
33: returnObject = s_simpleCacheEntries.get(keyValue);
34: // return null if its expired
35: if(returnObject != null && isExpired(returnObject))
36: {
37: remove(keyValue);
38: returnObject = null;
39: }
40: if(s_log.isLoggable(Level.FINEST))
41: {
42: s_log.log(Level.FINEST, "get called with key
"+keyValue);
43: if(returnObject != null)
44: {
45: s_log.log(Level.FINEST,"get returning
179 of 439
"+returnObject);
46: }
47: else
48: {
49: s_log.log(Level.FINEST, "returning null");
50: }
51:
52: }
53: return returnObject;
54: }
55:
56: /**
57: *
58: * remove remove the cache entry based on the key
59: *
60: * @param keyValue the key for the cache entry to be
removed.
61: */
62: public void remove(String keyValue)
63: {
64: s_simpleCacheEntries.remove(keyValue);
65: }
66:
67: /**
68: *
69: * put add an item to the cache
70: *
71: * @param keyValue the key value for the cache item
72: * @param cacheObject the object to add to the cache
73: */
74: public void put(String keyValue, Object cacheObject)
75: {
76: long expireTime =
System.currentTimeMillis()+defaultExpirationMinutes * 60 * 1000;
77: put(keyValue, cacheObject, expireTime);
78: }
79:
80: /**
81: *
82: * put add an item to the cache
83: *
84: * @param keyValue the key value for the cache item
85: * @param cacheObject the object to add to the cache
86: * @param expireTime the expiration of the object
87: */
88: public void put(String keyValue, Object cacheObject, long
expireTime)
89: {
90: SimpleCacheObject cachedObject = new
SimpleCacheObject(cacheObject, expireTime);
91: s_simpleCacheEntries.put(keyValue, cachedObject);
92: if(s_log.isLoggable(Level.FINEST))
93: {
94: s_log.log(Level.FINEST, "put called with key
"+keyValue+" cacheObject "+cacheObject+" expireTime "+expireTime);
95: }
96: }
180 of 439
97:
98: /**
99: *
100: * isExpired whether or not the cache item is expired
101: *
102: * @param theObject the cache item to check
103: * @return boolean whether expired
104: */
105: public boolean isExpired(SimpleCacheObject theObject)
106: {
107: boolean isExpiredReturn = false;
108: if(theObject != null)
109: {
110: isExpiredReturn=
System.currentTimeMillis()>theObject.getCacheExpireTime();
111: }
112: if(s_log.isLoggable(Level.FINEST))
113: {
114: s_log.log(Level.FINEST, "isExpired
"+isExpiredReturn);
115: }
116: return isExpiredReturn;
117: }
118:
119: static public SimpleCacheImpl getInstance()
120: {
121: if(s_theCacheImpl == null)
122: {
123: s_theCacheImpl = new SimpleCacheImpl();
124: }
125: return s_theCacheImpl;
126: }
127: }
The class allows us to get and set cache entries. One thing to note, we have added a
logger to the class. This means we can enable trace in the WebSphere Portal
administration to see whether the class is behaving correctly. To do so, enable the
following trace, and we will see the trace statements in the trace.log:
com.ibm.riverbend.simplecache.*=finest
181 of 439
Creating the custom jsps
Now that the code is in place, we need to create the jsp file that renders the menu and
caches the results. Later, we create the WCM component to render this JSP.
To create the folder, within the application in RAD, right click on the WebContent folder,
and select New > Folder. Name the folder jsp and click Finish.
Repeat this process to create a folder within the jsp folder named html. When we
finished, you have /jsp/html under the WebContent folder in the application. See the
screenshot above.
182 of 439
3. Name the folder tld and click Finish.
4. After the folder is created, import the wcm.tld file from the 7.0 WebSphere Portal
server. You can find the file in
/wp_profile/installedApps/cellname/wcm.ear/ilwwcm.war/WEB-INF/tld.
5. Copy the file to a directory on the machine where you use RAD.
6. Right click the tld folder, and select Import.
183 of 439
10. Click finish.
The end result should be that the wcm.tld file now resides within /WEB-INF/tld folder in
your project.
When we render this JSP, we first check the cache to see whether the item is already
cached.
184 of 439
To create the jsp file:
1. Right click the html folder, and select new jsp file.
185 of 439
4. Once the jsp is created, replace the entire text of the jsp with the following code.
1:
2: <%@ taglib uri="/WEB-INF/tld/wcm.tld" prefix="wcm"
3: %><%@ page session="false" contentType="text/html"
import="java.util.*,
4:
java.util.logging.*,
5:
javax.portlet.*,
6:
com.ibm.riverbend.simplecache.*,
7:
com.ibm.workplace.wcm.api.exceptions.*,
8:
com.ibm.workplace.wcm.api.query.*,
9:
com.ibm.workplace.wcm.api.*"
10: %>
11: <%!
12: private static final Logger s_log =
Logger.getLogger(SimpleCacheObject.class.getName());
13:
14: %>
15: <!-- grab the dojo assets -->
16: <link rel="stylesheet"
href="<%=pageContext.getAttribute("dojoRoot",
PageContext.REQUEST_SCOPE)%>/dijit/themes/tundra/tundra.css"
type="text/css" />
17: <link rel="stylesheet"
href="<%=pageContext.getAttribute("dojoRoot",
PageContext.REQUEST_SCOPE)%>/dojox/image/resources/image.css"
type="text/css" />
18: <wcm:initworkspace/>
19: <%
20: boolean isLoggingFinest = s_log.isLoggable(Level.FINEST);
21: try
22: {
23: Workspace usersWorkspace = (Workspace)
pageContext.getAttribute(Workspace.WCM_WORKSPACE_KEY);
24: // check cache first
25: SimpleCacheImpl theCache =
SimpleCacheImpl.getInstance();
26: String keyString =
"Riverbend_Menu_KeyProductsImageRotator";
27: // if we are anonymous, use a different key
28: if(request.getUserPrincipal() == null)
29: {
30: keyString =
"ANON_Riverbend_Menu_KeyProductsImageRotator";
31: }
186 of 439
32:
33: SimpleCacheObject theCacheObject =
theCache.get(keyString);
34: if(theCacheObject != null)
35: {
36: String cachedString =
(String)theCacheObject.getCacheEntry();
37: out.println(cachedString);
38: }
39: else
40: {
41: // retrieve the workspace and the rendering
context
42: // set the library in the workspace
43:
usersWorkspace.setCurrentDocumentLibrary(usersWorkspace.getDo
cumentLibrary("Riverbend"));
44: RenderingContext usersRC = (RenderingContext)
pageContext.getRequest().getAttribute(Workspace.WCM_RENDERINGCONTEXT_
KEY);
45:
46: // get the menu to render it. Use the new
QueryAPI
47: QueryService queryService =
usersWorkspace.getQueryService();
48: Query query =
queryService.createQuery(LibraryMenuComponent.class);
49: query.addSelector(Selectors.nameLike("MENU -
KeyProductsImageRotator%"));
50:
51: // execute the query
52: ResultIterator results =
queryService.execute(query);
53: if(results.hasNext())
54: {
55: if(isLoggingFinest)
56: {
57: s_log.log(Level.FINEST,
"renderRotatorMenu.jsp :: menu not null");
58: }
59:
60: LibraryMenuComponent userMenu =
(LibraryMenuComponent)results.next();
61: String renderedHTML =
usersWorkspace.render(usersRC,userMenu);
62: out.println(renderedHTML);
63:
64: if(isLoggingFinest)
65: {
66: s_log.log(Level.FINEST,
"renderRotatorMenu.jsp :: menu not null");
67: s_log.log(Level.FINEST,
"renderRotatorMenu.jsp :: renderedHTML "+renderedHTML);
187 of 439
68: }
69: // cache it
70: theCache.put(keyString,renderedHTML);
71: }
72: }
73:
74: }
75: catch(Exception e)
76: {
77: e.printStackTrace();
78: }
79: %>
We do not go into great detail about the jsp. We concentrate on the important bits of the
code as follows.
Here, we are generating a key to hold the cache entry. Since this is a menu with images,
we want to allow anonymous and authenticated requests. In order to handle that, we
need a different cache key for anonymous vs authenticated.
1:
2: String keyString = "Riverbend_Menu_KeyProductsImageRotator";
3: // if we are anonymous, use a different key
4: if(request.getUserPrincipal() == null)
5: {
6: keyString = "ANON_Riverbend_Menu_KeyProductsImageRotator";
7: }
Next, we attempt to retrieve the item out of the cache if it exists. If it does, it is rendered
directly to the screen.
1:
2: SimpleCacheObject theCacheObject = theCache.get(keyString);
3: if(theCacheObject != null)
4: {
5: String cachedString =
(String)theCacheObject.getCacheEntry();
6: out.println(cachedString);
7: }
188 of 439
Create the removeCacheEntry.jsp
For testing purposes, clear the cache entries since you are making menu changes.
This jsp is created for that task. Repeat the above steps to create a new jsp in the same
folder, name it removeCacheEntry.jsp. Enter the following code and save it:
1:
2: <%@ page session="true" contentType="text/html"
import="java.util.*,
3:
java.util.logging.*,
4:
javax.portlet.*,
5:
com.ibm.riverbend.simplecache.*"
6: %>
7:
8: <%
9: try
10: {
11: // check cache first
12: SimpleCacheImpl theCache =
SimpleCacheImpl.getInstance();
13: String keyString =
"Riverbend_Menu_KeyProductsImageRotator";
14: String keyString2 =
"ANON_Riverbend_Menu_KeyProductsImageRotator";
15: String passedValue =
(String)request.getParameter("key");
16: if(passedValue != null)
17: {
18: keyString = passedValue;
19: }
20: theCache.remove(keyString);
21: theCache.remove(keyString2);
22: out.println("removed "+keyString);
23:
24: }
25: catch(Exception e)
26: {
27: e.printStackTrace();
28: }
29: %>
The way that the jsp is written, it automatically clears the cache entries for the 2 hard
coded keys that we created. If you create your own custom keys, you would pass those
values on the URL to the JSP as ?key=keyname.
189 of 439
Exporting the custom application
Now that the application is created, we need to export it from RAD so that we can deploy
on the server.
1. Right click on the project name within RAD, select Export > WAR file.
2. Choose the location where you want the file to be placed, and call the file
RiverbendCustom.war.
190 of 439
To deploy the custom application:
1. Log into the WebSphere Application Server admin console and navigate to
Applications > Application Types > WebSphere Enterprise Applications.
4. On the next page, keep Fast Path checked, and click Next.
5. For the Step 1 page, keep the values as they are, and click the Next button.
6. On the Step 2 page, where we map the modules to the servers. In this case, we want
to map the custom application to the WebSphere_Portal server. To do that, select the
server from the list of clusters and servers, and select the RiverbendCustom
module. With the checkbox selected, click on the Apply button. Ensure the server in
the mapping for the RiverbendCustom module is the WebSphere_Portal server. Click
on the Next button.
191 of 439
7. On the next page, map the context root for the application. In the context root field,
enter /RiverbendCustom. Then click the Next button.
8. After you click Next, the summary screen appears. Click on the Finish button to
deploy the changes.
9. After the application is deployed, click Save on the next change to persist the
changes to the server.
192 of 439
3. Click the checkbox to select the application, and click the Start button. Now the
application will be started.
193 of 439
Creating the JSP - removeCacheEntry.jsp component
First we will create the jsp component to use to clear the cache entries.
To create both:
1. In the WCM Authoring portlet, select New > Component > JSP Component.
2. For the name, display title, and description, enter JSP - removeCacheEntry.jsp.
3. For the path, enter /RiverbendCustom;/jsp/html/removeCacheEntry.jsp.
4. Enter the same in the error field.
194 of 439
This tells WCM to retrieve the jsp from the custom application in the directory where we
placed it.
Deploy the WCM rendering portlet to a page. Click on the Edit Shared Settings under
the configuration options of the portlet. Enter in the following values:
195 of 439
The only other options to change are the portlet cache options. We want to ensure each
user gets their own copy of the portlet cache, and since we are relying on the custom
cache, we set the timeout to 1 second.
After the configuration changes, click OK. Finally, render the portlet, and you will see the
menu being rendered from the JSP.
In general, all content in a portal that can be uniquely identified can be tagged or rated.
Users can apply tags and ratings both publicly and privately for the following purposes:
Public tagging and rating helps users categorize, evaluate, and find portal content
based on tags and ratings by other users.
Private tagging and rating can help users create their own personal way to
categorize, evaluate, and find portal content.
196 of 439
The portal provides two user interfaces for tagging and rating
The default user interface. It allows users to tag and rate resources, and to view tags
and ratings for multiple resources.
An alternative user interface that works with inline widgets. This shows tags and
ratings for individual resources in the context of each resource.
By default this user interface is available for blogs and wikis. Administrators can also add
this user interface to other types of resources.
To create and reference tags and ratings, you need to add a reference to the tags or
rating widget in the presentation template.
This section provides steps to create and reference tags and rating widgets for the River
Bend site.
<div id="tags">[Plugin:tags]</div>
197 of 439
Presentation template should now look as following:
1:
2: <!-- Products PT -->
3: <div class="contentEditContainer contentDetail">
4: <div class="head">
5: <h2 class="itemTitle">[Property
context="current" type="content" field="title"]</h2>
6: </div>
7: <div class="body">
8: <div class="itemSummary">
9: [Element context="current"
type="content" key="ImageLg"]
10: </div>
11: <div class="itemBody">
12: [Element context="current"
type="content" key="Details"]
13: </div>
14: </div>
15: <div class="foot">
16: <div class="tagging">
17: <div
id="tags">[Plugin:tags]</div>
18: </div>
19: </div>
20:
21: <!-- Component Reference -->
22: [Element context="current" type="content"
key="Related"]
23: [Element context="current" type="content"
key="Complimentary"]
24: </div>
198 of 439
Following is a figure of a content using the product presentation template showing the
tagging widget:
199 of 439
Presentation template should now look as following:
1:
2: <!-- Products PT -->
3: <div class="contentEditContainer contentDetail">
4: <div class="head">
5: <h2 class="itemTitle">[Property
context="current" type="content" field="title"]</h2>
6: <div class="rating">Product
Rating:[Plugin:ratings]</div>
7: </div>
8: <div class="body">
9: <div class="itemSummary">
10: [Element context="current"
type="content" key="ImageLg"]
11: </div>
12: <div class="itemBody">
13: [Element context="current"
type="content" key="Details"]
14: </div>
15: </div>
16: <div class="foot">
17: <div class="tagging">
18: <div
id="tags">[Plugin:tags]</div>
19: </div>
20: </div>
21:
22: <!-- Component Reference -->
23: [Element context="current" type="content"
key="Related"]
24: [Element context="current" type="content"
key="Complimentary"]
25: </div>
200 of 439
Following is a figure of a content using the product presentation template showing the
rating widget and the tagging widget.
In this section, we describe how to create the presentation templates used across the
River Bend site.
201 of 439
directly select these components as required.
The WCM Web Content Viewer portlet provides options to select components from WCM
for display. It also provides an override function to alter the display based upon an
alternative presentation template to the one mapped.
For the River Bend site, we create the following presentation templates:
Landing Page
Events
Products
We also illustrate how to pair the authoring template and the presentation template.
1. From the Library Explorer, click the New button and select Presentation Template.
2. Type in the Name: field, Landing.
3. Type in the Display title: field, Landing.
4. Type in the Description: field, General landing presentation template for main
pages.
5. In the Presentation Template Options section paste the following code into the
Presentation Markup: area.
6. Select the text in the presentation markup, delete the text and click the Insert a Tag
button.
7. Using the Insert a Tag windows that will appear, select:
Tag type: Element
Source item type: Current
Item content: Current
Authoring template: Landing Page
8. Click the OK button, and the OK button again to insert the tag.
1:
2: <!-- General lanading presentation template for main pages -->
3: <div class="itemSummary">
4: <h1>[Property context="current" type="content"
field="description"]</h1>
5: <div class="body"></br>
6: <h5><!-- INSERT BODY ELEMENT HERE --></h5>
7: </div>
8: </div>
9:
10: [Element context="current" type="content" key="Post Body
Component"]
P
202 of 439
Review of Landing presentation template
The following image shows one of the portlets on the River Bend home page displaying
the default content item using the Landing presentation template.
Note: To reference a component, the tag result from the Insert Tag button will look similar
to [Component name=" Name of the component " /]. You will notice that once you have
saved your presentation template, component tags when shown in edit mode will also
include an ID reference. This ID is to ensure referential integrity, if removed it will be re-
added when saved.
Note: To reference an element inside the content, the tag result from the Insert Tag
button will look similar to [Element context="current" type="content" key=" Name of the
field to be referenced " /]. Other Tag such as Property, Style Sheet, URL Path will be
similar.
203 of 439
Event page code snippet
1:
2: <!-- Event PT -->
3: <div class="contentEditContainer contentDetail">
4: <div class="head">
5: <h2 class="itemTitle">[Property context="current"
type="content" field="title"]</h2>
6: <div class="rating">Product
Rating:[Plugin:ratings]</div>
7: </div>
8: <div class="body">
9: <div class="itemSummary">
10: [Element context="current"
type="content" key="ImageLg"]
11: <p>[Element context="current"
type="content" key="date 1" format="DATE_TIME_SHORT"][Element
context="current" type="content" key="date 2"
format="DATE_TIME_SHORT" start=" to "][Element context="current"
type="content" key="location" start="<br>"]</p>
12: </div>
13: <div class="itemBody">
14: [Element context="current"
type="content" key="Details"]
15: </div>
16: </div>
17: <div class="foot">
18: <div class="tagging">
19: <div id="tags">[Plugin:tags]</div>
20: </div>
21: </div>
22:
23: <!-- Additional component references -->
24: [Element context="current" type="content" key="File"]
25: [Element context="current" type="content"
key="Complimentary"]
26: </div>
204 of 439
Product page code snippet
1:
2: <!-- Products PT -->
3: <div class="contentEditContainer contentDetail">
4: <div class="head">
5: <h2 class="itemTitle">[Property context="current"
type="content" field="title"]</h2>
6: <div class="rating">Product
Rating:[Plugin:ratings]</div>
7: </div>
8: <div class="body">
9: <div class="itemSummary">
10: [Element context="current"
type="content" key="ImageLg"]
11: </div>
12: <div class="itemBody">
13: [Element context="current"
type="content" key="Details"]
14: </div>
15: </div>
16: <div class="foot">
17: <div class="tagging">
18: <div id="tags">[Plugin:tags]</div>
19: </div>
20: </div>
21:
22: <!-- Component Reference -->
23: [Element context="current" type="content" key="Related"]
24: [Element context="current" type="content"
key="Complimentary"]
25: </div>
205 of 439
Creating the News presentation template
Using the steps outlined above for the Landing presentation template, use the criteria in
the next sections to create the News template.
Name: News
Display title: News
Description: News item presentation template.
Presentation Markup: See below
206 of 439
News page code snippet
1:
2: <!-- News PT -->
3: <div class="contentEditContainer contentDetail">
4: <div class="head">
5: <h2 class="itemTitle">[Property context="current"
type="content" field="title"]</h2>
6: </div>
7: <div class="body">
8: <div class="itemSummary">
9: [Element context="current" type="content"
key="ImageLg"]
10: <p>[Property context="current"
type="content" format="relative" field="publishdate"]</p>
11: </div>
12: <div class="itemBody">
13: [Element context="current"
type="content" key="Details"]
14: </div>
15: </div>
16: <div class="foot">
17: <!-- Additional component references -->
18: [Element context="current" type="content"
key="Related"]
19: </div>
20: </div>
Landing page
For the River Bend landing page we are going to set a Default mapping of the Landing
Page authoring template to the Landing presentation template.
207 of 439
4. Click the OK button.
5. Click the Save and Close button to apply your default mapping.
Applying a default template mapping may not always be appropriate/required, using the
site area to address mapping the authoring templates with presentations templates is an
alternative.
Using the following steps pair the different templates together at the River Bend site area
levels.
1. From the Library Explorer, navigate to Content > Riverbend site area.
2. Select the Riverbend site area and click the Edit button.
3. From the Site Area Properties section, click the button Manage Template Maps.
208 of 439
4. Click the button, Add.
209 of 439
The following figure shows all site area level maps.
Note: All children site areas will inherit these mappings unless a further mapping is
applied in a lower nested site area using the same authoring template; this overrides any
prior maps.
In this section, we describe how to modify the portlet configurations used for presenting
content in the River Bend site. The portlets were previously added when the River Bend
pages were created from the portal page templates.
210 of 439
Configuring the River Bend Home page portlets
The following steps outlined below will describe placing the page, and first portlet in to a
mode for configuration. Also detailed are the specific portlet configuration options,
The following image shows the first portlet configured with an image component.
The River Bend home page is assembled from 4 or more Web Content Viewer portlets,
each portlet configured differently to display content and components as needed. Using the
diagrams shown and their specific option selections, configured the portlets using the same
steps as outlined above.
211 of 439
Home page portlet configuration
Portlet configuration options for the main River Bend home page is as shown below.
212 of 439
Coffee page portlet configuration
The Coffee product page portlet configuration is as shown below.
213 of 439
News Community page portlet configuration
The News Community page portlet configuration is as shown below.
1. From the Library Explorer, click the New button and select Content
2. From the authoring template list, choose Landing Page, click the OK button.
3. In the name field, enter Home.
4. Type in the Description: field, Default content for the Riverbend home page.
5. Type in the Body field the following text:
Our company Riverbend has been established since 1971, and for 30+ years we've
been in the business of making our own special blends of teas & coffees.
214 of 439
Take a look at our featured news items, seasonal products and tasty daily special
offers.
The default content we use for the Riverbend home page also contains additional
elements to include WCM components as part of the content item. Next we will add
these components to the content item.
6. In the Post Body Component, click select Component and select the Menu
Featured Content item.
Note: When selecting a component item it can be quicker to select your component
via the Recent Items (if youve recently edited/view the component) or Favorite
links.
In a previous section we created the Riverbend Home page, this was created from a
template (Riverbend 3 Portlet Layout), and was also mapped to the corresponding
site area called Home to default the context for content. We now need to assign the
content we created in the steps above to the Home site area.
8. From the Library Explorer navigate to the Riverbend site area.
9. Tick the site area Home, and click the Edit button.
215 of 439
10. From Site Area Properties section, click the Select Default Content link, choose the
Riverbend/Home/Home content item and click the OK button.
11. Click the Save and Close button.
216 of 439
3. Green
4. and Oolong
We take these dried base teas and add our own special
additive, all natural to offer you a range of over 12 types of tea
in store. Our tea making process is a secret but we can tell you
it takes a long time to perfect but worth every minute we hope.
We know we sell allot of tea, but did you know that production
of tea is over 3 million tonnes per year with both China and
India being the largest producers.
217 of 439
back in 1971 it was running from his home with 1 employee,
himself. Back then John used his families experience roasting
coffee to give a unique flavour & texture to the beans his coffee
was made from. John just sold coffee then, today things are
different.
All our stores will have openings for, Delivery Agents, Store
Staff and Management including Cleaners and Security. River
Bend is working in partnership with local recruitment offices
close to the new store planned below:
UK
West Chiltington, West Sussex
Cheam, Surrey
Staines, Middlesex
Fulham, London
London, City (3 stores)
Europe
Berlin, Germany (3 stores)
Barcelona, Spain (2 stores)
St. Omer, France
USA
Westford, MA
Cambridge, MA
Rochester, NY (2 stores)
Samford, CT (3 stores)
Orange County, NY
India
Bangalore
o Delhi
218 of 439
Post Body Select component > Riverbend/Default Article Text with List
Component:
[Component name="Riverbend/DefaultArticleText"]
With ten of the top Jazz bands in the London area we thought
you'd like to spend a few evenings with us listening to the best
Jazz, drinking great coffee and helping support the local music
community.
For two weeks our London store is going to play host to ten of
the top bands, between 6 and 8pm weekdays. Best of all it's
FREE to come along and join in. To spice things up, with every
coffee you buy were donating 50p towards local music
education programs dedicated to Jazz in London.
219 of 439
Small Image: CappuchinoTn.jpg
Jasmine
Pepermint
Lemon
Herbal Green
Enjoy
Large Image: FlavouredTeaLg.jpg
Small Image: FlavouredTeaTn.jpg
220 of 439
If you work with the young people in the local community, bring
with your Raleigh Community Card next time your in the store
and we will give you and extra shot of coffee to keep you
going, or if you like your Tea complimentary snack.
Enjoy
Large Image: CommunityLg.jpg
Small Image: CommunityTn.jpg
221 of 439
Description: Zesty carrot cake, filled with a citrus cream filling.
Recipe: Citrus and Carrot Cake.pdf
We believe that the best way to enjoy Ceylon tea is pure and
not blended. It's rich golden colour, and intense strong flavour
lets you know it's a quality tea for when you need that
222 of 439
something special.
Large Image: CeylonTea.jpg
Small Image:
Complimentary
Items:
Related Items:
Our twist on the Swiss style long twice brewed espresso is just
right for that moment, Something different for when you need
that change.. you never know you may not change back.
Large Image: ChaiCaffeeCreme.jpg
Small Image:
Complimentary
Items:
Related Items:
223 of 439
Name: CaffeLatte
Display title: Caffe Latte
Description: Double-shot Caff Latte to kickstart the day.
Body: If it's a hot or cold day sometime you need to give yourself a
little kickstart, a Caff Latte double-shot is what you need.
If you want something more, feeling sweet then why not add a
drizzle of Caramel or Chocolate.
Large Image: CaffeLatte.jpg
Small Image:
Complimentary
Items:
Related Items:
224 of 439
Body: [Component name="Riverbend/DefaultArticleTextWithList"]
Image:
File:
Related Link 1:
Related Link 2:
Related Link 3:
Viewing the sample site after you have defined the default content areas,
Viewing the content in a portlet
Creating a portal page and adding the the content Viewer Portlets
Configuring the portlets
225 of 439
Opening and viewing the River Bend site in a browser
After you have assigned default content to the site areas, the River Bend website is ready
for browsing.
To open and view the River Bend website in a browser, follow these steps:
For example, the site for the example River Bend site is:
http://wcm01.itso.ibm.com:10040/wps/wcm/myconnect/RiverBend/RiverBend/Home
This will open the home page and you can continue navigating the pages from there.
Tip: If you cannot view a certain page as you navigate the site, the default content for
that page might be missing. Be sure that you have defined default content for all site
areas.
To create two copies of the Web Content Viewer portlet, do the following:
226 of 439
7. In the Type of Page section make sure Standard Portal Layout property is selected
(default value).
8. Click OK.
9. In the list of pages, navigate to your created page.
10. Select the Edit Page Layout icon (see the figure below).
20. Click on Select Page, click on Content Root, click on Administration, click on
WebSphere Portal.
21. Click on the Move button.
Now, the page has been moved under Administration and could be accessed from the
left navigator.
227 of 439
3.3. Managing the publishing process
One of the key goals of a content management system is to coordinate editing activities
among groups of content authors and editors.
Work with security - Controlling access to resources for read, write, or delete
Work with workflow - Allowing users to contribute and review content in an
organized way
Using collaboration tools - Managing different versions of libraries, design, and
content.
Using collaboration tools - Locking shared resources while they are edited
Previewing content - Providing tools to ensure consistency between different
content items
Controlling who can create content and design elements of a given type.
Targeting the views and actions available in the Library Explorer for each user/group.
Determining which items are visible for a user/group when accessing them though
the Library Explorer view, and within the website.
This section explains how security works in WCM, and how to set up the River Bend site
security.
Overview of security
WCM security is based on portal security which provides a module called Virtual Member
Manager (VMM). VMM is capable of managing multiple LDAPs and databases for a
single portal instance.
Portal security provides utilities to create, update, and delete users and groups through
the administration interface. Permissions are organized using a tree-like structure. You
start by defining a general permission set for all libraries at the IBM JCR repository,
refining them for every type in the library (such as components and authoring items), for
each item type and finally item by item.
By default, access levels are propagated and inherited by using the hierarchy shown in
the following figure.
228 of 439
Note: Access control delegation can be applied at a portal page level.This provides the
View access to all items on the page (including content), and overrides what has been
set elsewhere. AC delegation can be set during page creation (or afterwards) via the
administrative interface.
The following figure shows access control delegation during the page creation step.
The following figure shows access control delegation during the page edit (after creation)
step.
Propagation and inheritance of permissions can be stopped at any level of the tree
showing in the security hierarchy.
User
Cntributor
229 of 439
Editor
Manager
Administrator.
User
Contributor
Editor
Approver.
Library security
With library level security, you can establish a common set of permissions that are
refined later. Library security is based on portal roles as defined in the following table.
Roles Rendering and authoring portlet access rights
User Users and groups assigned to this role can:
Note: The simplest way to assign users to this role is to select any
of the default user groups such as "All Authenticated Portal Users"
or "Anonymous Portal User". Users will still require "user" access
to an item before it will be rendered in a website or rendering
portlet.
Contributor Users and groups assigned to this role can:
230 of 439
Have all contributor's access rights (as described above).
For library item types that user and groups have been assigned at
least editor access to, editors can also access the following actions
in the authoring portlet:
- Create a new item.
- Add or remove links.
- Apply authoring template.
- Copy, delete, edit, link to, and move item type.
- Restore a version.
- Edit version labels
To render WCM objects, a user must be granted at least the User role on the library itself,
as described above. For details of this requirements, and up to date information, refer to
the IBM Portal Wiki, WCM documentation.
The River Bend website is organized into a single top level home page, three nested site
231 of 439
areas under the top level, and finally several child site areas under these. See the figure
below.
There are five groups of users that can create (author) content:
1. General authors can create content for the home page
(riverbend_ContentAuthorsStoreMgr)
2. Content creators from the marketing department can create content for the
Community and About Us sections (riverbend_ContentAuthorsMarketing).
3. Content creators from the operations department can manage all of the
Products and Key Products sections (riverbend_ContentAuthorsOps).
4. All content creators can manage General sections, such as Recipes and
Links (rivervend_ContentAuthors).
5. Administrative users can create content as needed across the site for backup
to the ContentAuthor groups.
Approval for publish content must be provided by three different departments:
1. Headquarter staff (HQ), rivernbend_ContentApproversHQ
2. Human resources (HR), riverbend_ContentApproversHR
3. Legal, riverbend_ContentApproversLegal
Content must expire automatically or manually by people from the following groups:
1. The author
2. Any of the groups of approvers from HQ, HR, Legal, and Admin.
Any user must be able to view published content.
With this security requirements, River Bend has prepared a permission matrix. For every
232 of 439
site area (e.g. Home, Products), there are three table rows shown for readers, editors,
and approvers permissions.
233 of 439
Authors and Approvers will have contributor access as shown in the following figure.
User permissions are inherited. Contributor permissions are established at the next level,
library resources.
234 of 439
Library resources
When a user accesses the Library Explorer, several views are available to access item
types managed by WCM, such as authoring templates, components, or content. In a
production systems, not all user groups need to access every WCM feature. Therefore,
the next level in the permissions hierarchy is the management of access to these item
types.
Content creator (authors) and Designers are allowed Editor access to content as shown
below.
User
Contributor: read
Editor
Manager
235 of 439
1.
Item level security management depends on whether the item has a workflow:
Security settings can be batch processed through the Library Explorer. Every item
includes a security section to read. Edit these permissions as shown in the following
figure.
The columns displayed in this table depend on whether the item is under a workflow:
Note: Administrator defined permissions do not depend on the current workflow stage.
Defined below are the security permissions set to manage who can create content in
areas of the River Bend website, these are set in the Properties tab of the site area.
236 of 439
Products site area permission
The following screenshot shows the Product site area permissions.
Content elements
It is possible to filter who sees a specific content element for reading or editing, for
example an image element on the Products authoring template. At River Bend this level
of access is not needed at present, however this is a useful level of security to restrict
editing (or reading) of elements on a content item by different user groups or
departments.
237 of 439
To set this level of permissions if required, open in edit mode the default content settings
of the authoring template. Expand the content element, click the field properties icon ,
and select the Editors or Viewers you require as shown in the figure below.
238 of 439
The remote rendering portlet (now deprecated) is used to communicate with another
WCM server to render its content. The remote rendering portlet can use either LTPA or
Credential Vault Slot to transfer user identity:
LTPA Token: Exported from one server and imported to the other; current user
credentials used
Credential Vault Slot: Stored specific value to use for all users accessing the portlet
Note: It is important to note that remote rendering portlet is still available if required but
has been replaced. WSRP (Web Services Remote Portlets) should be used against the
local Web Content Viewer (JSR 286) portlet.
Workflows are assigned by site designers to one or more authoring templates. Workflows
have access permissions so content authors can choose from any of the visible
workflows assigned to the current authoring template.
This section explains how workflow works in WCM and how to create both a basic
workflow and a custom workflow for the River Bend site.
River Bend requires three different ways of publishing information (see the figure below):
Approval - This is the default workflow. Items may have four states (draft, approval,
published and expired).
Express - Covers the exception items. It is used primarily to directly publish from
draft to published state.
None - No approval or review is required.
239 of 439
Note: As mentioned previously, workflows have their own security setting which can be
used to manage alternative ways to publish the same content. The River Bend site
designers use this feature to restrict the use of express publishing to the
contentWFExpressUsers group. These users can short-cut the content publishing
processing when dealing with exceptions.
Item status
An items status, typically content, controls whether it is visible in the website. A WCM
"workflowed" item has three states:
Draft - The item is not published yet and is not available on the live website.
Publish - The item is published and thus is available on the live website.
Expired - The item is no longer published.
A WCM "non-workflowed" item, or one that has no workflow defined has only one state,
which is published .
Note: When progressing through a workflow, item status can only change in a linear
fashion:
Stages
Stages represent a step in the overall workflow process. With the use of stages, site
designers can define the actions that will happen with a content and the necessary
conditions (approvals) from the time it is created to the time it expires:
240 of 439
Workflows can have one or more stages.
Content states happens when a content item reaches a new stage.
Workflow stages determine the content security for a particular stage. (Do not
confuse this with the security of the stage itself.)
Setting approve access is only available through the workflow stage.
Such options as "Joint approval" and "Enter comment on approval" are set in the
workflow stage. (Enter comment on approval can be across the workflow.)
*= joint approval
Publish Generate User: [anonymous portal user], [all This is the stage where
thumbnail authenticated portal users] content from the
Publish Contributor: workflow is published.
Move content Editor: A workflow custom
on expiry date Manager action generates a
Approver: riverbend_ContentApproversHR, thumbnail from an
riverbend_ContentApproversHQ, existing image for
riverbend_ContentApproversLegal Products and News.
The Publish action is
triggered and the
content is visible on the
website.
The Scheduled Move
action is also triggered
241 of 439
when the Expire Date is
reached
Expired Expired User: The Scheduled Move
Contributor: action moves the
Editor: content into this stage,
Manager where the Expire action
Approver:riverbend_ContentApproversHR, stops the document
riverbend_ContentApproversHQ, from being visible on
riverbend_ContentApproversLegal, the website
riverbend_ContentCreatorsMarketing,
riverbend_ContentCreatorsOps,
riverbend_ContentCreatorsStorMgr
Reject Email for User: Rejected content
rejected Contributor: reaches this stage.
content Editor: [authors] Authors are able to
Manager create a new draft from
Approver: the rejected content.
Actions
Workflow actions can be triggered when an item enters or leaves a workflow stage. WCM
provides several types of actions that you can extend by writing your own action,
packaging them as EAR or JAR files:
Scheduled move action: Used to move workflow items to the next stage based on
date
E-mail action: Used to e-mail users when an item reaches the stage
State change actions: Change the item state to publish or expire
Version actions: Create a new version of the item when this action is executed
Scheduled move action: Moves an item to the next workflow stage at a specified
date and time
Custom actions: Allows the ability to create new actions by using Java code and
packaging them as EAR or JAR files
242 of 439
Creating the workflow actions
Note: The following section may have already been complete if you completed 3.2.5
Creating the workflows. If that is the case, go directly to Creating a custom workflow action.
Additional actions are required. Use the steps 2 to 4 above, create the actions outlined
below:
Action Action Type
Email for rejected Email Action
Content
Expired Expire Action
Move content on Scheduled Move Action
expiry date
Generate Custom Action
thumbnail
For the "Move content on expiry date" select Expiry Date from the Date Type list and
choose an appropriate date to see this action, for example tomorrow's date.
For the "Email for rejected Content", select E-mail authors. E-mail Stage Approvers is
selected by default. Add an apology message in Additional e-mail text.
243 of 439
Creating the Express workflow
The Express Workflow is the workflow that publishes content immediately without
approval. Using this workflow allows specific River Bend departments and users the
ability to save their content in draft and then publish immediately. An express type
workflow can be useful where content updates require swift publishing, for example a
spelling mistake, incorrect information or wrong product image.
River Bend wants to optimize the page size of their website. To achieve this goal, they
generate a smaller image for products and news to be used in menus and navigators.
244 of 439
Several options are available to do this. The site designer has decided to implement a
custom workflow action that reads the product image, generates a reduced image using
Java APIs, and saves the new image as part of the content item before it is published.
Using this approach introduces an automated process where previously this would have
been a manual task.
You can use WCM APIs inside custom actions to read or update the content items that
are being processed or any other content items. The creation process of a custom action
has three steps:
1. Development -
Develop Java code for the action. Two classes will be necessary, the actual code that
will be executed every time the action runs (based on the CustomWorkflowAction
interface) and a factory that will manage the creation of instances for this actions
(based on (CustomWorkflowActionFactory). Create a plugin descriptor file
(plugin.xml) to register the workflow action within a WCM extension point.
2. Deployment -
Package and deploy your code either as an EAR or JAR file. An EAR file will allow
you to hot deploy your code (without restart) whereas JAR files require a server
restart.
3. Configuration -
Create custom workflow actions in WCM in same way as any other actions.
245 of 439
To use custom workflow actions:
246 of 439
Thumbnail.class
1:
2: package com.ibm.itso.redwiki.wcm.wf;
3: import java.awt.*;
4: import java.awt.geom.*;
5: import java.awt.image.*;
6: import java.io.*;
7: import javax.imageio.*;
8: public class Thumbnail {
9: public static byte [] scale( byte [] data, int width, int
10: height) {
11: // Get system temp
12: String tmp = System. getProperty ( "java.io.tmpdir" );
13: String src = tmp + "/" + new java.util.Date().getTime() +
14: "_in.jpg" ;
15: String dest = tmp + "/" + new java.util.Date().getTime() +
16: "_out.jpg" ;
17: // Temporay file names
18: File srcFile = new File(src);
19: File destFile = new File(dest);
20: // Generate temporary file for input
21: FileOutputStream fs;
22: try {
23: fs = new FileOutputStream(src);
24: fs.write(data);
25: // Convert byte array to buffered image
26: BufferedImage imgSrc = ImageIO. read (srcFile);
27: BufferedImage imgDest = new BufferedImage(width, height,
28: BufferedImage. TYPE_INT_RGB );
29: Graphics2D g = imgDest.createGraphics();
30: AffineTransform at = AffineTransform. getScaleInstance (
31: ( double ) width / imgSrc.getWidth(), ( double ) height
32: / imgSrc.getHeight());
33: g.drawRenderedImage(imgSrc, at);
34: // Generate result image
35: ImageIO. write (imgDest, "JPG" , destFile);
36: InputStream is = new FileInputStream(destFile);
37: // Convert result image to byte array
38: long length = destFile.length();
39: // Will hold resulting byte array
40: byte [] result = new byte [( int ) length];
41: if (length < Integer. MAX_VALUE ) {
42: // Read in the bytes
43: int offset = 0;
44: int numRead = 0;
45: while (offset < result. length
46: && (numRead =
47: is.read(result, offset, result. length - offset)) >= 0) {
48: offset += numRead;
247 of 439
49: }
50: // Close the input stream and return bytes
51: is.close();
52: }
53: // Delete temporary files
54: srcFile.delete();
55: destFile.delete();
56: return result;
57: } catch (Exception e) {
58: e.printStackTrace();
59: }
60: return null ;
61: }
62: }
CWFAction.class
1:
2: package com.ibm.itso.redwiki.wcm.wf;
3: import java.util.Date;
4: import javax.naming.InitialContext;
5: import javax.naming.NamingException;
6: import com.ibm.workplace.wcm.api.Content;
7: import com.ibm.workplace.wcm.api.Document;
8: import com.ibm.workplace.wcm.api.ImageComponent;
9: import
com.ibm.workplace.wcm.api.WebContentCustomWorkflowService;
10: import
com.ibm.workplace.wcm.api.custom.CustomWorkflowAction;
11: import
com.ibm.workplace.wcm.api.custom.CustomWorkflowActionResult;
12: import com.ibm.workplace.wcm.api.custom.Directive;
13: import com.ibm.workplace.wcm.api. custom .Directives;
14: import
com.ibm.workplace.wcm.api.exceptions.AuthorizationException;
15: import
com.ibm.workplace.wcm.api.exceptions.ComponentNotFoundException;
16: import
com.ibm.workplace.wcm.api.exceptions.IllegalTypeChangeException;
17: import
com.ibm.workplace.wcm.api.exceptions.OperationFailedException;
18: import
com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException;
19: public class CWFAction implements CustomWorkflowAction {
20: public CustomWorkflowActionResult execute(Document arg0)
{
21: Directive directive = Directives. CONTINUE ;
22: String message = "Action succesfully executed" ;
23: if (arg0 instanceof Content) {
24: // Get current image
25: try {
248 of 439
26: Content wcmItem = (Content) arg0;
27: // Get image element
28: ImageComponent bigImage = (ImageComponent) wcmItem
29: .getComponent( "Image" );
30: // Check if there is an attached image
31: if (bigImage.getImageFileName()!= null ) {
32: // Get image bytes
33: byte [] arrImg = bigImage.getImage();
34: // Scale it
35: byte [] arrImgTmb = Thumbnail. scale (arrImg, 100, 50);
36: // Load new image
37: ImageComponent thumbnail = (ImageComponent) wcmItem
38: .getComponent( "Thumbnail" );
39: thumbnail.setImage( "tmb_" + bigImage.getImageFileName(),
40: arrImgTmb);
41: // Put new width and height
42: thumbnail.setWidth( "100" );
43: thumbnail.setHeight( "50" );
44: wcmItem.setComponent( "Thumbnail" , thumbnail);
45: }
46: } catch (ComponentNotFoundException e) {
47: // Dont rollback if a component is not found
48: directive = Directives. CONTINUE ;
49: message = "Image or thumbnail element not found" ;
50: } catch (AuthorizationException e) {
51: directive = Directives. ROLLBACK_DOCUMENT ;
52: e.printStackTrace();
53: message = e.getMessage();
54: } catch (PropertyRetrievalException e) {
55: directive = Directives. ROLLBACK_DOCUMENT ;
56: e.printStackTrace();
57: message = e.getMessage();
58: } catch (OperationFailedException e) {
59: directive = Directives. ROLLBACK_DOCUMENT ;
60: e.printStackTrace();
61: message = e.getMessage();
62: } catch (IllegalTypeChangeException e) {
63: directive = Directives. ROLLBACK_DOCUMENT ;
64: e.printStackTrace();
65: message = e.getMessage();
66: }
67: }
68: WebContentCustomWorkflowService
webContentCustomWorkflowService =
69: null ;
70: try {
249 of 439
71: // Construct and inital Context
72: InitialContext ctx = new InitialContext();
73: // Retrieve Custom Workflow Service
74: webContentCustomWorkflowService =
75: (WebContentCustomWorkflowService) ctx
76: .lookup( "portal:service/wcm/WebContentCustomWorkflowService"
);
77: } catch (NamingException ne) {
78: // Exception retrieving Service
79: ne.printStackTrace();
80: return null ;
81: }
82: // Create a result object
83: CustomWorkflowActionResult result =
84: webContentCustomWorkflowService
85: .createResult(directive, message);
86: return result;
87: }
88: public Date getExecuteDate(Document arg0) {
89: return DATE_EXECUTE_NOW ;
90: }
91: }
Note: It is not necessary to save the current content item in the action. Directive.
CONTINUE will do that for you.
CWFActionFactory.class
1:
2: package com.ibm.itso.redwiki.wcm.wf;
3: import java.util.Locale;
4: import com.ibm.workplace.wcm.api.Document;
5: import com.ibm.workplace.wcm.api.custom.CustomWorkflowAction;
6: import
com.ibm.workplace.wcm.api.custom.CustomWorkflowActionFactory;
7: public class CWFActionFactory implements
CustomWorkflowActionFactory {
8: public CustomWorkflowAction getAction(String arg0, Document
9: arg1) {
10: if (arg0.equalsIgnoreCase( "generate_thumbnail" )) {
11: return new CWFAction();
12: }
13: return null ;
14: }
15: public String getActionDescription(Locale arg0, String arg1)
{
16: return "Generates a thumbnail from existing content" ;
17: }
18: public String[] getActionNames() {
19: String names[]={ "generate_thumbnail" };
250 of 439
20: return names;
21: }
22: public String getActionTitle(Locale arg0, String arg1) {
23: if (arg1.equalsIgnoreCase( "generate_thumbnail" )) {
24: return "generate_thumbnail" ;
25: }
26: return null ;
27: }
28: public String getName() {
29: return "CWFActionFactory" ;
30: }
31: public String getTitle(Locale arg0) {
32: return "ITSO WCM 6.1 Redwiki Custom Workflow
33: Action Factory" ;
34: }
35: }
Finally, River Bend developers created the configuration file that registered the action in
WCM by creating a new empty file under WEBINF, called plugin.xml with this content:
Note: When deploying your application you can use default settings in all steps but step 2
(Map modules to servers). In this step be sure to select the WebSphere_Portal server.
With the custom action installed, it must be started. Tick the check box beside the new
application and click the Start button. Once the application is started the console
displayed a message showing the new action was avalilable:
251 of 439
Configuration
To make the action available for content creators, River Bend developers created a
custom workflow action in the same way than any other action.
From the Library Explorer interface, using the New button, Workflow > Actions > Custom
Action) with the following configuration:
252 of 439
Select the custom action:
Using versions
Content authors, and site designers can follow changes that have occurred to specific
items using version control, for example changes to a content item, or updates to an
Authoring Template. Additionally, site administrators can also employ version control at a
library level. Items that have already been versioned can be saved and restored by Date
range or identified Label.
Library versioning
Using library versioning, site administrators can group the items within a library by Label or Date &
Time. River Bend administrators use this functionality to create a baseline of the first version of the
website as shown in the following figure:
1. Open the Administration page, and navigate to Portal Content and then Web
Content Libraries.
2. Click on the button (Additional tasks) for the River Bend library.
3. Click on the button to create a Version Label.
253 of 439
The following figure shows the baseline version of the River Bend library.
The library version is created in the background. You see the status in the Additional
Tasks page after applying a label to all the current versioned items in the library as
follows:
Additionally, further detail is provided by clicking on the button to view a report of the
versioning status (system report for Label All Items) as shown below.
254 of 439
If something goes wrong, the River Bend administrators can rollback to previous versions
of Items, selected by Label. Additionally, if needed, site administrators can specify default
restore options for non-existing items as shown below.
255 of 439
Note: A library cannot be restored while any Items are currently locked or checked out.
Before restoring a library, as an administrator you must view all published Items in the
library, unlocking any items marked as checked out or locked.
Item versioning
The behaviour you see when using the versioning capabilities in the Library Explorer can
be configured at a global level. You define and manage these authoring options in the
WCM WCMConfigService service using the IBM WebSphere Application Server
administration console.
256 of 439
The following values specify version control settings for the WCMConfigService
described above:
always - A version is saved every time a non-workflowed item is saved, or every time
a workflowed item is published.
manual - Versions will only be saved when a user with at least editor access
chooses to save a version. This setting causes the following changes in the interface:
The Save Version button is available in the read mode of non-workflowed
items and in workflowed items in the published state.
The Save and Version button is available in the edit mode of non-
workflowed items and in workflowed items in the published state.
never - Disable version control for an item type.
If a version control strategy is not defined for an item type, then the version control
strategy specified in by the versioningStrategy.Default property is used. Again the values
above should be used to provide a default if required.
To achieve this goal, they set the following values for WCMConfigService properties:
versioningStrategy.Default = never
versioningStrategy.AuthoringTemplate = never
versioningStrategy.Component = never
versioningStrategy.Content = manual
versioningStrategy.PresentationTemplate = never
versioningStrategy.Site = never
versioningStrategy.Taxonomy = never
versioningStrategy.Workflow = never
Versioning of content items can be configured in two separate places to address differing
site compliance requirements. At River Bend there is a need to provide a version strategy
using workflow, this is achieved by adding a Version Action to a Workflow Stage as show.
Alternatively as shown below, the behavior of versions can be applied in the Item
Properties section of an Authoring Template.
Setting Configured default will use the version actions in the versioning strategy
properties we set previously.
257 of 439
Note: When you define your workflow stage, you must put Version actions after a
Publishing action. You will be prompted if this is missed.
Links management
The View References feature shown below helps authors to keep track of and manage all
the links between items.
The River Bend authors can view the references From the Home default content item to
other items within the site, additionally using the Show: drop down box authors can see
references to this item. The feature is very useful to understand the impact a change, or
deletion might have on other items in the site.
258 of 439
Locks
As River Bend authors contribute their content into the site, sometime they may find their
items are locked by other users. This happens either because they are being edited by
another user who has access, or a draft item has been created.
Administrators can lock and unlock items by selecting them and clicking either the Lock
or Unlock button.
Locking: The locking of Site Areas, Taxonomies, and Categories is configurable and is
not enabled by default. When locking is enabled, authors cannot create any children
under the locked site area. This only applies to items that are located one level below a
locked parent.
When a new draft of a published item is created, a check mark is displayed next to the
published item indicating that no other user can create a draft until the current draft
progresses through a workflow and its state changes to published.
259 of 439
3.3.4. Previewing content
During the content creation process, the River Bend authors want to see how content will
be displayed on the rendered site before submitting a draft.
IBM Web Content Manager (WCM) provides authors two options (via the Library Explorer
user interface) to preview content before it is published:
For site designers, WCM provides the ability to preview other items such as templates,
site areas, and components.
Previewing options are controlled by the River Bend administrators using the Library
Explorer preference settings. Select Allow Authors to preview content in local portal
pages. Select specific portal pages from the list. The selected portal pages must contain
a Web Content Viewer portlet.
To allow users to preview pages using the WCM servlet engine (as a stand-alone web
page), select the Preview content in a Web page, option.
Note: When using a rendering portlet to preview content, the rendering portlet should be
configured to receive links from "Other Portlets and This Portlet". Otherwise the preview
will not work.
The River Bend website is built using both content from WCM and Portal components, as
such authors preview content using Portal pages.
The selected page is displayed in the preview portal page as shown in the figure below.
260 of 439
Note: Portal administrators can define several pages for previewing content. Those
pages can have different navigation themes to allow authors to preview how content will
display in different sites such as River Bend's public website and River Bend's intranet.
Note: In order for the preview option to work properly, you must allow browser pop-ups
for your server address. To preview content items River Bend authors have two options:
Select the content element from any of the views that are available in the authoring
environment and click the Preview button.
The following figure shows preview from a view list.
261 of 439
Open the content item directly in read mode, click the Preview button.
The following figure shows preview from a piece of content.
262 of 439
If there is more than one previewing option, the browser shows a dialog box to allow the
author to select where the content should be previewed. See the following figure.
If the author chooses Preview as a Web page, a new browser window that shows a
preview of how the selected content will be displayed.
Note: If the styling and formatting of the item being previewed is not reference by that
item directly, they styling will be missing. This occurs for example when a content item
that is previewed as a webpage isolation, but is actually published through a portal page
normally. In this situation the styling and formatting references to CSS will be in the Head
section of the Theme.
In the case of River Bend, a simple personalization rule and example is implemented to
better illustrate the concept. The personalization rule that is implemented is based on
dates. If the date the site is accessed is within a range of defined "summer dates", then
the home page illustrates a summer-based image of a refreshing iced coffee drink as
shown in the following figure. If the date the site is accessed is within a range of defined
"winter dates", then the home page illustrates a winter-based image of a hot coffee drink.
263 of 439
Overview of the personalization feature
You can find complete information about the rich set of capabilities that the
personalization feature provides in the WebSphere Portal information center at the
following address:
http://infolib.lotus.com/resources/portal/7.0.0/doc/en_us/pt700abd001/html-wrapper.html
A portlet can have a designated spot for rule-based content. For each spot, a rule is
selected. All rules are created based on the resource attribute definition. These attributes
are defined in a resource collection . The resource collection is a set of Java classes that
retrieve content requested by the rule from the defined repository source. The back-end
source can be LDAP or SQL databases, the portal Java Content Repository (JCR),
Virtual Member Manager (VMM), or any other custom collection that is coded for the
personalization API. The JCR resource collection is provided with WebSphere Portal as
well as VMM. Wizards are available in Rational Application Developer 7 that guide
developers in creating classes for other LDAP and relational database resources. A guide
of how to create these resources is described fully in the WebSphere Portal Information
Center.
Three types of rules are used to target select content to a certain group of users:
Select rule - Chooses content based on the attributes of the content. For example,
the GoldOffers rule selects products whose retail price is greater than a certain
amount. With IBM Web Content Manager content, you can also select content with a
specific category. For example, a NonManager rule gets content that is created with
the HRNews template that has a category of non-manager.
Profiler rule - Profiles based on user attributes, date, and any other information. This
rule is used to decide which actions to take and which policies to use. It gives a name
to a set of conditions. For example, a user is profiled as a premium user if the amount
of the user's mortgage is over a certain amount. Another example is if a user's order
amount is over a certain amount, then that user is profiled as a gold user . In addition,
an employee can be profiled as non-management if the employee's isManager
attribute is set to false.
264 of 439
Binding rule - Ties the profile and select rules together. Premium users see
PremiumOffers, gold customers see GoldOffers, and non-manager employees see
NonManagement news. You do not have to coordinate the naming of the profile with
the select rule name. However, this convention helps when creating the binding rule.
Any of these rules can be tied to a content spot. To enable your environment to construct
these rules, you must install and configure personalization in Web Content Manager.
To create a personalization rule, we write a select rule that retrieves all the content from
River Bend Site Area that is created using the General authoring template:
265 of 439
9. Click Save.
10. To show the content returned from this rule, select the Preview tab, as shown in the
figure below.
266 of 439
There are two configuration modes:
1. On the Personalized List Portlet Menu, select Configure and the following screen is
displayed.
267 of 439
2. Click the drop down that says Nothing Selected and you are provided with the
following option, as shown in the figure below.
3. Pick the Select content rule that you had created earlier and the following screen is
displayed, as shown in the figure below.
To configure the display settings for Personalized List Portlet, do the following:
268 of 439
The following result is displayed, as shown in the figure below.
When you select a title, you get the detail attribute displayed for that title. Note that
this list does not use the site area and presentation template to render the content.
Instead, it uses just the attribute that you defined in the Portlet configuration.
Only Select rule, Binding rule, content spots and custom JSP that has a content spot
can be verified using Personalized List portlet. Profiler rules cannot be tested using
this portlet.
Using personalization rules, the content of the beverage of the current season will be
269 of 439
selected and the image will be displayed.
The Portal Personalization engine can be used for the following tasks:
Personalization browser
Rules engine
LikeMinds recommendation engine
Resource engine
Logging framework
270 of 439
Personalization browser
The Personalization user interface is a portal based application where authorized users:
Rules engine
The rules engine evaluates rules created in the Personalization browser.
Personalization rules may be invoked through the personalized list portlet and
presented as a list of text and links.
The WCM personalization components allow you to invoke a selection rule or content
spot and format the results by using WCM tags.
Hide rules associated with pages or portlets through portal administration are
automatically triggered when a user navigates a portal page.
Resource engine
The resource engine resolves the queries produced by rules into content pieces to be
returned. Content for personalization is created using whatever content management tool
you choose, or may come from an LDAP or any other database. Content is accessed via
a set of Resource Collection classes.
271 of 439
Logging framework
The logging framework is used to record information about website usage to the
feedback database and the recommendation engine. It is entirely up to the site
developers to decide what information is logged.
This section shows you an example extracted from the article, Personalization , from the
Redbooks Wiki: "Creating External websites with WebSphere Portal" where you can find
a detailed tutorial to create two different scenarios:
A campaign for recommended products that runs for a fixed duration in the
"Recommended products" portlet in the home page.
How to show personalized content based on location of the registered users.
Recommended products
In this kind of campaign, there are two sets of content related to coffee and tea products.
Marketing department wants to run a campaign in the home page to promote coffee and
tea equally by splitting coffee and tea related information equally among visitors.
On first request, the view of the portlet is shown by the left figure (first recommendation).
If the user logs in again, the view of the portlet changes to show the second campaign
item shown on the right figure (second recommendation).
272 of 439
First recommendation Second recommendation
Their display needs to be divided in an equal ratio. Therefore, for one request to the
website, content 1 is displayed and for the next request, content 2 is displayed.
Personalized content
This second scenario shows personalized content based on location of the registered
users. Based on a location attribute filled in on the registration page of the registered
user, the location specific content is delivered in the "Campaign" portlet in the homepage.
Here the left figure (Spain content) shows the portlet seen by the user from Spain.
Assume we sign up a new user with CountryName attribute as India. Upon logging in by
that user, the right figure (India content ) shows the portlet by the Indian user.
273 of 439
Spain content India content
3.5. Internationalization
When addressing the requirements to deliver content across multiple languages it is
important not only to focus upon the resulting content itself, but also the authoring of that
content. Ensuring the content authoring environment is available in the local language is
an important step to removing any barriers to the content creation process.
To address both of these requirements typically seen within organizations IBM Web
Content Manager (WCM) provides the following:
Text Providers
Multi-lingual Solution (MLS)
274 of 439
3.5.1. Text Providers
Text providers are used to deliver localized text (i.e. text in the local users language) that
can be used within web content item forms. Within the scenario of internationalisation of
web content, a text provider can be used to localize the field labels or help text within an
authoring template so that each user sees the labels or help text in their own language.
Text providers are deployed into IBM Web Content Manager as a custom-plugin. This
requires a developer to implement the java interface
com.ibm.workplace.wcm.api.plugin.textprovider.TextProvider and specific methods:
In addition to the WCM API .textprovoider interface, the methods inherited from
com.ibm.portal.Localized must also be implemented.
Further information for developing text providers can be found on the IBM Portal Wiki.
The solution includes a whitepaper, Multilingual Site Management with Lotus Web
Content Management, that describes the framework for managing a multilingual site, the
deployment and configuration of the extensions, and examples of their use.
275 of 439
Workflows which coordinate the lifecycle of content items and their translations.
Authoring template extensions to simplify the creation and navigation between
translated content items.
Site template tools for self-service creation of new sites.
Notification system which informs content authors and translators when items need
translating and retranslating due to changes to one of the translations.
A recommendation capability which informs site owners when new content items are
created and enables them to include the content item on their site at the click of a
button.
Further information on the MLS solution can be found on the IBM Greenhouse Business
Solutions Catalogue.
276 of 439
3. Enter in RiverbendCollection for the location, name, and description fields. Ensure
the Summarizer is set to Automatic. See the setting below. Click OK.
Note: For the location field, if you do not give a full path, portal will store the data in a
predetermined directory (wp_profile/PortalServer/collections).
4. Click on the RiverbendCollection name to go into the details. There are no content
sources yet. Click on New Content Source as shown in the figure below.
277 of 439
5. When creating the new content source, in the drop down select WCM site.
Note regarding URL: You are entering in a URL to the seedlist capability of the
portal server. When you pass the SeedlistId, you tell the seedlist to get all the content
under the Riverbend library in the Riverbend SiteArea. Finally, the source for the
seedlist is passed to tell the server to use the WCM seedlist generation capabilities.
278 of 439
7. Leave the rest of the values. Click on the Security tab.
In the Define Security Realm, enter in the admin username and password.
For the Host Name, enter the host name for your portal.
Click the Create button.
8. After creating the security realm, click on the Create button at the bottom of the form.
279 of 439
Forcing the search crawl
Now that the search collection is created, we should force a crawl so that the WCM
content in the library can be indexed.
After creating the content source, you will be back in the list of content sources for the
collection. Click on the crawl icon to force a crawl.
Once the crawl is complete, we will still have to wait until the indexed documents are
available. Here's an example of a search collection that has available content indexed:
Now, for the Riverbend example, there will already be content pages mapped to the
280 of 439
Riverbend site framework. However, we can show how the pages will be created in the
general case.
1. Navigate to the Portal Administration > Portal User Interface > Manage Pages.
2. Navigate to where you want to deploy the page.
3. Click on the New Page from... button.
4. In the form, for the title and friendly URL name, enter RiverbendSearchResults,
From the Page Template drop down, select Sample Web Content Page Template.
This will cause a WCM JSR286 portlet to be automatically deployed on the page.
In the Web Content Mappings, choose the top level Riverbend site area in the
Riverbend library.
281 of 439
5. Now that the page has been created, all that is left is to change the portlet
configuration to allow the portlet to receive links. Navigate to the page that you
created, and then in the portlet, click on the Edit Shared Settings.
6. Down to the bottom of the page, there is a section for Advanced Options. Set the
Receive links from to Other portlets and this portlet. Then click OK.
This page will render content for any results under the Riverbend site area. In a real
world scenario, you would have more pages with more mappings, but in this example
we'll use the top level page as a catch all.
Note that although there are two results that look the same, they are actually to two
282 of 439
different results because of the path to the item. When we click on the search result,
because we have the content page mapped and the rendering portlet deployed to it, the
result will be displayed on that page. The URL becomes:
http://host:port/wps/myportal/RiverbendSearchResults/Home/Products/Tea/Jasmine%20
Tea/!ut/p/b1/hc7RToMwFAbgZ_EB5By6FthlGQRwUAcFR3uzoDgDk83IotKnHxpvp-
fuT778_wENilHmODY6BGrQx-
aje2nO3enYvH5n7ew4wbXv2xyjiDuYbOTK50VOMKGwBRXNSs0KrxzH_0v0D1lFPKZui
uilEcOEx1WxzBcLzOkv-
GNCzcC9PsKghBrpTvbTW2IOpuhNbmQ4TrIXayyrKQviWpQhyVppi0Bnc6spw6_70XCS
9Wo6t8GmfSgqnwcqS8cO7kB3j4P1-TRYaDHbc8kS6fys5zJiwzYGEZ-GZxj0-
3R72Iu9oDcXFerkvw!!/dl4/d5/L2dBISEvZ0FBIS9nQSEh/
This shows it being mapped to the proper portal page that we created.
Now, if we had not created the page mapping, this search result would have been
opened in the WCM servlet instead of to the portal. This is the reason that we want to
make the page mappings, assuming we want the content to be displayed within the
portal.
There are several reasons you may decide to do this, some reasons:
Only WCM results will be displayed, meaning any non WCM assets in the search
collection will be filtered out when using WCM search component.
Full control over the HTML display of the results.
Integration within a WCM site being rendered from the servlet.
To accomplish this, we have to create a piece of content that will hold both the search
form and the results of the search. When a search is submitted the form will submit to the
page for the results, which the form is also deployed to.
283 of 439
Save and close the new authoring template.
1:
2: Search Page
3:
4:
5:
6: <!-- Text -->
7:
8: <p>[Element context="current" type="content" key="text"]</p>
9:
10:
11:
12: <!-- Component Reference -->
13:
14: <p>[Element context="current" type="content"
key="query_form"]</p>
15:
16:
17:
18: <!-- Component Reference -->
19:
20: <p>[Element context="current" type="content"
key="search_results"]</p>
21:
22:
This code renders the three elements that were added to the authoring template in the
previous step. Save and close the new presentation template.
284 of 439
Creating the WCM search form
Now, we need to create the HTML component that will hold the html for the search form.
Create a new HTML component named "HTML - Adv Search form", and enter the
following HTML:
1:
2: <table>
3:
4: <tr>
5:
6: <td>Search by type: </td>
7:
8: <td>
9:
10: <form action='[PathCmpnt
type="servlet"]/RiverBend/Search/Results' method="post">
11:
12: <input type="text" name="search_query" />
13:
14: <select name="search_authoringtemplate">
15:
16: <option value="">Select one ...</option>
17:
18: <option value="News">News</option>
19:
20: <option value="Products">Products</option>
21:
22: <option value="Locations">Locations</option>
23:
24: </select>
25:
26: <input type="submit" value="Search" />
27:
28: </form>
29:
30: </td>
31:
32: </tr>
33:
34: </table>
35:
36:
What the code does is setting up the form to submit to the RiverBend/Search/Results
content (which we will create later), and puts the search_query in the form. The
search_query is what gets processed by the WCM Search component as the search. We
also limit results to News, Products, or Locations baed on the search_authoringtemplate
field. This means that when the search is performed, we limit results based on the
content's authoring template.
285 of 439
Creating the WCM search component
Next, we need the WCM search component to be created in order to display the search
results. Create a new search component named "Search-Search Results". In the search
options, select the RiverbendCollection for the Search collection: field. Also, use 5 for the
results per page, as we will use a page navigation to page through the search results.
1: [Component name="./search-result-navigation"]
2:
3: <table>
286 of 439
In the results field, enter the following:
1:
2: <tr>
3:
4: <td>
5:
6: [AttributeResource attributeName="nameLink" separator=","]
7:
8: ([AttributeResource attributeName="relevance"
separator=","])
9:
10: <br>
11:
12: [AttributeResource attributeName="summary"
separator=","]
13:
14:
15:
16: </td>
17:
18: </tr>
19:
20:
In this code, we display the link to the item, its relevance, and a summary of the result.
1: </table>
1:
2: <tr>
3:
4: <td bgcolor="#FFFAA" colspand="2" />
5:
6: </tr>
7:
8:
287 of 439
Creating the paging component
For the results to be paged, we create a simple paging component. Create a new page
navigation element named "Search-result-navigation". Use the following as a guide for
the paging design for shuffle, paging, jump to page, and page size values to use.
Use the following as the guide for the value of the design elements of the paging
component:
288 of 439
And finally, for the jump to and page size control.
Secondly, create a new piece of content. Select the at_Search authoring template, name
the content "Results", For the Query Form item, select the HTML - Adv Search form
component. For the Search Results, select the Search - Search Results component. In
289 of 439
the text field, enter "Please select your search mode and click the button":
Choose a workflow for your content, save and publish the content. As a last step, go back
to the Search site area, and set this new content as the default content for the site area.
290 of 439
Click on the Search button, and the results will be displayed.
Note: The results that are displayed have URLs which will bring you to the content within
the portal if a page is mapped as in the above documentation, or stay within the servlet if
you do not. Just like the portal search center portlet, but this guarantees only WCM
results.
Conclusion
In this section, we discussed some different ways in which you can get your WCM
content to be indexed in the portal search, and to present the WCM search results within
either the portal search center, or a WCM search component. Also, we discussed setting
up content page mappings to act as landing pages for the WCM search results once they
are retrieved.
291 of 439
Part 4. Expanding Web Content Manager environment
Part 4 covers the following topics:
4.3 Programming
The IBM Web Content Manager API is focused on processing the content
programmatically. This section provides an overview of the WCM API, links to the API
documentation and Javadoc, and an introduction to the new API features in WCM 7.0.
If you provide content authors with the right tools, they can do things faster and better.
IBM Web Content Manager (WCM) provides many extension points that allow site
designers to provide a tailored authoring experience with wizards and shortcuts for the
most frequent tasks.
This section describes how to personalize the authoring tools with WCM.
292 of 439
IBM Web Content Manager enables contributors and editors to access the most common
authoring functions directly from a rendered site. Some examples are: create and edit
content items, approve, reject or delete the content item displayed in a Web page.
Inline editing improves the usability of the authoring functions by limiting the number of
clicks and navigational actions needed to complete a task in the system. Inline editing is
enabled by using authoring tools components, which are regular components that can be
part of presentation templates, menu element designs, and navigator element designs.
When a user clicks an inline action, the Web Content Viewer portlet either launches a
modal dialog window that opens from the current page (as shown in the above figure) or
redirects the user to another portal page that contains the authoring portlet. This behavior
can be customized in the authoring tools element design as is specified in the product
documentation:
Link to authoring tools reference
Sample scenario
To increase productivity, River Bend designers added an authoring tool component to
every presentation template. Thus, when an author accesses an existing content item, a
quick menu is displayed (as shown in the following figure) for the author to edit and
create new content.
293 of 439
The author only needs to click Edit to access to the current content item in edit mode as
shown in the following figure.
The Authoring tool component creation is a simple process: River Bend designers only
need to specify the HTML code they want for the action buttons as shown in the following
block of code.
1: <Placeholder tag="namelink"/>
2: <Placeholder tag="namelink" format="tag"/>
3:
4: <a href="<Placeholder tag="href"/>">
5: <Placeholder tag="name"/>
6: </a>
7:
8: <a href="<Placeholder tag="href" format="tag"/>">
9: <Placeholder tag="name"/>
10: </a>
Several options, such as the authoring template or the site area for new content, are
available for the different authoring tools.
Remote actions
IBM Web Content Manager provides a REST like interface to invoke most of the
authoring functions by calling specific URL patterns. Consider the following examples of
remote action uses:
Create content by using a basic HTML form and submitting it against IBM Web
Content Manager.
294 of 439
Create your own wizards to accelerate the content creation process.
Embed authoring actions in feeds to provide access for open, edit, approve, decline,
or delete items actions.
Create shortcut for the most used views in the authoring portlet based on user roles.
You can find a list of all available remote actions in the product documentation in this
address:
Link to remote actions reference
Sample scenario
To increase productivity, the River Bend designers will create a launch page with
shortcuts for several authoring functions by using remote actions with these URL
patterns:
1:
/wps/myportal/wcmAuthoring?wcmAuthoringAction=new&type=com.i
bm.workplace.wcm.api.WCM_Content&wcmfield.content.title=<tit
le>&atid=<authoring template id>
1:
/wps/myportal/wcmAuthoring?wcmAuthoringAction=read&docid=com
.ibm.workplace.wcm.api.WCM_Content/<content id>
1:
/wps/myportal/wcmAuthoring?wcmAuthoringAction=edit&docid=com.
ibm.workplace.wcm.api.WCM_Content/<content id>
1:
/wps/myportal/wcmAuthoring?wcmAuthoringAction=approve&docid=c
om.ibm.workplace.wcm.api.WCM_Content/<content id>
295 of 439
By combining API calls and remote actions in launch JSPs, you can create shortcuts for
views and functions with the authoring portlet user interface.
A shortcut to create a content element using any of the authoring templates available
for users
Listing all the drafts created by the current user with contextual links for opening,
editing, or submitting for approval
Listing all the content pending for approval with contextual links for opening,
approving, or declining it
Listing all the published content with contextual links for opening it
Opening the IBM Web Content Manager main view
To develop this custom page, River Bend designers use these steps:
1. Create a JSP file with the content described later. The file is customLaunchPage.jsp
and package it in a WAR file under the folder: /jsp/html
2. Deploy the WAR file through WebSphere Administrative Console under the URL
contextPath: /RB_WCM_extensions
3. Configure the IBM Web Content Manager Authoring Portlet to launch the new page
instead the default workspace:
RB_WCM_extensions;/jsp/html/customLaunchPage.jsp
296 of 439
Sample code
The sample code is presented in six sections.
1: <%@page import="com.ibm.workplace.wcm.api.*,
2: com.ibm.workplace.wcm.api.exceptions.*" %>
3: <% Repository repository = WCM_API.getRepository();
4: Workspace workspace =
repository.getWorkspace(request.getUserPrincipal());
5:
6: // Set current document Library
7:
workspace.setCurrentDocumentLibrary(workspace.getDocumentLibrary("Riv
erBend"));
8: %>
9:
10: <script>
11: function display(id) {
12: status=document.getElementById(id).style.display;
13: if (status=="none") {
14: status=document.getElementById(id).style.display =
"block";
15: } else {
16: status=document.getElementById(id).style.display =
"none";
17: }
18: }
19: </script>
20: <h3>Select a task:</h3>
297 of 439
Section 2: Quick content creation form
First, a JavaScript function is created to help compose direct action URLs for content
creation. Then, an API call retrieve is available for authoring templates for the current
user to compose a select list with them.
1: <h4><a href="javascript:display('create')">Create
Content</a></h4>
2: <div id="create" style="display:block">
3: <script>
4: function createContent(){
5: atid=document.getElementById('atid').value;
6:
contentName=document.getElementById('contentName').value;
7:
8:
document.location.href='?wcmAuthoringAction=new&type=com.ibm.workplac
e.wcm.api.WCM_Content&atid=' + atid + '&wcmfield.content.name=' +
contentName;
9: }
10: </script>
11: Authoring template:
12: <select name="atid" id="atid">
13: <%
14:
15: // Get all the authoring templates
16: DocumentIdIterator authoringTemplates =
17: workspace.findByType(DocumentTypes.AuthoringTemplate);
18: while (authoringTemplates.hasNext()){
19: DocumentId authId = (DocumentId)
authoringTemplates.next();
20: out.println("<option value='" + authId.getId() +
"'>"+authId.getName()+"</option>");
21: }
22: %>
23: </select>
24: New item name: <input type="text" name="contentName"
id="contentName"/> <input type="button" onClick="createContent()"
value="Create"/>
25: </div>
298 of 439
Section 3: My Drafts
An API call retrieves the workflow stage called Draft from the River Bend library. This
stage is used together with the current user name to perform a search on all the library
content where the user has the author role. Direct actions are composed for open, edit,
and approve.
299 of 439
Section 4: Content pending for approval
The content pending for approval section is built in the same way as Section 3. An
additional workflow stage (approval) is added to the search query, and the content is
filtered by using ROLE_APPROVER.
300 of 439
33: out.println("</tr>");
34: }
35: if (!found) {
36: out.println("There are no documents pending
for approval");
37: }
38: } else {
39: out.println("Draft or Approval stages couldn't be
found");
40: } %>
41: </table> </div>
301 of 439
Section 6: Open main view
The open main view section provides access to the default authoring user portlet
interface.
You can write JSP to control the look and feel of an element and to restrict the values
that can be entered into an element. You can also write JSP to create sophisticated UI
components such as auto-completion boxes and pop-ups. You can find a complete set of
examples in the "Customizing elements using JSP" topic in the WebSphere Portal
information center at the following address:
Link to customizing authoring elements documentation
The JSP page must be stored in the WAR file directory for the Authoring portlet, which is
was_profile_root/installedApps/ cellname /PA_WCM_Authoring_UI.ear/ilwwcm-
authoring.war/jsp/html. In this directory name, cellname is unique to your installation. The
JSP page might also need to be stored in the client WAR directory of the servlet or portlet
that calls the JSP, such as when using the authoring tool element, or if using the IBM
Web Content Manager API. For example, if displaying custom fields in content that is
opened by using the edit button on an authoring tool, you also need to save the custom
field JSP in the WAR file directory for the local rendering portlet.
Refer to the "Examples of replacing the out of the box rich text editor in Web Content
Manager" wiki article at the following address for specific examples:
Link to replacing the out of the box rich text editor instructions
4.1.5. WebDAV
Web-based Distributed Authoring and Versioning (WebDAV) is a set of methods based
on the Hypertext Transfer Protocol (HTTP) that facilitates collaboration between users in
editing and managing documents and files stored on world wide web servers. WebDAV
enables you to work with your web content items by leveraging tools like file explorers to
create image or file components by dragging a file into a corresponding folder, perform
actions on several items at once, editing templates and modifying any item's metadata or
access control settings by modifying XML files.
302 of 439
4.2. Integrating with other systems
This section describes the integration options of IBM Web Content Manager (WCM) with
third party applications including Enterprise Content Management (ECM) systems and
web analytics solutions.
Standard portlets
It is common for third party ECM software to provide standard JSR168 or JSR286
portlets that can be used within the WebSphere Portal environment.
This pattern should be considered an entry point to ECM integration because it lacks
many features such as search, authorization or personalization integration that can be
achieved using richer integration capabilities that we will describe later in this article.
Federated documents are documents that are referenced in WCM but really "live" in
another system such as FileNet, Content Manager or Quickr.
303 of 439
To simplify the creation of federated documents rules and links, WCM provides an user
friendly dialog box called "Document Picker". The Document Picker makes it easy for
content authors to browse an external repository and select the document that they want
to link.
For authentication, Document Picker can reuse the SSO mechanisms configured
between WCM and the ECM system or allow the authors to enter a different user and
password to access the repository.
Access to ECM systems is achieved through the Portal AJAX proxy, so it's important to
create the right policies to ensure connectivity between them Link to instructions
Access to ECM systems may require the deployment of additional software capabilities in
the source system such as the Quickr REST services for FileNet.
WCI allows content created in third party ECM systems to be published in WCM by using
RSS/ATOM feeds that store the META data and data in WCM and adhere to the IBM
WCI specification.
304 of 439
IBM WCI can be easily understood by describing the various entities involved:
Feed Producer: This is a custom application built at the third party ECM level that
uses the IBM WCI specification to produce the RSS/ATOM feed.
RSS/ATOM Feed: This is the RSS/ATOM Feed that is generated by the third party
ECM custom application which contains the META data and data required by WCM.
WCI: IBM WCI is a Portal component that consumes the RSS/ATOM feed and uses
the META data information from the feed to create new, update existing or delete
WCM content.
There are three classes of events that can be delivered as messages to the Java
messaging service:
Sample scenarios where JMS for Web Content can be used are the expiration of custom
caching mechanisms, integration of business logic on item change, implementation of
audit systems, etc.
305 of 439
Before you start you need to deploy JMS resources in WCM: Link to instructions on creating JMS
resources for WCM
To understand this sample it is important that you are familiar with JMS and message
driven beans concepts: Link to JMS and MDB basic concepts
Then you have to create an EJB project in Rational Application Developer and include on
it a message driven bean with this code:
1:
2: package com.ibm.redwiki;
3:
4: import javax.ejb.ActivationConfigProperty;
5: import javax.ejb.MessageDriven;
6: import javax.jms.Message;
7: import javax.jms.MessageListener;
8:
9: /**
10: * Message-Driven Bean implementation class for: WCMItemEJB
11: *
12: */
13: @MessageDriven(
14: activationConfig = {
@ActivationConfigProperty(
15: propertyName =
"destinationType", propertyValue = "javax.jms.Topic"
16:
17:
),@ActivationConfigProperty(propertyName="destination",
propertyValue="jms/IWKTopics/Items")},
18: mappedName = "IWKTopics_Items")
19: public class WCMItemEJB implements MessageListener {
20:
21: /**
22: * Default constructor.
23: */
24: public WCMItemEJB() {
25: }
26:
27: /**
28: * @see MessageListener#onMessage(Message)
29: */
30: public void onMessage(Message message) {
31: System.out.println(message.toString());
32:
33: }
34: }
306 of 439
The source code for the message driven bean is very simple to understand; it registers
with the WCM JMS Topic queue to be notified every time a content item is changed.
When a change event is received, it is logged in the application server console.
In order to make this sample work, you need to bind the message driven bean to the JMS
activation for WCM topics that is configured in WAS. This is done by creating an XML file
under META-INF/ibm-ejb-jar-bnd.xml with this content:
1:
2: <?xml version="1.0" encoding="UTF-8"?>
3: <ejb-jar-bnd
4: xmlns="http://websphere.ibm.com/xml/ns/javaee"
5: xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6:
xsi:schemaLocation="http://websphere.ibm.com/xml/ns/javaee
http://websphere.ibm.com/xml/ns/javaee/ibm-ejb-jar-bnd_1_0.xsd"
7: version="1.0">
8:
9: <message-driven name="WCMItemEJB">
10: <jca-adapter activation-spec-binding-
name="jms/IWKItemChangeMonitorActivation" destination-binding-
name="jms/IWKTopics/Items"/>
11: </message-driven>
12: </ejb-jar-bnd>
Reference
You can find more information on message driven beans coding and configuration details
in this article: Link to message driven beans article
WebSphere Portal and WCM has supported server side analytics for some time. Server
side analytics traces the usage of pages and portlets to a dedicated log file. Multiple
types of site analyzer loggers allow portal administrators to gather statistical data in
varying areas.
Active site analytic support is a newer approach to the same requirements, but it runs on
the client-side, collecting and sending information in real time to web analytics solutions
such as Coremetrics, Omniture, and Webtrends. The underlying framework can be
extended to support other Web analytic providers.
307 of 439
This microformats are parsed on run-time by the Portal engine and sent to the analytics
provider by an aggregator. An aggregator is a JavaScript function that composes an
HTML entity such an image or an AJAX call to send the information that has been logged
to the analytics provider.
WebSphere Portal ships two sample aggregators that you can review to get started
before creating your own:
1:
2: // This is a sample for an Active Site Analytics aggregator.
3: // It injects a 1x1 pixel image into every page that has the
metadata item "asa.aggregator" set to "asa_sample.js"
4: // This image contains a list of portlet ids and titles, as
well as the page title and canonical URL, as HTTP GET
5: // parameters.
6:
7: // retrieve portlet titles tagged with <span
class="asa.portlet.title"/>
8: var portletTitles = new Array();
9:
10: getElementHTMLByClassName("span", "asa.portlet.title",
portletTitles);
11:
12:
13: // retrieve portlet IDs tagged with <span
class="asa.portlet.id"/>
14: var portletIDs = new Array();
308 of 439
15:
16: getElementHTMLByClassName("span", "asa.portlet.id",
portletIDs);
17:
18:
19: // retrieve the page's link node containing the bookmark
20: var bookmarkElement = null;
21: var links = document.getElementsByTagName("link");
22: for (var index = 0; index < links.length; index++) {
23: var elem = links[index];
24: if (elem.getAttribute("rel") == "bookmark") {
25: bookmarkElement = elem;
26: break;
27: }
28: }
29:
30: var imgURL = "http://example.com/analytics/tracking.png"
31: + "?" + "page_title=" +
escape(bookmarkElement.getAttribute("title"))
32: + "&" + "page_url=" +
escape(bookmarkElement.getAttribute("href"))
33: + "&" + "portlets=" +
escape(portletTitles.join(','))
34: + "&" + "portlet_ids=" +
escape(portletIDs.join(','))
35: //alert("imgURL = " + imgURL);
36:
37: document.write("<img alt='' src='" + imgURL + "' width='1'
height='1'>");
38:
39:
40: function getElementHTMLByClassName(strTagName, strClassName,
arrReturnElements){
41: var arrElements =
document.getElementsByTagName(strTagName);
42: strClassName = strClassName.replace(/\-/g, "\\-");
43: var regex = new RegExp("(^|\\s)" + strClassName +
"(\\s|$)");
44: var elem;
45: for(var i = 0; i < arrElements.length; i++){
46: elem = arrElements[i];
47: if(regex.test(elem.className)){
48: arrReturnElements.push(elem.innerHTML);
49: }
50: }
51: return (arrReturnElements)
52: }
4.2.5. Reference
Enabling Active Site Analytics in WebSphere Portal 7.0
Site analytics and optimization
309 of 439
4.3. Programming
The IBM Web Content Manager API is focused on processing the content
programmatically. This section provides an overview of the WCM API, links to the API
documentation and Javadoc, and an introduction to the new API features in WCM 7.0.
WCM API
The WCM API is an alternative way to access a site that allows web developers to
create, edit, delete, and render WCM objects by using Java code. Additionally, clients
can manipulate their site and integrate WCM with other applications in many ways.
The API offers only a subset of IBM Web Content Manager's functionality, although it is a
very useful subset.
Typical API scenarios may include the following examples:
The following figure illustrates the way in which the WCM repository is accessed.
Following are a list of sample functions available when using the IBM Web Content
Manager API. You can find the complete list in this link: API Overview
310 of 439
The ability to create, delete and save the following items: Content, Site Areas, most
types of components, Taxonomies and Categories, Projects, Folders.
The ability to retrieve the following items: Content, Site areas, Taxonomies and
categories, Workflows, Components, Projects, Folders.
The ability to approve or reject content items in a workflow stage. Other item-types do
not support this function.
WCM API Javadoc is available online or to download in this wiki: Lotus Web Content
Manager API
The WCM API supports the most basic functions of projects such as getting the items
that are contained in a project, managing its members or publishing a project.
In WCM 7, folders can be used to organize components. This is useful when you have
large numbers of items in your library and want to distinguish between different groups of
items within each item type view. Working with folders
The WCM API also supports navigating folder structures and setting name and titles.
311 of 439
Query API
Query API is a completely new set of classes designed to provide an optimized method
to query for content in the WCM repository.
The results of a Query API search can be sorted by Author, Date created, Item name,
Date modified, Item title and paged.
The following terms (selectors) can be combined to compose queries using the API:
1:
2: // Get the query service
3: QueryService queryService = wcmWorkspace.getQueryService();
4:
5: // Create a query
6: Query query = queryService.createQuery();
7:
8: // Query for content only
9: query.addSelector(Selectors.typeIn(Content.class));
10:
11: // Limit the query to a specific library
12: DocumentLibrary selectionLibrary =
wcmWorkspace.getDocumentLibrary("PEC");
13: query.addSelector(Selectors.libraryEquals(selectionLibrary));
14:
15: // Add selector to limit to the items modified in the last
week
16:
query.addSelector(HistorySelectors.modifiedSince(oneWeekAgo()));
17:
18: // Sort by last modified date
19:
query.addSort(Sorts.byDateModified(SortDirection.DESCENDING));
20:
21: // Execute the query
22: ResultIterator resultIterator = queryService.execute(query);
312 of 439
Rendering plugin extension point
Rendering plugins are custom presentation components that contribute dynamic content
to a presentation template. In many ways, they work like JSPs components but with a
more friendly syntax and additional capabilities.
Examples of rendering plugins include the insertion of tagging and rating widgets, and
video players.
You can reference rendering plugins from HTML or Rich text fields using the plugin tag:
[Plugin:{Plugin Name}]
For example:
Display titles
Descriptions
Labels for elements on Authoring Templates
Help fields
WCM includes one default text provider but has an extension point to allow site designers
to define new sources of translations for a given key such as database tables or XML
files. Creating a Text Provider class
313 of 439
without warranty of any kind. IBM shall not be liable for any damages arising out of your
use of the sample code, even if they have been advised of the possibility of such
damages.
Rendering plugins
For now, do not worry about the tag details. Just know that we will be using
htmlcomponent and folderid values within the custom rendering code, which is why we
mention the tag format here. Since we're about to detail the custom rendering code it's
important to know what the tag will be passing in.
314 of 439
315 of 439
Once the Web Project has been created, you have to add either the Portal 7 runtime, or
the ilwwcm-api.jar to the classpath properties of the project. Right click project in the
explorer, and select Java build path. Ensure that a Portal server 7 runtime has been
added, or a reference to the ilwwcm-api.jar file from your server:
The reason we need this is that we will need some of the WCM API classes in order to
create the custom classes.
316 of 439
Name the package com.riverbend.renderingplugin. Once the package has been created
the custom classes can be created.
Next, right click on the new package, and select New -> Class. Name the class
WCMFilesPlugin, and click Finish.
317 of 439
Once the class has been created, paste the following code in:
1:
2: /**
3: * DISCLAIMER OF WARRANTIES: The accompanying code provided in
this section
4: * (and this wiki) is sample code, created by the authors of
this wiki.
5: * This sample code is not part of any standard or IBM product
and is
6: * provided to you solely for the purpose of assisting you in
the development of
7: * your website. The code is provided as is, without warranty
of any kind.
8: * IBM shall not be liable for any damages arising out of your
use of the
9: * sample code, even if they have been advised of the
possibility of such damages.
10: */
11: package com.riverbend.renderingplugin;
12:
13: import java.io.IOException;
14: import java.io.Writer;
15: import java.util.List;
16: import java.util.Locale;
17: import java.util.Map;
18:
19: import com.ibm.workplace.wcm.api.Document;
20: import com.ibm.workplace.wcm.api.DocumentId;
21: import com.ibm.workplace.wcm.api.Folder;
22: import com.ibm.workplace.wcm.api.LibraryComponent;
23: import com.ibm.workplace.wcm.api.LibraryFileComponent;
24: import com.ibm.workplace.wcm.api.LibraryHTMLComponent;
25: import com.ibm.workplace.wcm.api.RenderingContext;
26: import com.ibm.workplace.wcm.api.WCM_API;
27: import com.ibm.workplace.wcm.api.Workspace;
28: import
com.ibm.workplace.wcm.api.exceptions.AuthorizationException;
29: import
com.ibm.workplace.wcm.api.exceptions.DocumentIdCreationException;
30: import
com.ibm.workplace.wcm.api.exceptions.DocumentRetrievalException;
31: import
com.ibm.workplace.wcm.api.exceptions.OperationFailedException;
32: import
com.ibm.workplace.wcm.api.exceptions.QueryServiceException;
33: import
com.ibm.workplace.wcm.api.exceptions.ServiceNotAvailableException;
34: import
com.ibm.workplace.wcm.api.plugin.rendering.RenderingPlugin;
35: import
com.ibm.workplace.wcm.api.plugin.rendering.RenderingPluginException;
318 of 439
36: import
com.ibm.workplace.wcm.api.plugin.rendering.RenderingPluginModel;
37: import com.ibm.workplace.wcm.api.query.Query;
38: import com.ibm.workplace.wcm.api.query.QueryService;
39: import com.ibm.workplace.wcm.api.query.ResultIterator;
40: import com.ibm.workplace.wcm.api.query.Selectors;
41:
42: /**
43: * A rendering plugin that will display the fileresources
containing in a folder
44: * and render out based on a html template
45: */
46: public class WCMFilesPlugin implements RenderingPlugin {
47: /**
48: *
49: */
50: private static final long serialVersionUID =
1742627406969994207L;
51: /** The name used for identifying this object */
52: private static final String PLUGIN_NAME = "WCMFiles";
53:
54: @Override
55: public boolean isShownInAuthoringUI() {
56: return true;
57: }
58:
59: @Override
60: public String getName() {
61: return PLUGIN_NAME;
62: }
63:
64: @Override
65: public boolean render(RenderingPluginModel p_model)
66: throws RenderingPluginException {
67: boolean success = true;
68: Writer renderWriter = p_model.getWriter();
69: Map<String, List<String>> pluginParams =
p_model.getPluginParameters();
70:
71: RenderingContext rc =
p_model.getRenderingContext();
72: System.out.println("*** New got rendering
context ***");
73:
74: // Get the defined folder id
75: String folderid =
pluginParams.get("folderid").get(0);
76:
77: // Get the id of the html to render the item
78: String htmlcomponent =
pluginParams.get("htmlcomponent").get(0);
79:
80: // The output
81: String output = "";
319 of 439
82:
83: // The pattern to replace filename
84: String FILENAMESTR = "FILENAME";
85:
86: // The pattern to replace url
87: String FILEURLSTR = "FILEURL";
88:
89: // The html to format results
90: String html = "";
91:
92: Workspace workspace;
93: if (folderid != null && htmlcomponent != null)
{
94: try {
95: workspace =
WCM_API.getRepository().getWorkspace();
96: workspace.useUserAccess(true);
97:
98: DocumentId docid =
workspace.createDocumentId(folderid);
99: Folder folder = (Folder)
workspace.getById(docid);
100:
101: // Get the first matching
folder name
102: if (htmlcomponent != null) {
103:
104: html = htmlcomponent;
105:
106: // Get the children of
the folder
107: try {
108: ResultIterator
children = folder.getChildren();
109: String filename
= "";
110: String fileurl =
"";
111:
112: while
(children.hasNext()) {
113: // Check
to see if its a file resource and then
114: //
render the results using the html component
115: Document
doc = (Document) children.next();
116: String
htmlout = html;
117:
118: //
320 of 439
System.out.println("*** working on output ***");
119:
LibraryComponent lc = (LibraryComponent) doc;
120: if (lc
instanceof LibraryFileComponent) {
121:
filename = lc.getTitle();
122:
fileurl = workspace.render(rc, lc);
123:
htmlout = htmlout
124:
125:
htmlout = htmlout.replace(FILEURLSTR, fileurl);
126:
output = output + htmlout;
127: }
128:
129: }
130:
131: } catch
(QueryServiceException e) {
132: // TODO Auto-
generated catch block
133: output =
"QueryServiceException";
134: }
135:
136: }
137:
138: } catch (ServiceNotAvailableException
e) {
139: // TODO Auto-generated catch
block
140: output =
"ServiceNotAvailableException";
141: } catch (OperationFailedException e) {
142: // TODO Auto-generated catch
block
143: output =
"OperationFailedException";
144: } catch (DocumentIdCreationException e)
{
145: // TODO Auto-generated catch
block
146: e.printStackTrace();
147: } catch (DocumentRetrievalException e)
{
148: // TODO Auto-generated catch
block
149: e.printStackTrace();
150: } catch (AuthorizationException e) {
151: // TODO Auto-generated catch
321 of 439
block
152: e.printStackTrace();
153: }
154:
155: try {
156: // Render the output
157: renderWriter.append(output);
158:
159: } catch (IOException ioe) {
160: ioe.printStackTrace();
161: success = false;
162: }
163: }
164:
165: return success;
166: }
167:
168: @Override
169: public String getDescription(Locale p_locale) {
170: return "Renders the contents of a defined
folder in WCM";
171: }
172:
173: @Override
174: public String getTitle(Locale p_locale) {
175: return PLUGIN_NAME;
176: }
177:
178: }
The important part of the code is in the render method. This is what will be invoked when
you render the tag for the plugin. In this specific example, what the plugin is doing is
finding the folder within WCM for the parameter passed on the tag for folderid, and the
html to be used to render the file information. We will pass the html to use directly from
the content.
1:
2: [Plugin:WCMFiles update="true" htmlcomponent="[Element
context='current' type='content' key='HTMLFilesFormat']"
folderid="[Element context='current' type='content' key='WCMFiles']"]
We're retrieving the folder and the htmlcomponent directly from content. We will detail
how those values are populated later in the article. For now know that the values are
retrieved from content and passed in on the tag. What the code is basically doing is
retrieving all files within the folder that's been passed, and rendering information about
them to the page. The htmlcomponent value is used to determine what is rendered for
each match. In this case, we will use the following in the html component:
1:
2: <a target="" title="" href="FILEURL" >FILENAME</a><br/>
322 of 439
and the code in the custom rendering plugin will replace FILEURL and FILENAME with
the relevant values from each file.
Name the file plugin.xml. Enter the following into the new file:
1:
2: <?xml version="1.0" encoding="UTF-8"?>
3: <plugin
4: id="wcmfiles.plugin"
5: name="WCM Files Plugin"
6: version="1.0.1"
7: provider-name="Riverbend">
8: <extension
point="com.ibm.workplace.wcm.api.RenderingPlugin"
id="WCMFilesPlugin">
9: <provider
class="com.riverbend.renderingplugin.WCMFilesPlugin"/>
10: </extension>
11: </plugin>
Basically what this does is register the WCMFilesPlugin as a custom rendering plugin
within the system. Once the application is installed and deployed, when rendering WCM
content and using the rendering plugin tag, WCM will be able to retrieve the relevant
information.
323 of 439
Java package: com.riverbend.renderingplugin.servlet
Class name: JSONResponse
Superclass: javax.servlet.http.HttpServlet
324 of 439
Click Next. Note that the URL Mappings: already has a line for /JSONResponse:
Click Finish.
1:
2: /**
3: * DISCLAIMER OF WARRANTIES: The accompanying code provided in
this section
4: * (and this wiki) is sample code, created by the authors of
this wiki.
5: * This sample code is not part of any standard or IBM product
and is
6: * provided to you solely for the purpose of assisting you in
the development of
7: * your website. The code is provided as is, without warranty
of any kind.
8: * IBM shall not be liable for any damages arising out of your
use of the
9: * sample code, even if they have been advised of the
possibility of such damages.
325 of 439
10: */
11: package com.riverbend.renderingplugin.servlet;
12:
13: import java.io.IOException;
14: import java.security.Principal;
15:
16: import javax.servlet.ServletException;
17: import javax.servlet.http.HttpServlet;
18: import javax.servlet.http.HttpServletRequest;
19: import javax.servlet.http.HttpServletResponse;
20:
21: import com.ibm.workplace.wcm.api.*;
22: import
com.ibm.workplace.wcm.api.exceptions.AuthorizationException;
23: import
com.ibm.workplace.wcm.api.exceptions.DocumentIdCreationException;
24: import
com.ibm.workplace.wcm.api.exceptions.DocumentRetrievalException;
25: import
com.ibm.workplace.wcm.api.exceptions.OperationFailedException;
26: import
com.ibm.workplace.wcm.api.exceptions.QueryServiceException;
27: import
com.ibm.workplace.wcm.api.exceptions.ServiceNotAvailableException;
28: import com.ibm.workplace.wcm.api.exceptions.WCMException;
29: import com.ibm.workplace.wcm.api.query.QueryService;
30: import com.ibm.workplace.wcm.api.query.ResultIterator;
31: import com.ibm.workplace.wcm.api.query.Query;
32: import com.ibm.workplace.wcm.api.query.Selectors;
33:
34: /**
35: * Servlet implementation class JSONResponse
36: */
37: public class JSONResponse extends HttpServlet {
38: private static final long serialVersionUID = 1L;
39:
40: /**
41: * @see HttpServlet#HttpServlet()
42: */
43: public JSONResponse() {
44: super();
45: // TODO Auto-generated constructor stub
46: }
47:
48: /**
49: * @see HttpServlet#doGet(HttpServletRequest request,
HttpServletResponse
50: * response)
51: */
52: protected void doGet(HttpServletRequest request,
53: HttpServletResponse response) throws
326 of 439
ServletException, IOException {
54: // TODO Auto-generated method stub
55: }
56:
57: /**
58: * @see HttpServlet#doPost(HttpServletRequest request,
HttpServletResponse
59: * response)
60: */
61: protected void doPost(HttpServletRequest request,
62: HttpServletResponse response) throws
ServletException, IOException {
63: // TODO Auto-generated method stub
64: Principal userPrincipal =
request.getUserPrincipal();
65:
66: String rd = "";
67: Workspace usersWorkspace = null;
68: if (userPrincipal != null) {
69: // very important is to place user
specific workspace key in session
70: usersWorkspace = (Workspace)
request.getSession()
71: .getAttribute(
72:
userPrincipal.getName() + "_"
73:
74: if (usersWorkspace == null) {
75: try {
76: usersWorkspace =
WCM_API.getRepository().getWorkspace(
77:
userPrincipal);
78: if (usersWorkspace !=
null) {
79:
request.getSession().setAttribute(
80:
userPrincipal.getName() + "_"
81:
82:
usersWorkspace);
83: }
84: } catch
(OperationFailedException e) {
85: //
logger.log(Level.WARNING, e.getMessage(), e);
86: } catch
(ServiceNotAvailableException e) {
87: //
logger.log(Level.WARNING, e.getMessage(), e);
327 of 439
88: }
89: } else {
90:
91: }
92: }
93: else
94: {
95: // get a system workspace
96: try
97: {
98: usersWorkspace =
WCM_API.getRepository().getSystemWorkspace();
99: }
100: catch(Exception e)
101: {
102: e.printStackTrace();
103: }
104: }
105:
106: usersWorkspace.logout();
107: usersWorkspace.login();
108:
109: // Set-up the query service
110: QueryService queryService =
usersWorkspace.getQueryService();
111: Query query =
queryService.createQuery(Folder.class);
112: query.returnObjects();
113: ResultIterator results = null;
114: String libName =
request.getParameter("libName");
115:
116: DocumentLibrary docLib =
usersWorkspace.getDocumentLibrary(libName);
117: // Set the library to the current library.
This may cause issues if the
118: // library hasn't been selected. Should add a
lib selector in
119:
query.addSelector(Selectors.libraryEquals(docLib));
120:
121: // Get the components folder
122:
query.addSelector(Selectors.nameEquals("Components"));
123:
124: // Get all of the children of the component
folder and build the json
328 of 439
125: // for the store
126: String parent = "";
127:
128: try {
129: results = queryService.execute(query);
130: while (results.hasNext()) {
131: // This is the parent folder
132: Folder parentfolder = (Folder)
results.next();
133: // Go get the children
134: rd =
getFolderChildren(parentfolder, "", 0);
135:
136: // ok we have a response
137: if (rd.length() != 0) {
138:
139: int returnCode =
HttpServletResponse.SC_OK;
140:
response.setStatus(returnCode);
141:
response.getWriter().write("[" + rd);
142:
response.getWriter().flush();
143: }
144:
145: }
146: } catch (QueryServiceException e1) {
147: // TODO Auto-generated catch block
148: e1.printStackTrace();
149: } catch (WCMException e) {
150: // TODO Auto-generated catch block
151: e.printStackTrace();
152: }
153:
154: }
155:
156: private String getFolderChildren(Folder folder, String
result, int id)
157: throws WCMException {
158:
159: // Get all of the children
160: ResultIterator children =
folder.getChildFolders();
161: int count = children.getSize();
162:
163: // If there are no children then return
otherwise set these as children
329 of 439
164: // in the json
165: int current = 0;
166: if (count == 0) {
167: return result;
168: } else {
169: if (id != 0) {
170: result = result + ",
\"children\":[";
171: }
172: }
173:
174: // Cycle through the children building up the
json
175: while (children.hasNext()) {
176: Folder child = (Folder)
children.next();
177:
178: // up the counter
179: current++;
180: // Get the doc id
181: String docId =
child.getIdentity().getID().toString();
182:
183: // Set the label (folder name) and
docid
184: result = result + "{ \"label\":\"" +
child.getName()
185: + "\", \"id\": \"" +
docId + "\"";
186:
187: // go get this folders children
188: result = getFolderChildren(child,
result, id++);
189:
190: // If we are on the last one then close
off this section else close
191: // this item
192: if (count == current) {
193: result = result + "}]";
194: } else {
195: result = result + "},";
196: }
197:
198: }
199: return result;
200: }
201:
202: }
At a high level, all this code is doing is grabbing a list of folders in the Components folder
of the library that's passed in. So this way, we will have a json object that contains the
component folders. This is used to populate the content later with the selected folder you
wish to use to render for the custom rendering plugin.
330 of 439
Creating the Custom jsp file
Now we need jsp file to be used during authoring to populate the folder you want to use
to retrieve the files from. First we have to create the folders to hold the jsp file. Right click
the WebContent directory of the RiverbendFilesPlugin, and select new -> folder. Enter
"jsp/html" in the popup:
Then hit Finish. Now, right click the WebContent/jsp/html folder, and select new -> other.
Select JSP File, you may have to click on show all wizards:
331 of 439
Click Finish. In the JSP, enter the following code:
1:
2: <%@ page import="java.util.*,
3: com.ibm.workplace.wcm.api.*,
4: com.ibm.workplace.wcm.api.exceptions.*,
5:
com.ibm.workplace.wcm.api.authoring.CustomItemBean,
6: com.ibm.workplace.wcm.api.query.Query,
7: com.ibm.workplace.wcm.api.query.QueryService,
8: com.ibm.workplace.wcm.api.query.ResultIterator,
9: com.ibm.workplace.wcm.api.query.Selectors,
10: javax.naming.InitialContext,
11: javax.naming.NamingException,
12: com.ibm.websphere.cache.DistributedMap,
13: java.util.Iterator"
14: session="true"%>
15: <%@ taglib uri="/WEB-INF/tld/wcm.tld" prefix="wcm" %>
16: <%@ taglib uri="/WEB-INF/tld/portlet.tld" prefix="portletAPI"
%>
17:
18: <portletAPI:init />
19: <wcm:initworkspace user="<%= request.getUserPrincipal() %>"
/>
20:
21: <%
22:
23: /*
24: rob.enright@uk.ibm.com July 11
25: Builds a list of the libraries in this instance
26: Makes a call to the servlet to return the folders for
the selected library
27: Updates the UI with a dijit tree of the folders
28: Stores the folder id for use with the WCMFiles
rendering plug-in
29:
30: */
31: CustomItemBean customItem = (CustomItemBean)
request.getAttribute("CustomItemBean");
32: customItem.setSubmitFunctionName("myoptionsubmit");
33: String fvalue = (String)customItem.getFieldValue();
34:
35:
36: String folderName = "";
37: String docPath = customItem.getDocumentPath();
38: String currentLib = "";
39: String libraries ="";
40:
41: Workspace usersWorkspace = (Workspace)
pageContext.getAttribute(Workspace.WCM_WORKSPACE_KEY);
332 of 439
42:
43:
44: //Need to build the raw data with the tree of folders in
the component library
45: String rd = "";
46: String lib = "";
47: if (usersWorkspace != null)
48: {
49:
50: if(fvalue.length()>0){
51:
52: DocumentId folderId;
53: try {
54: folderId =
usersWorkspace.createDocumentId(fvalue);
55: Document selectedFolder
= usersWorkspace.getById(folderId);
56: DocumentLibrary docLib
= selectedFolder.getOwnerLibrary();
57:
58: //get the current
library
59: currentLib =
docLib.getName();
60:
61: //Set the folder name
62: folderName =
selectedFolder.getName();
63: } catch
(DocumentIdCreationException e) {
64: // TODO Auto-generated
catch block
65: e.printStackTrace();
66: //Reset the values
67: fvalue = "";
68: } catch
(DocumentRetrievalException e) {
69: // TODO Auto-generated
catch block
70: e.printStackTrace();
71: //Reset the values
72: fvalue = "";
73: } catch (AuthorizationException
e) {
74: // TODO Auto-generated
catch block
75: e.printStackTrace();
76: //Reset the values
77: fvalue = "";
78: }
79: }
333 of 439
80:
81: libraries = "{'identifier': 'libraryName',
'label': 'libraryName', 'items': [";
82: //Get the current libraries that are avaiable
and create a json store
83: for(Iterator<DocumentLibrary> i =
usersWorkspace.getDocumentLibraries(); i.hasNext();){
84: String libraryName =
i.next().getName();
85: libraries = libraries + "{
'libraryName' : '" + libraryName + "'";
86: if(i.hasNext()){
87: libraries = libraries + "},";
88: } else {
89: libraries = libraries + "}]}";
90: }
91: }
92:
93: }
94:
95: %>
96:
97:
98:
99: <script language='Javascript'>
100:
101: function myoptionsubmit(){
102:
103: //Update the field with the holding value
104:
document.getElementById('<%=customItem.getFieldName()%>').val
ue = document.getElementById('folderID').value
105:
106: }
107:
108:
109: dojo.require("dojo.data.ItemFileReadStore");
110: dojo.require("dijit.Tree");
111: dojo.require('dijit.form.Select');
112: dojo.require("dijit.form.Button");
113: var treeNum = 0;
114: var treeControl = new Array();
115: var myTree;
116: var resetTree=true;
117:
118: var clib = "<%=currentLib%>";
119:
120:
121: function recursiveHunt(lookfor, model, buildme,
item) {
334 of 439
122: // console.log(">> recursiveHunt, item ",
item, " looking for ", lookfor);
123: var id = model.getIdentity(item);
124: buildme.push(id);
125: if (id == lookfor) {
126: // Return the buildme array, indicating
a match was found
127: // console.log("++ FOUND item ", item, "
buildme now = ", buildme);
128: return buildme;
129: }
130: for (var idx in item.children) {
131: // start a new branch of buildme,
starting with what we have so far
132: var buildmebranch = buildme.slice(0);
133: //console.log("Branching into ",
model.store.getValue(item.children[idx], 'name'), ", buildmebranch=",
buildmebranch);
134: var r = recursiveHunt(lookfor, model,
buildmebranch, item.children[idx]);
135: // If a match was found in that recurse,
return it.
136: // This unwinds the recursion on
completion.
137: if (r) {
138: return r;
139: }
140: }
141: // Return undefined, indicating no match was
found
142: return undefined;
143: }
144:
145: function selectTreeNodeById(tree, lookfor) {
146: //console.log("See model root=",
tree.model.root);
147: var buildme = new Array();
148: var result = recursiveHunt(lookfor,
tree.model, buildme, tree.model.root);
149: //console.log("*** FINISHED: result ",
result, " buildme ", buildme);
150: //console.dir(result);
151: if (result && result.length > 0) {
152: tree.attr('path', result);
153: }
154: }
155:
156:
157:
335 of 439
158: //Build the dojo tree of folders
159: function fetchChildren(library) {
160: var rawdata;
161: var targetNode = dojo.byId("displayError");
162:
163: var xhrArgs = {
164: url:
"/RiverbendFilesPlugin/JSONResponse",
165: handleAs: "text",
166: content: {
167: libName: library
168: },
169: load: function(data) {
170: targetNode.innerHTML = "";
171: buildTree(dojo.fromJson(data),
library);
172: },
173: error: function(error) {
174: targetNode.innerHTML = "No folders
found.";
175: if (myTree) {
176:
dojo.byId("treeContainer").removeChild(myTree.domNode);
177: resetTree=false;
178: }
179: }
180: };
181:
182: //Call the asynchronous xhrGet
183: var deferred = dojo.xhrPost(xhrArgs);
184:
185: }
186:
187: function buildTree(rawdata){
188:
189: var store = new
dojo.data.ItemFileReadStore({
190: data: {
191: identifier: 'id',
192: label: 'label',
193: items: rawdata
194: }
195: });
196: var treeModel = new
dijit.tree.ForestStoreModel({
197: store: store
198: });
199:
200: //If this tree has already been created then
scratch
336 of 439
201: if (treeNum>0 && resetTree) {
202: //remove the current
domNode
203:
dojo.byId("treeContainer").removeChild(myTree.domNode);
204: }
205:
206: var holdingField =
dojo.byId("folderID");
207:
208: //Build a new tree
209: myTree = new dijit.Tree({
210: onClick:
function(item, node, evt) {
211: //set the
display to be the name of the folder
212:
document.getElementById('selectedFolder').innerHTML =
item.label[0];
213:
214: //set the field
to be the id of the folder
215:
holdingField.value = item.id[0];
216: },
217: model: treeModel,
218: id: treeNum,
219: showRoot: false,
220: persist: false
221: });
222:
223:
dojo.byId("treeContainer").appendChild(myTree.domNode);
224: myTree.startup();
225: selectTreeNodeById(myTree, "<%=fvalue%>");
226: treeNum = treeNum + 1;
227: resetTree=true;
228:
229: }
230:
231: //Render the list of libraries and update the
folders if changed
232: dojo.addOnLoad(function() {
233:
234: var libraries = <%= libraries %>;
235: var myStore = new
dojo.data.ItemFileReadStore({
236: data: libraries
237: });
337 of 439
238:
239: var libSelect = new dijit.form.Select({
240: name: 'libSelect',
241: sortByLabel: false,
242: onChange: function(item, node,
evt) {
243: fetchChildren(item);
244: }
245: }, "librariesSelect");
246:
247:
248: libSelect.setStore(myStore, clib);
249:
document.getElementById('selectedFolder').innerHTML =
'<%=folderName%>';
250:
251:
252: });
253:
254: </script>
255:
256: <style>
257: .tundra .dijitLeaf {
258: background:
url("/portal_dojo/v1.4.3/dijit/themes/tundra/images/folderClosed.gif"
) no-repeat scroll 0 0 transparent;
259: }
260: </style>
261: <b>Selected:</b><br/><div
id="selectedFolder"><%=folderName%></div><br>
262: <INPUT type="hidden" id="<%=customItem.getFieldName()%>"
value="<%=fvalue%>">
263: <input type="hidden" id="folderID" value="<%=fvalue%>">
264: <b>Libraries:</b><br/><div
id="librariesSelect"></div><br><br>
265: <b>Folders:</b><br/><div id="treeContainer"></div>
266: <div id="displayError"></div>
Basically, what this is doing is populating a dojo object with the data being returned from
the JSONResponse servlet that we created before. It's beyond the scope of this article to
discuss the dojo and json being used, but just know that at a high level this is using dojo
to build out the selection mechanism. When you select a folder, it stores the ID of the
folder within the content object.
1:
2: <%@ taglib uri="/WEB-INF/tld/wcm.tld" prefix="wcm" %>
We need to import this file into our project. Create the /tld folder in the
/WebContent/WEB-INF folder. Once it has been created, copy or import the wcm.tld file
from your wcm server into this folder. You can find it in
/wp_profile/installedApps/cellname/wcm.ear/ilwwcm.war/WEB-INF/tld folder.
338 of 439
Deploying the Rendering Plugin Code
Now that the code has been created, we need to install to the server. Right click the
RiverbendFilesPlugin project, and select export. From the list, select WAR file, then click
on next. In the wizard, you have to choose a location. Choose somewhere you can find
the file, and name it RiverbendFilesPlugin.war. Click Finish:
Now that we have the .war file, we need to install it. Navigate to your WebSphere
Application Server admin console. Navigate to Applications -> New Application. Select
New Enterprise Application. On the next page, in the local file section, choose the .war
file you just exported:
339 of 439
Click the Next button. Choose the fast path option, then click on Next button. For the
Step 1 options, leave the defaults and click Next.
1:
2: <a target="" title="" href="FILEURL">FILENAME</a><br/>
340 of 439
Also, in the properties for the WCMFiles element, add the following for the path to the
custom JSP:
1:
2: /RiverbendFilesPlugin;/jsp/html/showFolders.jsp
1:
2: [Plugin:WCMFiles update="true" htmlcomponent="[Element
context='current' type='content' key='HTMLFilesFormat']"
folderid="[Element context='current' type='content'
key='WCMFiles']"]
Then, create 2 file resource components within this folder. Name them RiverbendFile1
and RiverbendFile2:
341 of 439
Creating the Necessary Site Area and Content
To render the tag now we have to create a content object to be used for the rendering
plugin html. Create a new Site Area named "RiverbendRenderingPlugin". Map the AT -
RiverbendRenderingPlugin authoring template to the PT - RiverbendRenderingPlugin
presentation template, then save and close the site area.
Finally, save and publish the content. Then, when we render the content:
4.3.3. Wrapping it up
In this example, we showed how to integrate and render custom rendering plugins, which
are a powerful tool to enhance your WCM environment. Additionally, the technique of
using custom JSP within authoring template elements was explored.
This section covers social media features supported in WCM including blogs, wikis, tags,
and social toolbars.
342 of 439
4.4.1. Blogs and wikis
Blogs and wikis are collaborative editing tools that allow end users or communities to
publish information on a web site in a easy and quick way.
WCM includes a set of site templates that allow site managers to add blog and wiki
features to Web sites. Blogs and wikis
Blogs and wiki libraries share common functionality such as a user friendly navigation
structure, tagging and rating support and simple rich editing, including the insertion of
images and links. Each blog, blog library, and wiki is organized in its own content library
and can be integrated into your site, syndicated and managed as any other content
resource in WCM.
Blogs
Blogs and blog libraries are often used to provide personal views, opinion, news and
commentary pertinent to your intranet and extranet sites.
Blogs and blog libraries typically combine text with graphics and links to other blogs and
Web sites. You can see an example of a blog in the following screenshot:
In WCM blogs:
The entries are arranged in reverse-chronological order, with the newest entry
displayed first.
343 of 439
In WCM blogs, readers can post comments about your entries. Users can manage
their own blog entries and comment on other blog entries.
Readers can tag and rate blogs. Tags added to a blog are automatically linked
through the the Tag Center.
Wikis
Wikis also provide the users of a web site with a collaborative authoring environment
where they can pull together a set of documentation about a topic. Wikis can be used to
share community content created by a group of authors in a collaborative way. Wikis
typically combine text with graphics and links to other wikis and Web sites. Users can
monitor and manage their own wiki articles.
Tagging and rating is one of the most powerful features of WCM 7. It allow site owners to
leverage the knowledge of the site users to organize and prioritize the information and
services of a site.
Tagging and rating support is based on WCM rendering plugins and can be added to any
content type: Adding tagging and rating to web content
Tagging engine
Users can use the tagging engine to help to classify the site content by adding tags to
content items, for example, apply the tag "RiverBend" to a page that provides information
about the company.
344 of 439
Once content has been tagged, users can view the tags that have been applied to
individual content items or search related items that have been tagged with the same
terms. Tags are usually displayed as a cloud, using a bigger and darker font to mark the
most used tags.
WCM provides an automatic generated tag cloud for users to browse the tags used on a
site:
Rating engine
The rating engine allows the site users to find the most relevant content in a site by
applying ratings to individual resources to show how much they rate or "like" them. For
example, a user can give a good coffee a rating of 4.
345 of 439
Users can change or remove ratings that they applied themselves. For example, a user
can update the previous rating 4 to a 5 and view the ratings that they or other users have
applied to the same item.
Social toolbars
Social networks are a key channel to deliver your content to a wider audience. By
publishing the updates of your content to networks like Twitter, Facebook or Google+ can
have a big impact in the number of visits that your site will receive.
Social toolbars are a set of buttons that allow authors and visitors to quicly publish a
reference to a content item onto many of the most popular social sites on the Web. Social
toolbars offen allow you to display a counter of the number of times that an item has been
shared in a social network.
This picture shows an example of a social toolbar:
There are many social toolbars services available for free on the Internet. Most offer an
easy integration method allowing you to embed them in any HTML page by including an
HTML fragment like this:
1:
2: <!-- AddThis Button BEGIN -->
3: <div class="addthis_toolbox addthis_default_style ">
4: <a class="addthis_button_preferred_1"></a>
5: <a class="addthis_button_preferred_2"></a>
6: <a class="addthis_button_preferred_3"></a>
7: <a class="addthis_button_preferred_4"></a>
8: <a class="addthis_button_compact"></a>
9: <a class="addthis_counter addthis_bubble_style"></a>
10: </div>
11: <script type="text/javascript"
src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-
4e7836eb3bb0be8d"></script>
12: <!-- AddThis Button END -->
T
The code from this example comes from the AddThis service: Link to AddThis website
but any other toolbar provider might be used as long as it uses a similar approach.
WCM HTML components provide an easy way to include a social toolbar in any content
type while managing it from a central location.
346 of 439
This example shows the code that Riverbend designers created to include a social
toolbar in their content items:
Once created, this HTML component can be included in any presentation template to
make possible to share the content in any social network.
This section briefly introduces multilingual site management and provides links to the
existing documentation for more information.
MLS also includes a whitepaper, Multilingual Site Management with Lotus Web Content
Management Link to multilingual solution , that describes the framework, the deployment
and configuration of the extensions, and examples of their use.
MLS is designed to work with IBM Web Content Management Version 7.0 and
subsequent fix packs/feature packs only.
For more details, refer to the linked asset in the Portal Solutions Catalog. Link to
multilingual solution .
347 of 439
Part 5. Site administration and operations
The previous parts of this guide describe how to design and build a website using IBM
Web Content Manager (WCM). In part 5, we cover topics on site administration and
operations.
Ideally users performing these activities should possess knowledge on how to build WCM
websites as this will enable the site to be administered more effectively.
5.2 Syndication
Syndication is the method used by IBM Web Content Manager to replicate data from a
web content library on one server to a web content library on another server.
5.5 Caching
IBM Web Content Manager generated Web pages and content from external data
sources can be cached by the Web Content Manager application. If utilized correctly,
Web Content Manager caching can dramatically increase the performance of a site. This
section provides details on how to configure WCM Caching.
5.6 Deployment
WCM sites can be delivered using the Rendering Portlet. The Rendering Portlet can be
used to pull content from the local WCM server, or through a remote server using Web
Services for Remote Portlets (WSRP). Standalone WCM sites can be delivered using the
WCM (connect) servlet and static websites can be delivered using the WCM pre-
rendering process. This section describes each delivery option in detail.
5.7 Troubleshooting
IBM Web Content Manager writes information, warning and error message to logs during
configuration and at real time that will aid in troubleshooting If experiencing a problem.
This section provides details on troubleshooting.
348 of 439
5.1. Library management
Administrators can create new web content libraries, delete and disable libraries that are
no longer required and unlock libraries that have been locked as a result of a long
running task. Web content libraries can be secured by setting the access control
appropriately. Exporting and importing web content libraries allows you to make a backup
copy and move web content libraries across different WCM servers. Administrators can
also maintain versions of items and restore versions of items if required.
Note: Only administrators can perform library management tasks described in this
section.
An administrator can maintain web content libraries from the WebSpere Portal
Administration portlet as shown in the screen below. By default, WCM Version 7 contains
a Web Content library, blog template related libraries, and wiki template related libraries.
Note: It is recommended not to use the default Web Content library because you cannot
syndicate this default library to other WCM environments.
349 of 439
Actions to manage web content libraries
There are several actions available for an administrator to manage the web content libraries.
If the WCM environment has many WCM libraries, you can set the search option to
search the specific WCM library you want to manage. The Search by drop down field
provides the following options:
This is a very useful action that allows the administrator to identify all the WCM items that
are locked by users (authors or web developers) across all the WCM libraries. The
administrator also has the ability to unlock the selected items from the result view.
System reports
Use this action to display a list of WCM library deletion reports. These reports can be
viewed and deleted if required.
350 of 439
Set Access on Root
Use this action to assign user access to the JCR content root node and thus allow the
users to work with web content libraries.
Refresh
Use this action to refresh the web content libraries portlet.
For instance, when a WCM library is deleted, the deleted library will still continue to
appear in the Web Content libraries portlet with the library status Deleting. Using the
Refresh action clears the deleted WCM library from the Web Content libraries portlet
view.
Library resources
Use this action to set access permissions to the library resources on the selected WCM
library. This controls the access to the views and actions available from within the WCM
authoring portlet.
Delete library
Use this action to delete the selected WCM library. This action will be disabled if the
WCM library is configured to be prohibited from being deleted.
Additional tasks
Use this action to perform version management related tasks on the WCM library.
351 of 439
5.1.1. Creating a new web content library
This section walks you through the steps of creating a new WCM library.
1. Use the Create new Library action and fill in the Web content
library name and Description.
The Localizations feature can be used to display a translated version of the library
name.
352 of 439
The screenshot below shows the newly created web content library.
Library level
Security defined at the library level determines who can access the library. If a user
does not have access to the library, the user will not be able to see any items that are
contained in the library. A user requires a minimum of "Contributor" access to a
library to be able to view this library from the authoring portlet.
Item type (authoring portlet views and tasks) in a library
Setting access at the item type level within a library allows you to define the views
and tasks a user can see and access from within the authoring portlet. Note this does
not give users access to the individual items. Users will still require the right access
level on the individual items itself. A user who is assigned access to an item can
always view that item in the All Items view regardless of whether they have access to
the related item type view.
Item level
Security defined at the item level determines the actions a user can perform on the
item. A user who only has read access on the item will not be able to edit the item.
This section covers the details of setting access at library level and at the item type in a
library. First, let's identify the various roles available within WCM and the two techniques
(additive and subtractive) to set access to the WCM library.
353 of 439
WCM roles
WCM v7 identifies a set of roles and each role has certain capabilities. The table below
describes these roles along with their capabilities from within the WCM authoring portlet.
354 of 439
view libraries the they have been assigned contributor access to in
an authoring portlet
access the "My Items" and "All Items" views in an authoring portlet
for libraries that they have been assigned at least contributor
access
for library item types that they have been assigned manager
access to, managers can access the all of the actions available to
editors and also the following actions in the authoring portlet:
* edit access settings
* next stage
* purge
* unlock
* edit user profile
The following table describes the pre-defined groups that can be assigned roles in a WCM library.
Pre-Defined Description
Group
Anonymous Select this user to assign a role to anonymous users
portal user
All Select this group to assign a role to users that have logged on
Authenticated to your server
Portal Users
Users and User Select this group to assign a role to all users and groups
Groups
All Portal User Select this group to assign a role to all groups
Groups
355 of 439
Additive and subtractive method
There are two techniques available to set access, additive and subtractive.
Additive method
With the additive method, you begin with assigning a user or a group with the lowest
possible privileges at the WCM library level and then increase their access rights by
assigning them with the higher privileges for specific WCM items.
Subtractive method
With the subtractive method, you begin with assigning a user or a group with higher
privileges at the WCM library level and then reducing their access rights at specific WCM
object level and de-selecting the inheritance option.
The Resource Permissions page displays the list of Roles, Allow Propagation option,
Allow Inheritance option and the action to Edit Roles.
Note: Making any changes to the Allow Propagation option and the Allow Inheritance
option requires you to use Apply action to ensure your change is applied.
356 of 439
Note: The Display/Modify Owner link is not applicable in the WCM context.
To assign a user or a group with the appropriate Roles, use the respective Edit Roles
action. The screen shot below illustrates an example of the page that loads up when the
Edit Roles action is used to add new Users to the WCM library. In this example, the All
Authenticated Portal Users group (see table Pre-Defined Groups above) has already
been allocated the User role. You can add additional users/groups by using the Add
action. You can also delete the users/groups by using the Delete action. The
Inherited column displays if the user/group has inherited the current role.
To apply access permissions to a WCM item type, as an administrator use the Library
resources action available for the WCM library in the Web Content Libraries view. The
screen shot below illustrates the Library Resources portlet that loads up when the Library
resources action is used.
357 of 439
You can control access to the following WCM item types:
Authoring Template
Components
Content
Presentation Template
Site and Site Areas
Taxonomies and Categories
Workflow and workflow elements
To apply access permissions to a WCM item type, as an administrator use the Set
Permissions action available for the WCM library in the Library Resource view. The
screen shot below illustrates the Resource Permissions portlet that loads up when the
Set Permissions action is used.
As you can see, this is the same Resource Permissions portlet that has been described
in the section Setting Access Permissions on the WCM Library above. Follow the same
instructions to add access permissions to the individual WCM item types.
You need to restart WebSphere Portal to enable any configuration changes made to this
file.
Note: Please note that disabling inheritance at the server level is not recommended as it
may impact performance.
358 of 439
To prevent a user or group from automatically having inherited access to an item, turn off
inheritance on that item.
You can allow assigned roles to be inherited from parent items up to and including the
library. The access roles are inherited in the following hierarchies:
Library -> Site -> Site area -> Content item
Library -> Taxonomy -> Category
Library -> Folder -> Component
Library -> Folder -> Authoring Template
Library -> Folder -> Presentation Template
Library -> Workflow
Library -> Workflow Stage
Library -> Workflow Action
You can stop inheritance at any point in an inheritance hierarchy. For example, you can
allow inheritance down to a site area, but assign access roles manually for each content
item under that site area.
Inheritance from a library is based on the role assigned to the overall library, not on the
role assigned to specific item types. For example, you may not have access to the
presentation template view on a library, but if you inherit the role of editor to a
presentation template, you can view and edit that presentation template from the All
Items view.
WCM's version feature does not take a "snap-shot" of the entire WCM site. Versioning
occurs only at the item level. Any hierarchical relationships to other items are not saved.
For example, if you save a version of a site area that has child site areas and you delete
the child site areas, the child site areas will not be restored if you restore the parent site
area.
You cannot create versions of external resources which are linked from within WCM
items because WCM does not store a copy of the external resources in the version index.
Note: The name of an item is independent of version control so changing the name of an
item version will reflect the change of name across all versions of that item.
359 of 439
Creating an item version automatically
By default, the WCM environment is configured to create an item version automatically.
An item version is saved each time you save an item, or if the item is participating in a
workflow, each time the item's state changes to published.
always: This value is set by default and will create item versions automatically.
never: This value will disable the version feature.
manual: This value will configure version control to be a manual task.
Each property applies to an individual item type thus allowing you to control the
versioning behavior at the item type level. It is best practice to disable automatic
versioning if it is not required otherwise the WCM authoring performance can be
adversely affected.
The screenshot below shows the IBM WebSphere Application Server administration
console and highlights the versioning properties available under the WCM
WCMConfigService service.
360 of 439
Restore an item version
In this section, we walk through the process of restoring an item version.
1. As an administrator, open the presentation template in read mode from the authoring
portlet and click on the More Actions drop down menu and then click on Versions action
as shown in the screenshot below.
361 of 439
2. The Current versions portlet displays all the versions available for the current item. We
select the first version and then use the Restore action to restore the previous
version of the presentation template.
The Read action available allows you you view the selected item version before
you can Restore it.
The Edit Label action allows you to add a meaningful label to selected the
item version.
3. Once the item is restored you will receive confirmation that the item was restored to the
selected version.
As an administrator use the Additional tasks action for the WCM library in the Web
Content Libraries view to access version management features available at the library
level. The screen shot below illustrates the Additional tasks portlet.
362 of 439
Apply version label
This action is used to apply a label to the most recent versions of all items in a library.
Note this action does not create a new version of items. Note also that you can only label
one set of items at a time. If you are labelling many items, this action may take some time
and hence you cannot execute a second label request until the first request has been
completed.
Note: The following applies to the two restore all actions described above:
You can only restore one set of items at a time. If you are restoring many items this
action may take some time and hence you cannot execute a second restore request
until the first request has been completed.
You cannot use the restore action if you have locked items in the library.
When restoring items that contain links or references to other items, you will be
prompted to select a new item to link or reference if the original item does not exists.
View report
This action displays a report of the respective task that you selected to view the report
against.
363 of 439
5.1.4. Exporting and importing libraries
WCM provides a capability to manually export a web content library to disk from a source
environment and then manually import it to a target environment. This capability allows
you to take backup of web content libraries and is also used to move web content
libraries between environments.
The web content library export and import process cannot be used to send item updates,
deletes and moves between environments. It is only suitable for populating new items.
WCM v7 permits exporting and importing web content libraries between different versions
of WCM provided the following criteria is met:
The WCM environment exporting the web content library is a lower version than the
WCM environment importing the web content library. It is not possible to import libraries
from WCM versions before 6.1.0.2.
Examples:
It is possible to import a library exported from WCM version 6.1.0.2 into WCM version
7.0.x
It is not possible to import a library exported from WCM version 7.0.x into version
6.1.0.2
Syndication process can be used to send updates, deletes and moves whereas the
export and import process is only suitable for populating new items.
The export and import process only exports the current version of each item. If an
item has multiple versions, they will not be exported.
The export and import process will only export and import a child item when its parent
item is successfully exported and imported.
The export and import process will overwrite an item with the same path, name and
ID on the target server.
The export and import process does not change the Web content library and item
level access controls on the target WCM environment. You need to run the member
fixer tool on the imported library to fix references to missing users and groups on the
target WCM environment.
The export and import process cannot be used to import an item if an item on the
target server has the same ID but a different parent than the item being imported.
364 of 439
1. As an administrator, log into the the IBM WebSphere Application Server
administration console and navigate to the following:
365 of 439
Export process properties
Set or update the following properties on the server where you will run the export
process:
1. export.libraryname
Set this property to be the name of the web content library to transfer. If exporting
multiple libraries enter each library name separated by a semi-colon.
Example: export.library=Lib01;Lib02;Lib03
2. export.directory
Default value is set to
${USER_INSTALL_ROOT}/PortalServer/wcm/ilwwcm/system/export.
Set this property to the directory name on the source server where the exported data
will be written. The export task creates a subdirectory with the name corresponding to
library name within this directory for each exported library.
3. export.singledirectory
The accepted values are either true or false.
If set to true, multiple libraries are written into a single directory specified by the
export.directory property.
If set to false, the export task created subdirectories with the name corresponding to
each exported library names.
Note: Changing any of these properties requires a server restart to reflect the new
values.
366 of 439
Import process properties
Set or update the following properties on the server where you will run the import
process:
1. import.directory
Default value is set to
${USER_INSTALL_ROOT}/PortalServer/wcm/ilwwcm/system/import.
Set this property to the directory name on the target server from where the exported
data is read when importing the data to the target server.
Note: If exporting and importing across a network, this property can be the same
directory as the one specified in export.directory property. Otherwise, you must copy
the exported data from the location specified in the export.directory property to the
location specified in the import.directory property before running the import task.
If the export.singledirectory property was set to true when you exported your libraries,
specify the parent directory where all the exported libraries are located.
If the export.singledirectory property was set to false when you exported your
libraries, or if you only want to import specific libraries, then list the directory of each
library separated by semicolons. Example:
c:\import\Lib01;c:\import\Lib02;c:\import\Lib03.
If using the Linux platform use /; to separate each library, such as
/opt/importdata/Lib01/;/opt/importdata/Lib02/;/opt/importdata/Lib03.
Note: Changing any of these properties requires a server restart to reflect the new
values.
367 of 439
Running the export process
Complete the following steps to run the export process on the source server:
368 of 439
Tips on importing large web content libraries
Follow these tips when importing large web content libraries:
1. Disable JCR text search indexing on your WebSphere Portal server before exporting
or importing large libraries. This will reduce the load on the database during the
export and import process. To disable the JCR text search, edit the
/PortalServer/jcr/lib/com/ibm/icm/icm.properties file and set the jcr.textsearch.enabled
property to false. Restart the server for the change to take effect. After the export or
import process has successfully completed, you must enable the JCR text search by
changing the jcr.textsearch.enabled property to true. Please note that rebuilding the
indexes can take some time.
2. When uploading large libraries, ensure that there is sufficient disk space to
accommodate the import. The location of the temporary directory is specified by the
jcr.binaryValueFileDir property in the /PortalServer/jcr/lib/com/ibm/icm/icm.properties
file.
Note: A library cannot be deleted if there are references to items in the library being
deleted from items in other libraries.
369 of 439
As an administrator, follow these steps to delete a WCM library using the Web Content
Libraries portlet:
1. Click on the Delete Library action available against the WCM library you want to
delete.
2. You will be prompted with a dialog box to confirm this operation. Click OK.
3. The screen shot below illustrates the screen visible after the delete action was
triggered on the Test library. Notice the view displays the status Deleting against this
library.
370 of 439
4. Use the System Reports action to see a report on this library that
was deleted.
371 of 439
5. Use the View Report action to view the report of the delete operation.
As an administrator, follow these steps to disable a WCM library using the Web Content
Libraries portlet:
1. Click on the Edit Library action available against the WCM library you want to
disable.
372 of 439
2. Disable the checkbox Enabled as shown in the screenshot below and click OK.
3. The Web Content Libraries portlet now displays the library status to be Disabled and
will no longer be available for selection from the authoring portlet.
The unlock library tool needs to be enabled by adding the following properties to the
WCM WCMConfigService service using the IBM WebSphere Application Server
administration console:
373 of 439
connect.businesslogic.module.unlocklibrary.class=com.aptrix.pluto.security.UnlockLi
braryModule
connect.businesslogic.module.unlocklibrary.remoteaccess=true
connect.businesslogic.module.unlocklibrary.autoload=false
http://[hostname]:[port_number]/wps/wcm/connect?MOD=UnlockLibrary&library=libraryna
me
5.2. Syndication
Syndication is the method used by IBM Web Content Manager (WCM) to replicate data
from a web content library on one server to a web content library on another server.
This section introduces syndication and covers the various syndication methods,
syndication relationships, and other related topics.
Introduction
IBM Web Content Manager facilitates an environment to design, author and maintain web
content. A WCM deployment usually comprises more than one WCM server. For
example: One WCM Authoring server, one WCM staging server and one WCM delivery
server. A Web Content library on a server can be replicated between all the WCM server
using WCM syndication.
The source WCM server where content is replicated from is known as at the Syndicator
374 of 439
and the target WCM server where content is replicated to is known as the Subscriber.
Reference: An additional detail about the workings of the ICE protocol is available in the
IBM Developerworks article Understanding syndication in IBM Workplace Web Content
Management.
URL: http://www.ibm.com/developerworks/lotus/library/wwcm-syndication/
Syndication methods
All the items you work with as part of your WCM authoring environment (templates,
components, content items, and so forth) are stored in WCM libraries. Syndication takes
place at the WCM library level and replicates from the selected WCM library or libraries
from the syndicator to the subscriber.
Live items
Live item syndication is mostly used when syndicating to a staging or delivery server. The
following items are syndicated:
Published
Expired
Published
Expired
Projects
Draft items in a project
All items
All item syndication is mostly used when syndicating between servers within an authoring
environment. The following items are syndicated:
375 of 439
Published
Expired
Projects
Draft items in a project
Other draft items
Versions
Deleted items
Syndication relationships
WCM library planning should consider how you plan to syndicate libraries between WCM
instances. Planning WCM libraries should be done during the information architecture
planning stage.
Note: You must use a consistent syndication strategy. For example, if syndicating "All
items", then both syndication relationships must be syndicating "All items".
376 of 439
The following figure illustrates the two way syndication relationship.
Multiple relationship
In a multiple syndication relationship, you can have a WCM instance subscribe WCM
libraries from multiple WCM instances as illustrated in the figure below. An example of
where this setup could be used - if you have multiple WCM authoring instances in
multiple locations and a single WCM delivery instance, you can use multiple syndication
relationships to syndicate content to a single WCM delivery instance.
Version consistency
First time syndication on a new library
Access control when syndicating and User consistency
Additional things to remember (see the list below)
377 of 439
Version consistency
All servers participating in syndication must be of the same version for syndication to
work as expected and to be in a supported state. Syndication is not supported between
versions.
For example:
Server A with version 7.0.0.0 can be syndicated to Server B with version 7.0.0.1 installed.
Server A with version 7.0.0.0 can be syndicated to Server B with version 7.0.1 installed.
Server A with version 7.0.1 can be syndicated to Server B with version 7.0.0.0 installed.
Syndicating Server A with version 6.1.5 to Server B with version 7.0.0.0 installed is not
supported.
Syndicating Server A with version 7.0.0.0 to Server B with version 6.1.5 installed is not
supported.
Access control settings are not part of syndication, and hence you must manually set
access permissions on the subscriber's library when syndicating for the first time. If the
library does not exist on the subscriber, it will be created during syndication. By default,
no access control settings are specified on the new library, so you must set them
manually before users can access content in the new library. It is not required that the
settings on the subscriber's library match those on the Syndicators library, because you
might want to provide different access for users on the subscribing server.
For user level access to remain consistent between the syndicator and subscriber, both
servers must be configured to use the same user repository unless access controls are
determined by only using virtual users and groups, such as "All authenticated" and
"Anonymous Users". If different user repositories are used, syndication will occur but with
there will be errors in the subscriber log indicating missing users.
Information about a Library is only syndicated the first time syndication occurs and
not on subsequent updates and rebuilds. If a library is renamed or library user access
is changed, this information is not syndicated to the Subscriber. If you change the
name of a library or change user access to a library, you will need to manually make
the same changes to any subscriber libraries if you want the same settings on all
your syndicated libraries.
If content from one library (Library A) uses an item from another library (Library B),
you must include both libraries in the Syndicator to ensure that all items are
378 of 439
syndicated successfully. If you only include Library A in the Syndicator, any items in
Library A that reference items in Library B are not syndicated, and syndication errors
are generated.
If you add a new library to a Syndicator after the initial syndication you will need to
click Update to force the new library to be syndicated immediately.
If you intend to syndicate a library that contains more than 10000 items, update the
maximum Java heap size (at least 1024 MB) used by the portal application server on
the subscriber machine.
Although it is possible to set up more than one syndication relationship between the
same WCM instances, there is no reason to do so. The additional syndication
relationships are not required.
WCM Event Log is a database table that was created to track changes made to all
objects within WCM. This table is separate from the main WCM object library. The
Event Log stores attributes about each WCM object. The Event Log can be used to
flag candidates for syndication based on the lastModified date, the item gatherer and
the library in which the object resides.
An item will fail to syndicate if an item it references has been deleted (but not
purged). Purge the deletion and rebuild the subscription so that the deleted item is
resent.
Switching from "all item" syndication to "live item" syndication: When you switch from
"all item" syndication to "live and projects" syndication or "live item" syndication, any
drafts previously syndicated to the subscriber are not removed.
If you move a draft item from a library using "all item" syndication to a library using
"live item" syndication, the draft item will also be moved on the subscriber because
the action occurred on the library using "all item" syndication. This behavior allows for
some draft items to be included in a subscriber library even though "live item"
syndication is being used.
Syndication interval
To set up syndication interval, use the following property:
Use this property to change the syndication interval to better suit the needs of your
environment. For example, you might shorten the interval in an active authoring
environment where users must collaborate heavily and rely on timely replication. Similarly
you might lengthen the interval to avoid excessive replication of data that does not
change often.
A value of 0 will prevent syndication from occurring. If the interval is too short for
syndication to complete before the interval expires, syndication will begin again as soon
as the previous syndication completes.
379 of 439
Disabling automatic syndication
To disable automatic syndication, use the following property:
Subscriber-only server
To set up subscriber-only server, use the following property:
A syndicator server uses several processes to gather and queue content for syndication.
These processes can sometimes impact server performance when running. However, a
subscriber-only server does not require these processes, so performance can be
improved on the subscriber-only server by disabling the processes.
To configure a subscriber only server, change the value of this property to true.
Subscriber reporting
To set up subscriber reporting, use the following property:
This enables high level reporting of syndication to the SystemOut.log file on the
Subscriber server. It provides a summary of items that were processed, and which items
failed syndication to help you troubleshoot syndication issues.
380 of 439
update-wcm-service-properties.
Refer to the IBM Web Content Manager Infocenter for more details.
URL :
www.lotus.com/ldd/portalwiki.nsf/dx/xpViewCategories.xsp?lookupName=IBM%20Web%20Content
%20Manager%207%20Product%20Documentation
Note:
You will need to restart WebSphere Portal to enable any configuration changes
made.
When making changes to clustered servers, you will need to ensure the WCM
WCMConfigService service section under the Cluster Scope is updated.
381 of 439
To ensure both the Syndicator WCM instance and Subscriber WCM instance were at the
same WCM version we looked at the information available in the following file on both
the servers \PortalServer\log\VersionInfo.log. Both the environments are on the same
build level, as shown below:
1:
2: IBM WebSphere Portal 7.0.0.1
3: Build Level: wp7001CF06_001_15 (2011-07-19 15:33)
4: Server Name: WebSphere_Portal
5: Started at: 9/10/2011 10:47:42:890 EDT
6: Installed Feature Packs:
7: None
8: Installed FixPacks:
9: WP_PTF_7001 (IBM WebSphere Portal, Version 7.0.0.1 Fix
Pack)
10: Installed Interim Fixes:
11: PM41442 (IBM WebSphere Portal, 7.0.0.1-WP-WCM-Combined-
CFPM41442-CF006)
12: PM43406 (Cumulative iFix 18 for WCM v7.0.0.1)
Note: Cross fix-pack syndication is now supported in WCM version 7.x onwards. This
means a server running 7.0.0.0 could be syndicated with a server running 7.0.0.1.
The following figure shows checking the network connectivity from the Subscriber to the
Syndicator using the ping command and the ping result.
382 of 439
The following figure shows checking the network connectivity from the Syndicator to the
Subscriber using the ping command and the ping result.
383 of 439
Create a Credential Vault slot to connect to Syndicator
Starting from WCM V7 and later we must create a Credential Vault Slot to allow access
to the Syndicator. Go to Administration > Access > Credential Vault and create a
credential vault slot to allow you to access the syndicator.
Click on Add a vault slot and create a slot. Be sure to use an Administrator id as a userid.
To verify or update the heap, In the administrative console for IBM WebSphere
Application Server, navigate to the Java Virtual Machine settings.
384 of 439
Standalone server:
Servers > Server Types > WebSphere application servers > WebSphere_Portal
> Java and Process Management > Process definition > Java Virtual Machine
Clustered server:
System administration > Deployment manager > Java and Process
Management > Process Definition > Java Virtual Machine
Update the value in the Maximum Heap Size field. A value of at least 1024 MB is recommended.
385 of 439
Enter the syndicator URL in the form of http://HostName:HostPort/WcmContextRoot. For
example: http://wcmwikiauth.itso.ibm.com:10039/wps/wcm a name for the syndicator item. This
name is used as the name of the syndicator item created on the syndicator server, so
enter a name that helps identify the syndication relationship you are creating. Enter a
name for the subscriber item. This name is used as the name of the subscriber item
created on the subscriber server, so enter a name that helps identify the syndication
relationship you are creating. Select the credential vault slot you created previously and
Click Next.
Then select the libraries you want to subscribe and also select a the Syndication Type in
the drop down Scope menu.
386 of 439
Click Finish. You will see a Confirmation Message similar to that shown below.
After this step, access the Portal Administration Console on the Syndicator node and go
to Administration > Portal Content > Syndicators and you will see the Syndicator
already created based on the data entered in the Subscriber and also the status.
387 of 439
Working with existing Syndicator or Subscriber
Notice the actions that are now visible with the subscriber and syndicator views. The
same actions are visible in both views and hence have only been explained once below.
Update (Syndicator/Subscriber)
Manual action to override the syndication interval and initiate syndication directly. This
action is useful when automatic syndication is disabled. Click on the first icon
to trigger this action. The Update action will push the new updates
to Subscriber.
Rebuild (Syndicator/Subscriber)
Manual action to overrides the syndication interval and trigger the syndicator to send all
updates to the subscriber. Generally, the rebuild action is used when the datastore on
the subscriber is lost or corrupted. This action is useful when automatic syndication is
The following figure shows the Web content Subscribers view with the
WcmWikiSubscriber's status being idle.
388 of 439
The following figure shows the Web Content Syndicators view with the
WcmWikiAuthSyndicator's status being idle.
The table below provides details about the different states and provides a brief
description.
Status Description
Idle The syndication process is idle.
Pending The syndicator has received a request, but it has yet to initiate it.
Queued The syndicator has sent a request to the syndication application, but
syndication is not yet active. This state will not occur if the subscriber
has initiated syndication. The status remains as Idle until syndication
begins and the status then changes to Active.
Active The syndication process is active.
Disabled The syndication process is disabled. If syndication was already in
process prior to being disabled, the status can be a combination of
Disabled and Pending, Queued, or Active.
Once the syndication process has completed, the Syndicator and Subscriber views
display the idle status as illustrated in the screenshots above.
389 of 439
390 of 439
The following table describes the information available in the Syndicator and Subscriber
status reports.
391 of 439
Updates sent This field indicates the number of items that have been updated.
This includes new items that have been added and existing items
that have been updated.
Removes sent This field indicates the number of items that have been removed.
Old state and This field displays state information for a syndicator or subscriber
new state for before and after syndication occurred. This information is
subscriber or provided for the opposite member of the syndication relationship,
syndicator so for example if you are viewing syndication results for a
syndicator, the old and new states for the subscriber are
displayed.
If successful, this field indicates the actual change of status. If
syndication has failed, this indicates what should have been the
change of status.
Note: The syndication state only displays a list of item gatherer
ids and the current state. It is designed to be used as a diagnostic
tool when troubleshooting syndication.
Update This lists:
summary
the number of updates sent
the number of successful updates
the number of failed updated
Note: The number of updates listed here does not directly relate
to the number of items updated. For example, if you create a
library and then create a taxonomy item in the library, you have
updated a single item. However in the Update summary this will
be displayed as three updates; one for the library, one for the
new taxonomy and one for its version.
Update details This section provides additional information to the Update
summary section. It lists:
392 of 439
Monitor the Subscriber directory
Once Syndication has started, you can monitor its progress by looking at the
\PortalServer\wcm\ilwwcm\system\subscriber\ directory on the Subscriber server. As
items are being retrieved from the Syndicator, this directory will grow. After all items are
retrieved, they will start to be saved within the Subscribers repository. As each item is
saved in the repository, its corresponding file entry will be removed from the above
directory.
The figure below shows the Subscribers file system directory during syndication.
393 of 439
The figure below shows the Subscribers file system directory after syndication.
Files can remain in the subscriber directory for any of the following reasons:
Syndicator logs
[9/10/11 21:20:58:953 PDT] 0000004f SyndicatorTas I Subscription: [IceId: <5b13c813-
cd97-42d5-b9ab-4e35079ca9fe> Current State: <87f6bc08-3cc8-459a-866a-
3874dd2c9d3e:1315337007437,1252960041b11551a9faedf39c984080:1315670080703
>] updated successfully.
Subscriber logs
[9/11/11 0:21:01:359 EDT] 0000002d SubscriberTas I Finished processing update for
subscription: [IceId: <5b13c813-cd97-42d5-b9ab-4e35079ca9fe> Current State:
<87f6bc08-3cc8-459a-866a-
3874dd2c9d3e:1315337007437,1252960041b11551a9faedf39c984080:1315670080703
>]
Syndication requires that both the Syndicator WCM instance and the Subscriber
WCM instance are at the same IBM Web Content Manager version. Syndication is
not supported between versions. For example, Syndicating Server A with version
6.1.5 to Server B with version 7.0.0.0 installed is not supported. and vice versa.
Syndication interval can only be set globally at the server level and not with each
syndicator-subscriber relationship. Similarly automatic syndication can only be
disabled globally at the server level.
394 of 439
You cannot syndicate to a pre-existing library (on the Subscriber) with the same
name as the Syndicator library. Even though the two libraries might have the same
name, they have different unique ID's.
Search Collections are not syndicated which means they have to be created on both
servers.
JSP files used by WCM JSP components aren't syndicated, so you need to ensure
that they manually copied to any Subscriber servers.
It is expected that the Syndicator and the Subscriber should share the same user
repository if they use automatic syndication. If this is not the case, disable automatic
syndication and perform manual syndication. The latter should be followed by
executing the MemberFixer module.
Library access control settings are not part of syndication, and hence you must
manually set access permissions on the subscriber's library when syndicating for the
first time.
Example 1: A user name can change due to a change in their marital status.
Example 2: A user can move from one department to another within the organization say
from HR to Finance which would change the fully qualified distinguished name from
CN=<firstname lastname>,OU=HR,O=<companyname> to CN=<firstname
lastname>,OU=Finance,O=<companyname>
In such cases, it is necessary to change the user or group references made in an item
refer to the new user or group.
Administrators can also use the member fixer task to check whether any users or groups
referenced in the IBM Web Content Manager items have been renamed or deleted and
fix these references.
The member fixer task checks all of the items in a specified library for references to users
and groups that no longer exist in the current user repository. When run in report mode, it
will report all the references to members. When run in fix mode, these references can be
fixed, either by replacing them with references to members that exist, or by removing the
references.
References to members in library items contain the distinguished name of the member as
well as a unique ID for the member. This unique ID is an internal id that is unique over
time, and is different to the distinguished name. This means if a member is deleted and
another member is created with the same distinguished name, the two members will
have different unique IDs. The mismatchedId parameter can be used to update or
remove references from web content items to users with these unique IDs.
395 of 439
When a member that has been given permissions on a library is deleted, the member
permissions are removed from the library, so that any inherited permissions for items in
the library will also be removed. Therefore, the member fixer task cannot be used to
update these permissions to a different member. However, when an LDAP transfer is
carried out, the member permissions on the library are maintained. So, the member fixer
task can be run after an LDAP transfer to update or remove these permissions.
1. As an administrator, log into the the IBM WebSphere Application Server administration
console and navigate to the following:
Resources > Resource Environment > Resource Environment Providers > WCM
WCMConfigService.
2. From the WCM WCMConfigServices page that is loaded, click on Custom properties as
shown in the screenshot below.
396 of 439
3. Set or update the following properties on the server where you will run the member fixer
tool:
- connect.businesslogic.module.memberfixer.class =
com.aptrix.pluto.security.MemberFixerModule
- connect.businesslogic.module.memberfixer.remoteaccess = true
- connect.businesslogic.module.memberfixer.autoload = false
4. Save the changes and restart the server for these settings to take effect.
Custom mapping
To update a reference to a member that does not exist with a member that does exist,
member mappings can be defined in a custom mapping file. Where the member fixer task
does not find a mapping in this file for a member, it will search the user repository for
members with the same ID as the member that no longer exists. If such a member is
found, it will update the reference with this user or group, or remove the reference, as
specified by the -DaltDn parameter described below. If no such member is found, this
397 of 439
member is classified as 'invalid' and will be updated or removed as specified by the -
DinvalidDn parameter described below.
2. As shown in the screenshot, the examples available in the file demonstrate how you can
either configure a full replacement of one distinguished name with another or you can
configure part replacement of a distinguished names which will change all of the
distinguished name except the common name.
3. Once you have defined the member mappings, you can save the file and then run the
member fixer task using the -DaltDn option as described below.
398 of 439
ssword> PortalAdminId and PortalAdminPwd settings in the
wkplc.properties file.
-Dlibrary="<library Use this parameter in the command to identify the web
name>" content library.
If this parameter is omitted, the default library that has
been configured with the defaultLibrary property in the
WCM WCMConfigService service is used.
-DaltDn=update Use this parameter in the command when non-existent
users or groups have alternate distinguished names
(DNs) available and you want to update the items that
reference the non-existent users or groups.
-DaltDN=remove Use this parameter in the command when non-existent
users or groups have alternate distinguished names
(DNs) available and you want to remove the members
that reference the users or groups.
-DinvalidDn=update If users or groups have invalid distinguished names
(DNs) the report will list these as "invalid". This means
the distinguished name doesn't exist and there is no
alternate distinguished name available.
Use this parameter in the command to update users and
groups that have invalid distinguished names with the
portal administrator user's distinguished names.
-DinvalidDn=remove Use this parameter in the command to remove users
and groups that have invalid distinguished names.
- Use this parameter in the command when users or
DmismatchedId=updat groups have been found with mismatched unique IDs
e and you want to fix these users and groups with
mismatched unique IDs.
- Use this parameter in the command when users or
DmismatchedId=remov groups have been found with mismatched unique IDs
e and you want to remove these users and groups with
mismatched unique IDs.
-DpreserveDates=true Use this parameter in the command to preserve the last
modified date of items updated by the member fixer
task. Otherwise the last modified date will be updated
when the member fixer task is run.
- Use this parameter in the command to restrict which
DrestrictOn=<ItemType item types are processed.
> The member fixer tool can be run against the following
item types:
content
folder
project
style (for presentation templates)
template (for authoring templates)
taxonomy
category
SiteArea
Workflow
WorkflowStage
399 of 439
WorkflowAction
Cmpnt (for components)
400 of 439
For example: To run the member fixer task in report mode against your library run the
following command:
ConfigEngine.bat run-wcm-admin-task-member-fixer -DPortalAdminId=<username> -
DPortalAdminPwd=<password> -Dlibrary="<library name>"
3. Before progressing to the next step and running the member fixer task in fix mode,
ensure that the report mode indicates that the updates will happen as you require. A
summary of the updates will be shown by the command. A detailed report containing
the updates that will be made for each item will be shown in the SystemOut.log file
located in <wp_profile_root>\logs\WebSphere_Portal. If the report indicates that the
update will not happen as required, change the member fixer task parameters and
run the report mode again. Repeat this process until you are satisfied that the fixes
will be applied correctly. This is important because the fixes made by the member
fixer task when run in fix mode may not be easy to undo if incorrect fixes are applied.
Use the parameters available to run the member fixer task as per your requirement.
Example
In the example below we have captured some screenshots of running the member fixer
task in report mode against the Sample library which we had imported into our WCM
server.
1. We modified the
<wp_profile_root>/PortalServer/wcm/shared/app/config/wcmservices/MemberFixerM
odule.properties file and added the following value to it:
uid=xyzadmin,o=defaultWIMFileBasedRealm ->
uid=portaladmin,o=defaultWIMFileBasedRealm
2. Ensuring the WebSphere Portal server was running, we then ran the following
command from <wp_profile_root>/ConfigEngine:
ConfigEngine.bat run-wcm-admin-task-member-fixer -DPortalAdminId=portaladmin -
DPortalAdminPwd= -Dlibrary="Sample"
401 of 439
3. Once the process was completed, we checked the SystemOut.log and a snippet of
log file is included below for reference.
402 of 439
Update security task settings
Use the following parameters to run the update security task:
content
folder
project
403 of 439
style (for presentation templates)
template (for authoring templates)
taxonomy
category
SiteArea
Workflow
WorkflowStage
WorkflowAction
Cmpnt (for components)
404 of 439
2. From the WCM WCMConfigServices page that is loaded, click on Custom
properties as shown in the screenshot below.
3. Set or update the following properties on the server where you will run the member
fixer tool:
-
connect.businesslogic.module.workflowenablement.class=com.aptrix.pluto.workflow.
WorkflowEnablementModule
- connect.businesslogic.module.workflowenablement.remoteaccess=true
- connect.businesslogic.module.workflowenablement.autoload=false
405 of 439
4. Save the changes and restart the server for these settings to take effect.
content
406 of 439
folder
project
style (for presentation
templates)
template (for authoring
templates)
taxonomy
category
SiteArea
Workflow
WorkflowStage
WorkflowAction
Cmpnt (for components)
407 of 439
5.3.4. Clear history tool
Administrators can use the clear history tool to clear the history of an item.
Note: You cannot completely clear item history. One history item will always remain in an
item no matter what parameters you select when clearing the item history.
1. As an administrator, log into the the IBM WebSphere Application Server administration console and
navigate to the following:
Resources > Resource Environment > Resource Environment Providers > WCM
WCMConfigService.
2. From the WCM WCMConfigServices page that is loaded, click on Custom properties as
shown in the screenshot below.
408 of 439
3. Set or update the following properties on the server where you will run the clear history
tool:
- connect.businesslogic.module.clearhistory.class=com.aptrix.history.ClearHistoryModule
- connect.businesslogic.module.clearhistory.remoteaccess=true
- connect.businesslogic.module.clearhistory.autoload=false
Save the changes and restart the server for these settings to take effect.
409 of 439
history entries prior to this date. If
no date is specified, then the date
will default to one year before the
current date.
&keep Use this query string parameter to
specify the minimum number of
history entries to keep. If a
number is not specified, then the
minimum number of history
entries to keep will default to 10.
Example: If an item has not been
updated for over a year, and you
specify to clear all history entries
more than a year old, but choose
to keep the last five history
entries, all the history entries will
be cleared except for the last five
history entries even though they
are over a year old.
&restrictOn Use this query string parameter to
restrict which item types are
processed.
The clear history tool can be run
against the following item types:
content
style (for presentation
templates)
template (for authoring
templates)
taxonomy
category
SiteArea
Workflow
WorkflowStage
WorkflowAction
Cmpnt (for components)
410 of 439
&fix Use this query string parameter to
run the clear history tool in report
mode or fix mode. If this query
string parameter is omitted or set
to false, a report listing of which
history entries will be cleared is
displayed. If set to true, history
entries will be cleared as
specified.
Note: You cannot completely clear all versions. One version of an item will always remain
no matter what parameters you select when clearing the version history.
411 of 439
2. From the WCM WCMConfigServices page that is loaded, click on Custom
properties as shown in the screenshot below.
3. Set or update the following properties on the server where you will run the clear
version tool:
-
connect.businesslogic.module.clearversions.class=com.aptrix.versioncontrol.ClearVe
rsionsModule
- connect.businesslogic.module.clearversions.remoteaccess=true
- connect.businesslogic.module.clearversions.autoload=false
412 of 439
4. Save the changes and restart the server for these settings to take effect.
413 of 439
content
style (for presentation
templates)
template (for authoring
templates)
taxonomy
category
SiteArea
Workflow
WorkflowStage
WorkflowAction
Cmpnt (for components)
414 of 439
5.4. Web content feed management
Administrators can configure new Web Content Integrator (WCI) feeds to consume
content from external, third party sources into IBM Web Content Manager. These feeds
can also be configured to run on schedule.
This section covers the various web content feed management tasks in detail.
Note: Only administrators can perform web content feed management tasks described in
this section.
415 of 439
Delete an existing web content feed
Use the following action button to delete an existing selected web content feed
configuration.
1. Access the WebSphere Portal administration page and navigate to Portal Content >
Feed Configurations.
2. Use the New action to create a new feed configuration and enter a suitable
name for this feed configuration.
416 of 439
<lastBuildDate>{last-modified_value}</lastBuildDate>
<ibmfs:etag>{etag_value}</ibmfs:etag>
In the HTTP Headers
The handshake data is exchanged using standard HTTP protocol header
fields. This is the default and preferred method.
Requests from the Consumer contain:
If-Modified-Since : {last-modified_value}
If-None-Match: {etag_value}
Responses from the producer contain:
ETag: {etag_value}
Last-Modified: {last-modified_value}
8. Select whether to check the publication date or not. If selected, web content items
that have the same publish date as the feed source will not be processed.
9. If you want to use an XSLT style sheet, select Enable XSLT and specify the path to
the XSL file relative to the /config/xslt directory in the feed Service application.
10. Use either the Save action to save the configuration without consuming the
417 of 439
Actions to manage web content feed jobs
Several actions are available for the administrator to manage the web content feed jobs.
418 of 439
Resume job schedules
Use this action to resume a selected job schedule.
1. Access the WebSphere Portal administration page and navigate to Portal Content >
Feed Jobs.
2. Use the New action to create a new feed job and enter a suitable name for
this feed job.
3. Define how often (minutes, hours or days) you want to run this job by entering and
selecting the values in the Run Every field.
4. Select the feed configuration that you have configured from the list.. You can use the
Remove action to remove an existing feed configuration selection.
419 of 439
5.5. Caching
Caching in IBM Web Content Manager (WCM) can be performed at three different levels:
Web server: using a caching proxy module part of Websphere Edge components
Application Server: using WebSphere Servlet Caching to store the responses
generated by the WCM servlet or portlets for future users
WCM: Elements can be cached in WCM reducing the number of database calls.
IBM Web Content Manager generated web pages and content from external data
sources can be cached by the Web Content Manager application If utilized correctly, Web
Content Manager caching can dramatically increase the performance of a site. More
details about caching are available in the IBM Web Content Manager product infocenter
and in the wiki article Web Content Management Caching and Pre-rendering
420 of 439
1. Site - This is the same as the basic web content cache except that cache parameters
in connect tags and URL requests can be used to override your server's default
advanced web content caching settings.
2. Session - When session caching is enabled, a copy of each Web page a user visits is
stored in the session cache. The User accesses the cached version of a web page
until they start a new session, or until the cached web page is expired from the cache
3. User - When user caching is enabled, a copy of each Web page a user visits is
stored in the user cache. The user accesses the cached version of a web page until
the cached web page is expired from the cache
4. Secured - Secured caching is used on sites where the item security features are
used to grant different users access to different Web pages and components based
on the groups they belong to.
5. Personalize - Personalized caching is used to cache web pages of users who have
the same "personalization profile". This means that users who have selected the
same personalization categories and keywords, and who belong to the same group,
share a single cache.
To set these, access the WebSphere Application Server administration console and
navigate to Resource environment providers, WCM WCMConfigService. The
configuration options are specified under Custom properties section and can be updated
to the desired settings.
Alternately you can uncomment and update the desired property in the
WCMConfigService.properties file in \PortalServer\wcm\shared\app\config\wcmservices
directory and then run the config task update-wcm-service-properties.
Refer to the IBM Web Content Manager Infocenter for more details.
URL :
www.lotus.com/ldd/portalwiki.nsf/dx/Setting_service_configuration_properties_exp7
421 of 439
1:
2: # Advance caching
3:
connect.moduleconfig.ajpe.contentcache.defaultcontentcache=Secured
4: connect.moduleconfig.ajpe.contentcache.contentcacheexpires=REL
600s
5: # Basic cache
6: #connect.businesslogic.defaultcacheexpires=REL 3D
7: #connect.businesslogic.defaultcache=false
Note:
You will need to restart WebSphere Portal to enable any configuration changes
made.
When making changes to clustered servers, you will need to ensure the WCM
WCMConfigService service section under the Cluster Scope is updated.
You can get the Cache Statistics or review the cache content, invalidate a cache, etc
using the WebSphere Application Server extended cache monitor.
422 of 439
Refer to WebSphere Application Server Infocenter for more details on monitoring and
managing cache. The below screenshot provide on example on what is seen in the in the
cache monitor application when you select the Cache Content option. This enables you
to invalidate a specific cache or you you clear all caching the Cache Statistics panel.
5.6. Deployment
This section covers a high level overview of the authoring environment and the various
options available for delivery of IBM Web Content Manager (WCM) content.
Authoring environments
The WCM authoring environment is usually the environment in which the content authors
and editors will create and update content and approvers will approve the content before
it is published.
There are various WCM authoring topologies that are possible. Refer to the following wiki
article that describes these authoring topologies:
http://www-10.lotus.com/ldd/portalwiki.nsf/dx/5.2.2-authoring-environments
Note: Even though the link refers to the wiki topic from the previous version of WCM, the
authoring topologies described still apply to WCM v7.
Rendering environments
WCM sites can be delivered using one of the following three mechanisms:
423 of 439
5.6.1. Portlet rendering
WebSphere Portal sites can include WCM content using the portlet rendering option.
With this option, the JSR 286 web content viewer portlet is added to the WebSphere
Portal page where the WCM content is required. This JSR 286 web content viewer portlet
can be configured for displaying the WCM content from a web content library. Multiple
JSR 286 web content viewer portlets can be included on a WebSphere Portal page if
required.
Perform local rendering using the JSR 286 web content viewer portlet
Perform remote rendering using the Web Services for Remote Portlets (WSRP) and
the JSR 286 web content viewer portlet
To add a web content viewer portlet on a portal page, follow these steps:
2. Click on Add portlets action and search for Web Content Viewer (JSR
286). Select the portlet and click OK.
424 of 439
3. The web content viewer is now added to the portal page. The screenshot below
displays multiple web content viewer portlets on the portal page.
4. Click on the Edit shared settings action to configure the web content you want this
web content viewer to display.
425 of 439
5. A new window will pop up as shown in the screenshot below.
The Content section enables you to select the content from a web content library to
display in the portlet.
The Profile section contains profiling settings for the JSR 286 web content viewer
where you can specifying categories, site areas, and authoring templates that can be
used as menu search options.
The Portlet Settings section defines additional settings for the JSR 286 web content
viewer where you can set the portlet and page display title and configure the portlet
cache options.
The Advanced Options section allows you to define the broadcast behavior between
web content viewers, specify if context processors plug-ins are applied and set the
scope of the tag cloud results.
426 of 439
Refer to the following wiki link to understand each of these sections in detail:
http://www-
10.lotus.com/ldd/portalwiki.nsf/dx/Editing_the_settings_of_a_web_content_viewer_por
tlet_wcm7
427 of 439
6. Clicking OK to display a preview of the content you selected for the web content
viewer portlet.
428 of 439
286 portlet
Yes Upgrade WCM No
independent of
WebSphere Portal
For additional details on web content pages refer to the following wiki link:
http://www-10.lotus.com/ldd/portalwiki.nsf/dx/Working_with_web_content_pages_wcm7
Note: As non-ascii characters can not be used in the query string section of URLs it is
important that you do not use such characters in the names field of WCM items.
429 of 439
5.6.3. Pre-rendering
The pre-rendering process takes a copy of the entire IBM Web Content Manager (WCM)
website and saves the site as static HTML files and resource files (images, CSS etc.).
These static pre-rendered files can be delivered by the WCM server or by the HTTP web
server. This improves the website delivery performance as the pages are not dynamically
rendered on the fly.
Important considerations
Carefully read through the following important considerations before you use pre-
rendering as an option:
Pre-rendering is ideal when the WCM website content does not change very frequently.
A personalized website cannot be pre-rendered.
The pre-rendering process is configured to run as a user
(connect.moduleconfig.cacher.rendereruser) and hence the website snapshot is taken as
per the access privileges available to the selected user.
It can take a long time to pre-render a large site. While the site is being pre-rendered
WCM authoring portlet users may be locked out of the system until the pre-rendering
process is completed. So it is recommended that a dedicated pre-rendering server be
responsible for pre-rendering.
The entire site must be pre-rendered before it can be used, otherwise there will be
broken links.
Website using page navigation components and WCM Search components cannot be
pre-rendered.
The path to the content item cannot exceed the operating systems maximum path length
which is 255 characters on Microsoft Windows and 1024 characters on Linux.
Invalid Characters in Site, Site Area or Content Names: Sites, Site Areas, and Content
objects cannot contain characters that are considered invalid in file names by the
operating system where the server will pre-render.
Configuring pre-rendering
Pre-rendering configuration can be done from the IBM WebSphere Application Server
administration console:
430 of 439
2. From the WCM WCMConfigServices page that is loaded, click on Custom
properties as shown in the screenshot below.
Note: Refer to the following wiki links to get details on the additional properties that you
need to configure for pre-rendering and to learn more about how to pre-render a WCM
website respectively:
http://www-10.lotus.com/ldd/portalwiki.nsf/dx/Configuring_prerendering_wcm7
http://www-10.lotus.com/ldd/portalwiki.nsf/dx/Prerendering_a_website_wcm7
431 of 439
Configure pre-rendering for sites viewed using Web
Content Manager
You can configure pre-rendering such that WCM will serve the pre-rendered website
content.
This option was more important in the Connect Tag days as Connect Tags wouldnt be
pre-rendered and thus would be dynamically processed each time a page was requested.
As the Connect Tag use is now discouraged, this form of accessing Pre-Rendered
content is not popular.
To set this option, use the WebSphere administration console to set the following
property in the WCM WCMConfigService service:
Save the setting and restart the server for this setting to take effect.
Note: You cannot use the local rendering portlet (Web Content Viewer) when pre-
rendering is set as the default module.
To set this option, use the WebSphere administration console to set the following
property in the WCM WCMConfigService service:
Save the setting and restart the server for this setting to take effect.
5.7. Troubleshooting
IBM Web Content Manager (WCM) writes information, warning and error message to
logs during configuration and at real time. These message provides details to resolve
problems.
The product Infocenter, Troubleshooting section provides details on the logging and
information about various log files.
URL : http://www-10.lotus.com/ldd/portalwiki.nsf/dx/Troubleshooting_wcm7
You can enable logging and tracing for software that is shipped with IBM Web Content
432 of 439
Manager. If you are experiencing a problem, you might want to enable tracing and then
recreate the problem to capture more log information.
Enabling tracing
Enabling tracing makes log output more verbose. For example, you can enable tracing
within WebSphere Application Server to obtain information about application servers and
other processes.
Refer to IBM Web Content Manager Infocenter for more details and also to the
MustGather data collection lists used in troubleshooting various problems in IBM Web
Content Manager.
You can enable and disable temporary tracing or setup extended tracing from startup.
Refer to WebSphere Portal Family Wiki - Troubleshooting Web Content Manager section
for articled that provides more specific details on troubleshooting and resolving various
problem with IBM Web Content Manager.
Temporary tracing
To enable temporary tracing:
icon.
Example : com.ibm.workplace.wcm.*=all:com.aptrix.*=all:com.presence.*=all
433 of 439
3. Reproduce the issue and then remove the trace string by selecting the setting you
Extended tracing
Extended/Static tracing is the recommended method of capturing data as it collects data
from server startup until problem recreation.
1. Log into the Integrated Solutions Console as the WebSphere Application Server
administrator and navigate to Troubleshooting >Logs and Trace
>WebSphere_Portal >Diagnostic Trace.
2. On the Configuration tab, ensure you increase the Maximum File Size and and
Maximum Number of Historical Files as needed so that the tracing of the problem
recreation is not overwritten due to the amount of traffic on the system and output of
the tracing itself.
3. Click Change Log Level Details and enter a trace string.
Example : com.ibm.workplace.wcm.*=all:com.aptrix.*=all:com.presence.connect.*=all
434 of 439
followed by:
4. Click OK and save the changes. Restart the WebSphere_Portal application server.
Collecting logs
The location of log files are documented in IBM Web Content Manager Infocenter in
section Logging and Tracing.
URL : http://www-10.lotus.com/ldd/portalwiki.nsf/dx/Logging_and_tracing_wcm7
If any assistance is required you can contact the IBM Product Support and create a PMR
and request assistance. Collecting MustGather data early and submitting this when
opening a PMR will help get a resolution much quicker. Run the following script from
/PortalServer/bin to collect the data:
Windows: wpcollector.bat
Linux/Unix/i: wpcollector.sh
Note: If you want to use wpcollector to FTP the files to IBM Support, include the -Dpmr=
parameter to indicate the relevant PMR #.
For example: wpcollector.bat -Dpmr=11111,222,333
If you did not FTP your files via wpcollector, locate the "wp.mustgather.zip" file or the "-
wp.mustgather-timestamp.zip" file in /filesForAutoPD/ and you can send the logs to IBM
Support for review and assist.
Details on how to Exchanging information with IBM Technical Support for problem
determination is documented in link below.
http://www.ibm.com/support/docview.wss?rs=688&uid=swg21201571
435 of 439
IBM Support tools portlet
IBM Support tools portlet can download from IBM Lotus and WebSphere Portal Business
Solutions Catalog website. This can be installed like any standard portlet and added to a
portal page with Administrator access.
URL :
https://greenhouse.lotus.com/plugins/plugincatalog.nsf/assetDetails.xsp?action=editDocu
ment&documentId=AE2BB2412F20AA318525772E006F7014
This portlet provides an assortment of tools that are useful in troubleshooting content
related issues.This portlet includes tools to view the JCR repository for WCM content, run
an xpath query and view results, and directly execute various JSP's from support. These
tools are commonly provided by support on a case to case basis to gather information
specific to customer environment and content. With this portlet installed on the WCM
system, it will help expedite the troubleshooting process. This also provides tools to clear
all WCM Caches.
Split-second utility
Split-second is an innovative performance troubleshooting tool designed to fill the gap
between no-cost but unreliable performance trouble shooting approaches and elaborate
but expensive performance monitoring tools.
URL :
https://greenhouse.lotus.com/plugins/plugincatalog.nsf/assetDetails.xsp?action=editDocu
ment&documentId=376ACFB8593EEC0A85257832005A4F8A
436 of 439
One of the main hurdles that developers and support personnel face when debugging
performance issues is identifying the problem area(exact method) and also the stack
leading up to it. Using Split-Second, anyone can build and deploy an instrumented
module with minimal effort containing the suspect packages which would record the
method call execution times and dump the thread stack when the times exceeds a certain
threshold. The advantage of using this approach is that we do not need to hard code the
logic in each and every method. No tracing needs to be enabled for the stack to be
dumped and the response threshold times can be made configurable.
Split-Second an extremely useful tool in the field to identify the performance bottleneck
root cause very quickly. It is not specific to any product and can be used for any java
based application. SplitSecond 3.x is currently not compatible with WCM syndication.
Before using SplitSecond, disable automatic syndication as per the infocenter instruction.
437 of 439
The screenshot below shows after the data has been captured.
URL : http://www.ibm.com/developerworks/websphere/downloads/cache_monitor.html
438 of 439
439 of 439