JBoss Portal SVN: r7685 - in trunk: common/src/main/org/jboss/portal/common/xml and 3 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-07-06 10:04:24 -0400 (Fri, 06 Jul 2007)
New Revision: 7685
Modified:
trunk/common/src/main/org/jboss/portal/common/net/URLTools.java
trunk/common/src/main/org/jboss/portal/common/xml/XMLTools.java
trunk/widget/src/main/org/jboss/portal/widget/google/GGWidget.java
trunk/widget/src/main/org/jboss/portal/widget/google/GGWidgetInfo.java
trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGProvider.java
trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGWidgetInfoBuilder.java
trunk/widget/src/resources/widget-war/WEB-INF/jsp/edit.jsp
Log:
- honour URLTools.performGet that must returns null when no answer is available
- Use the RSS mode of google gadgets for more reliable catalog queries
Modified: trunk/common/src/main/org/jboss/portal/common/net/URLTools.java
===================================================================
--- trunk/common/src/main/org/jboss/portal/common/net/URLTools.java 2007-07-06 13:15:55 UTC (rev 7684)
+++ trunk/common/src/main/org/jboss/portal/common/net/URLTools.java 2007-07-06 14:04:24 UTC (rev 7685)
@@ -81,7 +81,7 @@
* @param url the URL the URL of the resource
* @param soTimeoutMillis the socket connection timeout in millis
* @param connTimeoutMillis the connection timeout in millis
- * @return
+ * @return the retrieved byte array
*/
public static byte[] performGET(URL url, int soTimeoutMillis, int connTimeoutMillis) throws IllegalArgumentException, IOException
{
@@ -135,8 +135,11 @@
method.releaseConnection();
}
}
+
+ //
+ return null;
}
- throw new IllegalArgumentException("Protocol " + url.getProtocol() + " not accepted");
+ throw new IllegalArgumentException("Protocol " + url.getProtocol() + " not accepted for url " + url);
}
/**
Modified: trunk/common/src/main/org/jboss/portal/common/xml/XMLTools.java
===================================================================
--- trunk/common/src/main/org/jboss/portal/common/xml/XMLTools.java 2007-07-06 13:15:55 UTC (rev 7684)
+++ trunk/common/src/main/org/jboss/portal/common/xml/XMLTools.java 2007-07-06 14:04:24 UTC (rev 7685)
@@ -421,10 +421,20 @@
Element childElt = (Element)node;
//
- if ((uri == null || uri.equals(childElt.getNamespaceURI())) && childElt.getLocalName().equals(name))
+ if (uri == null)
{
- result.add(childElt);
+ if (childElt.getTagName().equals(name))
+ {
+ result.add(childElt);
+ }
}
+ else if (uri.equals(childElt.getNamespaceURI()))
+ {
+ if (childElt.getLocalName().equals(name))
+ {
+ result.add(childElt);
+ }
+ }
}
}
return result;
Modified: trunk/widget/src/main/org/jboss/portal/widget/google/GGWidget.java
===================================================================
--- trunk/widget/src/main/org/jboss/portal/widget/google/GGWidget.java 2007-07-06 13:15:55 UTC (rev 7684)
+++ trunk/widget/src/main/org/jboss/portal/widget/google/GGWidget.java 2007-07-06 14:04:24 UTC (rev 7685)
@@ -26,15 +26,11 @@
import org.jboss.portal.common.util.UUIDGenerator;
import org.jboss.portal.common.text.FastURLEncoder;
import org.jboss.portal.widget.Widget;
-import org.jboss.portal.widget.google.provider.GGWidgetInfoBuilder;
import java.util.Iterator;
import java.util.Map;
import java.net.URL;
-import edu.emory.mathcs.backport.java.util.concurrent.FutureTask;
-import edu.emory.mathcs.backport.java.util.concurrent.Callable;
-
/**
* A Google Gadget widget.
* For more details please see the <a href="http://www.google.com/apis/gadgets/reference.html">API Developer Guide</a>.
@@ -58,51 +54,13 @@
private final String id;
/** . */
- private final LocalizedString title;
+ private final GGWidgetInfo info;
- /** . */
- private final LocalizedString description;
-
- /** . */
- private final int width;
-
- /** . */
- private final int height;
-
- /** . */
- private final FutureTask future;
-
- public GGWidget(URL url,
- LocalizedString title,
- LocalizedString description,
- int width,
- int height)
+ public GGWidget(URL url, GGWidgetInfo info)
{
- Callable callable = new Callable()
- {
- public Object call() throws Exception
- {
- try
- {
- GGWidgetInfoBuilder builder = new GGWidgetInfoBuilder(GGWidget.this.url);
- return builder.create();
- }
- catch (Exception e)
- {
- e.printStackTrace();
- return null;
- }
- }
- };
-
- //
this.id = url.toString();
this.url = url;
- this.title = title;
- this.description = description;
- this.width = width;
- this.height = height;
- this.future = new FutureTask(callable);
+ this.info = info;
}
public String getId()
@@ -112,27 +70,17 @@
public GGWidgetInfo getInfo()
{
- try
- {
- return (GGWidgetInfo)future.get();
- }
- catch (Exception e)
- {
- e.printStackTrace();
-
- //
- return null;
- }
+ return info;
}
public LocalizedString getTitle()
{
- return title;
+ return getInfo().getTitle();
}
public LocalizedString getDescription()
{
- return description;
+ return getInfo().getDescription();
}
public String render(Map parameters)
@@ -140,20 +88,21 @@
String id = generator.generateKey();
StringBuffer tmp = new StringBuffer("http://gmodules.com/ig/ifr?url=").append(url);
- // Generate base params
- tmp.append("&synd=open");
- tmp.append("&w=").append(width);
- tmp.append("&h=").append(height);
- tmp.append("&title=").append(FastURLEncoder.DEFAULT_ENCODER.encode(title.getDefaultString()));
- tmp.append("&border=%23ffffff%7C3px%2C1px+none+%23999999"); // "&border=%23ffffff%7C3px%2C1px+solid+%23999999"
- tmp.append("&output=js");
-
//
GGWidgetInfo info = getInfo();
//
if (info != null)
{
+ // Generate base params
+ tmp.append("&synd=open");
+ tmp.append("&w=").append(info.getWidth());
+ tmp.append("&h=").append(info.getHeight());
+ tmp.append("&title=").append(FastURLEncoder.DEFAULT_ENCODER.encode(info.getTitle().getDefaultString()));
+ tmp.append("&border=%23ffffff%7C3px%2C1px+none+%23999999"); // "&border=%23ffffff%7C3px%2C1px+solid+%23999999"
+ tmp.append("&output=js");
+
+ //
GGPreferencesInfo prefsInfo = info.getPreferences();
// Append default values
Modified: trunk/widget/src/main/org/jboss/portal/widget/google/GGWidgetInfo.java
===================================================================
--- trunk/widget/src/main/org/jboss/portal/widget/google/GGWidgetInfo.java 2007-07-06 13:15:55 UTC (rev 7684)
+++ trunk/widget/src/main/org/jboss/portal/widget/google/GGWidgetInfo.java 2007-07-06 14:04:24 UTC (rev 7685)
@@ -22,6 +22,8 @@
******************************************************************************/
package org.jboss.portal.widget.google;
+import org.jboss.portal.common.i18n.LocalizedString;
+
/**
* Meta data retrieved from the XML file.
*
@@ -32,10 +34,31 @@
{
/** . */
+ private final LocalizedString title;
+
+ /** . */
+ private final LocalizedString description;
+
+ /** . */
+ private final int width;
+
+ /** . */
+ private final int height;
+
+ /** . */
private final GGPreferencesInfo preferences;
- public GGWidgetInfo(GGPreferencesInfo preferences)
+ public GGWidgetInfo(
+ LocalizedString title,
+ LocalizedString description,
+ int width,
+ int height,
+ GGPreferencesInfo preferences)
{
+ this.title = title;
+ this.description = description;
+ this.width = width;
+ this.height = height;
this.preferences = preferences;
}
@@ -43,4 +66,24 @@
{
return preferences;
}
+
+ public LocalizedString getTitle()
+ {
+ return title;
+ }
+
+ public LocalizedString getDescription()
+ {
+ return description;
+ }
+
+ public int getWidth()
+ {
+ return width;
+ }
+
+ public int getHeight()
+ {
+ return height;
+ }
}
Modified: trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGProvider.java
===================================================================
--- trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGProvider.java 2007-07-06 13:15:55 UTC (rev 7684)
+++ trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGProvider.java 2007-07-06 14:04:24 UTC (rev 7685)
@@ -35,9 +35,12 @@
import java.net.MalformedURLException;
import java.util.Collections;
import java.util.Collection;
+import java.util.Iterator;
+import java.util.ArrayList;
import org.jboss.portal.widget.google.GGWidget;
import org.jboss.portal.widget.google.GGWidgetCategoryInfo;
+import org.jboss.portal.widget.google.GGWidgetInfo;
import org.jboss.portal.common.util.CollectionBuilder;
/**
@@ -57,9 +60,6 @@
private final ConcurrentMap searches = new ConcurrentHashMap();
/** . */
- private final Context context = new Context();
-
- /** . */
private ExecutorService executor;
/** . */
@@ -91,6 +91,9 @@
return CATEGORIES;
}
+ /**
+ * Returns a specified widget.
+ */
public GGWidget getWidget(String id)
{
if (id == null)
@@ -102,49 +105,69 @@
try
{
URL url = new URL(id);
- return context.getWidgetEntry(url).getWidget();
+ return getWidget(url);
}
catch (MalformedURLException e)
{
e.printStackTrace();
+
+ //
return null;
}
}
- public GGQueryResult search(GGQuery query)
+ /**
+ * Returns a specified widget.
+ */
+ private GGWidget getWidget(URL url)
{
+ GGProvider.GGWidgetEntry tmp = new GGProvider.GGWidgetEntry(url);
+ GGProvider.GGWidgetEntry entry = (GGProvider.GGWidgetEntry)entries.putIfAbsent(url, tmp);
+ if (entry == null)
+ {
+ entry = tmp;
+ entry.retrieve();
+ }
+ return entry.getWidget();
+ }
+
+ /**
+ * Returns a collection of widgets from a query.
+ */
+ public Collection search(GGQuery query)
+ {
if (query == null)
{
throw new IllegalArgumentException();
}
//
- QueryEntry tmp = new QueryEntry(query);
- QueryEntry entry = (QueryEntry)searches.putIfAbsent(query, tmp);
+ GGQueryEntry tmp = new GGQueryEntry(query);
+ GGQueryEntry entry = (GGQueryEntry)searches.putIfAbsent(query, tmp);
if (entry == null)
{
entry = tmp;
entry.retrieve();
}
- return entry.getResult();
- }
+ GGQueryResult result = entry.getResult();
- public class Context
- {
- GGProvider.GGWidgetEntry getWidgetEntry(URL url)
+ //
+ Collection widgets = new ArrayList();
+ for (Iterator i = result.entries();i.hasNext();)
{
- GGProvider.GGWidgetEntry tmp = new GGProvider.GGWidgetEntry(url);
- GGProvider.GGWidgetEntry entry = (GGProvider.GGWidgetEntry)entries.putIfAbsent(url, tmp);
- if (entry == null)
+ GGQueryResultEntry resultEntry = (GGQueryResultEntry)i.next();
+ GGWidget widget = getWidget(resultEntry.getURL());
+ if (widget != null)
{
- entry = tmp;
- entry.retrieve();
+ widgets.add(widget);
}
- return entry;
}
+
+ //
+ return widgets;
}
- public class GGWidgetEntry implements Callable
+ private class GGWidgetEntry implements Callable
{
/** The widget id. */
@@ -173,26 +196,28 @@
catch (Exception e)
{
e.printStackTrace();
+
+ //
return null;
}
}
- public Object call()
+ public Object call() throws Exception
{
- try
+ GGWidgetInfoBuilder builder = new GGWidgetInfoBuilder(url);
+ GGWidgetInfo info = builder.create();
+ if (info != null)
{
- GGWidgetInfoBuilder builder = new GGWidgetInfoBuilder(url);
- return builder.create();
+ return new GGWidget(url, info);
}
- catch (Exception e)
+ else
{
- e.printStackTrace();
return null;
}
}
}
- private class QueryEntry implements Callable
+ private class GGQueryEntry implements Callable
{
/** . */
@@ -201,7 +226,7 @@
/** . */
private FutureTask future;
- public QueryEntry(GGQuery query)
+ public GGQueryEntry(GGQuery query)
{
this.query = query;
this.future = new FutureTask(this);
@@ -214,30 +239,31 @@
public GGQueryResult getResult()
{
+ GGQueryResult result = null;
+
+ //
try
{
- return (GGQueryResult)future.get();
+ result = (GGQueryResult)future.get();
}
catch (Exception e)
{
- e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
- return new GGQueryResult(Collections.EMPTY_LIST);
+ e.printStackTrace();
}
- }
- public Object call()
- {
- try
+ //
+ if (result == null)
{
- return new GGQueryResultBuilder(query).build();
+ result = new GGQueryResult(Collections.EMPTY_LIST);
}
- catch (MalformedURLException e)
- {
- e.printStackTrace();
- // todo
- return null;
- }
+ //
+ return result;
}
+
+ public Object call() throws MalformedURLException
+ {
+ return new GGQueryResultBuilder(query).build();
+ }
}
}
Modified: trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGWidgetInfoBuilder.java
===================================================================
--- trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGWidgetInfoBuilder.java 2007-07-06 13:15:55 UTC (rev 7684)
+++ trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGWidgetInfoBuilder.java 2007-07-06 14:04:24 UTC (rev 7685)
@@ -25,7 +25,6 @@
import org.jboss.portal.common.xml.XMLTools;
import org.jboss.portal.common.i18n.LocalizedString;
import org.jboss.portal.common.net.URLTools;
-import org.jboss.portal.common.concurrent.loader.ObjectLoader;
import org.jboss.portal.widget.google.type.DataType;
import org.jboss.portal.widget.google.type.StringType;
import org.jboss.portal.widget.google.type.LocationType;
@@ -33,7 +32,6 @@
import org.jboss.portal.widget.google.type.BoolType;
import org.jboss.portal.widget.google.type.ListType;
import org.jboss.portal.widget.google.type.EnumType;
-import org.jboss.portal.widget.google.GGWidget;
import org.jboss.portal.widget.google.GGPreferenceInfo;
import org.jboss.portal.widget.google.GGPreferencesInfo;
import org.jboss.portal.widget.google.GGWidgetInfo;
@@ -67,6 +65,8 @@
{
throw new IllegalArgumentException("No null URL");
}
+
+ //
this.url = url;
}
@@ -75,15 +75,24 @@
return url;
}
+ /**
+ * Build the widget info from the url or return null if it is not possible.
+ * @return the widget info
+ * @throws Exception
+ */
public GGWidgetInfo create() throws Exception
{
- DocumentBuilderFactory factory = XMLTools.getDocumentBuilderFactory();
- DocumentBuilder builder = factory.newDocumentBuilder();
byte[] bytes = obtainWidget(url);
+
+ // No response was obtained
if (bytes == null)
{
- throw new Exception("Cannot retrieve document " + url);
+ return null;
}
+
+ //
+ DocumentBuilderFactory factory = XMLTools.getDocumentBuilderFactory();
+ DocumentBuilder builder = factory.newDocumentBuilder();
Document doc = builder.parse(new ByteArrayInputStream(bytes));
Element moduleElt = doc.getDocumentElement();
@@ -165,28 +174,26 @@
prefsInfo = new GGPreferencesInfo(tmp);
}
- //
- return new GGWidgetInfo(prefsInfo);
-// Iterator modulePrefsEltIterator = XMLTools.getChildrenIterator(moduleElt, "ModulePrefs");
-// if (modulePrefsEltIterator.hasNext())
-// {
-// Element modulePrefsElt = (Element)modulePrefsEltIterator.next();
-// String titleAttr = modulePrefsElt.getAttribute("title");
-// String descriptionAttr = modulePrefsElt.getAttribute("description");
-// String widthAttr = modulePrefsElt.getAttribute("width");
-// String heightAttr = modulePrefsElt.getAttribute("height");
-//
-// //
-// LocalizedString title = titleAttr != null ? new LocalizedString(titleAttr, Locale.ENGLISH) : null;
-// LocalizedString description = descriptionAttr != null ? new LocalizedString(descriptionAttr, Locale.ENGLISH) : null;
-// int width = (widthAttr != null && widthAttr.length() > 0) ? Integer.parseInt(widthAttr) : 320;
-// int height = (heightAttr != null && heightAttr.length() > 0) ? Integer.parseInt(heightAttr) : 200;
-// return new GGWidget(url.toString(), prefsInfo, title, description, width, height);
-// }
-// else
-// {
-// throw new Exception(); // Basic for now
-// }
+ Iterator modulePrefsEltIterator = XMLTools.getChildrenIterator(moduleElt, "ModulePrefs");
+ if (modulePrefsEltIterator.hasNext())
+ {
+ Element modulePrefsElt = (Element)modulePrefsEltIterator.next();
+ String titleAttr = modulePrefsElt.getAttribute("title");
+ String descriptionAttr = modulePrefsElt.getAttribute("description");
+ String widthAttr = modulePrefsElt.getAttribute("width");
+ String heightAttr = modulePrefsElt.getAttribute("height");
+
+ //
+ LocalizedString title = titleAttr != null ? new LocalizedString(titleAttr, Locale.ENGLISH) : null;
+ LocalizedString description = descriptionAttr != null ? new LocalizedString(descriptionAttr, Locale.ENGLISH) : null;
+ int width = (widthAttr != null && widthAttr.length() > 0) ? Integer.parseInt(widthAttr) : 320;
+ int height = (heightAttr != null && heightAttr.length() > 0) ? Integer.parseInt(heightAttr) : 200;
+ return new GGWidgetInfo(title, description, width, height, prefsInfo);
+ }
+ else
+ {
+ throw new Exception(); // Basic for now
+ }
}
protected byte[] obtainWidget(URL url) throws Exception
Modified: trunk/widget/src/resources/widget-war/WEB-INF/jsp/edit.jsp
===================================================================
--- trunk/widget/src/resources/widget-war/WEB-INF/jsp/edit.jsp 2007-07-06 13:15:55 UTC (rev 7684)
+++ trunk/widget/src/resources/widget-war/WEB-INF/jsp/edit.jsp 2007-07-06 14:04:24 UTC (rev 7685)
@@ -9,6 +9,7 @@
<%@ page import="org.jboss.portal.widget.google.type.EnumType" %>
<%@ page import="javax.portlet.PortletURL" %>
<%@ page import="org.jboss.portal.common.util.IteratorStatus" %>
+<%@ page import="java.util.Collection" %>
<%@ page language="java"%>
<%@ taglib uri="http://java.sun.com/portlet" prefix="p" %>
<%@ page isELIgnored="false" %>
@@ -44,7 +45,7 @@
// Compute query
GGQuery query = new GGQuery(0, catTerm, queryTerm);
- GGQueryResult result = provider.search(query);
+ Collection widgets = provider.search(query);
%>
@@ -69,7 +70,7 @@
<p>
<table style="width:100%;border:1px solid" cellspacing="0" cellpadding="0">
<%
- for (IteratorStatus i = new IteratorStatus(result.entries()); i.hasNext();)
+ for (IteratorStatus i = new IteratorStatus(widgets.iterator()); i.hasNext();)
{
GGWidget widget = (GGWidget)i.next();
boolean selected = selWidget != null && selWidget.getId().equals(widget.getId());
@@ -80,7 +81,7 @@
selectURL.setParameter("content.uri", widget.getId());
// Set default parametrization state
- for (Iterator j = widget.getPreferencesInfo().getPreferences().iterator(); j.hasNext();)
+ for (Iterator j = widget.getInfo().getPreferences().getPreferences().iterator(); j.hasNext();)
{
GGPreferenceInfo prefInfo = (GGPreferenceInfo)j.next();
String paramName = "content.param." + prefInfo.getName();
@@ -105,7 +106,7 @@
</p>
<%
- if (selWidget != null && !selWidget.getPreferencesInfo().getPreferences().isEmpty())
+ if (selWidget != null && !selWidget.getInfo().getPreferences().getPreferences().isEmpty())
{
PortletURL selectURL = renderResponse.createActionURL();
@@ -120,7 +121,7 @@
<p>
<form action="<%= selectURL %>" method="post">
<%
- for (Iterator i = selWidget.getPreferencesInfo().getPreferences().iterator(); i.hasNext();)
+ for (Iterator i = selWidget.getInfo().getPreferences().getPreferences().iterator(); i.hasNext();)
{
GGPreferenceInfo prefInfo = (GGPreferenceInfo)i.next();
if (prefInfo.getType().getOrdinal() == DataType.HIDDEN)
@@ -135,7 +136,7 @@
<table>
<tbody>
<%
- for (Iterator i = selWidget.getPreferencesInfo().getPreferences().iterator(); i.hasNext();)
+ for (Iterator i = selWidget.getInfo().getPreferences().getPreferences().iterator(); i.hasNext();)
{
GGPreferenceInfo prefInfo = (GGPreferenceInfo)i.next();
16 years, 12 months
JBoss Portal SVN: r7684 - in docs/branches/JBoss_Portal_Branch_2_6: readmeFiles and 2 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-07-06 09:15:55 -0400 (Fri, 06 Jul 2007)
New Revision: 7684
Removed:
docs/branches/JBoss_Portal_Branch_2_6/readmeFiles/jboss-forums-bin.README
docs/branches/JBoss_Portal_Branch_2_6/readmeFiles/jboss-forums-src.README
Modified:
docs/branches/JBoss_Portal_Branch_2_6/quickstartuser/en/master.xml
docs/branches/JBoss_Portal_Branch_2_6/readmeFiles/jboss-portal-bin.README
docs/branches/JBoss_Portal_Branch_2_6/readmeFiles/jboss-portal-ha-bin.README
docs/branches/JBoss_Portal_Branch_2_6/readmeFiles/jboss-portal-src.README
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/master.xml
docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/master.xml
Log:
Changed version number in docs
Modified: docs/branches/JBoss_Portal_Branch_2_6/quickstartuser/en/master.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/quickstartuser/en/master.xml 2007-07-06 13:09:39 UTC (rev 7683)
+++ docs/branches/JBoss_Portal_Branch_2_6/quickstartuser/en/master.xml 2007-07-06 13:15:55 UTC (rev 7684)
@@ -11,9 +11,9 @@
]>
<book lang="en">
<bookinfo>
- <title>JBoss Portal 2.6.0-GA</title>
+ <title>JBoss Portal 2.6.1-CR1</title>
<subtitle>Quickstart User Guide</subtitle>
- <releaseinfo>Release 2.6.0-GA "Ninja"</releaseinfo>
+ <releaseinfo>Release 2.6.1-CR1 "Ninja"</releaseinfo>
<author>
<firstname>Kevin</firstname>
Deleted: docs/branches/JBoss_Portal_Branch_2_6/readmeFiles/jboss-forums-bin.README
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/readmeFiles/jboss-forums-bin.README 2007-07-06 13:09:39 UTC (rev 7683)
+++ docs/branches/JBoss_Portal_Branch_2_6/readmeFiles/jboss-forums-bin.README 2007-07-06 13:15:55 UTC (rev 7684)
@@ -1,13 +0,0 @@
-
- JBoss Forums Portlet 2.4.0
- GPL Licensed (See http://www.gnu.org/copyleft/gpl.html for details on the product usage)
-
- JBoss Forums Portlet aims at providing a forums system to your JBoss Portal. This
- portlet is under GPL license (while all other resources for the portal are under LGPL).
-
- INSTALLATION:
- For installation, please refer to the user guide available in the 'docs' directory
-
- RUNNING:
- To run the application, start JBoss AS and point your web browser to:
- http://localhost:8080/portal/index.html?_id=page.default.forums
\ No newline at end of file
Deleted: docs/branches/JBoss_Portal_Branch_2_6/readmeFiles/jboss-forums-src.README
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/readmeFiles/jboss-forums-src.README 2007-07-06 13:09:39 UTC (rev 7683)
+++ docs/branches/JBoss_Portal_Branch_2_6/readmeFiles/jboss-forums-src.README 2007-07-06 13:15:55 UTC (rev 7684)
@@ -1,13 +0,0 @@
-
- JBoss Forums Portlet 2.4.0
- GPL Licensed (See http://www.gnu.org/copyleft/gpl.html for details on the product usage)
-
- JBoss Forums Portlet aims at providing a forums system to your JBoss Portal. This
- portlet is under GPL license (while all other resources for the portal are under LGPL).
-
- INSTALLATION:
- For installation, please refer to the user guide available in the 'docs' directory
-
- RUNNING:
- To run the application, start JBoss AS and point your web browser to:
- http://localhost:8080/portal/index.html?_id=page.default.forums
\ No newline at end of file
Modified: docs/branches/JBoss_Portal_Branch_2_6/readmeFiles/jboss-portal-bin.README
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/readmeFiles/jboss-portal-bin.README 2007-07-06 13:09:39 UTC (rev 7683)
+++ docs/branches/JBoss_Portal_Branch_2_6/readmeFiles/jboss-portal-bin.README 2007-07-06 13:15:55 UTC (rev 7684)
@@ -1,5 +1,5 @@
- JBoss Portal 2.6.0
+ JBoss Portal 2.6.1
LGPL Licensed (See http://www.gnu.org/copyleft/lesser.html for details on the product usage)
JBoss Portal is the next generation open source content management system (CMS) and portal
Modified: docs/branches/JBoss_Portal_Branch_2_6/readmeFiles/jboss-portal-ha-bin.README
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/readmeFiles/jboss-portal-ha-bin.README 2007-07-06 13:09:39 UTC (rev 7683)
+++ docs/branches/JBoss_Portal_Branch_2_6/readmeFiles/jboss-portal-ha-bin.README 2007-07-06 13:15:55 UTC (rev 7684)
@@ -1,5 +1,5 @@
- JBoss Portal 2.6.0
+ JBoss Portal 2.6.1
LGPL Licensed (See http://www.gnu.org/copyleft/lesser.html for details on the product usage)
JBoss Portal is the next generation open source content management system (CMS) and portal
Modified: docs/branches/JBoss_Portal_Branch_2_6/readmeFiles/jboss-portal-src.README
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/readmeFiles/jboss-portal-src.README 2007-07-06 13:09:39 UTC (rev 7683)
+++ docs/branches/JBoss_Portal_Branch_2_6/readmeFiles/jboss-portal-src.README 2007-07-06 13:15:55 UTC (rev 7684)
@@ -1,5 +1,5 @@
- JBoss Portal 2.6.0
+ JBoss Portal 2.6.1
LGPL Licensed (See http://www.gnu.org/copyleft/lesser.html for details on the product usage)
JBoss Portal is the next generation open source content management system (CMS) and portal
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/master.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/master.xml 2007-07-06 13:09:39 UTC (rev 7683)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/master.xml 2007-07-06 13:15:55 UTC (rev 7684)
@@ -31,9 +31,9 @@
]>
<book lang="en">
<bookinfo>
- <title>JBoss Portal 2.6.0-GA</title>
+ <title>JBoss Portal 2.6.1-CR1</title>
<subtitle>Reference Guide</subtitle>
- <releaseinfo>Release 2.6.0-GA "Ninja"</releaseinfo>
+ <releaseinfo>Release 2.6.1-CR1 "Ninja"</releaseinfo>
<releaseinfo>June 2007</releaseinfo>
<author>
<firstname>Thomas</firstname>
Modified: docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/master.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/master.xml 2007-07-06 13:09:39 UTC (rev 7683)
+++ docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/master.xml 2007-07-06 13:15:55 UTC (rev 7684)
@@ -13,9 +13,9 @@
]>
<book lang="en">
<bookinfo>
- <title>JBoss Portal 2.6.0-GA</title>
+ <title>JBoss Portal 2.6.1-CR1</title>
<subtitle>User Guide</subtitle>
- <releaseinfo>Release 2.6.0-GA "Ninja"</releaseinfo>
+ <releaseinfo>Release 2.6.1-CR1 "Ninja"</releaseinfo>
<releaseinfo>June 2007</releaseinfo>
<author>
<firstname>Roy</firstname>
16 years, 12 months
JBoss Portal SVN: r7683 - in branches/JBoss_Portal_Branch_2_6: server/src/main/org/jboss/portal/server and 1 other directory.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-07-06 09:09:39 -0400 (Fri, 06 Jul 2007)
New Revision: 7683
Modified:
branches/JBoss_Portal_Branch_2_6/build/build-thirdparty.xml
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/PortalConstants.java
Log:
Changed version number
Modified: branches/JBoss_Portal_Branch_2_6/build/build-thirdparty.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/build/build-thirdparty.xml 2007-07-06 12:48:38 UTC (rev 7682)
+++ branches/JBoss_Portal_Branch_2_6/build/build-thirdparty.xml 2007-07-06 13:09:39 UTC (rev 7683)
@@ -33,7 +33,7 @@
<!-- Main Definition of dependencies -->
<build id="jbossportal-thirdparty"
impltitle="JBossPortal"
- implversion="jboss-portal-2.6.0.BETA1"
+ implversion="jboss-portal-2.6.1.CR1"
implvendor="JBoss, a division of Red Hat Inc."
implurl="http://www.jboss.org"
description="JBoss Portal"
Modified: branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/PortalConstants.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/PortalConstants.java 2007-07-06 12:48:38 UTC (rev 7682)
+++ branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/PortalConstants.java 2007-07-06 13:09:39 UTC (rev 7683)
@@ -36,7 +36,7 @@
{
/** Current version. */
- public static final Version VERSION = new Version("JBoss Portal", 2, 6, 0, new Version.Qualifier(Version.Qualifier.Prefix.GA), "Ninja");
+ public static final Version VERSION = new Version("JBoss Portal", 2, 6, 1, new Version.Qualifier(Version.Qualifier.Prefix.CR, Version.Qualifier.Suffix.SUFFIX_1), "Ninja");
/** The default portal name. */
public static final String DEFAULT_PORTAL_NAME = "default";
16 years, 12 months
JBoss Portal SVN: r7682 - branches/JBoss_Portal_Branch_2_6/demo/portlets/flickrportlet/resources/WEB-INF.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-07-06 08:48:38 -0400 (Fri, 06 Jul 2007)
New Revision: 7682
Added:
branches/JBoss_Portal_Branch_2_6/demo/portlets/flickrportlet/resources/WEB-INF/portlet-instances.xml
Log:
So behavior changed with the new version of Eclipse, something to keep in mind to avoid 4 commits for a single action... Sorry about this.
Added: branches/JBoss_Portal_Branch_2_6/demo/portlets/flickrportlet/resources/WEB-INF/portlet-instances.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/demo/portlets/flickrportlet/resources/WEB-INF/portlet-instances.xml (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/demo/portlets/flickrportlet/resources/WEB-INF/portlet-instances.xml 2007-07-06 12:48:38 UTC (rev 7682)
@@ -0,0 +1,50 @@
+<?xml version="1.0" standalone="yes"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE deployments PUBLIC
+ "-//JBoss Portal//DTD Portlet Instances 2.6//EN"
+ "http://www.jboss.org/portal/dtd/portlet-instances_2_6.dtd">
+
+<deployments>
+ <deployment>
+ <instance>
+ <instance-id>FlickrPortletInstance</instance-id>
+ <portlet-ref>FlickrPortlet</portlet-ref>
+ <preferences>
+ <preference>
+ <name>userName</name>
+ <value>jbossportal</value>
+ </preference>
+ <preference>
+ <name>perPageMinimized</name>
+ <value>9</value>
+ </preference>
+ <preference>
+ <name>perPageMaximized</name>
+ <value>27</value>
+ </preference>
+ </preferences>
+ </instance>
+ </deployment>
+</deployments>
\ No newline at end of file
Property changes on: branches/JBoss_Portal_Branch_2_6/demo/portlets/flickrportlet/resources/WEB-INF/portlet-instances.xml
___________________________________________________________________
Name: svn:executable
+ *
16 years, 12 months
JBoss Portal SVN: r7680 - branches/JBoss_Portal_Branch_2_6/demo/bin and 6 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-07-06 08:46:13 -0400 (Fri, 06 Jul 2007)
New Revision: 7680
Added:
branches/JBoss_Portal_Branch_2_6/demo/bin/
branches/JBoss_Portal_Branch_2_6/demo/bin/jbossws-1.2.1.GA.zip
branches/JBoss_Portal_Branch_2_6/demo/conf/core-cms/
branches/JBoss_Portal_Branch_2_6/demo/conf/core-cms/jboss-service.xml
branches/JBoss_Portal_Branch_2_6/demo/portlets/flickrportlet/
branches/JBoss_Portal_Branch_2_6/demo/portlets/flickrportlet/flickrportlet.war
branches/JBoss_Portal_Branch_2_6/demo/portlets/flickrportlet/resources/
branches/JBoss_Portal_Branch_2_6/demo/portlets/jbossforums/
branches/JBoss_Portal_Branch_2_6/demo/portlets/jbossforums/jboss-forums.ear
Removed:
trunk/demo/conf/jbossws/
Log:
* Make the script update WS
* Sync between Branch_2_6 and trunk
(second try)
Added: branches/JBoss_Portal_Branch_2_6/demo/bin/jbossws-1.2.1.GA.zip
===================================================================
(Binary files differ)
Property changes on: branches/JBoss_Portal_Branch_2_6/demo/bin/jbossws-1.2.1.GA.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/JBoss_Portal_Branch_2_6/demo/conf/core-cms/jboss-service.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/demo/conf/core-cms/jboss-service.xml (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/demo/conf/core-cms/jboss-service.xml 2007-07-06 12:46:13 UTC (rev 7680)
@@ -0,0 +1,570 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<server>
+
+ <!-- Management MBean -->
+ <mbean
+ code="org.jboss.portal.cms.management.CMSImpl"
+ name="portal:service=Management,type=CMS,name=Default"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <depends
+ optional-attribute-name="CMS"
+ proxy-type="attribute">portal:service=CMS</depends>
+ <xmbean/>
+ </mbean>
+
+ <mbean
+ code="org.jboss.portal.jems.hibernate.SessionFactoryBinder"
+ name="portal:service=Hibernate,type=CMS"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends>jboss.jca:service=DataSourceBinding,name=PortalDS</depends>
+ <attribute name="DoChecking">true</attribute>
+ <attribute name="ConfigLocation">conf/hibernate/cms/hibernate.cfg.xml</attribute>
+ <attribute name="JNDIName">java:/portal/cms/CMSSessionFactory</attribute>
+ </mbean>
+
+ <mbean
+ code="org.jboss.portal.cms.impl.jcr.JCRCMS"
+ name="portal:service=CMS"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <!-- The datasource hibernate depends on, it can be commented when the file store is used -->
+ <depends>jboss.jca:service=DataSourceBinding,name=PortalDS</depends>
+ <depends>portal:service=JAASLoginModule</depends>
+ <depends>portal:service=Hibernate,type=CMS</depends>
+ <depends optional-attribute-name="IdentityServiceController" proxy-type="attribute">portal:service=Module,type=IdentityServiceController</depends>
+
+ <!-- Add this to activate publish/approval workflow integration -->
+ <depends optional-attribute-name="ApprovePublishWorkflow" proxy-type="attribute">portal:service=ApprovePublish,type=Workflow</depends>
+
+ <depends optional-attribute-name="StackFactory" proxy-type="attribute">portal:service=InterceptorStackFactory,type=Cms</depends>
+ <attribute name="DoChecking">true</attribute>
+ <attribute name="DefaultContentLocation">portal/cms/conf/default-content/default/</attribute>
+ <attribute name="DefaultLocale">en</attribute>
+ <attribute name="RepositoryName">PortalRepository</attribute>
+ <attribute name="HomeDir">${jboss.server.data.dir}${/}portal${/}cms${/}conf</attribute>
+ <attribute name="IdentitySessionFactory">java:/portal/IdentitySessionFactory</attribute>
+ <attribute name="Config">
+ <Repository>
+ <!--
+ | virtual file system where the repository stores global state (e.g. registered namespaces, custom node types, etc.)
+ | Configure to use FS or RDBMS.
+ -->
+
+ <!-- HibernateStore: uses RDBMS + Hibernate for storage -->
+ <FileSystem class="org.jboss.portal.cms.hibernate.HibernateStore">
+ <param name="schemaObjectPrefix" value="RepositoryEntry"/>
+ <param name="JNDIName" value="java:/portal/cms/CMSSessionFactory"/>
+ </FileSystem>
+
+ <!-- LocalFileSystem: uses FileSystem for storage. -->
+ <!--
+ <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+ <param name="path" value="${rep.home}/repository"/>
+ </FileSystem>
+ -->
+ <Security appName="Jackrabbit">
+ <AccessManager class="org.apache.jackrabbit.core.security.SimpleAccessManager"/>
+ <LoginModule class="org.apache.jackrabbit.core.security.SimpleLoginModule">
+ <!-- anonymous user name ('anonymous' is the default value) -->
+ <param name="anonid" value="anonymous"/>
+ </LoginModule>
+ </Security>
+ <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default"/>
+ <Workspace name="${wsp.name}">
+ <!-- Virtual file system of the workspace: Configure to use FS or RDBMS. -->
+
+ <!-- HibernateStore: uses RDBMS + Hibernate for storage -->
+ <FileSystem class="org.jboss.portal.cms.hibernate.HibernateStore">
+ <param name="schemaObjectPrefix" value="CMSEntry"/>
+ <param name="JNDIName" value="java:/portal/cms/CMSSessionFactory"/>
+ </FileSystem>
+ <!-- LocalFileSystem: uses FileSystem for storage. -->
+ <!--<FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+ <param name="path" value="${wsp.home}"/>
+ </FileSystem>-->
+
+ <!--
+ persistence manager of the workspace.
+ Use XMLPersistenceManager for LocalFileSystem Store and JBossCachePersistenceManager .
+ -->
+
+ <!-- HibernatePersistentManager: uses RDBMS + Hibernate for storage -->
+ <PersistenceManager class="org.jboss.portal.cms.hibernate.state.JBossCachePersistenceManager">
+ <param name="schemaObjectPrefix" value="WSP"/>
+ <param name="JNDIName" value="java:/portal/cms/CMSSessionFactory"/>
+ <param name="externalBLOBs" value="false"/>
+ </PersistenceManager>
+
+ <!-- XMLPersistenceManager: uses FileSystem for storage -->
+ <!--<PersistenceManager class="org.apache.jackrabbit.core.state.xml.XMLPersistenceManager"/>-->
+
+ <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
+ <param name="path" value="${wsp.home}/index"/>
+ <param name="textFilterClasses" value="org.apache.jackrabbit.core.query.HTMLTextFilter" />
+ <param name="useCompoundFile" value="true"/>
+ <param name="minMergeDocs" value="100"/>
+ <param name="volatileIdleTime" value="3"/>
+ <param name="maxMergeDocs" value="100000"/>
+ <param name="mergeFactor" value="10"/>
+ <param name="bufferSize" value="10"/>
+ <param name="cacheSize" value="1000"/>
+ <param name="forceConsistencyCheck" value="false"/>
+ <param name="autoRepair" value="true"/>
+ </SearchIndex>
+ </Workspace>
+ <Versioning rootPath="${rep.home}/versions">
+ <!--
+ Configures the filesystem to use for versioning for the respective persistence manager
+ Configure to use FS or RDBMS.
+ -->
+
+ <!-- HibernateStore: uses RDBMS + Hibernate for storage -->
+ <FileSystem class="org.jboss.portal.cms.hibernate.HibernateStore">
+ <param name="schemaObjectPrefix" value="VersionEntry"/>
+ <param name="JNDIName" value="java:/portal/cms/CMSSessionFactory"/>
+ </FileSystem>
+
+ <!-- LocalFileSystem: uses FileSystem for storage. -->
+ <!--
+ <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+ <param name="path" value="${rep.home}/versions"/>
+ </FileSystem>
+ -->
+
+ <!--
+ Configures the persistence manager to be used for persisting version state.
+ Use XMLPersistenceManager for LocalFileSystem Store and JBossCachePersistenceManager for HibernateStore.
+ -->
+
+ <!-- HibernatePersistentManager: uses RDBMS + Hibernate for storage -->
+ <PersistenceManager class="org.jboss.portal.cms.hibernate.state.JBossCachePersistenceManager">
+ <param name="schemaObjectPrefix" value="Version"/>
+ <param name="JNDIName" value="java:/portal/cms/CMSSessionFactory"/>
+ <param name="externalBLOBs" value="false"/>
+ </PersistenceManager>
+
+ <!-- XMLPersistenceManager: uses FileSystem for storage -->
+ <!--<PersistenceManager class="org.apache.jackrabbit.core.state.xml.XMLPersistenceManager"/>-->
+ </Versioning>
+ </Repository>
+ </attribute>
+ <attribute name="JNDIName">java:portal/CMS</attribute>
+ </mbean>
+
+ <!--
+ | Uncomment in clustered mode : Provides an HA-singleton based clustering architecture.
+
+ <mbean
+ code="org.jboss.invocation.jrmp.server.JRMPProxyFactory"
+ name="portal:service=ProxyFactory,type=CMS">
+ <depends optional-attribute-name="InvokerName">jboss:service=invoker,type=jrmp</depends>
+ <attribute name="TargetName">portal:service=CMS</attribute>
+ <attribute name="ExportedInterfaces">org.jboss.portal.jems.ha.HASingletonInvokerMBean$Proxy</attribute>
+ <attribute name="InvokeTargetMethod">true</attribute>
+ <attribute name="ClientInterceptors">
+ <interceptors>
+ <interceptor>org.jboss.proxy.ClientMethodInterceptor</interceptor>
+ <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
+ </interceptors>
+ </attribute>
+ </mbean>
+
+ <mbean
+ code="org.jboss.portal.jems.ha.HASingletonInvoker"
+ name="portal:service=HASingletonInvoker,type=CMS">
+ <depends>jboss:service=${jboss.partition.name:DefaultPartition}</depends>
+ <attribute name="RetryWaitingTimeMS">2000</attribute>
+ <attribute name="MaxRetries">1</attribute>
+ <attribute name="JNDIName">MyServiceInvokeTarget</attribute>
+ <attribute name="JNDIProperties">
+ java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+ java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
+ java.naming.provider.url=${jboss.bind.address:localhost}:1100
+ jnp.disableDiscovery=false
+ jnp.partitionName=${jboss.partition.name:DefaultPartition}
+ jnp.discoveryGroup=${jboss.partition.udpGroup:230.0.0.4}
+ jnp.discoveryPort=1102
+ jnp.discoveryTTL=16
+ jnp.discoveryTimeout=5000
+ jnp.maxRetries=1
+ </attribute>
+ <depends optional-attribute-name="Callback" proxy-type="attribute">portal:service=CMS</depends>
+ <depends optional-attribute-name="ProxyFactory">portal:service=ProxyFactory,type=CMS</depends>
+ </mbean>
+
+ -->
+
+ <mbean
+ code="org.jboss.portal.core.cms.CMSObjectCommandFactoryService"
+ name="portal:commandFactory=CMSObject"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <attribute name="TargetWindowRef">default.default.CMSWindow</attribute>
+ <depends
+ optional-attribute-name="CMSService"
+ proxy-type="attribute">portal:service=CMS</depends>
+ <depends
+ optional-attribute-name="ServerConfig"
+ proxy-type="attribute">portal:service=ServerConfig</depends>
+ </mbean>
+ <mbean
+ code="org.jboss.portal.core.controller.command.mapper.CommandFactoryDelegate"
+ name="portal:commandFactory=Delegate,path=content"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <attribute name="Path">/content</attribute>
+ <depends
+ optional-attribute-name="DelegatingFactory"
+ proxy-type="attribute">portal:commandFactory=Delegating</depends>
+ <depends
+ optional-attribute-name="DelegateFactory"
+ proxy-type="attribute">portal:commandFactory=CMSObject</depends>
+ </mbean>
+
+ <mbean
+ code="org.jboss.portal.core.cms.CMSObjectURLFactory"
+ name="portal:urlFactory=CMSObject"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <attribute name="Path">/content</attribute>
+ <depends optional-attribute-name="Factory" proxy-type="attribute">portal:urlFactory=Delegating</depends>
+ </mbean>
+
+ <!-- TreeCache configuration used to cache CMS data -->
+ <mbean code="org.jboss.cache.TreeCache"
+ name="cms.pm.cache:service=TreeCache">
+
+ <depends>jboss:service=Naming</depends>
+ <depends>jboss:service=TransactionManager</depends>
+ <depends>portal:service=Hibernate,type=CMS</depends>
+ <depends>portal:service=CMS</depends>
+
+ <!--
+ Configure the TransactionManager
+ -->
+ <attribute name="TransactionManagerLookupClass">org.jboss.cache.GenericTransactionManagerLookup</attribute>
+
+ <!--
+ Node locking scheme:
+ OPTIMISTIC
+ PESSIMISTIC (default)
+ using the OPTIMISTIC scheme, the ISOLATION_LEVEL value is ignored
+ -->
+ <!--attribute name="NodeLockingScheme">OPTIMISTIC</attribute-->
+
+ <!--
+ Isolation level : SERIALIZABLE
+ REPEATABLE_READ (default)
+ READ_COMMITTED
+ READ_UNCOMMITTED
+ NONE
+ -->
+ <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
+
+
+ <!--
+ Valid modes are LOCAL
+ REPL_ASYNC
+ REPL_SYNC
+ INVALIDATION_ASYNC
+ INVALIDATION_SYNC
+ -->
+ <!-- in a non-HA environment with the Jackrabbit cluster is activated -->
+ <!--attribute name="CacheMode">INVALIDATION_ASYNC</attribute-->
+ <!-- in a HA environment since there is only a singleton node for CMS, this can be local -->
+ <attribute name="CacheMode">LOCAL</attribute>
+
+ <!--
+ Just used for async repl: use a replication queue
+ -->
+ <attribute name="UseReplQueue">false</attribute>
+
+ <!--
+ Replication interval for replication queue (in ms)
+ -->
+ <attribute name="ReplQueueInterval">0</attribute>
+
+ <!--
+ Max number of elements which trigger replication
+ -->
+ <attribute name="ReplQueueMaxElements">0</attribute>
+
+ <!-- Name of cluster. Needs to be the same for all clusters, in order
+ to find each other
+ -->
+ <attribute name="ClusterName">JCRPMCache</attribute>
+
+ <!-- JGroups protocol stack properties. Can also be a URL,
+ e.g. file:/home/bela/default.xml
+ <attribute name="ClusterProperties"></attribute>
+ -->
+
+ <attribute name="ClusterConfig">
+ <config>
+ <!-- UDP: if you have a multihomed machine,
+ set the bind_addr attribute to the appropriate NIC IP address -->
+ <!-- UDP: On Windows machines, because of the media sense feature
+ being broken with multicast (even after disabling media sense)
+ set the loopback attribute to true -->
+ <UDP mcast_addr="228.1.2.3" mcast_port="48866"
+ ip_ttl="64" ip_mcast="true"
+ receive_on_all_interfaces="true"
+ mcast_send_buf_size="150000" mcast_recv_buf_size="80000"
+ ucast_send_buf_size="150000" ucast_recv_buf_size="80000"
+ loopback="false"/>
+ <PING timeout="2000" num_initial_members="3"
+ up_thread="false" down_thread="false"/>
+ <MERGE2 min_interval="10000" max_interval="20000"/>
+ <!-- <FD shun="true" up_thread="true" down_thread="true" />-->
+ <FD_SOCK/>
+ <VERIFY_SUSPECT timeout="1500"
+ up_thread="false" down_thread="false"/>
+ <pbcast.NAKACK gc_lag="50" retransmit_timeout="600,1200,2400,4800"
+ max_xmit_size="8192" up_thread="false" down_thread="false"/>
+ <UNICAST timeout="600,1200,2400" window_size="100" min_threshold="10"
+ down_thread="false"/>
+ <pbcast.STABLE desired_avg_gossip="20000"
+ up_thread="false" down_thread="false"/>
+ <FRAG frag_size="8192"
+ down_thread="false" up_thread="false"/>
+ <pbcast.GMS join_timeout="5000" join_retry_timeout="2000"
+ shun="true" print_local_addr="true"/>
+ <pbcast.STATE_TRANSFER up_thread="true" down_thread="true"/>
+ </config>
+ </attribute>
+
+ <!--
+ Whether or not to fetch state on joining a cluster
+ NOTE this used to be called FetchStateOnStartup and has been renamed to be more descriptive.
+
+ Not supported in version 1.2.4SP2 which is what ships by default in 4.0.4GA
+ -->
+ <!--attribute name="FetchInMemoryState">false</attribute-->
+
+ <!--
+ The max amount of time (in milliseconds) we wait until the
+ initial state (ie. the contents of the cache) are retrieved from
+ existing members in a clustered environment
+ -->
+ <attribute name="InitialStateRetrievalTimeout">20000</attribute>
+
+ <!--
+ Number of milliseconds to wait until all responses for a
+ synchronous call have been received.
+ -->
+ <attribute name="SyncReplTimeout">20000</attribute>
+
+ <!-- Max number of milliseconds to wait for a lock acquisition -->
+ <attribute name="LockAcquisitionTimeout">15000</attribute>
+
+
+ <!-- Name of the eviction policy class. -->
+ <attribute name="EvictionPolicyClass"></attribute>
+
+ <!--
+ Indicate whether to use region based marshalling or not. Set this to true if you are running under a scoped
+ class loader, e.g., inside an application server. Default is "false".
+
+ Not supported in version 1.2.4SP2 which is what ships by default in 4.0.4GA
+ -->
+ <!--attribute name="UseRegionBasedMarshalling">false</attribute-->
+
+ <!--
+ Configuring the PortalCMSCacheLoader
+
+ CacheLoader configuratoon for 1.4.0
+ -->
+ <attribute name="CacheLoaderConfiguration">
+ <config>
+ <passivation>false</passivation>
+ <preload></preload>
+ <shared>false</shared>
+ <cacheloader>
+ <class>org.jboss.portal.cms.hibernate.state.PortalCMSCacheLoader</class>
+ <properties></properties>
+ <async>false</async>
+ <fetchPersistentState>false</fetchPersistentState>
+ <ignoreModifications>false</ignoreModifications>
+ </cacheloader>
+ </config>
+ </attribute>
+ <!--
+ Configuring the PortalCMSCacheLoader
+
+ CacheLoader configuratoon for 1.2.4SP2
+ -->
+ <!--attribute name="CacheLoaderClass">org.jboss.portal.cms.hibernate.state.PortalCMSCacheLoader</attribute>
+ <attribute name="CacheLoaderConfig" replace="false"></attribute>
+ <attribute name="CacheLoaderPassivation">false</attribute>
+ <attribute name="CacheLoaderPreload"></attribute>
+ <attribute name="CacheLoaderShared">false</attribute>
+ <attribute name="CacheLoaderFetchTransientState">false</attribute>
+ <attribute name="CacheLoaderFetchPersistentState">false</attribute>
+ <attribute name="CacheLoaderAsynchronous">false</attribute-->
+ </mbean>
+
+ <!-- interceptor factory where all cms interceptors are registered -->
+ <mbean
+ code="org.jboss.portal.server.impl.invocation.JBossInterceptorStackFactory"
+ name="portal:service=InterceptorStackFactory,type=Cms"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends-list optional-attribute-name="InterceptorNames">
+ <depends-list-element>portal:service=Interceptor,type=Cms,name=ACL</depends-list-element>
+ <depends-list-element>portal:service=Interceptor,type=Cms,name=ApprovalWorkflow</depends-list-element>
+ </depends-list>
+ </mbean>
+
+ <!-- CMS Authorization Security Service -->
+ <mbean
+ code="org.jboss.portal.cms.security.AuthorizationManagerImpl"
+ name="portal:service=AuthorizationManager,type=cms"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <attribute name="JNDIName">java:portal/cms/AuthorizationManager</attribute>
+ <depends optional-attribute-name="Provider" proxy-type="attribute">
+ portal:service=AuthorizationProvider,type=cms
+ </depends>
+ </mbean>
+ <mbean
+ code="org.jboss.portal.cms.security.AuthorizationProviderImpl"
+ name="portal:service=AuthorizationProvider,type=cms"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends optional-attribute-name="IdentityServiceController" proxy-type="attribute">portal:service=Module,type=IdentityServiceController</depends>
+ </mbean>
+
+ <!-- ACL Security Interceptor -->
+ <mbean
+ code="org.jboss.portal.cms.impl.interceptors.ACLInterceptor"
+ name="portal:service=Interceptor,type=Cms,name=ACL"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <attribute name="JNDIName">java:/portal/cms/ACLInterceptor</attribute>
+ <attribute name="CmsSessionFactory">java:/portal/cms/CMSSessionFactory</attribute>
+ <attribute name="IdentitySessionFactory">java:/portal/IdentitySessionFactory</attribute>
+ <attribute name="DefaultPolicy">
+ <![CDATA[
+ <policy>
+ <!-- permissions on the root cms node -->
+ <criteria name="path" value="/">
+ <permission name="cms" action="read">
+ <role name="Anonymous"/>
+ </permission>
+ <permission name="cms" action="write">
+ <role name="User"/>
+ </permission>
+ <permission name="cms" action="manage">
+ <role name="Admin"/>
+ </permission>
+ </criteria>
+ <!-- permissions on the default cms node -->
+ <criteria name="path" value="/default">
+ <permission name="cms" action="read">
+ <role name="Anonymous"/>
+ </permission>
+ <permission name="cms" action="write">
+ <role name="User"/>
+ </permission>
+ <permission name="cms" action="manage">
+ <role name="Admin"/>
+ </permission>
+ </criteria>
+ <!-- permissions on the private/protected node -->
+ <criteria name="path" value="/default/private">
+ <permission name="cms" action="manage">
+ <role name="Admin"/>
+ </permission>
+ </criteria>
+ </policy>
+ ]]>
+ </attribute>
+ <depends optional-attribute-name="AuthorizationManager" proxy-type="attribute">
+ portal:service=AuthorizationManager,type=cms
+ </depends>
+ <depends>portal:service=Hibernate,type=CMS</depends>
+ <depends>portal:service=Module,type=IdentityServiceController</depends>
+ </mbean>
+
+ <!-- Approval Workflow Interceptor -->
+ <mbean
+ code="org.jboss.portal.cms.impl.interceptors.ApprovalWorkflowInterceptor"
+ name="portal:service=Interceptor,type=Cms,name=ApprovalWorkflow"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <attribute name="JNDIName">java:/portal/cms/ApprovalWorkflowInterceptor</attribute>
+ <depends>portal:service=Hibernate,type=CMS</depends>
+ </mbean>
+
+ <mbean
+ code="org.jboss.portal.core.cms.aspect.IdentityBindingInterceptor"
+ name="portal:service=Interceptor,type=Server,name=CMSIdentityBinding"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ </mbean>
+
+ <mbean
+ code="org.jboss.portal.server.impl.invocation.JBossInterceptorRegistration"
+ name="portal:service=InterceptorRegistration,type=Server,name=CMSIdentityBinding"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends
+ optional-attribute-name="InterceptorName">portal:service=Interceptor,type=Server,name=CMSIdentityBinding</depends>
+ <depends
+ optional-attribute-name="StackFactory">portal:service=InterceptorStackFactory,type=Server</depends>
+ </mbean>
+
+ <!-- Content renderer integration -->
+ <mbean
+ code="org.jboss.portal.core.cms.content.InternalCMSContentProvider"
+ name="portal:service=ContentRenderer,type=cms"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <attribute name="ContentType">cms</attribute>
+ <attribute name="DecorateContent">false</attribute>
+ <attribute name="PortletInstanceName">CMSPortletInstance</attribute>
+ <depends
+ optional-attribute-name="Registry"
+ proxy-type="attribute">portal:service=ContentProviderRegistry</depends>
+ <depends
+ optional-attribute-name="CommandFactory"
+ proxy-type="attribute">portal:commandFactory=CMSObject</depends>
+ </mbean>
+</server>
Added: branches/JBoss_Portal_Branch_2_6/demo/portlets/flickrportlet/flickrportlet.war
===================================================================
(Binary files differ)
Property changes on: branches/JBoss_Portal_Branch_2_6/demo/portlets/flickrportlet/flickrportlet.war
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/JBoss_Portal_Branch_2_6/demo/portlets/jbossforums/jboss-forums.ear
===================================================================
(Binary files differ)
Property changes on: branches/JBoss_Portal_Branch_2_6/demo/portlets/jbossforums/jboss-forums.ear
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 12 months
JBoss Portal SVN: r7679 - branches/JBoss_Portal_Branch_2_6/demo/conf and 3 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-07-06 08:39:42 -0400 (Fri, 06 Jul 2007)
New Revision: 7679
Added:
branches/JBoss_Portal_Branch_2_6/demo/build.properties
branches/JBoss_Portal_Branch_2_6/demo/conf/
branches/JBoss_Portal_Branch_2_6/demo/conf/default-object.xml
branches/JBoss_Portal_Branch_2_6/demo/conf/jboss-web.xml
branches/JBoss_Portal_Branch_2_6/demo/portlets/
trunk/demo/.project
trunk/demo/bin/
trunk/demo/bin/jbossws-1.2.1.GA.zip
trunk/demo/build.properties
trunk/demo/conf/jbossws/
Removed:
branches/JBoss_Portal_Branch_2_6/demo/build.bat
branches/JBoss_Portal_Branch_2_6/demo/build.sh
branches/JBoss_Portal_Branch_2_6/demo/src/
Modified:
branches/JBoss_Portal_Branch_2_6/demo/build.xml
trunk/demo/build.xml
Log:
* Make the script update WS
* Sync between Branch_2_6 and trunk
Deleted: branches/JBoss_Portal_Branch_2_6/demo/build.bat
===================================================================
--- branches/JBoss_Portal_Branch_2_6/demo/build.bat 2007-07-06 10:20:08 UTC (rev 7678)
+++ branches/JBoss_Portal_Branch_2_6/demo/build.bat 2007-07-06 12:39:42 UTC (rev 7679)
@@ -1,54 +0,0 @@
-@echo off
-rem
-rem Invokes a script of the same name in the 'tools' module.
-rem
-rem The 'tools' module is expected to be a peer directory of the directory
-rem in which this script lives.
-rem
-rem @author Jason Dillon <jason(a)planet57.com>
-rem
-
-rem $Id: build.bat 2 2005-01-14 23:01:32Z vietj $
-
-setlocal
-
-set PROGNAME=%~nx0
-set DIRNAME=%~dp0
-
-rem Legacy shell support
-if x%PROGNAME%==x set PROGNAME=build.bat
-if x%DIRNAME%==x set DIRNAME=.\
-
-set MODULE_ROOT=%DIRNAME%
-if x%TOOLS_ROOT%==x set TOOLS_ROOT=%DIRNAME%..\tools
-set TARGET=%TOOLS_ROOT%\bin\build.bat
-set ARGS=%*
-
-rem Start'er up yo
-goto main
-
-:debug
-if not x%DEBUG%==x echo %PROGNAME%: %*
-goto :EOF
-
-:main
-call :debug PROGNAME=%PROGNAME%
-call :debug DIRNAME=%DIRNAME%
-call :debug TOOLS_ROOT=%TOOLS_ROOT%
-call :debug TARGET=%TARGET%
-
-if exist %TARGET% call :call-script & goto :EOF
-rem else fail, we can not go on
-
-echo %PROGNAME%: *ERROR* The target executable does not exist:
-echo %PROGNAME%:
-echo %PROGNAME%: %TARGET%
-echo %PROGNAME%:
-echo %PROGNAME%: Please make sure you have checked out the 'tools' module
-echo %PROGNAME%: and make sure it is up to date.
-goto :EOF
-
-:call-script
-call :debug Executing %TARGET% %ARGS%
-call %TARGET% %ARGS%
-goto :EOF
Added: branches/JBoss_Portal_Branch_2_6/demo/build.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_6/demo/build.properties (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/demo/build.properties 2007-07-06 12:39:42 UTC (rev 7679)
@@ -0,0 +1,10 @@
+# Location of the JBoss Portal + 4.0.5 AS bundle
+portal.bundle.url=/home/theute/Portal/Demo/jboss-portal-2.6/build/output/jboss-portal-2.6-bundled.zip
+# Name used as top directory in the bundle
+portal.name.dir=jboss-portal-2.6
+# Where to create the demo website and associated tgz file
+destination.dir=/home/theute/Portal/demoWebsite
+# Which WS to use. (keep this to use the one embedded here)
+jbossws.location=./bin/jbossws-1.2.1.GA.zip
+# Where to put temporary files during the construction of the portal demo
+tmp.dir=/tmp
Deleted: branches/JBoss_Portal_Branch_2_6/demo/build.sh
===================================================================
--- branches/JBoss_Portal_Branch_2_6/demo/build.sh 2007-07-06 10:20:08 UTC (rev 7678)
+++ branches/JBoss_Portal_Branch_2_6/demo/build.sh 2007-07-06 12:39:42 UTC (rev 7679)
@@ -1,49 +0,0 @@
-#!/bin/sh
-##
-## Invokes a script of the same name in the 'tools' module.
-##
-## The 'tools' module is expected to be a peer directory of the directory
-## in which this script lives.
-##
-## @author Jason Dillon <jason(a)planet57.com>
-##
-
-# $Id: build.sh 2 2005-01-14 23:01:32Z vietj $
-
-PROGNAME=`basename $0`
-DIRNAME=`dirname $0`
-
-# Buss it yo
-main() {
- if [ "x$TOOLS_ROOT" = "x" ]; then
- TOOLS_ROOT=`cd $DIRNAME/../tools && pwd`
- fi
-
- MODULE_ROOT=`cd $DIRNAME; pwd`
- export TOOLS_ROOT MODULE_ROOT DEBUG TRACE
-
- # Where is the target script?
- target="$TOOLS_ROOT/bin/$PROGNAME"
- if [ ! -f "$target" ]; then
- echo "${PROGNAME}: *ERROR* The target executable does not exist:"
- echo "${PROGNAME}:"
- echo "${PROGNAME}: $target"
- echo "${PROGNAME}:"
- echo "${PROGNAME}: Please make sure you have checked out the 'tools' module"
- echo "${PROGNAME}: and make sure it is up to date."
- exit 2
- fi
-
- # Get busy yo!
- if [ "x$DEBUG" != "x" ]; then
- echo "${PROGNAME}: Executing: /bin/sh $target $@"
- fi
- if [ "x$TRACE" = "x" ]; then
- exec /bin/sh $target "$@"
- else
- exec /bin/sh -x $target "$@"
- fi
-}
-
-# Lets get ready to rumble!
-main "$@"
Modified: branches/JBoss_Portal_Branch_2_6/demo/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/demo/build.xml 2007-07-06 10:20:08 UTC (rev 7678)
+++ branches/JBoss_Portal_Branch_2_6/demo/build.xml 2007-07-06 12:39:42 UTC (rev 7679)
@@ -1,162 +1,83 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE project [
- <!ENTITY buildmagic SYSTEM "../tools/etc/buildfragments/buildmagic.ent">
- <!ENTITY tools SYSTEM "../tools/etc/buildfragments/tools.ent">
- <!ENTITY libraries SYSTEM "../thirdparty/libraries.ent">
- <!ENTITY modules SYSTEM "../tools/etc/buildfragments/modules.ent">
- <!ENTITY defaults SYSTEM "../tools/etc/buildfragments/defaults.ent">
- <!ENTITY targets SYSTEM "../tools/etc/buildfragments/targets.ent">
- ]>
-
-<!-- $Id: build.xml 7200 2007-05-06 16:33:54Z julien(a)jboss.com $ -->
-
-<!--+======================================================================+-->
-<!--| JBoss Portal (The OpenSource Portal) Build File |-->
-<!--| |-->
-<!--| Distributable under LGPL license. |-->
-<!--| See terms of license at http://www.gnu.org. |-->
-<!--| |-->
-<!--| This file has been designed to work with the 'tools' module and |-->
-<!--| Buildmagic extentions. |-->
-<!--+======================================================================+-->
-
<project default="main" name="JBoss Portal">
- <!--+====================================================================+-->
- <!--| Setup |-->
- <!--| |-->
- <!--| Include the common build elements. |-->
- <!--| |-->
- <!--| This defines several different targets, properties and paths. |-->
- <!--| It also sets up the basic extention tasks amoung other things. |-->
- <!--+====================================================================+-->
+ <property file="build.properties"/>
+
+ <target name="init">
+ <mkdir dir="${destination.dir}"/>
+ </target>
+
+ <target name="unzip-bundle" depends="init">
+ <unzip src="${portal.bundle.url}" dest="${destination.dir}"/>
+ </target>
+
+ <target name="delete-jmxconsole">
+ <delete dir="${destination.dir}/${portal.name.dir}/server/default/deploy/jmx-console.war"/>
+ </target>
- &buildmagic;
- &modules;
- &defaults;
- &tools;
- &targets;
+ <target name="delete-docs">
+ <delete dir="${destination.dir}/${portal.name.dir}/docs"/>
+ </target>
- <!-- ================================================================== -->
- <!-- Initialization -->
- <!-- ================================================================== -->
+ <target name="delete-objectsdescriptors">
+ <delete>
+ <fileset dir="${destination.dir}/${portal.name.dir}/server/default/deploy/jboss-portal.sar" includes="**/*-object.xml"/>
+ </delete>
+ </target>
- <!--
- | Initialize the build system. Must depend on '_buildmagic:init'.
- | Other targets should depend on 'init' or things will mysteriously fail.
- -->
+ <target name="install-objectsdescriptor">
+ <copy file="conf/default-object.xml" todir="${destination.dir}/${portal.name.dir}/server/default/deploy/jboss-portal.sar/conf/data"/>
+ </target>
+
+ <target name="clean">
+ <delete dir="${destination.dir}/${portal.name.dir}"/>
+ <delete dir="${tmp.dir}/flickrportlet"/>
+ <delete dir="${tmp.dir}/jbossws"/>
+ <delete file="${destination.dir}/${portal.name.dir}.tgz"/>
+ </target>
+
+ <target name="update-context">
+ <delete dir="${destination.dir}/${portal.name.dir}/server/default/deploy/jbossweb-tomcat55.sar/ROOT.war"/>
+ <copy overwrite="true" file="conf/jboss-web.xml" todir="${destination.dir}/${portal.name.dir}/server/default/deploy/jboss-portal.sar/portal-server.war/WEB-INF"/>
+ </target>
+
+ <target name="install-flickrportlet">
+ <unwar src="portlets/flickrportlet/flickrportlet.war" dest="${tmp.dir}/flickrportlet"/>
+ <delete file="${tmp.dir}/flickrportlet/WEB-INF/sun-web.xml"/>
+ <delete file="${tmp.dir}/flickrportlet/WEB-INF/lib/log4j-1.2.13.jar"/>
+ <copy todir="${tmp.dir}/flickrportlet">
+ <fileset dir="portlets/flickrportlet/resources"/>
+ </copy>
+ <copy todir="${destination.dir}/jboss-portal-2.6/server/default/deploy/jboss-portal.sar/flickrportlet.war">
+ <fileset dir="${tmp.dir}/flickrportlet"/>
+ </copy>
+ </target>
- <target name="init" unless="init.disable" depends="_buildmagic:init">
- </target>
+ <target name="install-jbossforums">
+ <copy todir="${destination.dir}/jboss-portal-2.6/server/default/deploy">
+ <fileset dir="portlets/jbossforums"/>
+ </copy>
+ </target>
+
+ <!-- Fix WS issues on JBoss 4.0.x -->
+ <target name="update-ws">
+ <unzip src="${jbossws.location}" dest="${tmp.dir}/jbossws"/>
+ <ant inheritAll="false" dir="${tmp.dir}/jbossws" antfile="build.xml" target="deploy-jboss40-jdk14">
+ <property name="jboss40.home" value="${destination.dir}/${portal.name.dir}"/>
+ <property name="jboss.server.instance" value="default"/>
+ </ant>
+ </target>
- <!--+====================================================================+-->
- <!--| Configuration |-->
- <!--| |-->
- <!--| This target is invoked by the Buildmagic initialization logic |-->
- <!--| and should contain module specific configuration elements. |-->
- <!--+====================================================================+-->
-
- <target name="configure" unless="configure.disable">
-
- <!-- Configure some properties -->
- <property name="jboss-junit-configuration" value=""/>
- <property name="junit.formatter.usefile" value="true"/>
-
- <!-- Configure thirdparty libraries -->
- &libraries;
-
- <path id="library.classpath">
- </path>
-
- <!-- Configure modules -->
- <call target="configure-modules"/>
- <path id="dependentmodule.classpath">
- </path>
-
- <!--+=======================================+-->
- <!--| Override any default properties here. |-->
- <!--+=======================================+-->
-
- <!-- Configure defaults & build tools -->
- <call target="configure-defaults"/>
- <call target="configure-tools"/>
-
- <!--+=======================================+-->
- <!--| Define module specific elements here. |-->
- <!--+=======================================+-->
- <property name="javadoc.private" value="true"/>
- <property name="javadoc.protected" value="false"/>
-
- </target>
-
-
- <!--+====================================================================+-->
- <!--| Compile |-->
- <!--| |-->
- <!--| This target should depend on other compile-* targets for each |-->
- <!--| different type of compile that needs to be performed, short of |-->
- <!--| documentation compiles. |-->
- <!--+====================================================================+-->
-
- <target name="compile"
- description="Compile all source files."
- depends="generate-parsers,
- _default:compile-classes,
- _default:compile-etc,
- _default:compile-resources">
- <!-- Add module specific elements here. -->
- </target>
-
- <target name="generate-parsers" depends="init">
- </target>
-
- <!--+====================================================================+-->
- <!--| Generate Output |-->
- <!--| |-->
- <!--| Generates the target output for this module. Target output is |-->
- <!--| the output which is ment to be released or used by external |-->
- <!--| modules. |-->
- <!--+====================================================================+-->
-
- <target name="output"
- description="Generate all target output."
- depends="compile">
- </target>
-
- <!-- generates artifacts used for tests, requires output to be previously run -->
- <target name="package-tests" depends="init">
- </target>
-
-
- <!-- ================================================================== -->
- <!-- Cleaning -->
- <!-- ================================================================== -->
-
- <!-- Clean up all build output -->
- <target name="clean" depends="_default:clean">
- <!-- Add module specific elements here. -->
- </target>
-
- <!--+====================================================================+-->
- <!--| Documents |-->
- <!--| |-->
- <!--| Generate all documentation for this module. |-->
- <!--+====================================================================+-->
-
- <target name="docs" depends="_default:docs">
- <!-- Add module specific elements here. -->
- </target>
-
- <!-- ================================================================== -->
- <!-- Misc. -->
- <!-- ================================================================== -->
-
- <target name="main" depends="most"/>
- <target name="all" depends="_default:all"/>
- <target name="most" depends="_default:most"/>
- <target name="help" depends="_default:help"/>
-
- <target name="tests" depends="init">
- </target>
-
-</project>
+ <target name="activate-workflow">
+ <copy todir="${destination.dir}/jboss-portal-2.6/server/default/deploy/jboss-portal.sar/portal-cms.sar/META-INF">
+ <fileset file="conf/core-cms/jboss-service.xml"/>
+ </copy>
+ </target>
+
+ <target name="main" depends="unzip-bundle, delete-docs, delete-jmxconsole, delete-objectsdescriptors, update-context, update-ws, install-objectsdescriptor, install-jbossforums, activate-workflow, install-flickrportlet">
+ <tar destfile="${destination.dir}/${portal.name.dir}.tar" basedir="${destination.dir}/${portal.name.dir}" longfile="gnu"/>
+ <gzip zipfile="${destination.dir}/${portal.name.dir}.tgz" src="${destination.dir}/${portal.name.dir}.tar"/>
+ <delete file="${destination.dir}/${portal.name.dir}.tar"/>
+ </target>
+
+</project>
\ No newline at end of file
Added: branches/JBoss_Portal_Branch_2_6/demo/conf/default-object.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/demo/conf/default-object.xml (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/demo/conf/default-object.xml 2007-07-06 12:39:42 UTC (rev 7679)
@@ -0,0 +1,397 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE deployments PUBLIC
+ "-//JBoss Portal//DTD Portal Object 2.6//EN"
+ "http://www.jboss.org/portal/dtd/portal-object_2_6.dtd">
+
+<deployments>
+ <deployment>
+ <context>
+ <context-name/>
+ <properties>
+ <!--
+ | Set the layout for the default portal, see also portal-layouts.xml.
+ -->
+ <property>
+ <name>layout.id</name>
+ <value>generic</value>
+ </property>
+ <!--
+ | Set the theme for the default portal, see also portal-themes.xml.
+ -->
+ <property>
+ <name>theme.id</name>
+ <value>renaissance</value>
+ </property>
+ <!--
+ | Set the default render set name (used by the render tag in layouts), see also portal-renderSet.xml
+ -->
+ <property>
+ <name>theme.renderSetId</name>
+ <value>divRenderer</value>
+ </property>
+ <!--
+ | The default page name, if the property is not explicited then the default page name is "default"
+ -->
+ <property>
+ <name>portal.defaultObjectName</name>
+ <value>default</value>
+ </property>
+
+ <!-- Control policy config -->
+ <property>
+ <name>control.portal.access_denied</name>
+ <value>ignore</value>
+ </property>
+ <property>
+ <name>control.portal.unavailable</name>
+ <value>ignore</value>
+ </property>
+ <property>
+ <name>control.portal.not_found</name>
+ <value>ignore</value>
+ </property>
+ <property>
+ <name>control.portal.internal_error</name>
+ <value>jsp</value>
+ </property>
+ <property>
+ <name>control.portal.error</name>
+ <value>jsp</value>
+ </property>
+ <property>
+ <name>control.portal.resource_uri</name>
+ <value>/WEB-INF/jsp/error/portal.jsp</value>
+ </property>
+ <property>
+ <name>control.page.access_denied</name>
+ <value>hide</value>
+ </property>
+ <property>
+ <name>control.page.unavailable</name>
+ <value>hide</value>
+ </property>
+ <property>
+ <name>control.page.not_found</name>
+ <value>hide</value>
+ </property>
+ <property>
+ <name>control.page.internal_error</name>
+ <value>jsp</value>
+ </property>
+ <property>
+ <name>control.page.error</name>
+ <value>jsp</value>
+ </property>
+ <property>
+ <name>control.page.resource_uri</name>
+ <value>/WEB-INF/jsp/error/page.jsp</value>
+ </property>
+ </properties>
+ </context>
+ </deployment>
+ <deployment>
+ <parent-ref/>
+ <if-exists>keep</if-exists>
+ <portal>
+ <portal-name>default</portal-name>
+ <supported-modes>
+ <mode>view</mode>
+ <mode>edit</mode>
+ <mode>help</mode>
+ </supported-modes>
+ <supported-window-states>
+ <window-state>normal</window-state>
+ <window-state>minimized</window-state>
+ <window-state>maximized</window-state>
+ </supported-window-states>
+ <security-constraint>
+ <policy-permission>
+ <action-name>viewrecursive</action-name>
+ <action-name>personalizerecursive</action-name>
+ <unchecked/>
+ </policy-permission>
+ </security-constraint>
+ <page>
+ <page-name>default</page-name>
+ <properties>
+ <property>
+ <name>order</name>
+ <value>1</value>
+ </property>
+ </properties>
+ <window>
+ <window-name>JSPPortletWindow</window-name>
+ <instance-ref>JSPPortletInstance</instance-ref>
+ <region>left</region>
+ <height>0</height>
+ </window>
+ <window>
+ <window-name>CMSWindow</window-name>
+ <content>
+ <content-type>cms</content-type>
+ <content-uri>/default/index.html</content-uri>
+ </content>
+ <region>center</region>
+ <height>0</height>
+ </window>
+ <window>
+ <window-name>UserPortletWindow</window-name>
+ <instance-ref>UserPortletInstance</instance-ref>
+ <region>left</region>
+ <height>1</height>
+ </window>
+ </page>
+ <page>
+ <page-name>Samples</page-name>
+ <properties>
+ <property>
+ <name>order</name>
+ <value>2</value>
+ </property>
+ </properties>
+ <window>
+ <window-name>FlickrPortletWindow</window-name>
+ <instance-ref>FlickrPortletInstance</instance-ref>
+ <region>center</region>
+ <height>0</height>
+ </window>
+ <window>
+ <window-name>NewsPortletWindow</window-name>
+ <instance-ref>NewsPortletInstance</instance-ref>
+ <region>center</region>
+ <height>1</height>
+ </window>
+ <window>
+ <window-name>WeatherPortletWindow</window-name>
+ <instance-ref>WeatherPortletInstance</instance-ref>
+ <region>left</region>
+ <height>0</height>
+ </window>
+ </page>
+ </portal>
+ </deployment>
+ <deployment>
+ <if-exists>keep</if-exists>
+ <context>
+ <context-name>dashboard</context-name>
+ <properties>
+
+ <!--
+ | Set the layout for the default portal, see also portal-layouts.xml.
+ -->
+ <property>
+ <name>layout.id</name>
+ <value>generic</value>
+ </property>
+
+ <!--
+ | Set the theme for the default portal, see also portal-themes.xml.
+ -->
+ <property>
+ <name>theme.id</name>
+ <value>renaissance</value>
+ </property>
+
+ <!--
+ | Set the default render set name (used by the render tag in layouts), see also portal-renderSet.xml
+ -->
+ <property>
+ <name>theme.renderSetId</name>
+ <value>divRenderer</value>
+ </property>
+
+ <!--
+ | Set the dnd property
+ -->
+ <property>
+ <name>theme.dyna.dnd_enabled</name>
+ <value>true</value>
+ </property>
+
+ <!--
+ | Set the partial refresh property
+ -->
+ <property>
+ <name>theme.dyna.partial_refresh_enabled</name>
+ <value>false</value>
+ </property>
+
+ <!-- Control policy config -->
+ <property>
+ <name>control.portal.access_denied</name>
+ <value>ignore</value>
+ </property>
+ <property>
+ <name>control.portal.unavailable</name>
+ <value>ignore</value>
+ </property>
+ <property>
+ <name>control.portal.not_found</name>
+ <value>ignore</value>
+ </property>
+ <property>
+ <name>control.portal.internal_error</name>
+ <value>jsp</value>
+ </property>
+ <property>
+ <name>control.portal.error</name>
+ <value>jsp</value>
+ </property>
+ <property>
+ <name>control.portal.resource_uri</name>
+ <value>/WEB-INF/jsp/error/portal.jsp</value>
+ </property>
+ <property>
+ <name>control.page.access_denied</name>
+ <value>hide</value>
+ </property>
+ <property>
+ <name>control.page.unavailable</name>
+ <value>hide</value>
+ </property>
+ <property>
+ <name>control.page.not_found</name>
+ <value>hide</value>
+ </property>
+ <property>
+ <name>control.page.internal_error</name>
+ <value>jsp</value>
+ </property>
+ <property>
+ <name>control.page.error</name>
+ <value>jsp</value>
+ </property>
+ <property>
+ <name>control.page.resource_uri</name>
+ <value>/WEB-INF/jsp/error/page.jsp</value>
+ </property>
+ </properties>
+ </context>
+ </deployment>
+ <deployment>
+ <parent-ref/>
+ <if-exists>keep</if-exists>
+ <portal>
+ <portal-name>template</portal-name>
+ <supported-modes>
+ <mode>view</mode>
+ <mode>edit</mode>
+ <mode>help</mode>
+ </supported-modes>
+ <supported-window-states>
+ <window-state>normal</window-state>
+ <window-state>minimized</window-state>
+ <window-state>maximized</window-state>
+ </supported-window-states>
+ <page>
+ <page-name>default</page-name>
+ <properties>
+ <property>
+ <name>order</name>
+ <value>1</value>
+ </property>
+ </properties>
+ <window>
+ <window-name>JSPPortletWindow</window-name>
+ <instance-ref>JSPPortletInstance</instance-ref>
+ <region>left</region>
+ <height>0</height>
+ </window>
+ <window>
+ <window-name>CMSWindow</window-name>
+ <content>
+ <content-type>cms</content-type>
+ <content-uri>/default/index.html</content-uri>
+ </content>
+ <region>center</region>
+ <height>0</height>
+ </window>
+ <window>
+ <window-name>UserPortletWindow</window-name>
+ <instance-ref>UserPortletInstance</instance-ref>
+ <region>left</region>
+ <height>1</height>
+ </window>
+ </page>
+ </portal>
+ </deployment>
+ <deployment>
+ <parent-ref/>
+ <if-exists>keep</if-exists>
+ <portal>
+ <portal-name>admin</portal-name>
+ <supported-modes>
+ <mode>view</mode>
+ <mode>edit</mode>
+ <mode>help</mode>
+ </supported-modes>
+ <supported-window-states>
+ <window-state>normal</window-state>
+ <window-state>minimized</window-state>
+ <window-state>maximized</window-state>
+ </supported-window-states>
+ <security-constraint>
+ <policy-permission>
+ <action-name>viewrecursive</action-name>
+ <role-name>Admin</role-name>
+ </policy-permission>
+ </security-constraint>
+ <page>
+ <page-name>default</page-name>
+ <window>
+ <window-name>AdminPortletWindow</window-name>
+ <instance-ref>AdminPortletInstance</instance-ref>
+ <region>center</region>
+ <height>0</height>
+ </window>
+ </page>
+ <page>
+ <page-name>Members</page-name>
+ <window>
+ <window-name>UserPortletWindow</window-name>
+ <instance-ref>UserPortletInstance</instance-ref>
+ <region>center</region>
+ <height>0</height>
+ </window>
+ <window>
+ <window-name>RolePortletWindow</window-name>
+ <instance-ref>RolePortletInstance</instance-ref>
+ <region>left</region>
+ <height>0</height>
+ </window>
+ </page>
+ <page>
+ <page-name>CMS</page-name>
+ <window>
+ <window-name>CMSAdminPortletWindow</window-name>
+ <instance-ref>CMSAdminPortletInstance</instance-ref>
+ <region>center</region>
+ <height>0</height>
+ </window>
+ </page>
+ </portal>
+ </deployment>
+</deployments>
Property changes on: branches/JBoss_Portal_Branch_2_6/demo/conf/default-object.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/JBoss_Portal_Branch_2_6/demo/conf/jboss-web.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/demo/conf/jboss-web.xml (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/demo/conf/jboss-web.xml 2007-07-06 12:39:42 UTC (rev 7679)
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<jboss-web>
+ <security-domain>java:jaas/portal</security-domain>
+ <context-root>/</context-root>
+ <replication-config>
+ <replication-trigger>SET</replication-trigger>
+ </replication-config>
+ <resource-ref>
+ <res-ref-name>jdbc/PortalDS</res-ref-name>
+ <jndi-name>java:PortalDS</jndi-name>
+ </resource-ref>
+</jboss-web>
Added: trunk/demo/.project
===================================================================
--- trunk/demo/.project (rev 0)
+++ trunk/demo/.project 2007-07-06 12:39:42 UTC (rev 7679)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>demo</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ </buildSpec>
+ <natures>
+ </natures>
+</projectDescription>
Added: trunk/demo/bin/jbossws-1.2.1.GA.zip
===================================================================
(Binary files differ)
Property changes on: trunk/demo/bin/jbossws-1.2.1.GA.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/demo/build.properties
===================================================================
--- trunk/demo/build.properties (rev 0)
+++ trunk/demo/build.properties 2007-07-06 12:39:42 UTC (rev 7679)
@@ -0,0 +1,10 @@
+# Location of the JBoss Portal + 4.0.5 AS bundle
+portal.bundle.url=/home/theute/Portal/Demo/jboss-portal-2.6/build/output/jboss-portal-2.6-bundled.zip
+# Name used as top directory in the bundle
+portal.name.dir=jboss-portal-2.6
+# Where to create the demo website and associated tgz file
+destination.dir=/home/theute/Portal/demoWebsite
+# Which WS to use. (keep this to use the one embedded here)
+jbossws.location=./bin/jbossws-1.2.1.GA.zip
+# Where to put temporary files during the construction of the portal demo
+tmp.dir=/tmp
Modified: trunk/demo/build.xml
===================================================================
--- trunk/demo/build.xml 2007-07-06 10:20:08 UTC (rev 7678)
+++ trunk/demo/build.xml 2007-07-06 12:39:42 UTC (rev 7679)
@@ -1,13 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project default="main" name="JBoss Portal">
-
- <property name="portal.bundle.url" value="/home/theute/Downloads/jboss-portal-2.6-bundled.zip"/>
-
- <property name="portal.name.dir" value="jboss-portal-2.6"/>
- <property name="destination.dir" value="/home/theute/Portal/demoWebsite"/>
- <property name="tmp.dir" value="/tmp"/>
-
+ <property file="build.properties"/>
+
<target name="init">
<mkdir dir="${destination.dir}"/>
</target>
@@ -37,12 +32,13 @@
<target name="clean">
<delete dir="${destination.dir}/${portal.name.dir}"/>
<delete dir="${tmp.dir}/flickrportlet"/>
+ <delete dir="${tmp.dir}/jbossws"/>
<delete file="${destination.dir}/${portal.name.dir}.tgz"/>
</target>
- <target name="change-context">
+ <target name="update-context">
<delete dir="${destination.dir}/${portal.name.dir}/server/default/deploy/jbossweb-tomcat55.sar/ROOT.war"/>
- <copy file="conf/jboss-web.xml" todir="${destination.dir}/${portal.name.dir}/server/default/deploy/jboss-portal.sar/portal-server.war/WEB-INF"/>
+ <copy overwrite="true" file="conf/jboss-web.xml" todir="${destination.dir}/${portal.name.dir}/server/default/deploy/jboss-portal.sar/portal-server.war/WEB-INF"/>
</target>
<target name="install-flickrportlet">
@@ -62,6 +58,15 @@
<fileset dir="portlets/jbossforums"/>
</copy>
</target>
+
+ <!-- Fix WS issues on JBoss 4.0.x -->
+ <target name="update-ws">
+ <unzip src="${jbossws.location}" dest="${tmp.dir}/jbossws"/>
+ <ant inheritAll="false" dir="${tmp.dir}/jbossws" antfile="build.xml" target="deploy-jboss40-jdk14">
+ <property name="jboss40.home" value="${destination.dir}/${portal.name.dir}"/>
+ <property name="jboss.server.instance" value="default"/>
+ </ant>
+ </target>
<target name="activate-workflow">
<copy todir="${destination.dir}/jboss-portal-2.6/server/default/deploy/jboss-portal.sar/portal-cms.sar/META-INF">
@@ -69,7 +74,7 @@
</copy>
</target>
- <target name="main" depends="unzip-bundle, delete-docs, delete-jmxconsole, delete-objectsdescriptors, change-context, install-objectsdescriptor, install-jbossforums, activate-workflow, install-flickrportlet">
+ <target name="main" depends="unzip-bundle, delete-docs, delete-jmxconsole, delete-objectsdescriptors, update-context, update-ws, install-objectsdescriptor, install-jbossforums, activate-workflow, install-flickrportlet">
<tar destfile="${destination.dir}/${portal.name.dir}.tar" basedir="${destination.dir}/${portal.name.dir}" longfile="gnu"/>
<gzip zipfile="${destination.dir}/${portal.name.dir}.tgz" src="${destination.dir}/${portal.name.dir}.tar"/>
<delete file="${destination.dir}/${portal.name.dir}.tar"/>
16 years, 12 months
JBoss Portal SVN: r7678 - in trunk: build and 14 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-07-06 06:20:08 -0400 (Fri, 06 Jul 2007)
New Revision: 7678
Added:
trunk/widget/src/main/org/jboss/portal/test/widget/google/QueryResultParserTestCase.java
trunk/widget/src/main/org/jboss/portal/widget/google/GGWidgetInfo.java
trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGQueryResultEntry.java
trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGWidgetInfoBuilder.java
trunk/widget/src/resources/test/google/queryresult1.xml
Removed:
trunk/core/src/main/org/jboss/portal/core/controller/handler/UIServerResponse.java
trunk/uiserver/
trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGWidgetBuilder.java
Modified:
trunk/build/build.xml
trunk/common/src/main/org/jboss/portal/common/xml/XMLTools.java
trunk/core/build.xml
trunk/core/src/main/org/jboss/portal/core/controller/Controller.java
trunk/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java
trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectResponseHandler.java
trunk/core/src/main/org/jboss/portal/core/theme/PageRendition.java
trunk/core/src/resources/portal-core-sar/META-INF/jboss-service.xml
trunk/widget/build.xml
trunk/widget/src/main/org/jboss/portal/test/widget/google/PreferencesTestCase.java
trunk/widget/src/main/org/jboss/portal/widget/google/GGWidget.java
trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGProvider.java
trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGQuery.java
trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGQueryResult.java
trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGQueryResultBuilder.java
trunk/widget/src/resources/widget-war/WEB-INF/jsp/edit.jsp
Log:
rollback uiserver prototype
Modified: trunk/build/build.xml
===================================================================
--- trunk/build/build.xml 2007-07-05 23:41:21 UTC (rev 7677)
+++ trunk/build/build.xml 2007-07-06 10:20:08 UTC (rev 7678)
@@ -127,7 +127,6 @@
<module name="bridge"/>
<module name="cms"/>
<module name="format"/>
- <module name="uiserver"/>
<module name="core"/>
<module name="core-cms"/>
<module name="core-management"/>
@@ -137,14 +136,14 @@
<module name="wsrp"/>
<module name="registration"/>
<module name="workflow"/>
- <module name="widget"/>
+ <module name="widget"/>
<!--<module name="core-admin"/>-->
<!-- Module groups -->
<group name="portal">
<include
- modules="common, test, api, web, jems, server, security, identity, search, format, portlet, portlet-server, bridge, faces, portlet-federation, theme, workflow, cms, registration, uiserver, core, wsrp, core-admin, core-cms, core-management, core-samples, widget"/>
+ modules="common, test, api, web, jems, server, security, identity, search, format, portlet, portlet-server, bridge, faces, portlet-federation, theme, workflow, cms, registration, core, wsrp, core-admin, core-cms, core-management, core-samples, widget"/>
</group>
<group name="cms">
Modified: trunk/common/src/main/org/jboss/portal/common/xml/XMLTools.java
===================================================================
--- trunk/common/src/main/org/jboss/portal/common/xml/XMLTools.java 2007-07-05 23:41:21 UTC (rev 7677)
+++ trunk/common/src/main/org/jboss/portal/common/xml/XMLTools.java 2007-07-06 10:20:08 UTC (rev 7678)
@@ -313,7 +313,25 @@
public static Element getUniqueChild(Element element, String name, boolean strict) throws IllegalArgumentException,
NoSuchElementException, TooManyElementException
{
- List list = getChildren(element, name);
+ return getUniqueChild(element, null, name, strict);
+ }
+
+ /**
+ * Return an optional child of an element with the specified name and the optionally specified namespace uri.
+ *
+ * @param element the parent element
+ * @param name the child name
+ * @param uri the child uri
+ * @param strict if the child must be present
+ * @return the child element or null if it does not exist and strict is set to false
+ * @throws IllegalArgumentException if an argument is null
+ * @throws NoSuchElementException if strict is true and the element is not present
+ * @throws TooManyElementException if more than one element is found
+ */
+ public static Element getUniqueChild(Element element, String uri, String name, boolean strict) throws IllegalArgumentException,
+ NoSuchElementException, TooManyElementException
+ {
+ List list = getChildren(element, uri, name);
switch (list.size())
{
case 0:
@@ -346,6 +364,21 @@
}
/**
+ * Return an iterator for all the children of the given element having the specified name and the optionally
+ * specified namesspace uri.
+ *
+ * @param element the parent element
+ * @param uri the children uri
+ * @param name the children name
+ * @return an iterator for the designated elements
+ * @throws IllegalArgumentException if the element is null or the name is null
+ */
+ public static Iterator getChildrenIterator(Element element, String uri, String name) throws IllegalArgumentException
+ {
+ return getChildren(element, uri, name).iterator();
+ }
+
+ /**
* Return all the children of the given element having the specified name. The collection object can be modified.
*
* @param element the parent element
@@ -355,6 +388,21 @@
*/
public static List getChildren(Element element, String name) throws IllegalArgumentException
{
+ return getChildren(element, null, name);
+ }
+
+ /**
+ * Return all the children of the given element having the specified name and the optionally specified namespace URI.
+ * The collection object can be modified.
+ *
+ * @param element the parent element
+ * @param uri the children uri
+ * @param name the children name
+ * @return a list of elements
+ * @throws IllegalArgumentException if the element is null or the name is null
+ */
+ public static List getChildren(Element element, String uri, String name) throws IllegalArgumentException
+ {
if (element == null)
{
throw new IllegalArgumentException("No element found");
@@ -371,7 +419,9 @@
if (node.getNodeType() == Node.ELEMENT_NODE)
{
Element childElt = (Element)node;
- if (childElt.getTagName().equals(name))
+
+ //
+ if ((uri == null || uri.equals(childElt.getNamespaceURI())) && childElt.getLocalName().equals(name))
{
result.add(childElt);
}
Modified: trunk/core/build.xml
===================================================================
--- trunk/core/build.xml 2007-07-05 23:41:21 UTC (rev 7677)
+++ trunk/core/build.xml 2007-07-06 10:20:08 UTC (rev 7678)
@@ -134,7 +134,6 @@
<path refid="jboss.portal-theme.classpath"/>
<path refid="jboss.portal-security.classpath"/>
<path refid="jboss.portal-test.classpath"/>
- <path refid="jboss.portal-uiserver.classpath"/>
</path>
<!--+=======================================+-->
@@ -335,7 +334,6 @@
<fileset dir="${jboss.portal-search.root}/lib" includes="portal-search-lib.jar"/>
<fileset dir="${jboss.portal-identity.root}/lib" includes="portal-identity-lib.jar"/>
<fileset dir="${jboss.portal-registration.root}/lib" includes="portal-registration-lib.jar"/>
- <fileset dir="${jboss.portal-uiserver.root}/lib" includes="portal-uiserver-lib.jar"/>
<fileset dir="${ehcache.ehcache.lib}" includes="ehcache.jar"/>
<fileset dir="${apache.collections.lib}" includes="commons-collections.jar"/>
<fileset dir="${javassist.javassist.lib}" includes="javassist.jar"/>
Modified: trunk/core/src/main/org/jboss/portal/core/controller/Controller.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/controller/Controller.java 2007-07-05 23:41:21 UTC (rev 7677)
+++ trunk/core/src/main/org/jboss/portal/core/controller/Controller.java 2007-07-06 10:20:08 UTC (rev 7678)
@@ -46,10 +46,6 @@
import org.jboss.portal.server.ServerException;
import org.jboss.portal.web.spi.ServletContainerContext;
-import org.jboss.portal.uiserver.UIServer;
-import org.jboss.portal.uiserver.UIServerRequest;
-import org.jboss.portal.core.controller.handler.UIServerResponse;
-
import javax.servlet.ServletException;
import java.io.IOException;
@@ -96,12 +92,6 @@
/** . */
protected PageControlPolicy pageControlPolicy;
-
- /**
- *
- */
- protected UIServer uiServer = null;
-
public ContentRendererRegistry getContentRendererRegistry()
{
@@ -217,25 +207,7 @@
{
this.pageControlPolicy = pageControlPolicy;
}
-
- /**
- *
- * @return
- */
- public UIServer getUIServer()
- {
- return uiServer;
- }
- /**
- *
- * @param uiServer
- */
- public void setUIServer(UIServer uiServer)
- {
- this.uiServer = uiServer;
- }
-
public final void handle(ServerInvocation invocation) throws ServerException
{
// Create controller context
@@ -345,19 +317,6 @@
AjaxResponse ar = (AjaxResponse)handlerResponse;
sendResponse(controllerContext, ar);
}
-
- //This condition hands over UI aggregation function to the
- //UI Server, regardless of what type of UI is being catered to
- else if(handlerResponse instanceof UIServerResponse)
- {
- //Create a request to be handled by the UIServer
- UIServerRequest request = new UIServerRequest();
- request.setAttribute(UIServerRequest.SERVER_INVOCATION, controllerContext.getServerInvocation());
- request.setAttribute(UIServerRequest.UI_INDICATOR, ((UIServerResponse)handlerResponse).getUiIndicator());
-
- //Perform aggregation of the UI to be sent back to the client
- this.uiServer.aggregate(request);
- }
}
/**
Modified: trunk/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java 2007-07-05 23:41:21 UTC (rev 7677)
+++ trunk/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java 2007-07-06 10:20:08 UTC (rev 7678)
@@ -68,8 +68,6 @@
import org.jboss.portal.theme.page.Region;
import org.apache.log4j.Logger;
-import org.jboss.portal.core.controller.handler.UIServerResponse;
-
import java.io.StringWriter;
import java.util.Set;
import java.util.HashSet;
@@ -176,7 +174,7 @@
ViewPageCommand rpc = new ViewPageCommand(upr.getPageId());
String url = controllerContext.renderURL(rpc, null, null);
UpdatePageLocationResponse dresp = new UpdatePageLocationResponse(url);
- return new UIServerResponse(dresp);
+ return new AjaxResponse(dresp);
}
else if (controllerResponse instanceof UpdateWindowResponse)
{
@@ -368,7 +366,7 @@
//
if (!fullRefresh)
{
- return new UIServerResponse(updatePage);
+ return new AjaxResponse(updatePage);
}
}
@@ -376,7 +374,7 @@
ViewPageCommand rpc = new ViewPageCommand(page.getId());
String url = controllerContext.renderURL(rpc, null, null);
UpdatePageLocationResponse dresp = new UpdatePageLocationResponse(url);
- return new UIServerResponse(dresp);
+ return new AjaxResponse(dresp);
}
else
{
Deleted: trunk/core/src/main/org/jboss/portal/core/controller/handler/UIServerResponse.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/controller/handler/UIServerResponse.java 2007-07-05 23:41:21 UTC (rev 7677)
+++ trunk/core/src/main/org/jboss/portal/core/controller/handler/UIServerResponse.java 2007-07-06 10:20:08 UTC (rev 7678)
@@ -1,83 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.core.controller.handler;
-
-import org.jboss.portal.core.controller.handler.HandlerResponse;
-import org.jboss.portal.server.ServerInvocationContext;
-
-import javax.servlet.ServletException;
-import java.io.IOException;
-
-/**
- *
- * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- *
- */
-public class UIServerResponse extends HandlerResponse
-{
- /**
- *
- */
- private Object uiIndicator = null;
-
- /**
- *
- * @param controllerResponse
- */
- public UIServerResponse(Object uiIndicator)
- {
- this.uiIndicator = uiIndicator;
- }
-
-
- /**
- *
- * @return
- */
- public Object getUiIndicator()
- {
- return uiIndicator;
- }
-
-
- /**
- *
- * @param uiIndicator
- */
- public void setUiIndicator(Object uiIndicator)
- {
- this.uiIndicator = uiIndicator;
- }
-
- /**
- * Leave this empty.....The UIServer will take care of sending the response
- *
- *
- * @param ctx
- * @throws IOException
- * @throws ServletException
- */
- public void sendResponse(ServerInvocationContext ctx) throws IOException, ServletException
- {
- }
-}
Modified: trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectResponseHandler.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectResponseHandler.java 2007-07-05 23:41:21 UTC (rev 7677)
+++ trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectResponseHandler.java 2007-07-06 10:20:08 UTC (rev 7678)
@@ -41,9 +41,6 @@
import org.jboss.portal.web.ServletContextDispatcher;
import org.jboss.portal.common.util.MarkupInfo;
-import org.jboss.portal.core.controller.handler.UIServerResponse;
-import org.jboss.portal.uiserver.UIServerPageRendition;
-
import javax.servlet.ServletException;
import java.io.IOException;
@@ -79,11 +76,17 @@
//
if (resp instanceof PageRendition)
{
- PageRendition pageRendition = (PageRendition)resp;
- UIServerPageRendition uiServerPageRendition = new UIServerPageRendition(
- pageRendition.getLayout(),pageRendition.getTheme(),pageRendition.getPageResult(),pageRendition.getPageService()
- );
- return new UIServerResponse(uiServerPageRendition);
+ final PageRendition rendition = (PageRendition)resp;
+ final ServerInvocation invocation = controllerContext.getServerInvocation();
+ return new HTTPResponse()
+ {
+ public void sendResponse(ServerInvocationContext ctx) throws IOException, ServletException
+ {
+ ServletContextDispatcher dispatcher = new ServletContextDispatcher(invocation.getServerContext().getClientRequest(), invocation.getServerContext().getClientResponse(), invocation.getRequest().getServer().getServletContainerContext());
+ MarkupInfo markupInfo = (MarkupInfo)invocation.getResponse().getContentInfo();
+ rendition.render(markupInfo, dispatcher);
+ }
+ };
}
else
{
Modified: trunk/core/src/main/org/jboss/portal/core/theme/PageRendition.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/theme/PageRendition.java 2007-07-05 23:41:21 UTC (rev 7677)
+++ trunk/core/src/main/org/jboss/portal/core/theme/PageRendition.java 2007-07-06 10:20:08 UTC (rev 7678)
@@ -68,7 +68,7 @@
this.pageResult = markupResult;
this.pageService = pageService;
}
-
+
/** Performs the page rendition. */
public void render(MarkupInfo markupInfo, ServletContextDispatcher dispatcher) throws IOException, ServletException
{
@@ -102,19 +102,4 @@
{
return pageResult;
}
-
- public PortalLayout getLayout()
- {
- return this.layout;
- }
-
- public PortalTheme getTheme()
- {
- return this.theme;
- }
-
- public PageService getPageService()
- {
- return this.pageService;
- }
}
Modified: trunk/core/src/resources/portal-core-sar/META-INF/jboss-service.xml
===================================================================
--- trunk/core/src/resources/portal-core-sar/META-INF/jboss-service.xml 2007-07-05 23:41:21 UTC (rev 7677)
+++ trunk/core/src/resources/portal-core-sar/META-INF/jboss-service.xml 2007-07-06 10:20:08 UTC (rev 7678)
@@ -1090,9 +1090,6 @@
<depends
optional-attribute-name="PageControlPolicy"
proxy-type="attribute">portal:service=ControlPolicy,type=Page</depends>
- <depends
- optional-attribute-name="UIServer"
- proxy-type="attribute">portal:service=UIServer</depends>
</mbean>
<!-- The controller factory -->
@@ -1289,24 +1286,5 @@
optional-attribute-name="JBossAppEntityResolver"
proxy-type="attribute">portal:service=EntityResolver</depends>
</mbean>
-
- <!-- Using the new UIServer -->
- <mbean
- code="org.jboss.portal.uiserver.UIServerImpl"
- name="portal:service=UIServer"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <!--
- A map of some UIIndicator object provided from the Controller Layer to the corresponding Client Side
- UI technology which will be used to handle the UI related tasks
- -->
- <attribute name="ClientUiConfig">
- <properties>
- <entry key="org.jboss.portal.uiserver.UIServerPageRendition">org.jboss.portal.uiserver.ClassicUI</entry>
- <entry key="org.jboss.portal.theme.impl.render.dynamic.response.UpdatePageStateResponse">org.jboss.portal.uiserver.PartialRefreshUI</entry>
- <entry key="org.jboss.portal.theme.impl.render.dynamic.response.UpdatePageLocationResponse">org.jboss.portal.uiserver.PartialRefreshUI</entry>
- </properties>
- </attribute>
- </mbean>
+
</server>
Modified: trunk/widget/build.xml
===================================================================
--- trunk/widget/build.xml 2007-07-05 23:41:21 UTC (rev 7677)
+++ trunk/widget/build.xml 2007-07-06 10:20:08 UTC (rev 7678)
@@ -250,17 +250,19 @@
<target name="tests" depends="init, package-tests">
<property name="proto-libs" value="${project.root}/proto-libs"/>
<execute-tests>
+
<!--
-
<x-sysproperty>
<jvmarg value="-Xdebug"/>
<jvmarg value="-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y"/>
</x-sysproperty>
-->
-
<x-test>
+<!--
<test todir="${test.reports}" name="org.jboss.portal.test.widget.google.PreferencesTestCase"/>
+-->
+ <test todir="${test.reports}" name="org.jboss.portal.test.widget.google.QueryResultParserTestCase"/>
</x-test>
<x-classpath>
<pathelement location="${build.lib}/widget-lib.jar"/>
Modified: trunk/widget/src/main/org/jboss/portal/test/widget/google/PreferencesTestCase.java
===================================================================
--- trunk/widget/src/main/org/jboss/portal/test/widget/google/PreferencesTestCase.java 2007-07-05 23:41:21 UTC (rev 7677)
+++ trunk/widget/src/main/org/jboss/portal/test/widget/google/PreferencesTestCase.java 2007-07-06 10:20:08 UTC (rev 7678)
@@ -23,10 +23,10 @@
package org.jboss.portal.test.widget.google;
import junit.framework.TestCase;
-import org.jboss.portal.widget.google.provider.GGWidgetBuilder;
-import org.jboss.portal.widget.google.GGWidget;
+import org.jboss.portal.widget.google.provider.GGWidgetInfoBuilder;
import org.jboss.portal.widget.google.GGPreferencesInfo;
import org.jboss.portal.widget.google.GGPreferenceInfo;
+import org.jboss.portal.widget.google.GGWidgetInfo;
import org.jboss.portal.widget.google.type.DataType;
import org.jboss.portal.widget.google.type.EnumType;
import org.jboss.portal.common.io.IOTools;
@@ -47,12 +47,12 @@
ClassLoader tcl = Thread.currentThread().getContextClassLoader();
URL url = tcl.getResource("google/gadget1.xml");
- GGWidgetBuilder ggwb = constructBuilder(url);
- GGWidget ggw = ggwb.create();
+ GGWidgetInfoBuilder ggwb = constructBuilder(url);
+ GGWidgetInfo ggw = ggwb.create();
assertNotNull(ggw);
- assertEquals("TestTitle",ggw.getTitle().getDefaultString());
- assertEquals("TestDescription",ggw.getDescription().getDefaultString());
+// assertEquals("TestTitle",ggw.getTitle().getDefaultString());
+// assertEquals("TestDescription",ggw.getDescription().getDefaultString());
}
public void testUserPrefs() throws Exception
@@ -60,12 +60,12 @@
ClassLoader tcl = Thread.currentThread().getContextClassLoader();
URL url = tcl.getResource("google/gadget2.xml");
- GGWidgetBuilder ggwb = constructBuilder(url);
- GGWidget ggw = ggwb.create();
+ GGWidgetInfoBuilder ggwb = constructBuilder(url);
+ GGWidgetInfo ggw = ggwb.create();
assertNotNull(ggw);
- GGPreferencesInfo prefs = ggw.getPreferencesInfo();
+ GGPreferencesInfo prefs = ggw.getPreferences();
// String
GGPreferenceInfo pi = prefs.getPreference("testString");
@@ -138,9 +138,9 @@
}
- public GGWidgetBuilder constructBuilder(URL url) throws Exception
+ public GGWidgetInfoBuilder constructBuilder(URL url) throws Exception
{
- return new GGWidgetBuilder(url)
+ return new GGWidgetInfoBuilder(url)
{
protected byte[] obtainWidget(URL url) throws Exception
{
Added: trunk/widget/src/main/org/jboss/portal/test/widget/google/QueryResultParserTestCase.java
===================================================================
--- trunk/widget/src/main/org/jboss/portal/test/widget/google/QueryResultParserTestCase.java (rev 0)
+++ trunk/widget/src/main/org/jboss/portal/test/widget/google/QueryResultParserTestCase.java 2007-07-06 10:20:08 UTC (rev 7678)
@@ -0,0 +1,64 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.test.widget.google;
+
+import junit.framework.TestCase;
+
+import java.net.URL;
+import java.net.MalformedURLException;
+import java.util.Iterator;
+
+import org.jboss.portal.widget.google.provider.GGQueryResultBuilder;
+import org.jboss.portal.widget.google.provider.GGQueryResult;
+import org.jboss.portal.widget.google.provider.GGQueryResultEntry;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class QueryResultParserTestCase extends TestCase
+{
+
+ public void testA() throws MalformedURLException
+ {
+ ClassLoader tcl = Thread.currentThread().getContextClassLoader();
+ URL url = tcl.getResource("google/queryresult1.xml");
+ assertNotNull(url);
+ GGQueryResultBuilder builder = new GGQueryResultBuilder(url);
+ GGQueryResult result = builder.build();
+ assertNotNull(result);
+ Iterator i = result.entries();
+ assertNotNull(i);
+ assertTrue(i.hasNext());
+ GGQueryResultEntry entry = (GGQueryResultEntry)i.next();
+ assertNotNull(entry);
+ assertEquals("Date & Time", entry.getTitle());
+ assertEquals("Add a clock to your page. Click edit to change it to the color of your choice.", entry.getDescription());
+ assertEquals("http://www.google.com/ig/modules/datetime.png", entry.getScreenshot());
+ assertEquals("http://www.google.com/ig/modules/datetime-thm.png", entry.getThumbnail());
+ assertEquals("matt.feedback+datetime(a)gmail.com", entry.getAuthor());
+ assertEquals(320, entry.getWidth());
+ assertEquals(136, entry.getHeight());
+ assertEquals(new URL("http://www.google.com/ig/modules/datetime.xml"), entry.getURL());
+ }
+}
Modified: trunk/widget/src/main/org/jboss/portal/widget/google/GGWidget.java
===================================================================
--- trunk/widget/src/main/org/jboss/portal/widget/google/GGWidget.java 2007-07-05 23:41:21 UTC (rev 7677)
+++ trunk/widget/src/main/org/jboss/portal/widget/google/GGWidget.java 2007-07-06 10:20:08 UTC (rev 7678)
@@ -26,12 +26,18 @@
import org.jboss.portal.common.util.UUIDGenerator;
import org.jboss.portal.common.text.FastURLEncoder;
import org.jboss.portal.widget.Widget;
+import org.jboss.portal.widget.google.provider.GGWidgetInfoBuilder;
import java.util.Iterator;
import java.util.Map;
+import java.net.URL;
+import edu.emory.mathcs.backport.java.util.concurrent.FutureTask;
+import edu.emory.mathcs.backport.java.util.concurrent.Callable;
+
/**
- * A Google Gadget widget For more details please see the <a href="http://www.google.com/apis/gadgets/reference.html">API Developer Guide</a>.
+ * A Google Gadget widget.
+ * For more details please see the <a href="http://www.google.com/apis/gadgets/reference.html">API Developer Guide</a>.
*
* @todo
* - Resource bundles implementation
@@ -46,10 +52,10 @@
private static final UUIDGenerator generator = new UUIDGenerator();
/** . */
- private final String url;
+ private final URL url;
/** . */
- private final GGPreferencesInfo prefsInfo;
+ private final String id;
/** . */
private final LocalizedString title;
@@ -63,29 +69,60 @@
/** . */
private final int height;
- public GGWidget(String url,
- GGPreferencesInfo prefsInfo,
- LocalizedString title,
- LocalizedString description,
- int width,
- int height)
+ /** . */
+ private final FutureTask future;
+
+ public GGWidget(URL url,
+ LocalizedString title,
+ LocalizedString description,
+ int width,
+ int height)
{
+ Callable callable = new Callable()
+ {
+ public Object call() throws Exception
+ {
+ try
+ {
+ GGWidgetInfoBuilder builder = new GGWidgetInfoBuilder(GGWidget.this.url);
+ return builder.create();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ return null;
+ }
+ }
+ };
+
+ //
+ this.id = url.toString();
this.url = url;
- this.prefsInfo = prefsInfo;
this.title = title;
this.description = description;
this.width = width;
this.height = height;
+ this.future = new FutureTask(callable);
}
public String getId()
{
- return url;
+ return id;
}
- public GGPreferencesInfo getPreferencesInfo()
+ public GGWidgetInfo getInfo()
{
- return prefsInfo;
+ try
+ {
+ return (GGWidgetInfo)future.get();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+
+ //
+ return null;
+ }
}
public LocalizedString getTitle()
@@ -111,38 +148,49 @@
tmp.append("&border=%23ffffff%7C3px%2C1px+none+%23999999"); // "&border=%23ffffff%7C3px%2C1px+solid+%23999999"
tmp.append("&output=js");
- // Append default values
- for (Iterator i = prefsInfo.getPreferences().iterator();i.hasNext();)
+ //
+ GGWidgetInfo info = getInfo();
+
+ //
+ if (info != null)
{
- GGPreferenceInfo prefInfo = (GGPreferenceInfo)i.next();
- String prefName = prefInfo.getName();
- String[] values = (String[])parameters.get(prefName);
- String value = values != null ? values[0] : prefInfo.getDefaultValue();
- if (value != null)
+ GGPreferencesInfo prefsInfo = info.getPreferences();
+
+ // Append default values
+ for (Iterator i = prefsInfo.getPreferences().iterator();i.hasNext();)
{
- tmp.append("&up_").append(FastURLEncoder.DEFAULT_ENCODER.encode(prefName)).append("=").append(FastURLEncoder.DEFAULT_ENCODER.encode(value));
+ GGPreferenceInfo prefInfo = (GGPreferenceInfo)i.next();
+ String prefName = prefInfo.getName();
+ String[] values = (String[])parameters.get(prefName);
+ String value = values != null ? values[0] : prefInfo.getDefaultValue();
+ if (value != null)
+ {
+ tmp.append("&up_").append(FastURLEncoder.DEFAULT_ENCODER.encode(prefName)).append("=").append(FastURLEncoder.DEFAULT_ENCODER.encode(value));
+ }
}
- }
- //
- String clipper = "" +
- "(function(){\n" +
- "var a = document.getElementById('" + id + "');\n" +
- "var b = a.childNodes.item(2);\n" + // table
- "var c = b.childNodes.item(0);\n" + // tbody
- "var d = c.childNodes.item(0);\n" + // tr
- "var e = c.childNodes.item(1);\n" + // tr
- "var f = c.childNodes.item(3);\n" + // tr
- "c.removeChild(d);\n" +
- "c.removeChild(e);\n" +
- "c.removeChild(f);\n" +
- "})();";
+ //
+ String clipper = "" +
+ "(function(){\n" +
+ "var a = document.getElementById('" + id + "');\n" +
+ "var b = a.childNodes.item(2);\n" + // table
+ "var c = b.childNodes.item(0);\n" + // tbody
+ "var d = c.childNodes.item(0);\n" + // tr
+ "var e = c.childNodes.item(1);\n" + // tr
+ "var f = c.childNodes.item(3);\n" + // tr
+ "c.removeChild(d);\n" +
+ "c.removeChild(e);\n" +
+ "c.removeChild(f);\n" +
+ "})();";
- return "<div id=\"" + id + "\">\n" +
- "<script src=\"" + tmp + "\"></script>\n" +
- "<script>" + clipper + "</script>\n" +
- "</div>\n";
+ return "<div id=\"" + id + "\">\n" +
+ "<script src=\"" + tmp + "\"></script>\n" +
+ "<script>" + clipper + "</script>\n" +
+ "</div>\n";
+ }
+ else
+ {
+ return "Error";
+ }
}
-
-
}
Added: trunk/widget/src/main/org/jboss/portal/widget/google/GGWidgetInfo.java
===================================================================
--- trunk/widget/src/main/org/jboss/portal/widget/google/GGWidgetInfo.java (rev 0)
+++ trunk/widget/src/main/org/jboss/portal/widget/google/GGWidgetInfo.java 2007-07-06 10:20:08 UTC (rev 7678)
@@ -0,0 +1,46 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.widget.google;
+
+/**
+ * Meta data retrieved from the XML file.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class GGWidgetInfo
+{
+
+ /** . */
+ private final GGPreferencesInfo preferences;
+
+ public GGWidgetInfo(GGPreferencesInfo preferences)
+ {
+ this.preferences = preferences;
+ }
+
+ public GGPreferencesInfo getPreferences()
+ {
+ return preferences;
+ }
+}
Modified: trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGProvider.java
===================================================================
--- trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGProvider.java 2007-07-05 23:41:21 UTC (rev 7677)
+++ trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGProvider.java 2007-07-06 10:20:08 UTC (rev 7678)
@@ -172,7 +172,7 @@
}
catch (Exception e)
{
- e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
+ e.printStackTrace();
return null;
}
}
@@ -181,7 +181,7 @@
{
try
{
- GGWidgetBuilder builder = new GGWidgetBuilder(url);
+ GGWidgetInfoBuilder builder = new GGWidgetInfoBuilder(url);
return builder.create();
}
catch (Exception e)
@@ -221,14 +221,23 @@
catch (Exception e)
{
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
- return new GGQueryResult(query, Collections.EMPTY_LIST);
+ return new GGQueryResult(Collections.EMPTY_LIST);
}
}
public Object call()
{
- GGQueryResultBuilder builder = new GGQueryResultBuilder(query);
- return builder.build(context);
+ try
+ {
+ return new GGQueryResultBuilder(query).build();
+ }
+ catch (MalformedURLException e)
+ {
+ e.printStackTrace();
+
+ // todo
+ return null;
+ }
}
}
}
Modified: trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGQuery.java
===================================================================
--- trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGQuery.java 2007-07-05 23:41:21 UTC (rev 7677)
+++ trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGQuery.java 2007-07-06 10:20:08 UTC (rev 7678)
@@ -22,6 +22,9 @@
******************************************************************************/
package org.jboss.portal.widget.google.provider;
+import java.net.URL;
+import java.net.MalformedURLException;
+
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
@@ -109,4 +112,26 @@
{
return hashCode;
}
+
+ URL buildQueryURL() throws MalformedURLException
+ {
+ StringBuffer buffer = new StringBuffer("http://www.google.com/ig/directory?synd=open&output=rss");
+ if (start > 0)
+ {
+ buffer.append("&start=").append(start);
+ }
+ if (num > 0)
+ {
+ buffer.append("&num=").append(num);
+ }
+ if (cat != null)
+ {
+ buffer.append("&cat=").append(cat);
+ }
+ if (q != null)
+ {
+ buffer.append("&q=").append(q);
+ }
+ return new URL(buffer.toString());
+ }
}
Modified: trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGQueryResult.java
===================================================================
--- trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGQueryResult.java 2007-07-05 23:41:21 UTC (rev 7677)
+++ trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGQueryResult.java 2007-07-06 10:20:08 UTC (rev 7678)
@@ -22,11 +22,9 @@
******************************************************************************/
package org.jboss.portal.widget.google.provider;
-import org.jboss.portal.widget.google.GGWidget;
-
import java.util.List;
import java.util.Iterator;
-import java.util.NoSuchElementException;
+import java.util.ArrayList;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -36,78 +34,21 @@
{
/** . */
- private final GGQuery query;
+ private List entries;
- /** . */
- private List widgetEntries;
-
- GGQueryResult(GGQuery query, List widgetEntries)
+ GGQueryResult(List entries)
{
- if (query == null)
+ if (entries == null)
{
throw new IllegalArgumentException();
}
- if (widgetEntries == null)
- {
- throw new IllegalArgumentException();
- }
- this.query = query;
- this.widgetEntries = widgetEntries;
- }
- public GGQuery getQuery()
- {
- return query;
+ //
+ this.entries = entries;
}
- public Iterator getWidgetIterator()
+ public Iterator entries()
{
- return new WidgetIterator();
+ return entries.iterator();
}
-
- private class WidgetIterator implements Iterator
- {
-
- Iterator iterator = widgetEntries.iterator();
-
- GGWidget next;
-
- public boolean hasNext()
- {
- if (next == null)
- {
- findNext();
- }
- return next != null;
- }
-
- public Object next()
- {
- if (next == null)
- {
- findNext();
- }
- if (next == null)
- {
- throw new NoSuchElementException();
- }
- GGWidget tmp = next;
- next = null;
- return tmp;
- }
-
- void findNext()
- {
- while (iterator.hasNext() && next == null)
- {
- GGProvider.GGWidgetEntry entry = (GGProvider.GGWidgetEntry)iterator.next();
- next = entry.getWidget();
- }
- }
-
- public void remove()
- {
- throw new UnsupportedOperationException();
- }
- }
}
Modified: trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGQueryResultBuilder.java
===================================================================
--- trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGQueryResultBuilder.java 2007-07-05 23:41:21 UTC (rev 7677)
+++ trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGQueryResultBuilder.java 2007-07-06 10:20:08 UTC (rev 7678)
@@ -23,156 +23,135 @@
package org.jboss.portal.widget.google.provider;
import org.jboss.portal.common.net.URLTools;
+import org.jboss.portal.common.xml.XMLTools;
+import org.jboss.portal.common.io.IOTools;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
-import javax.swing.text.html.HTMLEditorKit;
-import javax.swing.text.html.HTML;
-import javax.swing.text.MutableAttributeSet;
+import javax.xml.parsers.DocumentBuilderFactory;
import java.net.URL;
import java.net.MalformedURLException;
-import java.util.LinkedHashSet;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.StringTokenizer;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Collections;
import java.util.List;
-import java.io.InputStreamReader;
import java.io.ByteArrayInputStream;
+import java.io.InputStream;
/**
+ * @todo make the timeouts parameterizable
+ *
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-class GGQueryResultBuilder
+public class GGQueryResultBuilder
{
/** . */
- private final GGQuery query;
+ public static final String GHAPI_URI = "http://www.google.com/apis/homepage";
- public GGQueryResultBuilder(GGQuery query)
+ /** . */
+ private final URL url;
+
+ public GGQueryResultBuilder(GGQuery query) throws MalformedURLException
{
if (query == null)
{
throw new IllegalArgumentException();
}
- this.query = query;
+ this.url = query.buildQueryURL();
}
- private URL getURLQuery() throws MalformedURLException
+
+ public GGQueryResultBuilder(URL url)
{
- StringBuffer buffer = new StringBuffer("http://www.google.com/ig/directory?synd=open");
- if (query.getStart() > 0)
+ if (url == null)
{
- buffer.append("&start=").append(query.getStart());
+ throw new IllegalArgumentException();
}
- if (query.getNum() > 0)
- {
- buffer.append("&num=").append(query.getNum());
- }
- if (query.getCat() != null)
- {
- buffer.append("&cat=").append(query.getCat());
- }
- if (query.getQ() != null)
- {
- buffer.append("&q=").append(query.getQ());
- }
- return new URL(buffer.toString());
+ this.url = url;
}
- public GGQueryResult build(GGProvider.Context context)
+ public GGQueryResult build()
{
try
{
- // Find widget URLs
- URL url = getURLQuery() ;
-
// Read fully the URL content first
- // log.info("Retrieving " + url);
- byte[] bytes = URLTools.performGET(url, 5000, 5000);
+ byte[] bytes;
+ if ("http".equals(url.getProtocol()))
+ {
+ bytes = URLTools.performGET(url, 5000, 5000);
+ }
+ else
+ {
+ InputStream in = url.openStream();
+ try
+ {
+ bytes = IOTools.getBytes(in);
+ }
+ finally
+ {
+ IOTools.safeClose(in);
+ }
+ }
+
+ //
if (bytes == null)
{
throw new Exception("Cannot retrieve " + url);
}
- // log.info("Document " + url + " has been retrieved");
//
- final LinkedHashSet urls = new LinkedHashSet();
- HTMLEditorKit.ParserCallback callback = new HTMLEditorKit.ParserCallback()
- {
- public void handleStartTag(HTML.Tag t, MutableAttributeSet attrSet, int pos)
- {
- if (t == HTML.Tag.A)
- {
- try
- {
- String href = (String)attrSet.getAttribute(HTML.Attribute.HREF);
- URL url = new URL(href);
- String query = url.getQuery();
- if (query != null)
- {
- Map params = new HashMap();
- StringTokenizer st = new StringTokenizer(query, "&");
- while (st.hasMoreTokens())
- {
- String pair = st.nextToken();
- int separator = pair.indexOf('=');
- if (separator != -1)
- {
- String left = pair.substring(0, separator);
- String right = pair.substring(separator + 1);
- params.put(left, right);
- }
- }
+ DocumentBuilderFactory factory = XMLTools.getDocumentBuilderFactory();
+ factory.setNamespaceAware(true);
- //
- if (params.containsKey("url"))
- {
- String tmp = (String)params.get("url");
- if (tmp.endsWith(".xml"))
- {
- url = new URL(tmp);
- urls.add(url);
- }
- }
- }
- }
- catch (MalformedURLException ignore)
- {
- }
- }
- }
- };
- HTMLEditorKit.Parser parser = new ParserAccessor().getParser();
- parser.parse(new InputStreamReader(new ByteArrayInputStream(bytes), "UTF-8"), callback, true);
+ //
+ Document doc = factory.newDocumentBuilder().parse(new ByteArrayInputStream(bytes));
- // Now parse each
- List widgetEntries = new ArrayList(urls.size());
- for (Iterator i = urls.iterator();i.hasNext();)
+ //
+ Element rssElt = doc.getDocumentElement();
+ Element channelElt = XMLTools.getUniqueChild(rssElt, "channel", true);
+
+ //
+ List entries = new ArrayList();
+ for (Iterator i = XMLTools.getChildrenIterator(channelElt, "item");i.hasNext();)
{
- URL widgetURL = (URL)i.next();
- GGProvider.GGWidgetEntry entry = context.getWidgetEntry(widgetURL);
- widgetEntries.add(entry);
+ Element itemElt = (Element)i.next();
+
+ //
+ Element titleElt = XMLTools.getUniqueChild(itemElt, "title", true);
+ Element linkElt = XMLTools.getUniqueChild(itemElt, "link", true);
+ Element descriptionElt = XMLTools.getUniqueChild(itemElt, "description", true);
+ Element authorElt = XMLTools.getUniqueChild(itemElt, "author", false);
+ Element screenshotElt = XMLTools.getUniqueChild(itemElt, GHAPI_URI, "screenshot", true);
+ Element thumbnailElt = XMLTools.getUniqueChild(itemElt, GHAPI_URI, "thumbnail", true);
+ Element widthElt = XMLTools.getUniqueChild(itemElt, GHAPI_URI, "width", true);
+ Element heightElt = XMLTools.getUniqueChild(itemElt, GHAPI_URI, "height", true);
+
+ //
+ String title = XMLTools.asString(titleElt);
+ URL link = new URL(XMLTools.asString(linkElt));
+ String description = XMLTools.asString(descriptionElt);
+ String screenshot = XMLTools.asString(screenshotElt);
+ String thumbnail = XMLTools.asString(thumbnailElt);
+ String author = authorElt != null ? XMLTools.asString(authorElt) : "";
+ int width = Integer.parseInt(XMLTools.asString(widthElt));
+ int height = Integer.parseInt(XMLTools.asString(heightElt));
+
+ //
+ GGQueryResultEntry entry = new GGQueryResultEntry(link, title, description, screenshot, thumbnail, author, width, height);
+ entries.add(entry);
}
//
- return new GGQueryResult(query, widgetEntries);
+ return new GGQueryResult(entries);
}
catch (Exception e)
{
e.printStackTrace();
}
- return new GGQueryResult(query, Collections.EMPTY_LIST);
+ //
+ return new GGQueryResult(Collections.EMPTY_LIST);
}
-
- private static class ParserAccessor extends HTMLEditorKit
- {
- public Parser getParser()
- {
- return super.getParser();
- }
- }
-
}
Added: trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGQueryResultEntry.java
===================================================================
--- trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGQueryResultEntry.java (rev 0)
+++ trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGQueryResultEntry.java 2007-07-06 10:20:08 UTC (rev 7678)
@@ -0,0 +1,119 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.widget.google.provider;
+
+import java.net.URL;
+
+/**
+ * @todo parse all meta data
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class GGQueryResultEntry
+{
+
+ /** . */
+ private final URL url;
+
+ /** . */
+ private final String title;
+
+ /** . */
+ private final String description;
+
+ /** . */
+ private final String screenshot;
+
+ /** . */
+ private final String thumbnail;
+
+ /** . */
+ private final String author;
+
+ /** . */
+ private final int width;
+
+ /** . */
+ private final int height;
+
+ public GGQueryResultEntry(
+ URL url,
+ String title,
+ String description,
+ String screenshot,
+ String thumbnail,
+ String author,
+ int width,
+ int height)
+ {
+ this.url = url;
+ this.title = title;
+ this.description = description;
+ this.screenshot = screenshot;
+ this.thumbnail = thumbnail;
+ this.author = author;
+ this.width = width;
+ this.height = height;
+ }
+
+ public URL getURL()
+ {
+ return url;
+ }
+
+ public String getTitle()
+ {
+ return title;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public String getScreenshot()
+ {
+ return screenshot;
+ }
+
+ public String getThumbnail()
+ {
+ return thumbnail;
+ }
+
+ public String getAuthor()
+ {
+ return author;
+ }
+
+ public int getWidth()
+ {
+ return width;
+ }
+
+ public int getHeight()
+ {
+ return height;
+ }
+}
Deleted: trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGWidgetBuilder.java
===================================================================
--- trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGWidgetBuilder.java 2007-07-05 23:41:21 UTC (rev 7677)
+++ trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGWidgetBuilder.java 2007-07-06 10:20:08 UTC (rev 7678)
@@ -1,208 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.widget.google.provider;
-
-import org.jboss.portal.common.xml.XMLTools;
-import org.jboss.portal.common.i18n.LocalizedString;
-import org.jboss.portal.common.net.URLTools;
-import org.jboss.portal.common.concurrent.loader.ObjectLoader;
-import org.jboss.portal.widget.google.type.DataType;
-import org.jboss.portal.widget.google.type.StringType;
-import org.jboss.portal.widget.google.type.LocationType;
-import org.jboss.portal.widget.google.type.HiddenType;
-import org.jboss.portal.widget.google.type.BoolType;
-import org.jboss.portal.widget.google.type.ListType;
-import org.jboss.portal.widget.google.type.EnumType;
-import org.jboss.portal.widget.google.GGWidget;
-import org.jboss.portal.widget.google.GGPreferenceInfo;
-import org.jboss.portal.widget.google.GGPreferencesInfo;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.DocumentBuilder;
-import java.net.URL;
-import java.util.Iterator;
-import java.util.Locale;
-import java.util.Collection;
-import java.util.ArrayList;
-import java.io.ByteArrayInputStream;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class GGWidgetBuilder implements ObjectLoader
-{
-
- /** . */
- private final URL url;
-
- public GGWidgetBuilder(URL url)
- {
- if (url == null)
- {
- throw new IllegalArgumentException("No null URL");
- }
- this.url = url;
- }
-
- public URL getURL()
- {
- return url;
- }
-
-
- public Object load()
- {
- try
- {
- return create();
- }
- catch (Exception e)
- {
- e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-
- //
- return null;
- }
- }
-
- public GGWidget create() throws Exception
- {
- DocumentBuilderFactory factory = XMLTools.getDocumentBuilderFactory();
- DocumentBuilder builder = factory.newDocumentBuilder();
- byte[] bytes = obtainWidget(url);
- if (bytes == null)
- {
- throw new Exception("Cannot retrieve document " + url);
- }
- Document doc = builder.parse(new ByteArrayInputStream(bytes));
- Element moduleElt = doc.getDocumentElement();
-
- //
- Collection tmp = null;
- Iterator userPrefsEltIterator = XMLTools.getChildrenIterator(moduleElt, "UserPref");
- while (userPrefsEltIterator.hasNext())
- {
- Element userPref = (Element)userPrefsEltIterator.next();
- String nameAttr = userPref.getAttribute("name");
- String displayNameAttr = userPref.getAttribute("display_name");
- String urlParamAttr = userPref.getAttribute("urlparam");
- String dataTypeAttr = userPref.getAttribute("datatype");
- String requiredAttr = userPref.getAttribute("required");
- String defaultValueAttr = userPref.getAttribute("default_value");
-
- // We don't support that for now
- if (urlParamAttr.length() > 0)
- {
- throw new Exception();
- }
-
- // String is default type when not specified
- DataType dataType = StringType.getInstance();
- if (dataTypeAttr.length() > 0)
- {
- int dataTypeOrdinal = DataType.parseDataTypeLiteral(dataTypeAttr);
- switch(dataTypeOrdinal)
- {
- case DataType.HIDDEN:
- dataType = HiddenType.getInstance();
- break;
- case DataType.BOOL:
- dataType = BoolType.getInstance();
- break;
- case DataType.STRING:
- dataType = StringType.getInstance();
- break;
- case DataType.LIST:
- dataType = ListType.getInstance();
- break;
- case DataType.ENUM:
- Collection values = new ArrayList();
- for (Iterator i = XMLTools.getChildrenIterator(userPref, "EnumValue");i.hasNext();)
- {
- Element enumValueElt = (Element)i.next();
- String valueAttr = enumValueElt.getAttribute("value");
- String displayValueAttr = enumValueElt.getAttribute("display_value");
- EnumType.Value value = new EnumType.Value(valueAttr, displayValueAttr.length() > 0 ? displayValueAttr : null);
- values.add(value);
- }
- dataType = new EnumType(values);
- break;
- case DataType.LOCATION:
- dataType = LocationType.getInstance();
- break;
- }
- }
-
- //
- GGPreferenceInfo prefInfo = new GGPreferenceInfo(
- nameAttr,
- dataType,
- displayNameAttr.length() > 0 ? displayNameAttr : null,
- requiredAttr.length() > 0 ? Boolean.valueOf(requiredAttr).booleanValue() : false,
- defaultValueAttr.length() > 0 ? defaultValueAttr : null
- );
-
- //
- if (tmp == null)
- {
- tmp = new ArrayList();
- }
- tmp.add(prefInfo);
- }
- GGPreferencesInfo prefsInfo = GGPreferencesInfo.EMPTY_PREFS;
- if (tmp != null)
- {
- prefsInfo = new GGPreferencesInfo(tmp);
- }
-
- //
- Iterator modulePrefsEltIterator = XMLTools.getChildrenIterator(moduleElt, "ModulePrefs");
- if (modulePrefsEltIterator.hasNext())
- {
- Element modulePrefsElt = (Element)modulePrefsEltIterator.next();
- String titleAttr = modulePrefsElt.getAttribute("title");
- String descriptionAttr = modulePrefsElt.getAttribute("description");
- String widthAttr = modulePrefsElt.getAttribute("width");
- String heightAttr = modulePrefsElt.getAttribute("height");
-
- //
- LocalizedString title = titleAttr != null ? new LocalizedString(titleAttr, Locale.ENGLISH) : null;
- LocalizedString description = descriptionAttr != null ? new LocalizedString(descriptionAttr, Locale.ENGLISH) : null;
- int width = (widthAttr != null && widthAttr.length() > 0) ? Integer.parseInt(widthAttr) : 320;
- int height = (heightAttr != null && heightAttr.length() > 0) ? Integer.parseInt(heightAttr) : 200;
- return new GGWidget(url.toString(), prefsInfo, title, description, width, height);
- }
- else
- {
- throw new Exception(); // Basic for now
- }
- }
-
- protected byte[] obtainWidget(URL url) throws Exception
- {
- return URLTools.performGET(url, 5000, 5000);
- }
-}
Copied: trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGWidgetInfoBuilder.java (from rev 7663, trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGWidgetBuilder.java)
===================================================================
--- trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGWidgetInfoBuilder.java (rev 0)
+++ trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGWidgetInfoBuilder.java 2007-07-06 10:20:08 UTC (rev 7678)
@@ -0,0 +1,196 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.widget.google.provider;
+
+import org.jboss.portal.common.xml.XMLTools;
+import org.jboss.portal.common.i18n.LocalizedString;
+import org.jboss.portal.common.net.URLTools;
+import org.jboss.portal.common.concurrent.loader.ObjectLoader;
+import org.jboss.portal.widget.google.type.DataType;
+import org.jboss.portal.widget.google.type.StringType;
+import org.jboss.portal.widget.google.type.LocationType;
+import org.jboss.portal.widget.google.type.HiddenType;
+import org.jboss.portal.widget.google.type.BoolType;
+import org.jboss.portal.widget.google.type.ListType;
+import org.jboss.portal.widget.google.type.EnumType;
+import org.jboss.portal.widget.google.GGWidget;
+import org.jboss.portal.widget.google.GGPreferenceInfo;
+import org.jboss.portal.widget.google.GGPreferencesInfo;
+import org.jboss.portal.widget.google.GGWidgetInfo;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.DocumentBuilder;
+import java.net.URL;
+import java.util.Iterator;
+import java.util.Locale;
+import java.util.Collection;
+import java.util.ArrayList;
+import java.io.ByteArrayInputStream;
+
+/**
+ * Build widget meta data from its URL.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class GGWidgetInfoBuilder
+{
+
+ /** . */
+ private final URL url;
+
+ public GGWidgetInfoBuilder(URL url)
+ {
+ if (url == null)
+ {
+ throw new IllegalArgumentException("No null URL");
+ }
+ this.url = url;
+ }
+
+ public URL getURL()
+ {
+ return url;
+ }
+
+ public GGWidgetInfo create() throws Exception
+ {
+ DocumentBuilderFactory factory = XMLTools.getDocumentBuilderFactory();
+ DocumentBuilder builder = factory.newDocumentBuilder();
+ byte[] bytes = obtainWidget(url);
+ if (bytes == null)
+ {
+ throw new Exception("Cannot retrieve document " + url);
+ }
+ Document doc = builder.parse(new ByteArrayInputStream(bytes));
+ Element moduleElt = doc.getDocumentElement();
+
+ //
+ Collection tmp = null;
+ Iterator userPrefsEltIterator = XMLTools.getChildrenIterator(moduleElt, "UserPref");
+ while (userPrefsEltIterator.hasNext())
+ {
+ Element userPref = (Element)userPrefsEltIterator.next();
+ String nameAttr = userPref.getAttribute("name");
+ String displayNameAttr = userPref.getAttribute("display_name");
+ String urlParamAttr = userPref.getAttribute("urlparam");
+ String dataTypeAttr = userPref.getAttribute("datatype");
+ String requiredAttr = userPref.getAttribute("required");
+ String defaultValueAttr = userPref.getAttribute("default_value");
+
+ // We don't support that for now
+ if (urlParamAttr.length() > 0)
+ {
+ throw new Exception();
+ }
+
+ // String is default type when not specified
+ DataType dataType = StringType.getInstance();
+ if (dataTypeAttr.length() > 0)
+ {
+ int dataTypeOrdinal = DataType.parseDataTypeLiteral(dataTypeAttr);
+ switch(dataTypeOrdinal)
+ {
+ case DataType.HIDDEN:
+ dataType = HiddenType.getInstance();
+ break;
+ case DataType.BOOL:
+ dataType = BoolType.getInstance();
+ break;
+ case DataType.STRING:
+ dataType = StringType.getInstance();
+ break;
+ case DataType.LIST:
+ dataType = ListType.getInstance();
+ break;
+ case DataType.ENUM:
+ Collection values = new ArrayList();
+ for (Iterator i = XMLTools.getChildrenIterator(userPref, "EnumValue");i.hasNext();)
+ {
+ Element enumValueElt = (Element)i.next();
+ String valueAttr = enumValueElt.getAttribute("value");
+ String displayValueAttr = enumValueElt.getAttribute("display_value");
+ EnumType.Value value = new EnumType.Value(valueAttr, displayValueAttr.length() > 0 ? displayValueAttr : null);
+ values.add(value);
+ }
+ dataType = new EnumType(values);
+ break;
+ case DataType.LOCATION:
+ dataType = LocationType.getInstance();
+ break;
+ }
+ }
+
+ //
+ GGPreferenceInfo prefInfo = new GGPreferenceInfo(
+ nameAttr,
+ dataType,
+ displayNameAttr.length() > 0 ? displayNameAttr : null,
+ requiredAttr.length() > 0 ? Boolean.valueOf(requiredAttr).booleanValue() : false,
+ defaultValueAttr.length() > 0 ? defaultValueAttr : null
+ );
+
+ //
+ if (tmp == null)
+ {
+ tmp = new ArrayList();
+ }
+ tmp.add(prefInfo);
+ }
+ GGPreferencesInfo prefsInfo = GGPreferencesInfo.EMPTY_PREFS;
+ if (tmp != null)
+ {
+ prefsInfo = new GGPreferencesInfo(tmp);
+ }
+
+ //
+ return new GGWidgetInfo(prefsInfo);
+// Iterator modulePrefsEltIterator = XMLTools.getChildrenIterator(moduleElt, "ModulePrefs");
+// if (modulePrefsEltIterator.hasNext())
+// {
+// Element modulePrefsElt = (Element)modulePrefsEltIterator.next();
+// String titleAttr = modulePrefsElt.getAttribute("title");
+// String descriptionAttr = modulePrefsElt.getAttribute("description");
+// String widthAttr = modulePrefsElt.getAttribute("width");
+// String heightAttr = modulePrefsElt.getAttribute("height");
+//
+// //
+// LocalizedString title = titleAttr != null ? new LocalizedString(titleAttr, Locale.ENGLISH) : null;
+// LocalizedString description = descriptionAttr != null ? new LocalizedString(descriptionAttr, Locale.ENGLISH) : null;
+// int width = (widthAttr != null && widthAttr.length() > 0) ? Integer.parseInt(widthAttr) : 320;
+// int height = (heightAttr != null && heightAttr.length() > 0) ? Integer.parseInt(heightAttr) : 200;
+// return new GGWidget(url.toString(), prefsInfo, title, description, width, height);
+// }
+// else
+// {
+// throw new Exception(); // Basic for now
+// }
+ }
+
+ protected byte[] obtainWidget(URL url) throws Exception
+ {
+ return URLTools.performGET(url, 5000, 5000);
+ }
+}
Added: trunk/widget/src/resources/test/google/queryresult1.xml
===================================================================
--- trunk/widget/src/resources/test/google/queryresult1.xml (rev 0)
+++ trunk/widget/src/resources/test/google/queryresult1.xml 2007-07-06 10:20:08 UTC (rev 7678)
@@ -0,0 +1,429 @@
+<rss version="2.0"
+xmlns="http://backend.userland.com/rss2"
+xmlns:ghapi="http://www.google.com/apis/homepage">
+<channel>
+<title>Homepage Content</title>
+<link>http://www.google.com/ig/</link>
+<image>http://www.google.com/ig/images/igoogle_logo_sm.gif</image>
+<description>Homepage Content search results.</description>
+<language>en</language>
+<copyright>Copyright 2007 and onwards Google, Inc.</copyright>
+<!-- number of items total, the actual items are affected by pagination --><ghapi:num_items>9939</ghapi:num_items>
+<ghapi:search_example>e.g. calendar, Dilbert, Washington Post</ghapi:search_example>
+<ghapi:weekly_pageviews_info>Gadget pageview statistics are approximate only-- for precise statistics, we recommend the use of Google Analytics inside your gadgets. Gadget pageviews represent the actual number of times that the gadget was rendered, including Google Personalized Homepage, Google Pages, Google Desktop and across thousands of independent pages around the web.</ghapi:weekly_pageviews_info>
+<item>
+<title>Date & Time</title>
+<link>http://www.google.com/ig/modules/datetime.xml</link>
+<guid>http://www.google.com/ig/modules/datetime.xml</guid>
+<description>Add a clock to your page. Click edit to change it to the color of your choice.</description>
+<ghapi:screenshot>http://www.google.com/ig/modules/datetime.png</ghapi:screenshot>
+<ghapi:thumbnail>http://www.google.com/ig/modules/datetime-thm.png</ghapi:thumbnail>
+<ghapi:category>tools</ghapi:category>
+<author>matt.feedback+datetime(a)gmail.com</author>
+<ghapi:author_name>Matt M.</ghapi:author_name>
+<ghapi:author_location>Mountain View, CA</ghapi:author_location>
+<ghapi:author_affiliation>Google Inc.</ghapi:author_affiliation>
+<ghapi:type>ghapi</ghapi:type>
+<ghapi:hosted>true</ghapi:hosted>
+<ghapi:width>320</ghapi:width>
+<ghapi:height>136</ghapi:height>
+<ghapi:num_userprefs>1</ghapi:num_userprefs>
+<ghapi:weekly_pageviews>175740286</ghapi:weekly_pageviews></item><item>
+<title>Search YouTube</title>
+<link>http://throttled.org/googlegadgets/youtubesearch.xml</link>
+<guid>http://throttled.org/googlegadgets/youtubesearch.xml</guid>
+<description>A search module, which searches YouTube by tags.</description>
+<ghapi:screenshot>http://www.google.com/ig/cache/28/a3/28a39282258f1ba32b6f6468ae6d12bc.png</ghapi:screenshot>
+<ghapi:thumbnail>http://www.google.com/ig/cache/28/a3/28a39282258f1ba32b6f6468ae6d12bc-thm...</ghapi:thumbnail>
+<ghapi:category>tools</ghapi:category>
+<ghapi:category2>funandgames</ghapi:category2>
+<author>ewilliams1(a)gmail.com</author>
+<ghapi:author_name>Eddie Williams</ghapi:author_name>
+<ghapi:author_location>Arizona</ghapi:author_location>
+<ghapi:author_affiliation>eddiewilliams.org</ghapi:author_affiliation>
+<ghapi:author_photo>/ig/cache/28/a3/28a39282258f1ba32b6f6468ae6d12bc-author.png</ghapi:author_photo>
+<ghapi:type>ghapi</ghapi:type>
+<ghapi:hosted>false</ghapi:hosted>
+<ghapi:width>320</ghapi:width>
+<ghapi:height>200</ghapi:height>
+<ghapi:num_userprefs>0</ghapi:num_userprefs>
+<ghapi:weekly_pageviews>11928552</ghapi:weekly_pageviews></item><item>
+<title>PacMan v2.4</title>
+<link>http://www.schulz.dk/pacman.xml</link>
+<guid>http://www.schulz.dk/pacman.xml</guid>
+<description>The good old Pacman game. Instructions: Use the arrow keys to guide Pac-Man. P - Pause/unpause game Q - Quit game M - Mute/unmute sound L - Low quality on/off</description>
+<ghapi:screenshot>http://www.google.com/ig/modules/ov/module_pacman_full.png</ghapi:screenshot>
+<ghapi:thumbnail>http://www.google.com/ig/modules/ov/module_pacman.png</ghapi:thumbnail>
+<ghapi:category>funandgames</ghapi:category>
+<author>kimusan(a)gmail.com</author>
+<ghapi:author_name>Kim Schulz.</ghapi:author_name>
+<ghapi:author_location>Aalborg, Denmark</ghapi:author_location>
+<ghapi:author_affiliation>Opensource world.</ghapi:author_affiliation>
+<ghapi:author_photo>/ig/cache/8f/2a/8f2aa11b287f5072ff77bc19e66ff78f-author.png</ghapi:author_photo>
+<ghapi:type>ghapi</ghapi:type>
+<ghapi:hosted>false</ghapi:hosted>
+<ghapi:width>320</ghapi:width>
+<ghapi:height>420</ghapi:height>
+<ghapi:num_userprefs>0</ghapi:num_userprefs>
+<ghapi:weekly_pageviews>7248983</ghapi:weekly_pageviews></item><item>
+<title>Bowling</title>
+<link>http://googlegadgets.neoteksystems.com/bowlinggadget.xml</link>
+<guid>http://googlegadgets.neoteksystems.com/bowlinggadget.xml</guid>
+<description>With a little practice you be knocking down pins like the pros with this cool game.</description>
+<ghapi:screenshot>http://www.google.com/ig/cache/60/a2/60a251befa8f2eceb1dd877b29a7c685.png</ghapi:screenshot>
+<ghapi:thumbnail>http://www.google.com/ig/cache/60/a2/60a251befa8f2eceb1dd877b29a7c685-thm...</ghapi:thumbnail>
+<ghapi:category>funandgames</ghapi:category>
+<author>googleGadgets(at)neoteksystems.com</author>
+<ghapi:author_name>NeoTekSystems</ghapi:author_name>
+<ghapi:author_location>Greer, SC</ghapi:author_location>
+<ghapi:author_affiliation>NeoTekSystems</ghapi:author_affiliation>
+<ghapi:type>ghapi</ghapi:type>
+<ghapi:hosted>false</ghapi:hosted>
+<ghapi:width>320</ghapi:width>
+<ghapi:height>500</ghapi:height>
+<ghapi:num_userprefs>0</ghapi:num_userprefs>
+<ghapi:weekly_pageviews>451998</ghapi:weekly_pageviews></item><item>
+<title>Fitness Tip of the Day</title>
+<link>http://phillip132.googlepages.com/fitness.xml</link>
+<guid>http://phillip132.googlepages.com/fitness.xml</guid>
+<description>Daily tips and quotes about fitness and exercise.</description>
+<ghapi:screenshot>http://www.google.com/ig/cache/c2/5d/c25dc64c96b128a50c313cb3ddf20be4.png</ghapi:screenshot>
+<ghapi:thumbnail>http://www.google.com/ig/cache/c2/5d/c25dc64c96b128a50c313cb3ddf20be4-thm...</ghapi:thumbnail>
+<ghapi:category>lifestyle</ghapi:category>
+<ghapi:category2>communication</ghapi:category2>
+<author>phillip132(a)gmail.com</author>
+<ghapi:author_name>Phillip Olsen</ghapi:author_name>
+<ghapi:type>ghapi</ghapi:type>
+<ghapi:hosted>false</ghapi:hosted>
+<ghapi:width>320</ghapi:width>
+<ghapi:height>140</ghapi:height>
+<ghapi:num_userprefs>0</ghapi:num_userprefs>
+<ghapi:weekly_pageviews>1594201</ghapi:weekly_pageviews></item><item>
+<title>myWeather</title>
+<link>http://www.notkewl.com/myWeather/myWeather.xml</link>
+<guid>http://www.notkewl.com/myWeather/myWeather.xml</guid>
+<description>View the weather for your area! Just enter your zip code / location code for international cities (click the gadget title to go to the page to use the location code lookup) and choose the unit. 3 Day + Detailed forecast for each day. Enjoy this stylish obnocktious design. Gets weather information f...</description>
+<ghapi:screenshot>http://www.google.com/ig/images/no_preview.gif</ghapi:screenshot>
+<ghapi:thumbnail>http://www.google.com/ig/images/no_image/en_ALL.gif</ghapi:thumbnail>
+<ghapi:category>tools</ghapi:category>
+<ghapi:category2>news</ghapi:category2>
+<author>info(a)notkewl.com</author>
+<ghapi:author_name>Jani Lehti</ghapi:author_name>
+<ghapi:author_location>Flower Mound, TX</ghapi:author_location>
+<ghapi:author_affiliation>None</ghapi:author_affiliation>
+<ghapi:type>ghapi</ghapi:type>
+<ghapi:hosted>false</ghapi:hosted>
+<ghapi:width>280</ghapi:width>
+<ghapi:height>250</ghapi:height>
+<ghapi:num_userprefs>2</ghapi:num_userprefs>
+<ghapi:weekly_pageviews>872154</ghapi:weekly_pageviews></item><item>
+<title>MP3 Player</title>
+<link>http://mike.s.duffy.googlepages.com/mp3player.xml</link>
+<guid>http://mike.s.duffy.googlepages.com/mp3player.xml</guid>
+<description>A simple, elegant flash MP3 player from ODEO. Use the edit menu to enter the URL of the MP3 file you wish to listen to.</description>
+<ghapi:screenshot>http://www.google.com/ig/cache/44/13/44135cfdb83465944f63f794f875d0c0.png</ghapi:screenshot>
+<ghapi:thumbnail>http://www.google.com/ig/cache/44/13/44135cfdb83465944f63f794f875d0c0-thm...</ghapi:thumbnail>
+<ghapi:category>funandgames</ghapi:category>
+<ghapi:category2>tools</ghapi:category2>
+<author>mike.s.duffy+gadget_feedback(a)gmail.com</author>
+<ghapi:author_name>Mike Duffy</ghapi:author_name>
+<ghapi:author_location>Davis, CA</ghapi:author_location>
+<ghapi:type>ghapi</ghapi:type>
+<ghapi:hosted>false</ghapi:hosted>
+<ghapi:width>320</ghapi:width>
+<ghapi:height>50</ghapi:height>
+<ghapi:num_userprefs>1</ghapi:num_userprefs>
+<ghapi:weekly_pageviews>159032</ghapi:weekly_pageviews></item><item>
+<title>Google Talk</title>
+<link>http://www.google.com/ig/modules/googletalk.xml</link>
+<guid>http://www.google.com/ig/modules/googletalk.xml</guid>
+<description>See your contacts and send instant messages.</description>
+<ghapi:screenshot>http://www.google.com/ig/cache/46/44/464445ab3ca9500a5558fdc7d7051365.png</ghapi:screenshot>
+<ghapi:thumbnail>http://www.google.com/ig/cache/46/44/464445ab3ca9500a5558fdc7d7051365-thm...</ghapi:thumbnail>
+<ghapi:category>communication</ghapi:category>
+<ghapi:category2>tools</ghapi:category2>
+<ghapi:author_name>Google Talk Team</ghapi:author_name>
+<ghapi:author_location>Kirkland, WA</ghapi:author_location>
+<ghapi:author_affiliation>Google, Inc.</ghapi:author_affiliation>
+<ghapi:type>ghapi</ghapi:type>
+<ghapi:hosted>true</ghapi:hosted>
+<ghapi:width>320</ghapi:width>
+<ghapi:height>451</ghapi:height>
+<ghapi:num_userprefs>0</ghapi:num_userprefs>
+<ghapi:weekly_pageviews>3710027</ghapi:weekly_pageviews></item><item>
+<title>Mini Web</title>
+<link>http://blog.outer-court.com/homepage/miniweb.xml</link>
+<guid>http://blog.outer-court.com/homepage/miniweb.xml</guid>
+<description>Displays a mini search which results in mini websites to be read on the personalized homepage. This module uses (or abuses) the Google Mobile search service.</description>
+<ghapi:screenshot>http://www.google.com/ig/modules/ov/module_miniweb_full.png</ghapi:screenshot>
+<ghapi:thumbnail>http://www.google.com/ig/modules/ov/module_miniweb.png</ghapi:thumbnail>
+<ghapi:category>tools</ghapi:category>
+<author>philipp.lenssen+widget(a)gmail.com</author>
+<ghapi:author_name>Philipp Lenssen</ghapi:author_name>
+<ghapi:author_location>Stuttgart, Germany</ghapi:author_location>
+<ghapi:author_affiliation>Google Blogoscoped</ghapi:author_affiliation>
+<ghapi:type>ghapi</ghapi:type>
+<ghapi:hosted>false</ghapi:hosted>
+<ghapi:width>320</ghapi:width>
+<ghapi:height>190</ghapi:height>
+<ghapi:num_userprefs>0</ghapi:num_userprefs>
+<ghapi:weekly_pageviews>22504</ghapi:weekly_pageviews></item><item>
+<title>Google Docs & Spreadsheets</title>
+<link>http://www.google.com/ig/modules/docs.xml</link>
+<guid>http://www.google.com/ig/modules/docs.xml</guid>
+<description>View your active Google documents and spreadsheets</description>
+<ghapi:screenshot>http://www.google.com/ig/modules/docs.png</ghapi:screenshot>
+<ghapi:thumbnail>http://www.google.com/ig/modules/docs-thm.png</ghapi:thumbnail>
+<ghapi:category>communication</ghapi:category>
+<ghapi:category2>tools</ghapi:category2>
+<author>claudiac.feedback+docs(a)gmail.com</author>
+<ghapi:author_name>Claudia C.</ghapi:author_name>
+<ghapi:author_location>Mountain View, CA</ghapi:author_location>
+<ghapi:author_affiliation>Google Inc.</ghapi:author_affiliation>
+<ghapi:type>ghapi</ghapi:type>
+<ghapi:hosted>true</ghapi:hosted>
+<ghapi:width>320</ghapi:width>
+<ghapi:height>50</ghapi:height>
+<ghapi:num_userprefs>2</ghapi:num_userprefs>
+<ghapi:weekly_pageviews>4296863</ghapi:weekly_pageviews></item><item>
+<title>Google Calendar Viewer</title>
+<link>http://ralph.feedback.googlepages.com/googlecalendarviewer.xml</link>
+<guid>http://ralph.feedback.googlepages.com/googlecalendarviewer.xml</guid>
+<description>Google Calendar Viewer</description>
+<ghapi:screenshot>http://www.google.com/ig/cache/8e/13/8e13d2ff945a0d45c66ff8665e017eab.png</ghapi:screenshot>
+<ghapi:thumbnail>http://www.google.com/ig/cache/8e/13/8e13d2ff945a0d45c66ff8665e017eab-thm...</ghapi:thumbnail>
+<ghapi:category>tools</ghapi:category>
+<author>ralph.feedback+googlecalendarviewer(a)gmail.com</author>
+<ghapi:author_name>Alex Sherwin, Eugen Kremer, Ralph S.</ghapi:author_name>
+<ghapi:author_location>Brighton, MI</ghapi:author_location>
+<ghapi:author_affiliation>Google Inc.</ghapi:author_affiliation>
+<ghapi:type>ghapi</ghapi:type>
+<ghapi:hosted>false</ghapi:hosted>
+<ghapi:width>320</ghapi:width>
+<ghapi:height>200</ghapi:height>
+<ghapi:num_userprefs>4</ghapi:num_userprefs>
+<ghapi:weekly_pageviews>1863052</ghapi:weekly_pageviews></item><item>
+<title>World Clocks</title>
+<link>http://www.ljmsite.com/google/gadgets/worldclocks.xml</link>
+<guid>http://www.ljmsite.com/google/gadgets/worldclocks.xml</guid>
+<description>Gadget for your Google homepage or website that displays multiple analog or digital clocks at the times in the selected time zones or countries/cities. The clocks can be synchronized with our server to always display the correct times. This gadget is especially useful when working with Globally Disp...</description>
+<ghapi:screenshot>http://www.google.com/ig/cache/38/24/382452f1075b88ce7e71312ce9b66329.png</ghapi:screenshot>
+<ghapi:thumbnail>http://www.google.com/ig/cache/38/24/382452f1075b88ce7e71312ce9b66329-thm...</ghapi:thumbnail>
+<ghapi:category>tools</ghapi:category>
+<author>worldclocks_feedback(a)ljmsite.com</author>
+<ghapi:author_name>Jerome Mouton</ghapi:author_name>
+<ghapi:author_location>Huntsville, AL, USA</ghapi:author_location>
+<ghapi:author_affiliation>None</ghapi:author_affiliation>
+<ghapi:type>ghapi</ghapi:type>
+<ghapi:hosted>false</ghapi:hosted>
+<ghapi:width>320</ghapi:width>
+<ghapi:height>300</ghapi:height>
+<ghapi:num_userprefs>26</ghapi:num_userprefs>
+<ghapi:weekly_pageviews>3865626</ghapi:weekly_pageviews></item><item>
+<title>YouTube Player</title>
+<link>http://padmanijain.googlepages.com/1YTP_6.xml</link>
+<guid>http://padmanijain.googlepages.com/1YTP_6.xml</guid>
+<description>You can search, play and download YouTube videos on your webpage.</description>
+<ghapi:screenshot>http://www.google.com/ig/cache/10/a4/10a4db9d35393ca04c34474dbae6290a.png</ghapi:screenshot>
+<ghapi:thumbnail>http://www.google.com/ig/cache/10/a4/10a4db9d35393ca04c34474dbae6290a-thm...</ghapi:thumbnail>
+<ghapi:category>funandgames</ghapi:category>
+<ghapi:category2>tools</ghapi:category2>
+<author>vi_ja(a)hotmail.com</author>
+<ghapi:author_name>Vineet Jain</ghapi:author_name>
+<ghapi:author_location>Ottawa, ON, Canada.</ghapi:author_location>
+<ghapi:author_affiliation>Cisco Systems.</ghapi:author_affiliation>
+<ghapi:type>ghapi</ghapi:type>
+<ghapi:hosted>false</ghapi:hosted>
+<ghapi:width>220</ghapi:width>
+<ghapi:height>330</ghapi:height>
+<ghapi:num_userprefs>2</ghapi:num_userprefs>
+<ghapi:weekly_pageviews>85715</ghapi:weekly_pageviews></item><item>
+<title>Google Calendar</title>
+<link>http://www.google.com/ig/modules/calendar-for-your-site.xml</link>
+<guid>http://www.google.com/ig/modules/calendar-for-your-site.xml</guid>
+<description>Google Calendar for your site, webpage or blog</description>
+<ghapi:screenshot>http://www.google.com/ig/modules/calendar.png</ghapi:screenshot>
+<ghapi:thumbnail>http://www.google.com/ig/modules/calendar-thm.png</ghapi:thumbnail>
+<ghapi:category>communication</ghapi:category>
+<ghapi:category2>tools</ghapi:category2>
+<author>michael.feedback(a)gmail.com</author>
+<ghapi:author_name>Michael B.</ghapi:author_name>
+<ghapi:author_location>Palo Alto, CA</ghapi:author_location>
+<ghapi:author_affiliation>Google Inc.</ghapi:author_affiliation>
+<ghapi:type>ghapi</ghapi:type>
+<ghapi:hosted>true</ghapi:hosted>
+<ghapi:width>320</ghapi:width>
+<ghapi:height>450</ghapi:height>
+<ghapi:num_userprefs>19</ghapi:num_userprefs>
+<ghapi:weekly_pageviews>524170</ghapi:weekly_pageviews></item><item>
+<title>The Weather Channel</title>
+<link>http://gadgets.weather.com/services/gadgets/googlegadget/gadget.xml</link>
+<guid>http://gadgets.weather.com/services/gadgets/googlegadget/gadget.xml</guid>
+<description>The Weather Channel Google Gadget provides local weather forecasts based upon city or US Zip Code</description>
+<ghapi:screenshot>http://www.google.com/ig/cache/da/c4/dac4011be823372e081fda0bbd81d470.png</ghapi:screenshot>
+<ghapi:thumbnail>http://www.google.com/ig/cache/da/c4/dac4011be823372e081fda0bbd81d470-thm...</ghapi:thumbnail>
+<ghapi:category>news</ghapi:category>
+<ghapi:category2>tools</ghapi:category2>
+<author>googlegadget(a)talk2.weather.com</author>
+<ghapi:author_name>The Weather Channel</ghapi:author_name>
+<ghapi:author_affiliation>The Weather Channel Interactive</ghapi:author_affiliation>
+<ghapi:type>ghapi</ghapi:type>
+<ghapi:hosted>false</ghapi:hosted>
+<ghapi:width>320</ghapi:width>
+<ghapi:height>380</ghapi:height>
+<ghapi:num_userprefs>0</ghapi:num_userprefs>
+<ghapi:weekly_pageviews>1129521</ghapi:weekly_pageviews></item><item>
+<title>Music Box</title>
+<link>http://widget4u.googlepages.com/gmusicbox.xml</link>
+<guid>http://widget4u.googlepages.com/gmusicbox.xml</guid>
+<description>a Music Box which you can add music</description>
+<ghapi:screenshot>http://www.google.com/ig/images/no_preview.gif</ghapi:screenshot>
+<ghapi:thumbnail>http://www.google.com/ig/images/no_image/en_ALL.gif</ghapi:thumbnail>
+<ghapi:category>tools</ghapi:category>
+<ghapi:category2>funandgames</ghapi:category2>
+<author>steven4u(a)gmailo.com</author>
+<ghapi:author_name>Steven</ghapi:author_name>
+<ghapi:author_location>Macau</ghapi:author_location>
+<ghapi:type>ghapi</ghapi:type>
+<ghapi:hosted>false</ghapi:hosted>
+<ghapi:width>320</ghapi:width>
+<ghapi:height>150</ghapi:height>
+<ghapi:num_userprefs>0</ghapi:num_userprefs>
+<ghapi:weekly_pageviews>8994</ghapi:weekly_pageviews></item><item>
+<title>Microsoft Outlook</title>
+<link>http://andyast.googlepages.com/MSOutlookWidget.xml</link>
+<guid>http://andyast.googlepages.com/MSOutlookWidget.xml</guid>
+<description>MS Outlook Inbox and Calendar</description>
+<ghapi:screenshot>http://www.google.com/ig/cache/1d/04/1d04b237d695e00f7345d8b32deda210.png</ghapi:screenshot>
+<ghapi:thumbnail>http://www.google.com/ig/cache/1d/04/1d04b237d695e00f7345d8b32deda210-thm...</ghapi:thumbnail>
+<ghapi:category>tools</ghapi:category>
+<author>andyast(a)gmail.com</author>
+<ghapi:author_name>Andy Steinmann</ghapi:author_name>
+<ghapi:author_location>Nixa, MO</ghapi:author_location>
+<ghapi:type>ghapi</ghapi:type>
+<ghapi:hosted>false</ghapi:hosted>
+<ghapi:width>400</ghapi:width>
+<ghapi:height>600</ghapi:height>
+<ghapi:num_userprefs>1</ghapi:num_userprefs>
+<ghapi:weekly_pageviews>365631</ghapi:weekly_pageviews></item><item>
+<title>Mario is Back!</title>
+<link>http://homepagegadgets.googlepages.com/mario.xml</link>
+<guid>http://homepagegadgets.googlepages.com/mario.xml</guid>
+<description>The most played game ever - Mario is Back! Add to your homepage now and get back to classic arcade action...</description>
+<ghapi:screenshot>http://www.google.com/ig/cache/4d/6b/4d6bf0c2f809d2301c0f708f8dc9596d.png</ghapi:screenshot>
+<ghapi:thumbnail>http://www.google.com/ig/cache/4d/6b/4d6bf0c2f809d2301c0f708f8dc9596d-thm...</ghapi:thumbnail>
+<ghapi:category>funandgames</ghapi:category>
+<author>bijoy(a)jsplash.com</author>
+<ghapi:author_name>Bijoy Thangaraj</ghapi:author_name>
+<ghapi:author_location>Trivandrum, Kerala, India</ghapi:author_location>
+<ghapi:author_affiliation>None</ghapi:author_affiliation>
+<ghapi:author_photo>/ig/cache/4d/6b/4d6bf0c2f809d2301c0f708f8dc9596d-author.png</ghapi:author_photo>
+<ghapi:type>ghapi</ghapi:type>
+<ghapi:hosted>false</ghapi:hosted>
+<ghapi:width>320</ghapi:width>
+<ghapi:height>200</ghapi:height>
+<ghapi:num_userprefs>0</ghapi:num_userprefs>
+<ghapi:weekly_pageviews>1198197</ghapi:weekly_pageviews></item><item>
+<title>Yahoo! Messenger</title>
+<link>http://whizzgadgets.googlepages.com/yahoo.xml</link>
+<guid>http://whizzgadgets.googlepages.com/yahoo.xml</guid>
+<description>Chat with your Yahoo! buddies anywhere, anytime. All you need is your personalized homepage.</description>
+<ghapi:screenshot>http://www.google.com/ig/cache/d9/75/d975f79b14a9d2ad5f1038a231d86362.png</ghapi:screenshot>
+<ghapi:thumbnail>http://www.google.com/ig/cache/d9/75/d975f79b14a9d2ad5f1038a231d86362-thm...</ghapi:thumbnail>
+<ghapi:category>tools</ghapi:category>
+<ghapi:category2>communication</ghapi:category2>
+<author>grenardus(a)gmail.com</author>
+<ghapi:author_name>Whizz</ghapi:author_name>
+<ghapi:author_location>The Netherlands</ghapi:author_location>
+<ghapi:type>ghapi</ghapi:type>
+<ghapi:hosted>false</ghapi:hosted>
+<ghapi:width>320</ghapi:width>
+<ghapi:height>400</ghapi:height>
+<ghapi:num_userprefs>0</ghapi:num_userprefs>
+<ghapi:weekly_pageviews>151198</ghapi:weekly_pageviews></item><item>
+<title>Weather by Weather.com</title>
+<link>http://timcwebman.googlepages.com/weather.xml</link>
+<guid>http://timcwebman.googlepages.com/weather.xml</guid>
+<description>This module is designed to give you the weather as Weather.com reports it. Enter your zip code (required), choose your unit of measure, pick from the list of available styles, and display either vertically (nice for small resolutions) or horizontally (default). This module currently only works fo...</description>
+<ghapi:screenshot>http://www.google.com/ig/cache/46/63/46631770b202d7d4f6cf46d3f3650394.png</ghapi:screenshot>
+<ghapi:thumbnail>http://www.google.com/ig/cache/46/63/46631770b202d7d4f6cf46d3f3650394-thm...</ghapi:thumbnail>
+<ghapi:category>news</ghapi:category>
+<author>timcwebman(a)gmail.com</author>
+<ghapi:author_name>Tim</ghapi:author_name>
+<ghapi:author_location>Lawrence, KS</ghapi:author_location>
+<ghapi:author_affiliation>None</ghapi:author_affiliation>
+<ghapi:type>ghapi</ghapi:type>
+<ghapi:hosted>false</ghapi:hosted>
+<ghapi:width>320</ghapi:width>
+<ghapi:height>180</ghapi:height>
+<ghapi:num_userprefs>4</ghapi:num_userprefs>
+<ghapi:weekly_pageviews>666303</ghapi:weekly_pageviews></item><item>
+<title>Laszlo ClockBlox</title>
+<link>http://www.openlaszlo.org/apps/clockblox.xml</link>
+<guid>http://www.openlaszlo.org/apps/clockblox.xml</guid>
+<description>a small clock written using Laszlo's LZX language</description>
+<ghapi:screenshot>http://www.google.com/ig/modules/ov/module_laszloclock_full.png</ghapi:screenshot>
+<ghapi:thumbnail>http://www.google.com/ig/modules/ov/module_laszloclock.png</ghapi:thumbnail>
+<ghapi:category>tools</ghapi:category>
+<ghapi:category2></ghapi:category2>
+<author>enw(a)laszlosystems.com</author>
+<ghapi:author_name>Elliot Winard</ghapi:author_name>
+<ghapi:author_location>San Francisco, CA</ghapi:author_location>
+<ghapi:author_affiliation>Laszlo Systems, Inc.</ghapi:author_affiliation>
+<ghapi:author_photo>/ig/modules/ov/developer_elliot.jpg</ghapi:author_photo>
+<ghapi:type>ghapi</ghapi:type>
+<ghapi:hosted>false</ghapi:hosted>
+<ghapi:width>320</ghapi:width>
+<ghapi:height>150</ghapi:height>
+<ghapi:num_userprefs>0</ghapi:num_userprefs>
+<ghapi:weekly_pageviews>575022</ghapi:weekly_pageviews></item><item>
+<title>Spider</title>
+<link>http://abowman.googlepages.com/spider.xml</link>
+<guid>http://abowman.googlepages.com/spider.xml</guid>
+<description>Add this spider to your page and watch it crawl around and follow your mouse. The latest update added more realism to the spider and allows you to change its color, size, and speed. You can also add an image behind the spider.</description>
+<ghapi:screenshot>http://www.google.com/ig/cache/df/7f/df7fc65a0a97e3365af350f8f6a58c3f.png</ghapi:screenshot>
+<ghapi:thumbnail>http://www.google.com/ig/cache/df/7f/df7fc65a0a97e3365af350f8f6a58c3f-thm...</ghapi:thumbnail>
+<ghapi:category>funandgames</ghapi:category>
+<author>adbocode(a)gmail.com</author>
+<ghapi:author_name>Adam Bowman</ghapi:author_name>
+<ghapi:author_location>Hallowell, Maine</ghapi:author_location>
+<ghapi:author_photo>/ig/cache/df/7f/df7fc65a0a97e3365af350f8f6a58c3f-author.png</ghapi:author_photo>
+<ghapi:type>ghapi</ghapi:type>
+<ghapi:hosted>false</ghapi:hosted>
+<ghapi:width>320</ghapi:width>
+<ghapi:height>200</ghapi:height>
+<ghapi:num_userprefs>13</ghapi:num_userprefs>
+<ghapi:weekly_pageviews>864280</ghapi:weekly_pageviews></item><item>
+<title>Micro-TV</title>
+<link>http://www.cammap.net/tvlive/microtv.xml</link>
+<guid>http://www.cammap.net/tvlive/microtv.xml</guid>
+<description>Watch live international TV channels</description>
+<ghapi:screenshot>http://www.google.com/ig/cache/ce/4f/ce4fc514cce72178f072bc781fc245ca.png</ghapi:screenshot>
+<ghapi:thumbnail>http://www.google.com/ig/cache/ce/4f/ce4fc514cce72178f072bc781fc245ca-thm...</ghapi:thumbnail>
+<ghapi:category>lifestyle</ghapi:category>
+<ghapi:category2>tools</ghapi:category2>
+<author>only_serious_mail_can_be_sent_to_info(a)cammap.net</author>
+<ghapi:author_name>CamMap.net</ghapi:author_name>
+<ghapi:author_location>Amsterdam, Netherlands</ghapi:author_location>
+<ghapi:type>ghapi</ghapi:type>
+<ghapi:hosted>false</ghapi:hosted>
+<ghapi:width>160</ghapi:width>
+<ghapi:height>160</ghapi:height>
+<ghapi:num_userprefs>1</ghapi:num_userprefs>
+<ghapi:weekly_pageviews>17854</ghapi:weekly_pageviews></item><item>
+<title>Mini-Clock</title>
+<link>http://www.labpixies.com/campaigns/clock/mini_clock.xml</link>
+<guid>http://www.labpixies.com/campaigns/clock/mini_clock.xml</guid>
+<description>Mini-Clock, the coolest clock for your homepage, now mini-sized! Click the gallery button to select your favorite skin. Make your homepage come alive with our cool selection of skins, see the date and time with style.</description>
+<ghapi:screenshot>http://www.google.com/ig/cache/f4/c1/f4c1fcb3fa9dd6a01fc0cf2910f497b9.png</ghapi:screenshot>
+<ghapi:thumbnail>http://www.google.com/ig/cache/f4/c1/f4c1fcb3fa9dd6a01fc0cf2910f497b9-thm...</ghapi:thumbnail>
+<ghapi:category>tools</ghapi:category>
+<ghapi:category2>funandgames</ghapi:category2>
+<author>info+mini_clock(a)labpixies.com</author>
+<ghapi:author_name>LabPixies</ghapi:author_name>
+<ghapi:type>ghapi</ghapi:type>
+<ghapi:hosted>false</ghapi:hosted>
+<ghapi:width>320</ghapi:width>
+<ghapi:height>215</ghapi:height>
+<ghapi:num_userprefs>0</ghapi:num_userprefs>
+<ghapi:weekly_pageviews>422834</ghapi:weekly_pageviews></item></channel></rss>
Modified: trunk/widget/src/resources/widget-war/WEB-INF/jsp/edit.jsp
===================================================================
--- trunk/widget/src/resources/widget-war/WEB-INF/jsp/edit.jsp 2007-07-05 23:41:21 UTC (rev 7677)
+++ trunk/widget/src/resources/widget-war/WEB-INF/jsp/edit.jsp 2007-07-06 10:20:08 UTC (rev 7678)
@@ -69,7 +69,7 @@
<p>
<table style="width:100%;border:1px solid" cellspacing="0" cellpadding="0">
<%
- for (IteratorStatus i = new IteratorStatus(result.getWidgetIterator()); i.hasNext();)
+ for (IteratorStatus i = new IteratorStatus(result.entries()); i.hasNext();)
{
GGWidget widget = (GGWidget)i.next();
boolean selected = selWidget != null && selWidget.getId().equals(widget.getId());
16 years, 12 months
JBoss Portal SVN: r7677 - trunk/core/src/main/org/jboss/portal/core/ui/portlet/user.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-07-05 19:41:21 -0400 (Thu, 05 Jul 2007)
New Revision: 7677
Modified:
trunk/core/src/main/org/jboss/portal/core/ui/portlet/user/UserPortlet.java
Log:
JBPORTAL-1456 - It is impossible to delete once entered user profile property
Modified: trunk/core/src/main/org/jboss/portal/core/ui/portlet/user/UserPortlet.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/ui/portlet/user/UserPortlet.java 2007-07-05 23:38:54 UTC (rev 7676)
+++ trunk/core/src/main/org/jboss/portal/core/ui/portlet/user/UserPortlet.java 2007-07-05 23:41:21 UTC (rev 7677)
@@ -769,11 +769,11 @@
String type = userProfileModule.getProfileInfo().getPropertyInfo(User.INFO_USER_REGISTRATION_DATE).getType();
if (type.equals("java.util.Date"))
{
- putNonEmptyProperty(user, User.INFO_USER_REGISTRATION_DATE, new Date());
+ putProperty(user, User.INFO_USER_REGISTRATION_DATE, new Date());
}
else if (type.equals("java.lang.String"))
{
- putNonEmptyProperty(user, User.INFO_USER_REGISTRATION_DATE, new Date().toString());
+ putProperty(user, User.INFO_USER_REGISTRATION_DATE, new Date().toString());
}
else
{
@@ -988,25 +988,13 @@
if (nbErrors == 0)
{
//
- if (givenName.trim().length() != 0)
- {
- setProperty(user, P3PConstants.INFO_USER_NAME_GIVEN, givenName);
- }
+ setProperty(user, P3PConstants.INFO_USER_NAME_GIVEN, givenName);
- if (familyName.trim().length() != 0)
- {
- setProperty(user, P3PConstants.INFO_USER_NAME_FAMILY, familyName);
- }
+ setProperty(user, P3PConstants.INFO_USER_NAME_FAMILY, familyName);
- if (realEmail.trim().length() != 0)
- {
- setProperty(user, P3PConstants.INFO_USER_BUSINESS_INFO_ONLINE_EMAIL, realEmail);
- }
+ setProperty(user, P3PConstants.INFO_USER_BUSINESS_INFO_ONLINE_EMAIL, realEmail);
- if (fakeEmail.trim().length() != 0)
- {
- setProperty(user, User.INFO_USER_EMAIL_FAKE, fakeEmail);
- }
+ setProperty(user, User.INFO_USER_EMAIL_FAKE, fakeEmail);
setProperty(user, User.INFO_USER_VIEW_EMAIL_VIEW_REAL, Boolean.valueOf(viewRealEmail));
@@ -1045,24 +1033,24 @@
}
else
{
- putNonEmptyProperty(user, User.INFO_USER_THEME, theme);
+ putProperty(user, User.INFO_USER_THEME, theme);
}
//
- putNonEmptyProperty(user, User.INFO_USER_HOMEPAGE, homepage);
- putNonEmptyProperty(user, User.INFO_USER_SECURITY_QUESTION, question);
- putNonEmptyProperty(user, User.INFO_USER_SECURITY_ANSWER, answer);
- putNonEmptyProperty(user, User.INFO_USER_IM_ICQ, icq);
- putNonEmptyProperty(user, User.INFO_USER_IM_MSNM, msnm);
- putNonEmptyProperty(user, User.INFO_USER_IM_YIM, yim);
- putNonEmptyProperty(user, User.INFO_USER_IM_AIM, aim);
- putNonEmptyProperty(user, User.INFO_USER_IM_SKYPE, skype);
- putNonEmptyProperty(user, User.INFO_USER_IM_XMMP, xmmp);
- putNonEmptyProperty(user, User.INFO_USER_SIGNATURE, signature);
- putNonEmptyProperty(user, User.INFO_USER_LOCATION, location);
- putNonEmptyProperty(user, User.INFO_USER_OCCUPATION, occupation);
- putNonEmptyProperty(user, User.INFO_USER_INTERESTS, interests);
- putNonEmptyProperty(user, User.INFO_USER_EXTRA, extra);
+ putProperty(user, User.INFO_USER_HOMEPAGE, homepage);
+ putProperty(user, User.INFO_USER_SECURITY_QUESTION, question);
+ putProperty(user, User.INFO_USER_SECURITY_ANSWER, answer);
+ putProperty(user, User.INFO_USER_IM_ICQ, icq);
+ putProperty(user, User.INFO_USER_IM_MSNM, msnm);
+ putProperty(user, User.INFO_USER_IM_YIM, yim);
+ putProperty(user, User.INFO_USER_IM_AIM, aim);
+ putProperty(user, User.INFO_USER_IM_SKYPE, skype);
+ putProperty(user, User.INFO_USER_IM_XMMP, xmmp);
+ putProperty(user, User.INFO_USER_SIGNATURE, signature);
+ putProperty(user, User.INFO_USER_LOCATION, location);
+ putProperty(user, User.INFO_USER_OCCUPATION, occupation);
+ putProperty(user, User.INFO_USER_INTERESTS, interests);
+ putProperty(user, User.INFO_USER_EXTRA, extra);
// Set back to normal window state
resp.setWindowState(WindowState.NORMAL);
@@ -1393,25 +1381,17 @@
}
}
- private void putNonEmptyProperty(User user, String key, Object value)
+ private void putProperty(User user, String key, Object value)
{
- if (value != null)
+ try
{
- if (value instanceof String && !(((String)value).trim().length() != 0) )
- {
- return;
- }
- //user.getProfile().put(key, value);
- try
- {
- userProfileModule.setProperty(user, key, value);
- }
- catch (IdentityException e)
- {
- //TODO: change to error
- log.info("Cannot set profile property: ", e);
- }
+ userProfileModule.setProperty(user, key, value);
}
+ catch (IdentityException e)
+ {
+ //TODO: change to error
+ log.info("Cannot set profile property: ", e);
+ }
}
public void deleteUser(JBossActionRequest request, JBossActionResponse response)
16 years, 12 months
JBoss Portal SVN: r7676 - branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/ui/portlet/user.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-07-05 19:38:54 -0400 (Thu, 05 Jul 2007)
New Revision: 7676
Modified:
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/ui/portlet/user/UserPortlet.java
Log:
JBPORTAL-1456 - It is impossible to delete once entered user profile property
Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/ui/portlet/user/UserPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/ui/portlet/user/UserPortlet.java 2007-07-05 23:15:40 UTC (rev 7675)
+++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/ui/portlet/user/UserPortlet.java 2007-07-05 23:38:54 UTC (rev 7676)
@@ -771,11 +771,11 @@
String type = userProfileModule.getProfileInfo().getPropertyInfo(User.INFO_USER_REGISTRATION_DATE).getType();
if (type.equals("java.util.Date"))
{
- putNonEmptyProperty(user, User.INFO_USER_REGISTRATION_DATE, new Date());
+ putProperty(user, User.INFO_USER_REGISTRATION_DATE, new Date());
}
else if (type.equals("java.lang.String"))
{
- putNonEmptyProperty(user, User.INFO_USER_REGISTRATION_DATE, new Date().toString());
+ putProperty(user, User.INFO_USER_REGISTRATION_DATE, new Date().toString());
}
else
{
@@ -1001,25 +1001,13 @@
if (nbErrors == 0)
{
//
- if (givenName.trim().length() != 0)
- {
- setProperty(user, P3PConstants.INFO_USER_NAME_GIVEN, givenName);
- }
+ setProperty(user, P3PConstants.INFO_USER_NAME_GIVEN, givenName);
- if (familyName.trim().length() != 0)
- {
- setProperty(user, P3PConstants.INFO_USER_NAME_FAMILY, familyName);
- }
+ setProperty(user, P3PConstants.INFO_USER_NAME_FAMILY, familyName);
- if (realEmail.trim().length() != 0)
- {
- setProperty(user, P3PConstants.INFO_USER_BUSINESS_INFO_ONLINE_EMAIL, realEmail);
- }
+ setProperty(user, P3PConstants.INFO_USER_BUSINESS_INFO_ONLINE_EMAIL, realEmail);
- if (fakeEmail.trim().length() != 0)
- {
- setProperty(user, User.INFO_USER_EMAIL_FAKE, fakeEmail);
- }
+ setProperty(user, User.INFO_USER_EMAIL_FAKE, fakeEmail);
setProperty(user, User.INFO_USER_VIEW_EMAIL_VIEW_REAL, Boolean.valueOf(viewRealEmail));
@@ -1058,24 +1046,24 @@
}
else
{
- putNonEmptyProperty(user, User.INFO_USER_THEME, theme);
+ putProperty(user, User.INFO_USER_THEME, theme);
}
//
- putNonEmptyProperty(user, User.INFO_USER_HOMEPAGE, homepage);
- putNonEmptyProperty(user, User.INFO_USER_SECURITY_QUESTION, question);
- putNonEmptyProperty(user, User.INFO_USER_SECURITY_ANSWER, answer);
- putNonEmptyProperty(user, User.INFO_USER_IM_ICQ, icq);
- putNonEmptyProperty(user, User.INFO_USER_IM_MSNM, msnm);
- putNonEmptyProperty(user, User.INFO_USER_IM_YIM, yim);
- putNonEmptyProperty(user, User.INFO_USER_IM_AIM, aim);
- putNonEmptyProperty(user, User.INFO_USER_IM_SKYPE, skype);
- putNonEmptyProperty(user, User.INFO_USER_IM_XMMP, xmmp);
- putNonEmptyProperty(user, User.INFO_USER_SIGNATURE, signature);
- putNonEmptyProperty(user, User.INFO_USER_LOCATION, location);
- putNonEmptyProperty(user, User.INFO_USER_OCCUPATION, occupation);
- putNonEmptyProperty(user, User.INFO_USER_INTERESTS, interests);
- putNonEmptyProperty(user, User.INFO_USER_EXTRA, extra);
+ putProperty(user, User.INFO_USER_HOMEPAGE, homepage);
+ putProperty(user, User.INFO_USER_SECURITY_QUESTION, question);
+ putProperty(user, User.INFO_USER_SECURITY_ANSWER, answer);
+ putProperty(user, User.INFO_USER_IM_ICQ, icq);
+ putProperty(user, User.INFO_USER_IM_MSNM, msnm);
+ putProperty(user, User.INFO_USER_IM_YIM, yim);
+ putProperty(user, User.INFO_USER_IM_AIM, aim);
+ putProperty(user, User.INFO_USER_IM_SKYPE, skype);
+ putProperty(user, User.INFO_USER_IM_XMMP, xmmp);
+ putProperty(user, User.INFO_USER_SIGNATURE, signature);
+ putProperty(user, User.INFO_USER_LOCATION, location);
+ putProperty(user, User.INFO_USER_OCCUPATION, occupation);
+ putProperty(user, User.INFO_USER_INTERESTS, interests);
+ putProperty(user, User.INFO_USER_EXTRA, extra);
// Set back to normal window state
resp.setWindowState(WindowState.NORMAL);
@@ -1406,25 +1394,17 @@
}
}
- private void putNonEmptyProperty(User user, String key, Object value)
+ private void putProperty(User user, String key, Object value)
{
- if (value != null)
+ try
{
- if (value instanceof String && !(((String)value).trim().length() != 0) )
- {
- return;
- }
- //user.getProfile().put(key, value);
- try
- {
- userProfileModule.setProperty(user, key, value);
- }
- catch (IdentityException e)
- {
- //TODO: change to error
- log.info("Cannot set profile property: ", e);
- }
+ userProfileModule.setProperty(user, key, value);
}
+ catch (IdentityException e)
+ {
+ //TODO: change to error
+ log.info("Cannot set profile property: ", e);
+ }
}
public void deleteUser(JBossActionRequest request, JBossActionResponse response)
16 years, 12 months