portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r918212 - in /portals/jetspeed-2/portal/trunk: components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/ components/jetspeed-portal/src/test/java/JETSPEED-INF/spring/ components/jetspeed-portal/src/test/java/org/apache/jet...
Date Tue, 02 Mar 2010 21:54:37 GMT
Author: ate
Date: Tue Mar  2 21:54:36 2010
New Revision: 918212

URL: http://svn.apache.org/viewvc?rev=918212&view=rev
Log:
Fix for JS2-1088: UserInfoManager implementation needs inprovements in resolving mapped user
attributes and its cache handling
See: http://issues.apache.org/jira/browse/JS2-1088

Added:
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/SubjectUserAttributeSourceImpl.java
  (contents, props changed)
      - copied, changed from r915238, portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/UserManagerUserAttributeSourceImpl.java
Removed:
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/UserManagerUserAttributeSourceImpl.java
Modified:
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/AbstractUserInfoManagerImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/MultiSourceUserInfoManagerImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/UserInfoManagerImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/JETSPEED-INF/spring/user-info.xml
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/userinfo/TestUserInfoManager.java
    portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/userinfo.xml

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/AbstractUserInfoManagerImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/AbstractUserInfoManagerImpl.java?rev=918212&r1=918211&r2=918212&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/AbstractUserInfoManagerImpl.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/AbstractUserInfoManagerImpl.java
Tue Mar  2 21:54:36 2010
@@ -27,7 +27,7 @@
 import org.apache.jetspeed.om.portlet.UserAttribute;
 import org.apache.jetspeed.om.portlet.UserAttributeRef;
 import org.apache.jetspeed.om.portlet.impl.UserAttributeRefImpl;
-import org.apache.jetspeed.request.RequestContext;
+import org.apache.jetspeed.userinfo.UserInfoManager;
 import org.apache.jetspeed.container.PortletWindow;
 
 /**
@@ -37,7 +37,7 @@
  * @author <a href="mailto:dlestrat@apache.org">David Le Strat </a>
  * @version $Id$
  */
-public abstract class AbstractUserInfoManagerImpl
+public abstract class AbstractUserInfoManagerImpl implements UserInfoManager
 {
     /** Logger */
     private static final Logger log = LoggerFactory.getLogger(UserInfoManagerImpl.class);
@@ -111,7 +111,4 @@
         PortletWindow portletWindow = (PortletWindow)window;
         return getUserInfoMap(portletWindow.getPortletDefinition().getApplication().getName(),
portletWindow.getRequestContext());        
     }
-
-    public abstract Map<String, String> getUserInfoMap(String appName, RequestContext
context);
-    
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/MultiSourceUserInfoManagerImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/MultiSourceUserInfoManagerImpl.java?rev=918212&r1=918211&r2=918212&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/MultiSourceUserInfoManagerImpl.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/MultiSourceUserInfoManagerImpl.java
Tue Mar  2 21:54:36 2010
@@ -40,32 +40,34 @@
  */
 public class MultiSourceUserInfoManagerImpl extends UserInfoManagerImpl
 {
-
     /** Logger */
     private static final Logger log = LoggerFactory.getLogger(MultiSourceUserInfoManagerImpl.class);
 
     private List<UserAttributeSource> sources;
+    
+    public MultiSourceUserInfoManagerImpl(PortletRegistry registry, List<UserAttributeSource>
sources)
+    {
+        super(registry);
+        this.sources = sources;
+    }
 
     public Map<String,String> getUserInfoMap(String appName, RequestContext context)
     {
-        Map<String,String> userInfoMap = null;
+        Map<String,String> userInfoMap = new HashMap<String,String>();
         try
         {
             Subject subject = context.getSubject();
             if (null != subject)
             {
+                List<UserAttributeRef> linkedUserAttributes = getLinkedUserAttr(appName);
                 
-            }
-            userInfoMap = new HashMap<String,String>();
-            
-            List<UserAttributeRef> linkedUserAttributes = getLinkedUserAttr(appName);
-            
-            for (UserAttributeSource source : sources)
-            {
-                Map<String, String> sourceMap = source.getUserAttributeMap(subject,
linkedUserAttributes, context);
-                if (sourceMap != null)
+                for (UserAttributeSource source : sources)
                 {
-                    userInfoMap.putAll(sourceMap);
+                    Map<String, String> sourceMap = source.getUserAttributeMap(subject,
linkedUserAttributes, context);
+                    if (sourceMap != null)
+                    {
+                        userInfoMap.putAll(sourceMap);
+                    }
                 }
             }
         } 
@@ -77,23 +79,4 @@
         }
         return userInfoMap;
     }
