[portal-commits] JBoss Portal SVN: r9085 - in branches/JBoss_Portal_Branch_2_6/widget: src/main/org/jboss/portal/widget and 4 other directories.

portal-commits at lists.jboss.org portal-commits at lists.jboss.org
Fri Nov 23 09:30:55 EST 2007


Author: emuckenhuber
Date: 2007-11-23 09:30:55 -0500 (Fri, 23 Nov 2007)
New Revision: 9085

Modified:
   branches/JBoss_Portal_Branch_2_6/widget/build.xml
   branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/AbstractWidgetPortlet.java
   branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/AbstractWidgetProvider.java
   branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGWidgetPortlet.java
   branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesPreferencesInfo.java
   branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidget.java
   branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidgetPortlet.java
   branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-netvibes-war/WEB-INF/portlet.xml
   branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-war/WEB-INF/portlet.xml
Log:
minor

Modified: branches/JBoss_Portal_Branch_2_6/widget/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/build.xml	2007-11-23 14:28:56 UTC (rev 9084)
+++ branches/JBoss_Portal_Branch_2_6/widget/build.xml	2007-11-23 14:30:55 UTC (rev 9085)
@@ -259,7 +259,7 @@
            depends="init">
       <require file="${jboss.home}/server/${portal.deploy.dir}"/>
       <delete file="${jboss.home}/server/${portal.deploy.dir}/portal-widget.war"/>
-      <delete file="${jboss.home}/server/${portal.deploy.dir}/portal-widget-netvibes.war"/>
+      	<delete file="${jboss.home}/server/${portal.deploy.dir}/portal-widget-netvibes.war"/>
    </target>
 
    <target name="package-tests" depends="init, output">

Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/AbstractWidgetPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/AbstractWidgetPortlet.java	2007-11-23 14:28:56 UTC (rev 9084)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/AbstractWidgetPortlet.java	2007-11-23 14:30:55 UTC (rev 9085)
@@ -42,7 +42,7 @@
    public final static String INIT_PARAM_CONNECTION_TIMEOUT = "connectionTimeout";
    
    /** .*/
-   public final static String INIT_PARAM_ENTRY_EXPIRATION = "entryExpiration";
+   public final static String INIT_PARAM_ENTRY_EXPIRATION = "widgetExpiration";
    
    /** . */
    public final static String INIT_PARAM_QUERY_EXPIRATION = "queryExpiration";
@@ -110,7 +110,7 @@
       String fetchWidgetsOnDirectoryLookup = config.getInitParameter(INIT_PARAM_FETCH_WIDGETS_ON_LOOKUP);
       if(fetchWidgetsOnDirectoryLookup != null && fetchWidgetsOnDirectoryLookup.length() > 0)
       {
-         provider.setFetchWidgetsOnDirectoryLookup(Boolean.getBoolean(fetchWidgetsOnDirectoryLookup));
+         provider.setFetchWidgetsOnDirectoryLookup(Boolean.parseBoolean(fetchWidgetsOnDirectoryLookup));
       }
       
       // Finally start widget provider

Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/AbstractWidgetProvider.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/AbstractWidgetProvider.java	2007-11-23 14:28:56 UTC (rev 9084)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/AbstractWidgetProvider.java	2007-11-23 14:30:55 UTC (rev 9085)
@@ -75,7 +75,7 @@
 
    public void start()
    {
-      executor = new ThreadPoolExecutor(4, 4, 0, TimeUnit.SECONDS, new LinkedBlockingQueue());
+      executor = new ThreadPoolExecutor(4, 6, 0, TimeUnit.SECONDS, new LinkedBlockingQueue());
       scheduledExecutor = new ScheduledThreadPoolExecutor(2);
 
       scheduledExecutor.scheduleAtFixedRate(new EntryEvictionThread(), timing, timing, TimeUnit.MILLISECONDS);
@@ -177,6 +177,7 @@
       catch (Exception e)
       {
          log.debug("Failed to retreive widget directory information", e);
+         queries.remove(query);
          return new DirectoryResultFailure(e);
       }
    }

Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGWidgetPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGWidgetPortlet.java	2007-11-23 14:28:56 UTC (rev 9084)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGWidgetPortlet.java	2007-11-23 14:30:55 UTC (rev 9085)
@@ -133,12 +133,10 @@
       Widget widget = provider.getWidget(uri);
       if (widget != null)
       {
-         /** breaks the portlet-titlebar if too long
          if (widget.getTitle() != null)
          {
-            resp.setTitle(widget.getTitle().getDefaultString() + " (Google Widget)");
+            resp.setTitle(widget.getTitle().getString(req.getLocale(), true));
          }
-         */
          writer.print(widget.render(req.getParameterMap(), req.getLocale()));
       }
       else

Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesPreferencesInfo.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesPreferencesInfo.java	2007-11-23 14:28:56 UTC (rev 9084)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesPreferencesInfo.java	2007-11-23 14:30:55 UTC (rev 9085)
@@ -25,6 +25,7 @@
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -37,7 +38,7 @@
    /** The preferences */
    private Map<String, NetvibesPreferenceInfo> preferences;
    
