|
|
Creating and Managing Property Sets
This following topics are included:
Property Value Retrieval via ConfigurableEntity
Using the Property Set Management Tool
Creating Properties within a Property Set
Editing Properties within a Property Set
Using the Property Set Management tool, you can create property sets, the schemas for personalization attributes schema and define the properties that make up these property sets.
Overview of Property Sets
In the most general sense, a property can be considered a name/value pair. Property sets serve as namespaces for properties so that properties can be conveniently grouped and so that multiple properties with the same name can be defined.
For instance, the web site developers might want users to be able to specify different background colors for each of their portals by requiring the property "backgroundColor" for a user. By creating "portalA" and "portalB" property sets, the property "backgroundColor" can exist for both portal A and portal B. While the two "backgroundColor" properties have the same name, they could have the same or different definitions. Figure 3-1 shows two property sets with redundant property names, corresponding to unique definitions.
Figure 3-1 Property Sets Serving as Namespaces.
A property definition includes the following information:
For Personalization Server purposes, property sets are applied to four major areas.
The "User/Group" property set type is used for defining the property sets and properties that apply to user and group profiles. For example, a property set of this type might be created called "portalA". Subsequent property retrieval for a particular user or group can then be scoped with this property set name to retrieve the user's background color for the portal. Please see the "Creating and Managing Users" for an in-depth discussion of how property retrieval works for users and groups.
The "Session" property set type is used for defining the property sets and properties that apply to HTTP sessions. Like the "User/Group" property set type, a "Session" property set type might be called "portalA". Properties available through this property set can then be accessed via the Personalization Advisor.
The "Request" property set type is used for defining the property sets and properties that apply to HTTP requests. Again, like the "User/Group" property set type, a "Request" property set type might be called "portalA." Properties available through this property set can then be accessed via the Personalization Advisor.
The "Content Management" property set type is used for defining the configuration and run-time use of the Content Management system. "Content Management" property sets cannot be created or manipulated with the Personalization Server administration tools. Please see "Creating and Managing Content" for more complete information on this subject.
Creating a property set is a simple task via the Property Set Management tools. A name for the set must be provided as well as a statement that describes the purpose of the property set. Properties can be copied from an existing property set if a preexisting property set defines similar properties. Expanding the previous example, if portal A's properties have been defined and portal B is going to have the same (or similar) properties, then time is saved by copying the properties from portal A's property set when creating portal B's property set. Finally, the type of property set ("User/Group", "Session", or "Request") must be chosen.
When defining a property, specify the following:
Name is the name of the property, such as "backgroundColor". Description is a textual description of the property, perhaps describing the purpose of the property. Type is the data type of the property value. Date types supported by the administration tools are Text, Integer (equivalent to Long in Java), Floating-Point number (equivalent to Double in Java), Boolean, and Date/Time (equivalent to java.sql.Timestamp). Selection option determines whether the property is single-valued or multi-valued. Creation category determines whether the possible values are restricted. Restricted property values are restricted to values listed in the property definition. Unrestricted property values have no such limitation.
Property Definition Attribute |
Attribute Value |
Name |
Text (100 character length maximum) |
Description |
Text (255 character length maximum) |
Type |
Text, Integer (equivalent to Long in Java), Floating-Point Number (equivalent to Double in Java), Boolean, or Date/Time |
Selection Option |
Single-Valued or Multi-Valued |
Creation Category |
Restricted or Unrestricted |
Default Value |
Up to you - can be null |
Once created, "User/Group" property values can be edited for a particular user or group via the User Management user and group tools. For "Session" and "Request" properties, the only editable values are the default values set in the property definitions - runtime values are determined by values in the HTTP session or HTTP request, respectively.
Property Value Retrieval via ConfigurableEntity
Property Sets created with the administration tools are stored as com.beasys.commerce.foundation.property.Schema components. The component that acts as an "owner" of properties associated with Property Sets is the com.beasys.commerce.axiom.contact.ConfigurableEntity. During inspection of the javadoc for Schema and ConfigurableEntity, the reader may see the words "schema" and "scope" used interchangeably with "Property Set." Figure 3-2 shows a simplified representation of property value retrieval through a ConfigurableEntity. For the ConfigurableEntity, the value of backgroundColor for portalB has been overridden. The value of backgroundColor for portalA has not. Therefore, when backgroundColor is requested for the portalB property set, the overridden value, red, will be returned. When backgroundColor is requested for the portalA property set, the property set default value, white, will be returned.
Figure 3-2 backgroundColor Property Retrieval
Figure 3-3 shows another simple example of backgroundColor property retrieval to demonstrate the notion of an explicit successor. A second ConfigurableEntity can be specified in the ConfigurableEntity getProperty() API that acts as a "backup" place to look for a particular property value. This second ConfigurableEntity is considered an explicit property successor. In this example, a particular group is used as an explicit successor, and the value for portalA's background color, green, is "inherited" from this successor.
Figure 3-3 Explicit Successor, `backgroundColor' Property Retrieval.
Figure 3-4 provides an example of an implicit successor. An implicit successor is a successor tied to a particular Property Set. In this case, the user does not have a value for portalA.backgroundColor, and no explicit successor is provided in the getProperty() call. However, the group has already been associated with the user as its successor for the portalA Property Set. Again, the user "inherits" the property value, green, from the group.
Figure 3-4 Property Inheritance through Property Set-Related Successor.
There also exists the notion of a default successor, which can be searched after an explicit successor and a Property Set-related successor have failed to return a value for the property. Figure 3-5 shows such a case. In this example, the Property Set-related successor cannot produce the necessary property value for backgroundColor in portalA, so the value must be retrieved from the default successor.
Figure 3-5 Figure 5. Property Inheritance through a default Successor.
Keep in mind that these examples have been considerably simplified for brevity and to easily explain relevant concepts. More details of ConfigurableEntity property inheritance are available in the topic Users and Groups.
Using the Property Set Management Tool
The Property Set Management tools allow you to create and manage sets of typed properties. Property Sets may be defined to describe user and group, session, request, and content properties.
Creating Property Sets
To create a property set:
To enter a new property set:
To copy properties from an existing property set into the new one:
Creating Properties within a Property Set
To create properties within a property set:
Note: The single option refers to those properties having only one option (e.g., Property: Color, Attribute: red). The multiple option refers to those properties having multiple options (e.g., Property: Colors, Attributes: red, green, blue, etc.).
Note: Restricted categories refer to values that are selected via a list, radio buttons, check boxes, etc. Unrestricted categories refer to instances in which users populate a form field.
To set up the property default value:
Note: Different steps are required for setting up default values, given your option/category selection.
For single/restricted:
For single/unrestricted:
For multiple/restricted:
For multiple-unrestricted:
Editing Property Sets
To edit a property set:
To edit the Property Set Description:
Editing Properties within a Property Set
To edit properties within a property set:
Deleting Property Sets
To delete a property set:
Deleting Properties
To delete properties:
|
Copyright © 2000 BEA Systems, Inc. All rights reserved.
|