<<

. 32
( 87 .)



>>



174 Chapter 9


with Studio Advanced Edition or use an IDE, such as VisualAge for Java.
Regardless of the method used, you need to be acquainted with the API.
The following sections provide a brief summary of the API. For full details
refer to the IBM product JavaDoc documentation.
The class ¬les for your implementations of the resource access APIs must
be placed in the Web module of your Enterprise Application.

Resource Interface
The interface com.ibm.websphere.personalization.resources.Resource
allows you to map your user model or content model to data in your
database. The resource essentially implements a property container. This
interface requires the following methods:
”returns an identi¬er (primary key) for the
String getId()
resource
”returns the value of the named
Object get(String prop)
dynamic property in this resource
”returns all property keys associates with
Enumeration keys()
the resource
”sets the named
void put(String name, Object value)
dynamic property to a value
”removes the named dynamic
void remove(String name)
property from the resource
In addition to these methods, you need to implement methods for setting
and getting each ¬xed property de¬ned in the data model for the resource.
For example, for a ¬xed property surname de¬ned for your user resource,
the methods getsurname() and setSurname() must be implemented.

ResourceDomain3 Interface
The com.ibm.websphere.personalization.resources.ResourceDomain3 in-
terface allows you to query and select resources based on ¬xed proper-
ties. The access is read-only mode. The methods ResourceDomain3 use
the class ResourceContext. The latter is an object that can be instantiated
in your JSPs to pass data to your resource classes. This interface requires
the following methods:
Resource findById(String name, ResourceContext
”returns the named resource
context)
Enumeration findResourcesByQuery(Query query,
”returns all resources meeting the
ResourceContext context)
P1: FCH/SPH P2: FCH/SPH QC: FCH/SPH T1: FCH
WY009-09 WY009-BenNatan-v1.cls May 18, 2004 21:54




WebSphere Portal Personalization 175


query speci¬cation (query speci¬cation is similar to the WHERE
clause in an SQL SELECT statement)
Enumeration findResourcesByPropertyQuery(String
”returns all
name, String value, ResourceContext context)
resources having the named property with the speci¬ed value


ResourceManager3 Interface
The com.ibm.websphere.personalization.resources.ResourceManager3 in-
terface supports the process of dynamically updating, adding, and deleting
resources (of type Resource) in the customer data store. This interface re-
quires the following methods:
void add(Resource resource, ResourceContext
”adds a new resource
context)
void delete(Resource resource, ResourceContext
”deletes the speci¬ed resource
context)
Resource getForUpdate(String id, ResourceContext
”returns a resource having the named id (recall the ID is
context)
unique, thus there is only one)
void syncdelete(Resource resource, ResourceContext
”synchronizes any changes made (that is, making the
context)
changes permanent by storing them in the datastore)


Recommendation-Based Personalization
Rules-based personalization, as discussed above, requires a lot of work for
de¬ning the various criteria for delivering content.
Recommendation-based personalization relies on products external to
the WebSphere application server to recommend content or to recommend
content to visitors of your Web site. Recommendation-based personaliza-
tion is powered by LikeMinds, which is not part of the WebSphere Portal
Server Distribution.
Recommendation-based personalization complements and does not re-
place rules-based personalization. It uses collaborative ¬ltering to capture
subtle behavior patterns not captured in rules, and thus it adapts to changes
without the need to create new rules. However, it can be used in the same
page as rules-based personalization.
When de¬ning new rules in the rule editor, the last option available un-
der the rule type is Recommend Content. The rule structure for this rule
type is shown in Figure 9-8. The content to be recommended is de¬ned
P1: FCH/SPH P2: FCH/SPH QC: FCH/SPH T1: FCH
WY009-09 WY009-BenNatan-v1.cls May 18, 2004 21:54




176 Chapter 9




Figure 9-8 De¬ning a recommendation rule.


by a resource collection. The recommendation can be made by one of the
following three options shown in Figure 9-9:
how the current user navigated the site”this
recommendation method is used to generate recommendation based
on the user navigation sequence through the site. This method uses
the LikeMinds ClickStream engine and is the default method. The




Figure 9-9 Recommendation methods available within a Recommendation rule.
P1: FCH/SPH P2: FCH/SPH QC: FCH/SPH T1: FCH
WY009-09 WY009-BenNatan-v1.cls May 18, 2004 21:54




WebSphere Portal Personalization 177


ClickStream engine captures each navigation even within a bean
called the Action bean.
preferences explicitly expressed by the user”this
recommendation method is used to generate recommendations
based on the ratings users give to items. This method uses the
LikeMinds Preference engine. Resources are rated using a Rating
bean, and data is stored by LikeMinds for later use.
association with content returned from a rule”this
method generates recommendations based on market-based
analysis. It associates resources that the user has interest in with
items that other users have previously been interested in or have
purchased. This method uses the LikeMinds Item Af¬nity engine.
This engine makes use of transaction data being collected.
The action, sort, and limit output clauses of the rule are similar to other
rules discussed above.


