com.bea.p13n.controls.profile
Interface PropertyControl

Control to access and modify the user profile. The methods all use the
ProfileWrapper as the object for which the profile will be associated.

Using ProfileWrapper, as opposed to the user name, allows the default
properties to be retrieved, if they are set. The ProfileWrapper is available
in every Session, regardless of wheter the user is registered. In addition to
the username, it also provides APIs for determining the user type (eg, registered,
anonymous, or tracked).

Using EntityPropertyCache as the container for the returned properties,
as opposed to a Map, makes it clear to the user how the properties should
be extracted from the cache. The EntityPropertyCache stores properties as a
HashMap of PropertySetKey/propertyValue, where PropertySetKey is the
propertySet/propertyName pair.

You may get the backing HashMap of the EntityPropertyCache by
calling its getMap() method, then step through it as follows:

getPropertiesFromKeys

Get all properties that match the set of PropertyMapKeys for this profile
A PropertyMapKey is a 'propertySet/propertyName' pair.
Use this API when you have access to the HttpSession; eg, in Page Groups
and JSP.
String propertySet = "BogusProperties"
String propertyName = "ColorPreference"
PropertyMapKey pmk = new PropertyMapKeyImpl(propertySet, propertyName);
Set set = new HashSet();
set.add(pmk);

Parameters

pw - The ProfileWrapper representing the user profile for which the
properties are to be retrieved

a - Set of PropertyMapKeys for which all properties will be retrieved

Returns

an EntityPropertyCache of the retrieved properties or null if there are
no properties

Throws

P13nControlException - if profile not found, or if remote exceptions
are encounterd while trying to retrieve the properties