Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2005 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.p13n.controls.profile
Interface UserProfileControl

All Superinterfaces:
  weblogic.jws.control.Control, com.bea.control.Control, Serializable

public interface UserProfileControl
extends weblogic.jws.control.Control

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:

- UserManager
- UserProfileManager
- RealmConfiguration

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();
    		 }
     }

Security requirements: The caller must be in the role of "PortalSystemAdministrator" to invoke method 'getAllUserNames()

See Also:
  `SessionHelper`, `PropertyMapKey`, `EntityPropertyCache`, `ProfileWrapper`, `ProfileFactory`

Nested Class Summary

Nested classes inherited from class com.bea.control.Control
`com.bea.control.Control.Callback`

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

### getAllProfileNames

    public String[] getAllProfileNames()
                                throws P13nControlException

  Deprecated. as of Portal 8.1 Use ProfileControl.getUserProfileManager().getAllProfileNames() or Use ProfileControl.getGroupProfileManager().getAllProfileNames()

  Get a list of all the profile names in the database

  Returns:
    a String array of all user profile names
  Throws:
    `P13nControlException` - if a RemoteException occurs while invoking the UserProfileManager EJB methods or if user is not in the role of 'PortalSystemAdministrator' or 'Portal'

### getProfile

    public ProfileWrapper getProfile(String username,
                                     String groupname)
                              throws P13nControlException

  Deprecated. as of Portal 8.1 Use ProfileControl.getProfile(username, groupname)

  Create a ProfileWrapper for the given username and groupname. Access the user's profile and use the provided groupname as an explicit successor when calling the ProfileManager.

  Parameters:
    `username` - the username of the profile
    `groupname` - the groupname of the profile
  Returns:
    an initialized ProfileWrapper
  Throws:
    `P13nControlException` - if the given identity(ies) do not exist or if a remote exception is encountered while creating profile.

### getProfileForGroup

    public ProfileWrapper getProfileForGroup(String groupname)
                                      throws P13nControlException

  Deprecated. as of Portal 8.1 Use ProfileControl.getProfileForGroup(groupname)

  Create a ProfileWrapper for the given username

  Parameters:
    `groupname` - the groupname of the profile
  Returns:
    an initialized ProfileWrapper
  Throws:
    `P13nControlException` - if the given identity(ies) do not exist or if a remote exception is encountered while creating profile.

### getProfileForUser

    public ProfileWrapper getProfileForUser(String username)
                                     throws P13nControlException

  Deprecated. as of Portal 8.1 Use ProfileControl.getProfileForUser(username)

  Create a ProfileWrapper for the given username, with no default explicit successor.

  Parameters:
    `username` - the username of the profile
  Returns:
    an initialized ProfileWrapper
  Throws:
    `P13nControlException` - if the given identity(ies) do not exist or if a remote exception is encountered while creating profile.

### getProfileFromRequest

    public ProfileWrapper getProfileFromRequest(HttpServletRequest request)
                                         throws P13nControlException

  Deprecated. as of Portal 8.1 Use ProfileControl.getProfileFromRequest(request)

  Get the existing ProfileWrapper from the request, or return null if none exists.

  Returns:
    an initialized ProfileWrapper
  Throws:
    `P13nControlException` - if errors generated on the control side.

### getProperties

    public EntityPropertyCache getProperties(ProfileWrapper pw)
                                      throws P13nControlException

  Deprecated. as of Portal 8.1 Use ProfileControl.getProperties(profileName)

  Get all properties for this profile, and return as an EntityPropertyCache. Use this API when you have access to the HttpSession; eg, in Page Groups and JSP.

  Parameters:
    `pw` - The ProfileWrapper representing the user profile for which the properties are to be retrieved
  Returns:
    an EntityPropertyCache of the retrieved properties
  Throws:
    `P13nControlException` - if profile not found, or if remote exceptions are encounterd while trying to retrieve the properties

### getPropertiesFromKeys

    public EntityPropertyCache getPropertiesFromKeys(ProfileWrapper pw,
                                                     Set propertyMapKeys)
                                              throws P13nControlException

  Deprecated. as of Portal 8.1 Use ProfileControl.getProfileManager().getProperties(profileName, propertyMapKeys)

  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
  Returns:
    an EntityPropertyCache of the retrieved properties
  Throws:
    `P13nControlException` - if profile not found, or if remote exceptions are encounterd while trying to retrieve the properties

### getPropertiesFromSet

    public EntityPropertyCache getPropertiesFromSet(ProfileWrapper pw,
                                                    String propertySetName)
                                             throws P13nControlException

  Deprecated. as of Portal 8.1 Use ProfileControl.getProfileManager().getProperties(profileName, propertySetName)

  Throws:
    `P13nControlException`

### getProperty

    public Object getProperty(ProfileWrapper pw,
                              String propertySet,
                              String property)
                       throws P13nControlException

  Deprecated. as of Portal 8.1 Use ProfileControl.getProfileManager().getProperty(profileName, propertySet, property)

  Get an individual property.

  Parameters:
    `pw` - The ProfileWrapper representing the user profile for which the properties are to be retrieved
  Returns:
    an EntityPropertyCache of the retrieved properties
  Throws:
    `P13nControlException` - if profile not found, or if remote exceptions are encounterd while trying to retrieve the properties

### getUserNames

    public List getUserNames(String searchExpression,
                             int limit)
                      throws P13nControlException

  Deprecated. as of Portal 8.1 Use UserProviderControl.getUserNames(searchExpression, limit)

  Get a list of all user names

  Parameters:
    `searchExpression` - a wildcard search expression
    `limit` - a limit of results to return
  Returns:
    a List of all user names matching the search expression
  Throws:
    `P13nControlException` - if a RemoteException occurs while invoking the UserManager EJB methods

### setProperties

    public void setProperties(ProfileWrapper pw,
                              EntityPropertyCache cache)
                       throws P13nControlException

  Deprecated. as of Portal 8.1 Use multiple invocations of ProfileControl.setProperty(profileName, propertySet, property, value)

  Set properties in this EntityPropertyCache back into the user's profile.

  Parameters:
    `pw` - The ProfileWrapper representing the user profile for which the properties are to be retrieved
    `cache` - the cache containing the properties to set. See javadocs at the top of this class for more info on the EntityPropertyCache
  Throws:
    `P13nControlException` - if profile not found, or if remote exceptions are encounterd while trying to set the properties

### setProperty

    public void setProperty(ProfileWrapper pw,
                            String propertySet,
                            String property,
                            Object value)
                     throws P13nControlException

  Deprecated. as of Portal 8.1 Use ProfileControl.setProperty(profileName, propertySet, property, value)

  Set an individual property.

  Parameters:
    `pw` - The ProfileWrapper representing the user profile for which the properties are to be retrieved
  Throws:
    `P13nControlException` - if profile not found, or if remote exceptions are encounterd while trying to set the property

### userExists

    public boolean userExists(String username)
                       throws P13nControlException

  Deprecated. as of Portal 8.1 Use UserProviderControl.userExists(username)

  Determine whether a user exists

  Parameters:
    `username` - The user (login) name of the user
  Returns:
    true if the user exists, false if cannot find user of this name
  Throws:
    `P13nControlException` - if a RemoteException occurs while invoking the UserManager EJB methods

### userProfileExists

    public boolean userProfileExists(String username)
                              throws P13nControlException

  Deprecated. as of Portal 8.1 Use ProfileControl.getUserProfileManager().profileExists(username)

  Determine whether a user profile exists

  Parameters:
    `username` - The user (login) name of the user
  Returns:
    true if the user profile exists for this user, false if not
  Throws:
    `P13nControlException` - if a RemoteException occurs while invoking the UserProfileManager EJB methods

Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2005 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005 BEA Systems, Inc. All Rights Reserved