|
Copyright © 2006 BEA Systems, Inc. All Rights Reserved | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public 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:
if ( ! cache.isEmpty()) { Iterator = cache.getMap().entrySet().iterator(); while ( iter.hasNext()) { Map.Entry entry = (Map.Entry)iter.next(); PropertyMapKey pmKey = (PropertyMapKey)entry.getKey(); String propertySetName = pmKey.getPropertySetName(); String propertyName = pmKey.getPropertyName(); Object value = entry.getValue(); } }
SessionHelper
,
PropertyMapKey
,
EntityPropertyCache
,
ProfileWrapper
,
ProfileFactory
Method Summary | |
---|---|
com.bea.p13n.property.EntityPropertyCache |
getProperties(com.bea.p13n.usermgmt.profile.ProfileWrapper pw)
Get all properties for this profile, and return as an EntityPropertyCache. |
com.bea.p13n.property.EntityPropertyCache |
getPropertiesFromKeys(com.bea.p13n.usermgmt.profile.ProfileWrapper pw,
Set propertyMapKeys)
Get all properties that match the set of PropertyMapKeys for this profile A PropertyMapKey is a 'propertySet/propertyName' pair. |
com.bea.p13n.property.EntityPropertyCache |
getPropertiesFromSet(com.bea.p13n.usermgmt.profile.ProfileWrapper pw,
String propertySetName)
Get all properties for named property set for this profile, and return as an EntityPropertyCache. |
Object |
getProperty(com.bea.p13n.usermgmt.profile.ProfileWrapper pw,
String propertySet,
String property)
Get an individual property. |
Object |
removeProperty(com.bea.p13n.usermgmt.profile.ProfileWrapper pw,
String propertySet,
String propertyName)
Remove a property from the profile |
void |
setProperties(com.bea.p13n.usermgmt.profile.ProfileWrapper pw,
com.bea.p13n.property.EntityPropertyCache cache)
Set properties in this EntityPropertyCache back into the user's profile. |
void |
setProperty(com.bea.p13n.usermgmt.profile.ProfileWrapper pw,
String propertySet,
String property,
Object value)
Set an individual property. |
Method Detail |
---|
com.bea.p13n.property.EntityPropertyCache getProperties(com.bea.p13n.usermgmt.profile.ProfileWrapper pw) throws com.bea.p13n.usermgmt.profile.ProfileNotFoundException, com.bea.p13n.controls.exceptions.P13nControlException
pw
- The ProfileWrapper representing the user profile for which the
properties are to be retrieved
com.bea.p13n.usermgmt.profile.ProfileNotFoundException
- if profile not found
com.bea.p13n.controls.exceptions.P13nControlException
- if remote exceptions
are encounterd while trying to retrieve the propertiescom.bea.p13n.property.EntityPropertyCache getPropertiesFromSet(com.bea.p13n.usermgmt.profile.ProfileWrapper pw, String propertySetName) throws com.bea.p13n.usermgmt.profile.ProfileNotFoundException, com.bea.p13n.controls.exceptions.P13nControlException
pw
- The ProfileWrapper representing the user profile for which the
properties are to be retrievedpropertySetName
-
com.bea.p13n.usermgmt.profile.ProfileNotFoundException
- if profile not found
com.bea.p13n.controls.exceptions.P13nControlException
- if remote exceptions
are encounterd while trying to retrieve the propertiescom.bea.p13n.property.EntityPropertyCache getPropertiesFromKeys(com.bea.p13n.usermgmt.profile.ProfileWrapper pw, Set propertyMapKeys) throws com.bea.p13n.usermgmt.profile.ProfileNotFoundException, com.bea.p13n.controls.exceptions.P13nControlException
String propertySet = "BogusProperties"
String propertyName = "ColorPreference"
PropertyMapKey pmk = new PropertyMapKeyImpl(propertySet, propertyName);
Set set = new HashSet();
set.add(pmk);
pw
- The ProfileWrapper representing the user profile for which the
properties are to be retrieveda
- Set of PropertyMapKeys for which all properties will be retrieved
com.bea.p13n.controls.exceptions.P13nControlException
- if profile not found, or if remote exceptions
are encounterd while trying to retrieve the properties
com.bea.p13n.usermgmt.profile.ProfileNotFoundException
Object getProperty(com.bea.p13n.usermgmt.profile.ProfileWrapper pw, String propertySet, String property) throws com.bea.p13n.usermgmt.profile.ProfileNotFoundException, com.bea.p13n.controls.exceptions.P13nControlException
pw
- The ProfileWrapper representing the user profile for which the
properties are to be retrievedthe
- name of the property set containing the property to retrievethe
- name of the property to retrieve
com.bea.p13n.usermgmt.profile.ProfileNotFoundException
- if profile not found
com.bea.p13n.controls.exceptions.P13nControlException
- if remote exceptions
are encounterd while trying to retrieve the propertiesvoid setProperties(com.bea.p13n.usermgmt.profile.ProfileWrapper pw, com.bea.p13n.property.EntityPropertyCache cache) throws com.bea.p13n.usermgmt.profile.ProfileNotFoundException, com.bea.p13n.property.PropertyValidationException, com.bea.p13n.controls.exceptions.P13nControlException
pw
- The ProfileWrapper representing the user profile for which the
properties are to be retrievedcache
- the cache containing the properties to set. See javadocs at the
top of this class for more info on the EntityPropertyCache
com.bea.p13n.usermgmt.profile.ProfileNotFoundException
- if profile not found
com.bea.p13n.property.PropertyValidationException
- if property is invalid
com.bea.p13n.controls.exceptions.P13nControlException
- if profile not found, or if remote exceptions
are encounterd while trying to set the propertiesvoid setProperty(com.bea.p13n.usermgmt.profile.ProfileWrapper pw, String propertySet, String property, Object value) throws com.bea.p13n.usermgmt.profile.ProfileNotFoundException, com.bea.p13n.property.PropertyValidationException, com.bea.p13n.controls.exceptions.P13nControlException
pw
- The ProfileWrapper representing the user profile for which the
properties are to be retrievedthe
- name of the property set containing the property to setthe
- name of the property to setthe
- value of the property to set
com.bea.p13n.usermgmt.profile.ProfileNotFoundException
- if profile not found
com.bea.p13n.property.PropertyValidationException
- if property is invalid
com.bea.p13n.controls.exceptions.P13nControlException
- if remote exceptions
are encounterd while trying to set the propertyObject removeProperty(com.bea.p13n.usermgmt.profile.ProfileWrapper pw, String propertySet, String propertyName) throws com.bea.p13n.usermgmt.profile.ProfileNotFoundException, com.bea.p13n.controls.exceptions.P13nControlException
pw
- The ProfileWrapper representing the user profile for which the
properties are to be retrievedpropertySet
- the property set containing the propertypropertyName
- the name of the property to retrieve
com.bea.p13n.usermgmt.profile.ProfileNotFoundException
- if profile not found
com.bea.p13n.controls.exceptions.P13nControlException
- if remote exceptions are encontered while
trying to remove the property
|
Copyright © 2006 BEA Systems, Inc. All Rights Reserved | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |