portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r209688 - in /portals/jetspeed-2/trunk/components/portal/src/test/org/apache/jetspeed/userinfo: TestUserInfoManager.java user-info.xml
Date Fri, 08 Jul 2005 01:04:00 GMT
Author: taylor
Date: Thu Jul  7 18:04:00 2005
New Revision: 209688

URL: http://svn.apache.org/viewcvs?rev=209688&view=rev
Log:
Implemented JS2-301
Also moved the interfaces for UserInfo into Jetspeed API

http://issues.apache.org/jira/browse/JS2-301

Im going to leave this issue open since the unit test is failing currently
Will get it fixed in next 24 hrs

Modified:
    portals/jetspeed-2/trunk/components/portal/src/test/org/apache/jetspeed/userinfo/TestUserInfoManager.java
    portals/jetspeed-2/trunk/components/portal/src/test/org/apache/jetspeed/userinfo/user-info.xml

Modified: portals/jetspeed-2/trunk/components/portal/src/test/org/apache/jetspeed/userinfo/TestUserInfoManager.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/portal/src/test/org/apache/jetspeed/userinfo/TestUserInfoManager.java?rev=209688&r1=209687&r2=209688&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/portal/src/test/org/apache/jetspeed/userinfo/TestUserInfoManager.java
(original)
+++ portals/jetspeed-2/trunk/components/portal/src/test/org/apache/jetspeed/userinfo/TestUserInfoManager.java
Thu Jul  7 18:04:00 2005
@@ -49,7 +49,9 @@
 {
 
     /** The user info manager. */
-    private UserInfoManager uim;
+    private UserInfoManager single;
+    /** The Multi Source user info manager */
+    private UserInfoManager multi;
     
     private PortletRegistry portletRegistry;
 
@@ -61,8 +63,9 @@
     {
         super.setUp();
         
-        uim = (UserInfoManager) ctx.getBean("org.apache.jetspeed.userinfo.UserInfoManager");

+        single = (UserInfoManager) ctx.getBean("org.apache.jetspeed.userinfo.UserInfoManager");

         portletRegistry = (PortletRegistry) ctx.getBean("portletRegistry");
+        multi = (UserInfoManager) ctx.getBean("org.apache.jetspeed.userinfo.MultiUserInfoManager");
       
     }
 
     /**
@@ -79,8 +82,18 @@
         return new TestSuite(TestUserInfoManager.class);
     }
 
-    /** Test set user info map. */
-    public void testSetUserInfoMap() throws Exception
+    /** Test set user info map. **/ 
+    public void testSingleSetUserInfoMap() throws Exception
+    {
+        innerTestSetUserInfoMap(single);
+    }
+    
+//    public void testMultiSetUserInfoMap() throws Exception
+//    {
+//        innerTestSetUserInfoMap(multi);
+//    }
+    
+    private void innerTestSetUserInfoMap(UserInfoManager uim) throws Exception
     {
         PortletApplicationDescriptor pad = new PortletApplicationDescriptor(new FileReader("./test/testdata/deploy/portlet.xml"),
"unit-test");
         MutablePortletApplication app = pad.createPortletApplication();            

Modified: portals/jetspeed-2/trunk/components/portal/src/test/org/apache/jetspeed/userinfo/user-info.xml
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/portal/src/test/org/apache/jetspeed/userinfo/user-info.xml?rev=209688&r1=209687&r2=209688&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/portal/src/test/org/apache/jetspeed/userinfo/user-info.xml
(original)
+++ portals/jetspeed-2/trunk/components/portal/src/test/org/apache/jetspeed/userinfo/user-info.xml
Thu Jul  7 18:04:00 2005
@@ -24,4 +24,24 @@
      <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>
+  </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