-
-    /**
-     * @param sources
-     *            The sources to set.
-     */
-    public void setSources(List<UserAttributeSource> sources)
-    {
-        this.sources = sources;
-    }
-
-    /**
-     * @param portletRegistry
-     *            The portletRegistry to set.
-     */
-    public void setPortletRegistry(PortletRegistry portletRegistry)
-    {
-        registry = portletRegistry;
-    }
-
 }

Copied: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/SubjectUserAttributeSourceImpl.java
(from r915238, portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/UserManagerUserAttributeSourceImpl.java)
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/SubjectUserAttributeSourceImpl.java?p2=portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/SubjectUserAttributeSourceImpl.java&p1=portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/UserManagerUserAttributeSourceImpl.java&r1=915238&r2=918212&rev=918212&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/UserManagerUserAttributeSourceImpl.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/SubjectUserAttributeSourceImpl.java
Tue Mar  2 21:54:36 2010
@@ -27,11 +27,8 @@
 import org.slf4j.LoggerFactory;
 import org.apache.jetspeed.om.portlet.UserAttributeRef;
 import org.apache.jetspeed.request.RequestContext;
-import org.apache.jetspeed.security.SecurityException;
 import org.apache.jetspeed.security.SubjectHelper;
 import org.apache.jetspeed.security.User;
-import org.apache.jetspeed.security.UserManager;
-import org.apache.jetspeed.userinfo.UserAttributeRetrievalException;
 import org.apache.jetspeed.userinfo.UserAttributeSource;
 
 /**
@@ -41,23 +38,11 @@
  * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  * @version $Id: $
  */
-public class UserManagerUserAttributeSourceImpl implements UserAttributeSource
+public class SubjectUserAttributeSourceImpl implements UserAttributeSource
 {
 
     /** Logger */
-    private static final Logger log = LoggerFactory.getLogger(UserManagerUserAttributeSourceImpl.class);
-
-    /** The user manager */
-    private UserManager userManager;
-
-    /**
-     * @param userManager
-     *            The userManager to set.
-     */
-    public void setUserManager(UserManager userManager)
-    {
-        this.userManager = userManager;
-    }
+    private static final Logger log = LoggerFactory.getLogger(SubjectUserAttributeSourceImpl.class);
 
     /*
      * (non-Javadoc)
@@ -65,7 +50,6 @@
      * @see org.jetspeed.userinfo.UserAttributeSource#getUserAttributeMap(javax.security.auth.Subject,
java.util.Set)
      */
     public Map<String, String> getUserAttributeMap(Subject subject, Collection<UserAttributeRef>
userAttributeRefs, RequestContext context)
-            throws UserAttributeRetrievalException
     {
 
         Map<String,String> userAttributeMap = new HashMap<String,String>();
@@ -73,30 +57,24 @@
         if (null != userPrincipal)
         {
             log.debug("Got user principal: " + userPrincipal.getName());
-            try
+            Map<String, String> userInfo = ((User)userPrincipal).getInfoMap();
+            if (userAttributeRefs != null)
             {
-                if (userManager.userExists(userPrincipal.getName()))
+                for (UserAttributeRef currentAttributeRef : userAttributeRefs)
                 {
-                    User user = userManager.getUser(userPrincipal.getName());
-                    Map<String, String> userInfo = user.getInfoMap();
-                    for (UserAttributeRef currentAttributeRef : userAttributeRefs)
+                    String key = currentAttributeRef.getNameLink();
+                    String name = currentAttributeRef.getName();
+                    if (key == null)
+                    {                
+                        key = name;
+                    }
+                    if (userInfo.containsKey(key))
                     {
-                        String value = userInfo.get(currentAttributeRef.getName());
-                        if (value != null)
-                        {
-                            userAttributeMap.put(currentAttributeRef.getName(), value);
-                        }
-
+                        userAttributeMap.put(name, userInfo.get(key));
                     }
                 }
             }
-            catch (SecurityException sex)
-            {
-                log.warn("Unexpected SecurityException in UserInfoManager", sex);
-            }
         }
-
         return userAttributeMap;
     }
-
 }

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/SubjectUserAttributeSourceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/UserInfoManagerImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/UserInfoManagerImpl.java?rev=918212&r1=918211&r2=918212&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/UserInfoManagerImpl.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/UserInfoManagerImpl.java
Tue Mar  2 21:54:36 2010
@@ -16,7 +16,6 @@
  */
 package org.apache.jetspeed.userinfo.impl;
 
