BEA Logo BEA WLCS Release 3.1.1

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

 

   WLCS Doc Home   |   Personalization Server Developer's Guide   |   Previous Topic   |   Next Topic   |   Contents   |   Index

Overview of Personalization Development

 

WebLogic Personalization Server provides developers with the ability to create personalized applications for e-commerce Web sites. This developer's guide provides information about the Advisor, Foundation Classes and Utilities, and JSP tags.

This section includes the following topics:

 


Personalization Server Run-Time Architecture

The WebLogic Personalization Server (WLPS) run-time architecture is designed to support a variety of personalized applications. These applications can be built on the portal/portlet infrastructure, on the tags and EJBs supplied by the Advisor, and on select tags and EJBs supplied by other personalization server components.

The following high-level architecture picture may be used to visualize the relationships between the components.

The personalized application is one built by the developer to use the personalization components. It may consist of a portal instance with JSP portlets, a set of traditional JSP pages or servlets, and/or code that accesses EJB objects directly.

Advisor

The Advisor component is the primary interface to the most common operations that personalized applications will use. It provides access through tags or a single EJB session bean. Specific functionality provided by the Advisor includes classifying users, selecting content based on user properties, and querying content management directly. The Advisor uses the Foundation, User Management, Rules Service, and Content Management components.

Portal Management

The Portal Management component provides tags and EJB objects to support creating a framework of portals and portlets. It is configured using the Portal Administration Tools and has embedded JSP fragments built by the developer.

User Management

The User Management component supports the run-time access of users, groups, and the relationships between them. The notion of property sets is embedded within the user and group property access scheme. This component is set up using the User Management Administration tools and supports access via JSP tags or direct access to EJB objects. A Unified User Profile may be built by the developer, extending the User EJB object, to provide custom data source access to user property values.

Content Management

The Content Management component provides the run-time API by which content is queried and retrieved. The functionality of this component is accessible via tags. The content retrieval functionality is provided using either the provided reference implementation or Documentum content retrieval products.

Rules Management

The Rules Management component is the run-time service that runs the rule sets that are built in the Rules Management Administration tool. This component is accessible only via the functionality of the Advisor tags. This component uses the JRules run-time library to make decisions.

Foundation Classes and Utilities

The Foundation is a set of miscellaneous utilities to aid JSP and Java developers in the development of personalized applications using the WebLogic Personalization Server. Its utilities include JSP files and Java classes that can be used by JSP developers to gain access to functions provided by the server and helpers for gaining access to Advisor services.

 


JSP Tags

The JSP tags included with WebLogic Personalization Server (Table 1-1) allow developers to create personalized applications without having to program using Java.

Table 1-1 Java Server Page (JSP) Tags Overview

Library

Tag

Description

Advisor


<pz:contentQuery>

Provides content based on search expression query syntax.


<pz:contentSelector>

Provides content based on results of a content selector rule and subsequent content query.


<pz:div>

Turns a user-provided piece of content on or off based on the results of a classifier rule.

Content Management

<cm:printDoc>

Inlines the raw bytes of a document object in to the JSP output stream.

<cm:printProperty>

Inlines the value of the specified content metadata property as a string.


<cm:select>

Selects content based on a search expression query syntax.


<cm:selectById>

Retrieves content using the content's unique identifier.

Flow Manager

<fm:getApplicationURI>

Gets the Flow Manager.

<fm:getCachedAttribute>

Gets an attribute out of the session/global cache.

<fm:setCachedAttribute>

Sets an attribute in the session/global cache.

<fm:removeCachedAttribute>

Removes an attribute from the session/global cache.

<fm:getSessionAttribute>

Gets an attribute out of the HttpSession.

<fm:setSessionAttribute>

Sets an attribute in the HttpSession.


<fm:removeSessionAttribute>

Removes an attribute from the HttpSession.

Internationalization

<i18n:localize>

Defines the language, country, variant, and base bundle name to be used throughout a page when accessing resource bundles via the <i18n:getmessage> tag. Also allows a character encoding and content type to be specified for a JSP.

<i18n:getMessage>

Used in conjunction with the <i18:localize> tag to retrieve localized static text or messages from a JspMessageBundle.

Portal Management


<esp:eval>

Evaluates a conditional attribute of a portlet. An example of a conditional attribute is isMinimizeable.


<esp:get>

Retrieves a String attribute of a portlet.


<esp:getGroupsForPortal>

Retrieves the names of the groups associated with a Portal.


<esp:monitorSession>

Disallows access to a page if the session is not valid or if the user has not logged in.


<esp:portalManager>

Provides the ability to do create, get, getColumnInfo, update, and remove actions on a Portal object.


<esp:portletManager>

Provides the ability to do create, get, getArranged, update, and remove actions on a Portlet object.


<esp:props>

Used to get a property from the Portal Properties bean, whose deployment descriptor contains default values used by the Portal Administration Tool.

Property Sets

<ps:getPropertyNames>

Used to get a list of property names given a property set.


<ps:getPropertySetNames>

Used to get a list of property sets given a property set type.

User Management (Profile)

<um:getProfile>

Retrieves the Unified User Profile object.


<um:getProperty>

Gets the value for the specified property from the current user profile in the session.


<um:getPropertyAsString>

Works exactly like the <um:getProperty> tag above, but ensures that the retrieved property value is a String.


