portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r707190 - in /portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade: components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/title/ jetspeed-portal-resources/src/main/resources/assembly/
Date Wed, 22 Oct 2008 20:31:38 GMT
Author: taylor
Date: Wed Oct 22 13:31:38 2008
New Revision: 707190

URL: http://svn.apache.org/viewvc?rev=707190&view=rev
Log:
https://issues.apache.org/jira/browse/JS2-871
Simplify DynamicTitleService, decouple unneeded deps, and wire into basic spring config (im
in the process of deleting the pluto-factories.xml)

Modified:
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/title/DynamicTitleService.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/title/DynamicTitleServiceImpl.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-portal-resources/src/main/resources/assembly/jetspeed-spring.xml

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/title/DynamicTitleService.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/title/DynamicTitleService.java?rev=707190&r1=707189&r2=707190&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/title/DynamicTitleService.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/title/DynamicTitleService.java
Wed Oct 22 13:31:38 2008
@@ -21,7 +21,8 @@
 import org.apache.jetspeed.container.PortletWindow;
 
 
-public interface DynamicTitleService extends org.apache.pluto.services.title.DynamicTitleService
+public interface DynamicTitleService 
 {
-    String getDynamicTitle(PortletWindow window, HttpServletRequest request);
+    String getDynamicTitle(PortletWindow window, HttpServletRequest request);
+    void setDynamicTitle(PortletWindow window, HttpServletRequest request, String dynamicTitle);
 }

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/title/DynamicTitleServiceImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/title/DynamicTitleServiceImpl.java?rev=707190&r1=707189&r2=707190&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/title/DynamicTitleServiceImpl.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/title/DynamicTitleServiceImpl.java
Wed Oct 22 13:31:38 2008
@@ -16,20 +16,17 @@
  */
 package org.apache.jetspeed.services.title;
 
-import java.util.Iterator;
 import java.util.Locale;
 
 import javax.servlet.http.HttpServletRequest;
 
 import org.apache.jetspeed.PortalReservedParameters;
-import org.apache.jetspeed.request.RequestContext;
-import org.apache.pluto.om.portlet.Preference;
 import org.apache.jetspeed.container.PortletEntity;
 import org.apache.jetspeed.container.PortletWindow;
+import org.apache.jetspeed.request.RequestContext;
 
 public class DynamicTitleServiceImpl implements DynamicTitleService
 {
-
     public void setDynamicTitle(PortletWindow window,
             HttpServletRequest request, String titleArg)
     {
@@ -47,11 +44,9 @@
             }
 
 //        }
-
         request.setAttribute(
                 PortalReservedParameters.OVERRIDE_PORTLET_TITLE_ATTR
                         + "::window.id::" + window.getId(), title);
-
     }
     
     public String getDynamicTitle(PortletWindow window,
@@ -87,33 +82,6 @@
         return title;
     }
 
-    protected final String getTitleFromPreference(PortletWindow window,
-            HttpServletRequest request)
-    {
-        Locale locale = request.getLocale();
-        String titleKey = createTitleKey(locale, false);
-
-        Preference titlePref = window.getPortletEntity().getPreferenceSet()
-                .get(titleKey);
-        if (titlePref == null)
-        {
-            titleKey = createTitleKey(locale, true);
-            titlePref = window.getPortletEntity().getPreferenceSet().get(
-                    titleKey);
-        }
-
-        if (titlePref != null)
-        {
-            Iterator values = titlePref.getValues();
-            if (values.hasNext())
-            {
-                return (String) titlePref.getValues().next();
-            }
-        }
-
-        return null;
-    }
-
     public static String createTitleKey(Locale locale, boolean languageOnly)
     {
         if(languageOnly)

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-portal-resources/src/main/resources/assembly/jetspeed-spring.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-portal-resources/src/main/resources/assembly/jetspeed-spring.xml?rev=707190&r1=707189&r2=707190&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-portal-resources/src/main/resources/assembly/jetspeed-spring.xml
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-portal-resources/src/main/resources/assembly/jetspeed-spring.xml
Wed Oct 22 13:31:38 2008
@@ -151,4 +151,9 @@
     </constructor-arg>
   </bean>
 
+  <bean id="org.apache.pluto.services.title.DynamicTitleService" name="DynamicTitleService"
+    class="org.apache.jetspeed.services.title.DynamicTitleServiceImpl">
+    <meta key="j2:cat" value="default" />
+  </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