-   public NetvibesPreferencesInfo(Collection<NetvibesPreferenceInfo> preferences)
+   public NetvibesPreferencesInfo(List<NetvibesPreferenceInfo> preferences)
    {
       if ( preferences == null)
       {
@@ -63,6 +64,4 @@
       }
       return this.preferences == null ? null : (NetvibesPreferenceInfo) this.preferences.get(key);
    }
-   
 }
-

Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidget.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidget.java	2007-11-23 14:28:56 UTC (rev 9084)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidget.java	2007-11-23 14:30:55 UTC (rev 9085)
@@ -118,7 +118,10 @@
                   {
                      tempHeight = value;
                   }
-                  frameUrl.append("&amp;" + FastURLEncoder.getUTF8Instance().encode(name) + "=" + FastURLEncoder.getUTF8Instance().encode(value));
+                  if (! value.equals(info.getDefaultValue()))
+                  {
+                     frameUrl.append("&amp;" + FastURLEncoder.getUTF8Instance().encode(name) + "=" + FastURLEncoder.getUTF8Instance().encode(value));
+                  }
                }
             }
          }
@@ -126,7 +129,8 @@
          String actualHeight = tempHeight != null ? String.valueOf(Integer.valueOf(tempHeight).intValue() + 50) : defaultHeight;
          
          StringBuffer output = new StringBuffer();
-         output.append("<iframe id=\"frame_"+ id +"\" frameborder=\"0\" width=\"100%\" height=\""+ actualHeight +"\" ");
+
+         output.append("<iframe id=\"frame_"+ id +"\" name=\"frame_"+ id +"\" frameborder=\"0\" width=\"100%\" height=\""+ actualHeight +"\" ");
          output.append("src=\"");
          output.append(frameUrl);
          output.append("\"></iframe>");

Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidgetPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidgetPortlet.java	2007-11-23 14:28:56 UTC (rev 9084)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidgetPortlet.java	2007-11-23 14:30:55 UTC (rev 9085)
@@ -137,12 +137,10 @@
       Widget widget = provider.getWidget(uri);
       if (widget != null)
       {
-         /** breaks the portlet-titlebar if too long
-         if( widget.getTitle() != null)
+         if (widget.getTitle() != null)
          {
-            resp.setTitle(widget.getTitle().getDefaultString() + " (Netvibes Widget)");
+            resp.setTitle(widget.getTitle().getString(req.getLocale(), true));
          }
-         */
          writer.print(widget.render(req.getParameterMap(), req.getLocale()));
       }
       else

Modified: branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-netvibes-war/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-netvibes-war/WEB-INF/portlet.xml	2007-11-23 14:28:56 UTC (rev 9084)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-netvibes-war/WEB-INF/portlet.xml	2007-11-23 14:30:55 UTC (rev 9085)
@@ -39,7 +39,7 @@
       </init-param>
       <init-param>
          <description>Time until a Widget expires and gets refreshed (in minutes). Default value is 6 hours.</description>
-         <name>entryExpiration</name>
+         <name>widgetExpiration</name>
          <value>360</value>
       </init-param>
       <init-param>
@@ -47,6 +47,11 @@
          <name>queryExpiration</name>
          <value>60</value>
       </init-param>
+      <init-param>
+      	<description>This value defines if all widgets should be fetched when performing the directory search.</description>
+      	<name>fetchWidgetsOnDirectoryLookup</name>
+      	<value>false</value>
+      </init-param>
       <supports>
          <mime-type>text/html</mime-type>
          <portlet-mode>VIEW</portlet-mode>

Modified: branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-war/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-war/WEB-INF/portlet.xml	2007-11-23 14:28:56 UTC (rev 9084)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-war/WEB-INF/portlet.xml	2007-11-23 14:30:55 UTC (rev 9085)
@@ -39,7 +39,7 @@
       </init-param>
       <init-param>
          <description>Time until a Widget expires and gets refreshed (in minutes). Default value is 6 hours.</description>
-         <name>entryExpiration</name>
+         <name>widgetExpiration</name>
          <value>360</value>
       </init-param>
       <init-param>
@@ -47,6 +47,11 @@
          <name>queryExpiration</name>
          <value>60</value>
       </init-param>
+      <init-param>
+      	<description>This value defines if all widgets should be fetched when performing the directory search.</description>
+      	<name>fetchWidgetsOnDirectoryLookup</name>
+      	<value>false</value>
+      </init-param>
       <supports>
          <mime-type>text/html</mime-type>
          <portlet-mode>VIEW</portlet-mode>




More information about the portal-commits mailing list