-import java.security.Principal;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
@@ -28,15 +27,12 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.apache.jetspeed.components.portletregistry.PortletRegistry;
+import org.apache.jetspeed.components.portletregistry.RegistryEventListener;
 import org.apache.jetspeed.om.portlet.PortletApplication;
+import org.apache.jetspeed.om.portlet.PortletDefinition;
 import org.apache.jetspeed.om.portlet.UserAttribute;
 import org.apache.jetspeed.om.portlet.UserAttributeRef;
 import org.apache.jetspeed.request.RequestContext;
-import org.apache.jetspeed.security.JetspeedPrincipal;
-import org.apache.jetspeed.security.SubjectHelper;
-import org.apache.jetspeed.security.User;
-import org.apache.jetspeed.security.UserManager;
-import org.apache.jetspeed.userinfo.UserInfoManager;
 
 /**
  * <p>
@@ -47,26 +43,20 @@
  * @author <a href="mailto:dlestrat@apache.org">David Le Strat </a>
  * @version $Id$
  */
-public class UserInfoManagerImpl extends AbstractUserInfoManagerImpl implements UserInfoManager
+public class UserInfoManagerImpl extends AbstractUserInfoManagerImpl implements RegistryEventListener
 {
 
     /** Logger */
     private static final Logger log = LoggerFactory.getLogger(UserInfoManagerImpl.class);
 
-    // TODO: needs cache invalidation when portlet application user info configuration changes
     /** Map to cache user info keys for each mapped portlet application. */
     private static Map<String, List<UserAttributeRef>> appUserInfoAttrCache =
Collections.synchronizedMap(new HashMap<String,List<UserAttributeRef>>());
-
-    /** The user manager */
-    protected UserManager userMgr;
+    
+    private static final SubjectUserAttributeSourceImpl subjectUserAttributeSource = new
SubjectUserAttributeSourceImpl();
 
     /** The portlet registry. */
     protected PortletRegistry registry;
     
-    protected UserInfoManagerImpl()
-    {
-    }
-
     /**
      * <p>
      * Constructor providing access to the {@link UserManager}.
@@ -75,47 +65,26 @@
      * @param userMgr The user manager.
      * @param registry The portlet registry component.
      */
-    public UserInfoManagerImpl(UserManager userMgr, PortletRegistry registry)
-    {
-        this.userMgr = userMgr;
-        this.registry = registry;
-    }
-
-    /**
-     * <p>
-     * Constructor providing access to the {@link UserManager}and specifying
-     * which property set to use for user information.
-     * </p>
-     * 
-     * @param userMgr The user manager.
-     * @param registry The portlet registry component.
-     * @param userInfoPropertySet The user information property set.
-     *  
-     */
-    public UserInfoManagerImpl(UserManager userMgr, PortletRegistry registry, String userInfoPropertySet)
+    public UserInfoManagerImpl(PortletRegistry registry)
     {
-        this.userMgr = userMgr;
         this.registry = registry;
+        registry.addRegistryListener(this);
     }
 
     public Map<String, String> getUserInfoMap(String appName, RequestContext context)
     {
         if (log.isDebugEnabled())
-            log.debug("Getting user info for portlet application: " + appName);
-        
-        Map<String, String> userInfo = getUserInformation(context);
-        if (null == userInfo)
         {
-            log.debug(PortletRequest.USER_INFO + " is null");
-            return null;
-        }
-        else if (userInfo.isEmpty())
-        {
-            log.debug(PortletRequest.USER_INFO + " is empty");
-            return Collections.emptyMap();
+            log.debug("Getting user info for portlet application: " + appName);
         }
         
-        return mapUserInfo(userInfo, getLinkedUserAttr(appName));
+        Map<String, String> userInfo = null;
+        Subject subject = context.getSubject();
+        if (null != subject)
+        {
+            userInfo = subjectUserAttributeSource.getUserAttributeMap(subject, getLinkedUserAttr(appName),
context);
+        }        
+        return userInfo;
     }
     
     protected List<UserAttributeRef> getLinkedUserAttr(String appName)
@@ -139,67 +108,25 @@
         return linkedUserAttr;
     }
 
