org.apache.jetspeed.userinfo.impl
Class UserInfoManagerImpl

java.lang.Object
  extended by org.apache.jetspeed.userinfo.impl.AbstractUserInfoManagerImpl
      extended by org.apache.jetspeed.userinfo.impl.UserInfoManagerImpl
All Implemented Interfaces:
org.apache.jetspeed.userinfo.UserInfoManager

public class UserInfoManagerImpl
extends AbstractUserInfoManagerImpl
implements org.apache.jetspeed.userinfo.UserInfoManager

Implements the UserInfoManager interface.

Version:
$Id: UserInfoManagerImpl.java 516448 2007-03-09 16:25:47Z ate $
Author:
David Le Strat

Field Summary
private static org.apache.commons.logging.Log log
          Logger
(package private)  String oid
          The object id of the portlet application being processed.
(package private)  org.apache.jetspeed.components.portletregistry.PortletRegistry registry
          The portlet registry.
private static Map userInfoMapCache
          Map used to cache user info maps for each mapped portlet application.
(package private)  String userInfoPropertySet
          The user information property set.
(package private)  org.apache.jetspeed.security.UserManager userMgr
          The user manager
 
Constructor Summary
UserInfoManagerImpl(org.apache.jetspeed.security.UserManager userMgr, org.apache.jetspeed.components.portletregistry.PortletRegistry registry)
           Constructor providing access to the UserManager.
UserInfoManagerImpl(org.apache.jetspeed.security.UserManager userMgr, org.apache.jetspeed.components.portletregistry.PortletRegistry registry, String userInfoPropertySet)
           Constructor providing access to the UserManagerand specifying which property set to use for user information.
 
Method Summary
 Map getUserInfoMap(org.apache.pluto.om.common.ObjectID oid, org.apache.jetspeed.request.RequestContext context)
           
private  Preferences getUserPreferences(org.apache.jetspeed.request.RequestContext context)
           Gets the user preferences from the user's request.
private  void initUserInfoMapCache()
           
private  Map mapUserInfo(Preferences userInfoPrefs, Collection userAttributes, Collection userAttributeRefs)
           Maps the user info properties retrieved from the user preferences to the user info attribute declared in the portlet.xml descriptor.
 
Methods inherited from class org.apache.jetspeed.userinfo.impl.AbstractUserInfoManagerImpl
mapLinkedUserAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static final org.apache.commons.logging.Log log
Logger


userInfoMapCache

private static Map userInfoMapCache
Map used to cache user info maps for each mapped portlet application.


userInfoPropertySet

String userInfoPropertySet
The user information property set.


userMgr

org.apache.jetspeed.security.UserManager userMgr
The user manager


registry

org.apache.jetspeed.components.portletregistry.PortletRegistry registry
The portlet registry.


oid

String oid
The object id of the portlet application being processed.

Constructor Detail

UserInfoManagerImpl

public UserInfoManagerImpl(org.apache.jetspeed.security.UserManager userMgr,
                           org.apache.jetspeed.components.portletregistry.PortletRegistry registry)

Constructor providing access to the UserManager.

Parameters:
userMgr - The user manager.
registry - The portlet registry component.

UserInfoManagerImpl

public UserInfoManagerImpl(org.apache.jetspeed.security.UserManager userMgr,
                           org.apache.jetspeed.components.portletregistry.PortletRegistry registry,
                           String userInfoPropertySet)

Constructor providing access to the UserManagerand specifying which property set to use for user information.

Parameters:
userMgr - The user manager.
registry - The portlet registry component.
userInfoPropertySet - The user information property set.
Method Detail

getUserInfoMap

public Map getUserInfoMap(org.apache.pluto.om.common.ObjectID oid,
                          org.apache.jetspeed.request.RequestContext context)
Specified by:
getUserInfoMap in interface org.apache.jetspeed.userinfo.UserInfoManager
See Also:
org.apache.jetspeed.userinfo.UserInfoManager#setUserInfoMap(org.apache.jetspeed.om.page.Fragment, org.apache.jetspeed.request.RequestContext)

mapUserInfo

private Map mapUserInfo(Preferences userInfoPrefs,
                        Collection userAttributes,
                        Collection userAttributeRefs)

Maps the user info properties retrieved from the user preferences to the user info attribute declared in the portlet.xml descriptor.

Parameters:
userInfoPrefs - The user info preferences.
userAttributes - The declarative portlet user attributes.
userAttributeRefs - The declarative jetspeed portlet extension user attributes reference.
Returns:
The user info map.

getUserPreferences

private Preferences getUserPreferences(org.apache.jetspeed.request.RequestContext context)

Gets the user preferences from the user's request.

If no user is logged in, return null.

Parameters:
context - The request context.
Returns:
The user preferences.

initUserInfoMapCache

private void initUserInfoMapCache()


Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.