portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r433925 - in /portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed: components/portletentity/PortletEntityAccessComponent.java mockobjects/request/MockRequestContext.java request/RequestContext.java
Date Wed, 23 Aug 2006 06:13:23 GMT
Author: taylor
Date: Tue Aug 22 23:13:23 2006
New Revision: 433925

URL: http://svn.apache.org/viewvc?rev=433925&view=rev
Log:
Implement preferences per user 
http://issues.apache.org/jira/browse/JS2-449

Before JS2-449, all preferences were shared. 
With JS2-449, preferences are now stored 'per user'. 
The username is stored in the preferences FULL_PATH
To turn on mergeSharedPreferences configure this property to true 
This will NOT turn off per user prefs, but instead merge with them, where user prefs override.

New request context function to centralize retrieval of user subject per request

Modified:
    portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/components/portletentity/PortletEntityAccessComponent.java
    portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/mockobjects/request/MockRequestContext.java
    portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/request/RequestContext.java

Modified: portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/components/portletentity/PortletEntityAccessComponent.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/components/portletentity/PortletEntityAccessComponent.java?rev=433925&r1=433924&r2=433925&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/components/portletentity/PortletEntityAccessComponent.java
(original)
+++ portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/components/portletentity/PortletEntityAccessComponent.java
Tue Aug 22 23:13:23 2006
@@ -197,4 +197,12 @@
 	
 	void storePreferenceSet(PreferenceSet prefSet, PortletEntity entity) throws IOException;
 
+    /** 
+     *  All preferences were shared. With JS2-449, preferences are now
+     *  stored 'per user'. The username is stored in the preferences FULL_PATH
+     *  To turn on mergeSharedPreferences configure this property to true 
+     *  in your Spring configuration. This will NOT turn off per user prefs, 
+     *  but instead merge with them, where user prefs override.
+     */   
+    boolean isMergeSharedPreferences();
 }

Modified: portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/mockobjects/request/MockRequestContext.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/mockobjects/request/MockRequestContext.java?rev=433925&r1=433924&r2=433925&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/mockobjects/request/MockRequestContext.java
(original)
+++ portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/mockobjects/request/MockRequestContext.java
Tue Aug 22 23:13:23 2006
@@ -15,6 +15,7 @@
  */
 package org.apache.jetspeed.mockobjects.request;
 
+import java.security.Principal;
 import java.util.HashMap;
 import java.util.Locale;
 import java.util.Map;
@@ -277,6 +278,12 @@
     public Subject getSubject()
     {
         return subject;
+    }
+    
+    public Principal getUserPrincipal()
+    {
+        // TODO: implement
+        return null;
     }
 
     /*

Modified: portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/request/RequestContext.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/request/RequestContext.java?rev=433925&r1=433924&r2=433925&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/request/RequestContext.java
(original)
+++ portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/request/RequestContext.java
Tue Aug 22 23:13:23 2006
@@ -15,7 +15,7 @@
  */
 package org.apache.jetspeed.request;
 
-import java.util.List;
+import java.security.Principal;
 import java.util.Locale;
 import java.util.Map;
 
@@ -402,6 +402,13 @@
      * @param pipeline
      */
     void setPipeline(Pipeline pipeline);
+
+    /**
+     * Gets the Jetspeed primary user principal associated with the authorized entity.
+     *
+     * @return The primary principal on this request.
+     */
+    Principal getUserPrincipal();
     
 }
 



---------------------------------------------------------------------
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