-    /**
-     * <p>
-     * Maps the user info properties retrieved from the user information to the
-     * user info attribute declared in the portlet.xml descriptor.
-     * </p>
-     * 
-     * @param userInfo The user info attributes.
-     * @param userAttributes The declarative portlet user attributes.
-     * @param userAttributeRefs The declarative jetspeed portlet extension user
-     *            attributes reference.
-     * @return The user info map.
-     */
-    protected Map<String, String> mapUserInfo(Map<String, String> userInfo, List<UserAttributeRef>
linkedUserAttributes)
+    public void applicationRemoved(PortletApplication app)
     {
-        Map<String, String>userInfoMap = new HashMap<String, String>();
-        if (linkedUserAttributes != null)
-        {
-            for (UserAttributeRef currentAttributeRef : linkedUserAttributes)
-            {
-                String key = currentAttributeRef.getNameLink();
-                String name = currentAttributeRef.getName();
-                if (key == null)
-                {                
-                    key = name;
-                }
-                if (userInfo.containsKey(key))
-                {
-                    userInfoMap.put(name, userInfo.get(key));
-                }
-            }
-        }
-        return userInfoMap;
+        // clear cache element
+        appUserInfoAttrCache.remove(app.getName());
     }
 
-    /**
-     * <p>
-     * Gets the user info from the user's request.
-     * </p>
-     * <p>
-     * If no user is logged in, return null.
-     * </p>
-     * 
-     * @param context The request context.
-     * @return The user info.
-     */
-    private Map<String, String> getUserInformation(RequestContext context)
+    public void applicationUpdated(PortletApplication app)
     {
-        Map<String, String> userInfo = null;
-        Subject subject = context.getSubject();
-        if (null != subject)
-        {
-            Principal userPrincipal = SubjectHelper.getPrincipal(subject, User.class);
-            if (null != userPrincipal)
-            {
-                log.debug("Got user principal: " + userPrincipal.getName());
-                if (userPrincipal instanceof JetspeedPrincipal)
-                {
-                    return ((JetspeedPrincipal)userPrincipal).getInfoMap();
-                }
-            }
-        }
-        return userInfo;
+        // clear cache element
+        appUserInfoAttrCache.remove(app.getName());
+    }
+
+    public void portletRemoved(PortletDefinition def)
+    {
+        // ignore
+    }
+
+    public void portletUpdated(PortletDefinition def)
+    {
+        // ignore
     }
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/JETSPEED-INF/spring/user-info.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/JETSPEED-INF/spring/user-info.xml?rev=918212&r1=918211&r2=918212&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/JETSPEED-INF/spring/user-info.xml
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/JETSPEED-INF/spring/user-info.xml
Tue Mar  2 21:54:36 2010
@@ -21,30 +21,18 @@
     
     <!-- User Info -->
   <bean id="org.apache.jetspeed.userinfo.UserInfoManager" 
-  	   class="org.apache.jetspeed.userinfo.impl.UserInfoManagerImpl"
-  >
-     <constructor-arg ><ref bean="org.apache.jetspeed.security.UserManager"/></constructor-arg>
 	     	   
+  	   class="org.apache.jetspeed.userinfo.impl.UserInfoManagerImpl">
      <constructor-arg ><ref bean="org.apache.jetspeed.components.portletregistry.PortletRegistry"/></constructor-arg>
-
   </bean>
   
   <bean id="org.apache.jetspeed.userinfo.MultiUserInfoManager" 	
          class="org.apache.jetspeed.userinfo.impl.MultiSourceUserInfoManagerImpl">
-		 <property name="portletRegistry">
-		    <ref bean="org.apache.jetspeed.components.portletregistry.PortletRegistry"/>
-		  </property>
-		  <property name="sources">
-		     <list>
-		         <ref bean="org.apache.jetspeed.userinfo.impl.UserManagerUserAttributeSourceImpl"/>
-		     </list>
-	     </property>
-  </bean>
-  
-  <bean id="org.apache.jetspeed.userinfo.impl.UserManagerUserAttributeSourceImpl"	
-    class="org.apache.jetspeed.userinfo.impl.UserManagerUserAttributeSourceImpl">    
 