<um:removeProperty>

Removes the property from the current user profile in the session.


<um:setProperty>

Sets a new value for the specified property for the current user profile in the session.

(Group-User Management)

<um:addGroupToGroup>

Adds the group corresponding to the provided childGroupName to the group corresponding to the provided parentGroupName.


<um:addUserToGroup>

Adds the user corresponding to the provided userName to the group corresponding to the provided parentGroupName.


<um:changeGroupName>

Adds the user corresponding to the provided userName to the group corresponding to the provided parentGroupName.


<um:createGroup>

Creates a new com.beasys.commerce.axiom.contact.Group object.


<um:createUser>

Creates a new persisted User object with the specified username and password.


<um:getChildGroupNames>

Returns the names of any groups that are children of the given group.


<um:getChildGroups>

Retrieves an array of com.beasys.commerce.axiom.contact.Group objects that are children of the Group corresponding to the provided groupName.


<um:getGroupNamesForUser>

Retrieves a String array that contains the group names matching the provided search expression and corresponding to groups to which the provided user belongs.


<um:getParentGroupName>

Retrieves the name of the parent of the com.beasys.commerce.axiom.contact.Group object associated with the provided groupName.


<um:getTopLevelGroups>

Retrieves an array of com.beasys.commerce.axiom.contact.Group objects, each of which has no parent group.


<um:getUsernames>

Retrieves a String array that contains the usernames matching the provided search expression.


<um:getUsernamesForGroup>

Retrieves a String array that contains the usernames matching the provided search expression and correspond to members of the provided group.


<um:removeGroup>

Removes the com.beasys.commerce.axiom.contact.Group object corresponding to the provided groupName.


<um:removeGroupFromGroup>

Removes a child group from a parent group.


<um:removeUser>

Removes the com.beasys.commerce.axiom.contact.User object corresponding to the provided userName.


<um:removeUserFromGroup>

Removes a user from a group.

(Security)

<um:login>

Authenticates a user/password combination.


<um:logout>

Ends the current user's WLS session. This is independent of the FlowManager's user session tracking, and should be used in combination with the <um:login> tag.


<um:setPassword>

Updates the password for the user corresponding to the provided username.

Personalization Utilities

<es:counter>

Creates a for loop construct.


<es:date>

Gets a date and time formatted string based on the user's time zone preference.


<es:forEachInArray>

Iterates over an array.


<es:isNull>

Checks to see if a value is null. If the value type is a String, also checks to see if the String is empty.


<es:monitorSession>

Disallows access to a page if the session is not valid or if the user is not logged in.


<es:notNull>

Checks to see if a value is not null. If the value type is a String, also checks to see if the String is not empty.


<es:preparedStatement>

Creates a JDBC prepared statement.


<es:simpleReport>

Creates a two-dimensional array out of a simple query.


<es:transposeArray>

Transposes a standard [row][column] array to a [column][row] array.


<es:uriContent>

Pulls content from a URL.

WebLogic Utilities

<wl:process>

Provides a attribute-based flow control construct.

<wl:repeat>

Used to iterate over a variety of Java objects, as specified in the set attribute.

 


Integration of External Components

A range of external components either come already integrated into the WebLogic Personalization Server, or can be integrated easily by a developer as extensions to the core components. A specific set of components that are known to be widely useful are described in Table 1-2. Other custom component integrations are possible given the JSP and EJB basis for the WebLogic Personalization Server, but the entire range of possibilities is not addressed here.

Table 1-2 Useful External Components the Personalization Server

External Component

Out-of-the-Box Support

Methods and Notes

DBMS

Integrated and tested with Cloudscape, Oracle 8.0.5, and 8.1.5.

Uses standard WebLogic Server JDBC connection pools.

LDAP authentication

Can be set up automatically using administration tools and property files.

Uses WebLogic Server security realms.

LDAP retrieval of user and group information

Can be set up automatically using administration tools.

Built into EJB persistence for User entity bean.

Legacy database of users

None.

Requires Unified User Profile extension of User entity bean.

Content Management engine

Reference implementation provided.

Provides API/SPI support from Documentum.

Legacy content database

None.

Requires either extension of Document entity bean or custom implementation of content management SPI.

Rules engine

JRules engine provided.

API/SPI with only JRules supported at this time as a valid service.

 


Support for Native Types

WebLogic Personalization Server supports the native types shown in Table 1-3.

Table 1-3 Native Types

Supported Type

Java Class

Notes

Boolean

java.lang.Boolean

Comparators: ==, !=

Integer

java.lang.Number

Comparators: ==, !=, <, >, <=, >=

Float

java.lang.Double

Comparators: ==, !=, <, >, <=, >=

Text

java.lang.String

Comparators: ==, !=, <, >, <=, >=, like

Datetime

java.sql.Timestamp

Comparators: ==, !=, <, >, <=, >=

UserDefined

Defined by developer

Comparators: N/A
User-defined properties may be programmatically set and gotten, but are not supported in the tools, rules, or content query expressions.

Any property can be a multivalue of a specific single native type as well. This is implemented as a java.util.Collection. Comparators for multivalues are contains and containsall, although the rules development tool will only allow the use of contains. The values possible as part of a multivalue may be restricted to a valid set, using the Property Set management tools.