|
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 UserProfileControl
Control to access and modify the user profile. The methods all use the ProfileWrapper as the object for which the profile will be associated. This control is deprecated as of Portal 8.1.x. It may only be used with the older UserManagerControl (which has also been deprecated).
As of 8.1 SP3, pleaseuse the UserProviderControl and GroupProviderControl in conjunction with ProfileControl and PropertyControl.
This control is backed by three EJBs, all of which must be deployed into this application. Those EJBs are:
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).
Support to retrieve profile information is provided in the event that the HttpSession cannot be obtained. For example, JWS currently provides no means to get the HttpSession object. In this case, you may create the ProfileWrapper by using the ProfileFactory.
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 | |
---|---|
String[] |
getAllProfileNames()
Deprecated as of Portal 8.1 Use ProfileControl.getUserProfileManager().getAllProfileNames() or Use ProfileControl.getGroupProfileManager().getAllProfileNames() |
ProfileWrapper |
getProfile(String username,
String groupname)
Deprecated as of Portal 8.1 Use ProfileControl.getProfile(username, groupname) |
ProfileWrapper |
getProfileForGroup(String groupname)
Deprecated as of Portal 8.1 Use ProfileControl.getProfileForGroup(groupname) |
ProfileWrapper |
getProfileForUser(String username)
Deprecated as of Portal 8.1 Use ProfileControl.getProfileForUser(username) |
ProfileWrapper |
getProfileFromRequest(HttpServletRequest request)
Deprecated as of Portal 8.1 Use ProfileControl.getProfileFromRequest(request) |
EntityPropertyCache |
getProperties(ProfileWrapper pw)
Deprecated as of Portal 8.1 Use ProfileControl.getProperties(profileName) |
EntityPropertyCache |
getPropertiesFromKeys(ProfileWrapper pw,
Set propertyMapKeys)
Deprecated as of Portal 8.1 Use ProfileControl.getProfileManager().getProperties(profileName, propertyMapKeys) |
EntityPropertyCache |
getPropertiesFromSet(ProfileWrapper pw,
String propertySetName)
Deprecated as of Portal 8.1 Use ProfileControl.getProfileManager().getProperties(profileName, propertySetName) |
Object |
getProperty(ProfileWrapper pw,
String propertySet,
String property)
Deprecated as of Portal 8.1 Use ProfileControl.getProfileManager().getProperty(profileName, propertySet, property) |
List |
getUserNames(String searchExpression,
int limit)
Deprecated as of Portal 8.1 Use UserProviderControl.getUserNames(searchExpression, limit) |
void |
setProperties(ProfileWrapper pw,
EntityPropertyCache cache)
Deprecated as of Portal 8.1 Use multiple invocations of ProfileControl.setProperty(profileName, propertySet, property, value) |
void |
setProperty(ProfileWrapper pw,
String propertySet,
String property,
Object value)
Deprecated as of Portal 8.1 Use ProfileControl.setProperty(profileName, propertySet, property, value) |
boolean |
userExists(String username)
Deprecated as of Portal 8.1 Use UserProviderControl.userExists(username) |
boolean |
userProfileExists(String username)
Deprecated as of Portal 8.1 Use ProfileControl.getUserProfileManager().profileExists(username) |
Method Detail |
---|
boolean userExists(String username) throws P13nControlException
username
- The user (login) name of the user
P13nControlException
- if a RemoteException occurs while invoking the
UserManager EJB methodsboolean userProfileExists(String username) throws P13nControlException
username
- The user (login) name of the user
P13nControlException
- if a RemoteException occurs while invoking the
UserProfileManager EJB methodsList getUserNames(String searchExpression, int limit) throws P13nControlException
searchExpression
- a wildcard search expressionlimit
- a limit of results to return
P13nControlException
- if a RemoteException occurs while invoking the
UserManager EJB methodsString[] getAllProfileNames() throws P13nControlException
P13nControlException
- if a RemoteException occurs while invoking the
UserProfileManager EJB methods or if user is not in the role of
'PortalSystemAdministrator' or 'Portal' ProfileWrapper getProfileFromRequest(HttpServletRequest request) throws P13nControlException
HttpServletRequest
- the request object
P13nControlException
- if errors generated on the control side.ProfileWrapper getProfileForUser(String username) throws P13nControlException
username
- the username of the profile
P13nControlException
- if the given identity(ies) do not exist
or if a remote exception is encountered while creating profile.ProfileWrapper getProfileForGroup(String groupname) throws P13nControlException
groupname
- the groupname of the profile
P13nControlException
- if the given identity(ies) do not exist
or if a remote exception is encountered while creating profile.ProfileWrapper getProfile(String username, String groupname) throws P13nControlException
username
- the username of the profilegroupname
- the groupname of the profile
P13nControlException
- if the given identity(ies) do not exist
or if a remote exception is encountered while creating profile.EntityPropertyCache getProperties(ProfileWrapper pw) throws P13nControlException
pw
- The ProfileWrapper representing the user profile for which the
properties are to be retrieved
P13nControlException
- if profile not found, or if remote exceptions
are encounterd while trying to retrieve the propertiesEntityPropertyCache getPropertiesFromSet(ProfileWrapper pw, String propertySetName) throws P13nControlException
P13nControlException
EntityPropertyCache getPropertiesFromKeys(ProfileWrapper pw, Set propertyMapKeys) throws 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
P13nControlException
- if profile not found, or if remote exceptions
are encounterd while trying to retrieve the propertiesObject getProperty(ProfileWrapper pw, String propertySet, String property) throws 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
P13nControlException
- if profile not found, or if remote exceptions
are encounterd while trying to retrieve the propertiesvoid setProperties(ProfileWrapper pw, EntityPropertyCache cache) throws 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
P13nControlException
- if profile not found, or if remote exceptions
are encounterd while trying to set the propertiesvoid setProperty(ProfileWrapper pw, String propertySet, String property, Object value) throws 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
P13nControlException
- if profile not found, or if remote exceptions
are encounterd while trying to set 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 |