-      <property name="userManager">
-         <ref bean="org.apache.jetspeed.security.UserManager"/>
-      </property>
+     <constructor-arg><ref bean="org.apache.jetspeed.components.portletregistry.PortletRegistry"/></constructor-arg>
+     <constructor-arg>
+        <list>
+           <bean class="org.apache.jetspeed.userinfo.impl.SubjectUserAttributeSourceImpl"/>
     
+		</list>
+	 </constructor-arg>
   </bean>
-  
+
 </beans>
\ No newline at end of file

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/userinfo/TestUserInfoManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/userinfo/TestUserInfoManager.java?rev=918212&r1=918211&r2=918212&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/userinfo/TestUserInfoManager.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/userinfo/TestUserInfoManager.java
Tue Mar  2 21:54:36 2010
@@ -62,7 +62,7 @@
         super.setUp();
 
         ums = (UserManager) scm.getComponent("org.apache.jetspeed.security.UserManager");
-        single = (UserInfoManager) scm.getComponent("org.apache.jetspeed.userinfo.UserInfoManager");
+        single = (UserInfoManager) scm.getComponent("org.apache.jetspeed.userinfo.MultiUserInfoManager");
     }
 
     public void tearDown() throws Exception
@@ -129,7 +129,9 @@
         // Without linked attributes
         // There are no preferences associated to the user profile.
         Map<String, String> userInfo = uim.getUserInfoMap(portletApp.getName(), request);
-//        assertNull(PortletRequest.USER_INFO + " is null", userInfo);
+        // disabled test: UserInfoManager doesn't return null anymore for a more efficient
solution
+        // PortletRequest.getAttribute(USER_INFO) == null for unauthorised users but that
requires a different test setup 
+        // assertNull(PortletRequest.USER_INFO + " is null", userInfo);
 
         // The user has preferences associated to the user profile.
         initUser();

Modified: portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/userinfo.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/userinfo.xml?rev=918212&r1=918211&r2=918212&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/userinfo.xml
(original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/userinfo.xml
Tue Mar  2 21:54:36 2010
@@ -23,10 +23,7 @@
         name="org.apache.pluto.services.UserInfoService"
     class="org.apache.jetspeed.userinfo.impl.UserInfoManagerImpl">
     <meta key="j2:cat" value="default" />
-    <constructor-arg index="0">
-      <ref bean="org.apache.jetspeed.security.UserManager" />
-    </constructor-arg>
-    <constructor-arg index="1">
+    <constructor-arg>
       <ref bean="org.apache.jetspeed.components.portletregistry.PortletRegistry" />
     </constructor-arg>
   </bean>
@@ -34,24 +31,15 @@
 
   <!-- Multi-source User Info Manager 
     
-    <bean id="org.apache.jetspeed.userinfo.UserInfoManager" 	
-    class="org.apache.jetspeed.userinfo.impl.MultiSourceUserInfoManagerImpl">
-    <property name="portletRegistry">
-    <ref bean="org.apache.jetspeed.components.portletregistry.PortletRegistry"/>
-    </property>
-    <property name="sources">
-    <list>
-    <ref bean="org.apache.jetspeed.userinfo.impl.UserManagerUserAttributeSourceImpl"/>
-    </list>
-    </property>
-    </bean>
-    
-    <bean id="org.apache.jetspeed.userinfo.impl.UserManagerUserAttributeSourceImpl"	
-    class="org.apache.jetspeed.userinfo.impl.UserManagerUserAttributeSourceImpl">    
 
-    <property name="userManager">
-    <ref bean="org.apache.jetspeed.security.UserManager"/>
-    </property>
-    </bean>
+  <bean id="org.apache.jetspeed.userinfo.MultiUserInfoManager"
+         class="org.apache.jetspeed.userinfo.impl.MultiSourceUserInfoManagerImpl">
+     <constructor-arg><ref bean="org.apache.jetspeed.components.portletregistry.PortletRegistry"/></constructor-arg>
+     <constructor-arg>
+        <list>
+           <bean class="org.apache.jetspeed.userinfo.impl.SubjectUserAttributeSourceImpl"/>
     
+        </list>
+     </constructor-arg>
+  </bean>
   -->
 
 </beans>



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message