portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r1816749 - in /portals/jetspeed-2/portal/trunk: components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/ jetspeed-portal-resources/src/main/resources/assembly/ jetspeed-portal-resources/src/main/resource...
Date Thu, 30 Nov 2017 19:20:56 GMT
Author: taylor
Date: Thu Nov 30 19:20:55 2017
New Revision: 1816749

URL: http://svn.apache.org/viewvc?rev=1816749&view=rev
Log:
JS2-1360: User Prefs are now optional. Added ability to configure enabling/disabling by jetspeed.properties

Modified:
    portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/PortletPreferencesServiceImpl.java
    portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/registry.xml
    portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/conf/jetspeed/jetspeed.properties

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/PortletPreferencesServiceImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/PortletPreferencesServiceImpl.java?rev=1816749&r1=1816748&r2=1816749&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/PortletPreferencesServiceImpl.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/PortletPreferencesServiceImpl.java
Thu Nov 30 19:20:55 2017
@@ -91,6 +91,9 @@ public class PortletPreferencesServiceIm
     private List<String> preloadedApplications = null;
     private boolean preloadEntities = false;
     private boolean useEntityPreferences = true;
+    // since 2.3.2
+    private boolean useUserPreferences = true;
+
     // JS2-1325: performance optimization to improve preference retrieval speed
     // To go back to old behavior, set jetspeed/override.properties.
     // Default is enabled
@@ -103,12 +106,21 @@ public class PortletPreferencesServiceIm
         return useEntityPreferences;
     }
 
-    
     public void setUseEntityPreferences(boolean useEntityPreferences)
     {
         this.useEntityPreferences = useEntityPreferences;
     }
 
+    public boolean isUseUserPreferences()
+    {
+        return useUserPreferences;
+    }
+
+    public void setUseUserPreferences(boolean useUserPreferences)
+    {
+        this.useUserPreferences = useUserPreferences;
+    }
+
     public PortletPreferencesServiceImpl(PortletFactory portletFactory, JetspeedCache preferenceCache)
     throws ClassNotFoundException
     {
@@ -221,6 +233,9 @@ public class PortletPreferencesServiceIm
      */
     public Map<String, PortletPreference> retrieveUserPreferences(PortletWindow window,
String userName)
     {
+        if (!useUserPreferences) {
+            return new JetspeedPreferencesMap();
+        }
         String appName = window.getPortletDefinition().getApplication().getName();
         String portletName = window.getPortletDefinition().getPortletName();
         String entityId = window.getPortletEntityId();        

Modified: portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/registry.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/registry.xml?rev=1816749&r1=1816748&r2=1816749&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/registry.xml
(original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/registry.xml
Thu Nov 30 19:20:55 2017
@@ -126,7 +126,8 @@
     <constructor-arg index="1">
       <ref bean="preferencesCache" />
     </constructor-arg>    
-    <property name="useEntityPreferences" ><value>true</value></property>
+    <property name="useEntityPreferences" ><value>${preferences.entity.enable}</value></property>
+    <property name="useUserPreferences" ><value>${preferences.user.enable}</value></property>
   </bean>
 
   <bean id="org.apache.jetspeed.components.portletpreferences.PortletPreferencesProvider"
parent="baseTransactionProxy"

Modified: portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/conf/jetspeed/jetspeed.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/conf/jetspeed/jetspeed.properties?rev=1816749&r1=1816748&r2=1816749&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/conf/jetspeed/jetspeed.properties
(original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/conf/jetspeed/jetspeed.properties
Thu Nov 30 19:20:55 2017
@@ -434,6 +434,10 @@ jetui.redirect.home.space=true
 # since 2.3.0
 #-------------------------------------------------------------------------
 preferences.session.cache.enabled = true
+# since 2.3.2 - enable/disable entity and user preferences
+preferences.entity.enable = true
+preferences.user.enable = true
+
 
 #-------------------------------------------------------------------------
 # XSS Filtering



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