Summary
In this chapter we have reviewed the WebSphere Personalization solution.
This solution relies heavily on content management solutions to store the
actual content to be displayed based on personalization rules and recom-
mendations. To implement personalization in your portal, you would need
to get acquainted with the content management concept described in Chap-
ter 11. In addition, content spots are deployed in the portal through portlets.
You will learn to develop your own portlets in Part 3 of the book.
The next chapter describes the various facets of portal administration.
P1: FCH/SPH P2: FCH/SPH QC: FCH/SPH T1: FCH
WY009-09 WY009-BenNatan-v1.cls May 18, 2004 21:54




178
P1: FCH/SPH P2: FCH/SPH QC: FCH/SPH T1: FCH
WY009-10 WY009-BenNatan-v1.cls May 14, 2004 0:16




CHAPTER

10

Portal Administration

The administration component of WebSphere Portal is the “ship™s bridge,”
the area that allows you to control the layout, portlets, server, users, groups,
and resources. The Portal Administration consists of ¬ve sections: portal
user interface, portlets, access, portal settings, and portal analysis. Portal
User Interface was covered in Chapter 7 De¬ning Portals and Pages In-
stalling portlets will be covered in Chapter 17 Portlet Interactive Debug
and JSR 168 Example. In this chapter you will learn how to customize and
con¬gure your portal, use Web Clippings, administer your search engine,
and perform simple portal analysis.


Your Portal Settings
To con¬gure your portal, you ¬rst need to access the administration page.
After logging in using a user ID with administrative rights (for example,
wpsadmin), click Administration in the right-hand corner. This will bring
you to the main administration page.
One of the ¬rst tasks you want to do after you have installed WebSphere
Portal (WP) is to con¬gure your Portal Settings. Within Portal Settings, your
¬rst stop is to click Global Settings.


Global Settings
The ¬rst setting you need to review is the default portal language. Each
user can change the selected language during the enrollment process or by
selecting Edit My Pro¬le. WP comes with support for numerous languages

179
P1: FCH/SPH P2: FCH/SPH QC: FCH/SPH T1: FCH
WY009-10 WY009-BenNatan-v1.cls May 14, 2004 0:16




180 Chapter 10


including Arabic, Czech, Danish, Dutch, English, Finnish, French, German,
Greek, Hebrew, Hungarian, Italian, Japanese, Korean, Norwegian, Polish,
Portuguese, Russian, Spanish, Chinese, and Turkish. But just in case you
speak a dialect not covered (such as Swahili), WP provides the ¬‚exibility to
add a new language.
You add a new language by adding it to the ¬le and then copying and
translating a resource bundle and JSP pages. Texts displayed in JSPs or
stored in Java code are maintained in resource bundles. To add a resource
bundle, copy and translate it, name it using the resource bundle naming
convention, and then with the JDK Native-to-ASCII converter native2ascii,
convert to Unicode. For any JSPs that have text directly imbedded in them,
you have to translate them and store them in the appropriate location.
The next global setting you have to set is how the ¬rst page will be dis-
played. You have three options. Set it to the default page, the most recently
visited page, or let the user make the choice at log-on. However, the latter
two imply that you set the session preservation levels to 1 or 2.
The user™s session state is de¬ned by the session preservation level vari-
able that is found in Con¬gServices.properties. There are three values. If per-
sistent.session.level = 0 then no persistent session information is stored in
the database and no settings can be restored after login. If persistent.session
level = 1, then the portlet states and portlet modes are stored but informa-
tion regarding the last page is not. If persistent.session level = 2, then all
session state information is stored.
The last two settings de¬ne portal-wide Find URL and enable transcoding
of portlet content. Enter the search engine URL you want used when the
user clicks Find and click Enable Transcoding of Portlet Content if you want
this function to be operative.

URL Mappings
Another useful feature of WebSphere Portal is URL mapping. URL mapping
allows you to create user-friendly URLs and map them to portal pages. For
instance, using the default portal that is installed with WP, you want to di-
rectly reference My Finance page. The URL is sandbox1.rigorconsul-
tants.com/wps/myportal/!ut/p/.cmd/cs/.ce/7_0_A/.s/7_0_
6S/_s.7_0_A/7_0_6S, which you must admit is somewhat dif¬cult to
remember. With URL mapping, you can replace that URL with a URL little
easier to remember such as sandbox1.rigorconsultants.com/wps/
myportal/finance. URL mapping can also be used to map several dif-
ferent contexts to the same internal URL. You can externalize and provide
different access rights for each new context.
URL mapping is quite simple. Under Portal Settings, click URL Map-
pings. In Figure 10-1, you can see that we have already added three new
P1: FCH/SPH P2: FCH/SPH QC: FCH/SPH T1: FCH
WY009-10 WY009-BenNatan-v1.cls May 14, 2004 0:16




Portal Administration 181


<<

. 32
( 87 .)



>>