JBoss Portal SVN: r13808 - in branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src: main/org/jboss/portal/widget/google and 3 other directories.
by portal-commits@lists.jboss.org
Author: mageshbk(a)jboss.com
Date: 2009-09-24 06:18:46 -0400 (Thu, 24 Sep 2009)
New Revision: 13808
Modified:
branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src/main/org/jboss/portal/widget/AbstractWidgetPortlet.java
branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src/main/org/jboss/portal/widget/google/GGWidgetPortlet.java
branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidgetPortlet.java
branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src/resources/portal-widget-netvibes-war/WEB-INF/portlet.xml
branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src/resources/portal-widget-war/WEB-INF/portlet.xml
Log:
[JBEPP-120] - Additional parameters for gadgets are lost when the gadgets are displayed - merged from EPP branch
Modified: branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src/main/org/jboss/portal/widget/AbstractWidgetPortlet.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src/main/org/jboss/portal/widget/AbstractWidgetPortlet.java 2009-09-24 05:04:24 UTC (rev 13807)
+++ branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src/main/org/jboss/portal/widget/AbstractWidgetPortlet.java 2009-09-24 10:18:46 UTC (rev 13808)
@@ -28,6 +28,7 @@
import javax.portlet.PortletConfig;
import javax.portlet.PortletException;
import javax.portlet.PortletMode;
+import javax.xml.namespace.QName;
/**
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
@@ -53,6 +54,10 @@
/** .*/
protected final PortletMode EDIT_CONTENT = new PortletMode("edit_content");
+ protected static final QName CONTENT_SELECT = new QName("urn:jboss:portal:content", "select");
+
+ public static final String CONTENT_PARAMETER_PREFIX = "content.param.";
+
/**
* @return WidgetProvider
*/
Modified: branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src/main/org/jboss/portal/widget/google/GGWidgetPortlet.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src/main/org/jboss/portal/widget/google/GGWidgetPortlet.java 2009-09-24 05:04:24 UTC (rev 13807)
+++ branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src/main/org/jboss/portal/widget/google/GGWidgetPortlet.java 2009-09-24 10:18:46 UTC (rev 13808)
@@ -35,7 +35,6 @@
import javax.portlet.PortletSecurityException;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
-import javax.xml.namespace.QName;
import java.io.IOException;
import java.io.PrintWriter;
@@ -50,8 +49,6 @@
*/
public class GGWidgetPortlet extends AbstractWidgetPortlet
{
- private static final QName CONTENT_SELECT = new QName("urn:jboss:portal:content", "select");
-
/** . */
private GGProvider provider = new GGProvider();
@@ -81,11 +78,11 @@
{
Map.Entry<String, String[]> entry = (Map.Entry<String, String[]>)i.next();
String contentParamName = (String)entry.getKey();
- if (contentParamName.startsWith("content.param"))
+ if (contentParamName.startsWith(CONTENT_PARAMETER_PREFIX))
{
String[] contentParamValue = (String[])entry.getValue();
params.put(contentParamName, contentParamValue);
- widgetParams.put(contentParamName, contentParamValue[0]);
+ widgetParams.put(contentParamName.substring(CONTENT_PARAMETER_PREFIX.length()), contentParamValue[0]);
}
}
Modified: branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidgetPortlet.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidgetPortlet.java 2009-09-24 05:04:24 UTC (rev 13807)
+++ branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidgetPortlet.java 2009-09-24 10:18:46 UTC (rev 13808)
@@ -36,7 +36,6 @@
import javax.portlet.PortletSecurityException;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
-import javax.xml.namespace.QName;
import org.jboss.portal.api.content.SelectedContent;
import org.jboss.portal.widget.AbstractWidgetPortlet;
@@ -51,8 +50,6 @@
public class NetvibesWidgetPortlet extends AbstractWidgetPortlet
{
- private static final QName CONTENT_SELECT = new QName("urn:jboss:portal:content", "select");
-
/** . */
private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(NetvibesWidgetPortlet.class);
@@ -112,11 +109,11 @@
{
Map.Entry<String, String[]> entry = (Map.Entry<String, String[]>)i.next();
String contentParamName = (String)entry.getKey();
- if (contentParamName.startsWith("content.param"))
+ if (contentParamName.startsWith(CONTENT_PARAMETER_PREFIX))
{
String[] contentParamValue = (String[])entry.getValue();
params.put(contentParamName, contentParamValue);
- widgetParams.put(contentParamName.substring("content.param.".length()), contentParamValue[0]);
+ widgetParams.put(contentParamName.substring(CONTENT_PARAMETER_PREFIX.length()), contentParamValue[0]);
}
}
Modified: branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src/resources/portal-widget-netvibes-war/WEB-INF/portlet.xml
===================================================================
--- branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src/resources/portal-widget-netvibes-war/WEB-INF/portlet.xml 2009-09-24 05:04:24 UTC (rev 13807)
+++ branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src/resources/portal-widget-netvibes-war/WEB-INF/portlet.xml 2009-09-24 10:18:46 UTC (rev 13808)
@@ -66,7 +66,7 @@
<title>Netvibes Widget</title>
<keywords>widget,netvibes</keywords>
</portlet-info>
- <supported-publishing-event xmlns:x="urn:jboss:portal:content">x:select</supported-publishing-event>
+ <supported-publishing-event><qname xmlns:x="urn:jboss:portal:content">x:select</qname></supported-publishing-event>
<supported-public-render-parameter>uri</supported-public-render-parameter>
<supported-public-render-parameter>parameters</supported-public-render-parameter>
</portlet>
Modified: branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src/resources/portal-widget-war/WEB-INF/portlet.xml
===================================================================
--- branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src/resources/portal-widget-war/WEB-INF/portlet.xml 2009-09-24 05:04:24 UTC (rev 13807)
+++ branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src/resources/portal-widget-war/WEB-INF/portlet.xml 2009-09-24 10:18:46 UTC (rev 13808)
@@ -61,8 +61,9 @@
<title>Google Widget</title>
<keywords>widget,google</keywords>
</portlet-info>
- <supported-publishing-event xmlns:x="urn:jboss:portal:content">x:select</supported-publishing-event>
+ <supported-publishing-event><qname xmlns:x="urn:jboss:portal:content">x:select</qname></supported-publishing-event>
<supported-public-render-parameter>uri</supported-public-render-parameter>
+ <supported-public-render-parameter>parameters</supported-public-render-parameter>
</portlet>
<event-definition>
@@ -75,4 +76,8 @@
<qname xmlns:c="urn:jboss:portal:content">c:uri</qname>
</public-render-parameter>
+ <public-render-parameter>
+ <identifier>parameters</identifier>
+ <qname xmlns:c="urn:jboss:portal:content">c:parameters</qname>
+ </public-render-parameter>
</portlet-app>
14 years, 7 months
JBoss Portal SVN: r13807 - branches.
by portal-commits@lists.jboss.org
Author: mageshbk(a)jboss.com
Date: 2009-09-24 01:04:24 -0400 (Thu, 24 Sep 2009)
New Revision: 13807
Added:
branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/
Log:
[JBEPP-120] Branch for patch
Copied: branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120 (from rev 13806, tags/Enterprise_Portal_Platform_4_3_GA_CP02)
14 years, 7 months
JBoss Portal SVN: r13806 - branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model.
by portal-commits@lists.jboss.org
Author: sviluppatorefico
Date: 2009-09-22 05:23:30 -0400 (Tue, 22 Sep 2009)
New Revision: 13806
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/CustomizationManagerService.java
Log:
It fixes a bug when the user take the dashboard for the first time. If there is some denied access, the dashboard is half imported and it generates a NullPointerException. See JBPORTAL-2456
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/CustomizationManagerService.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/CustomizationManagerService.java 2009-09-16 16:34:38 UTC (rev 13805)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/CustomizationManagerService.java 2009-09-22 09:23:30 UTC (rev 13806)
@@ -331,7 +331,7 @@
{
portalObject.copy(to, portalObject.getName(), false);
}
- copy(portalObject, to.getChild(portalObject.getName()));
+ copy(portalObject, to == null ? null : to.getChild(portalObject.getName()));
}
catch (IllegalArgumentException e)
{
14 years, 7 months
JBoss Portal SVN: r13805 - modules/portlet/trunk/portlet.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-09-16 12:34:38 -0400 (Wed, 16 Sep 2009)
New Revision: 13805
Modified:
modules/portlet/trunk/portlet/pom.xml
Log:
For newer Maven versions (such as used in Hudson)
Modified: modules/portlet/trunk/portlet/pom.xml
===================================================================
--- modules/portlet/trunk/portlet/pom.xml 2009-09-16 15:59:35 UTC (rev 13804)
+++ modules/portlet/trunk/portlet/pom.xml 2009-09-16 16:34:38 UTC (rev 13805)
@@ -51,6 +51,7 @@
<artifactId>jboss-unit-remote</artifactId>
<scope>test</scope>
</dependency>
+
</dependencies>
@@ -206,4 +207,4 @@
</plugins>
</build>
-</project>
\ No newline at end of file
+</project>
14 years, 7 months
JBoss Portal SVN: r13804 - modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-09-16 11:59:35 -0400 (Wed, 16 Sep 2009)
New Revision: 13804
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/MimeResponseImpl.java
Log:
Ignore attempts to change the content type once the output stream is obtained
Modified: modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/MimeResponseImpl.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/MimeResponseImpl.java 2009-09-10 19:24:02 UTC (rev 13803)
+++ modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/MimeResponseImpl.java 2009-09-16 15:59:35 UTC (rev 13804)
@@ -61,7 +61,13 @@
/** . */
private ContentBuffer responseContent;
+ /**
+ * The setContentType method must be called before the getWriter
+ * getPortletOutputStream methods. If called after, it should be ignored.
+ */
+ private boolean canSetContentType;
+
public MimeResponseImpl(PortletInvocation invocation, PortletRequestImpl preq)
{
super(invocation, preq);
@@ -73,6 +79,7 @@
this.bufferSize = 0;
this.contentTypeSet = false;
this.responseContent = new ContentBuffer();
+ this.canSetContentType = true;
}
protected abstract ContentResponse createMarkupResponse(
@@ -125,12 +132,17 @@
public void setContentType(String contentType)
{
- responseContent.setContentType(contentType);
- contentTypeSet = true;
+ if (canSetContentType)
+ {
+ responseContent.setContentType(contentType);
+ contentTypeSet = true;
+ }
+
}
public PrintWriter getWriter() throws IOException
{
+ canSetContentType = false;
if (responseContent.getContentType() == null)
{
responseContent.setContentType(preq.getResponseContentType());
@@ -142,6 +154,7 @@
public OutputStream getPortletOutputStream() throws IOException
{
+ canSetContentType = false;
if (responseContent.getContentType() == null)
{
responseContent.setContentType(preq.getResponseContentType());
14 years, 7 months
JBoss Portal SVN: r13803 - in branches/JBoss_Portal_Branch_2_7/widget/src: main/org/jboss/portal/widget/google and 3 other directories.
by portal-commits@lists.jboss.org
Author: mageshbk(a)jboss.com
Date: 2009-09-10 15:24:02 -0400 (Thu, 10 Sep 2009)
New Revision: 13803
Modified:
branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/AbstractWidgetPortlet.java
branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/google/GGWidgetPortlet.java
branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidgetPortlet.java
branches/JBoss_Portal_Branch_2_7/widget/src/resources/portal-widget-netvibes-war/WEB-INF/portlet.xml
branches/JBoss_Portal_Branch_2_7/widget/src/resources/portal-widget-war/WEB-INF/portlet.xml
Log:
[JBPORTAL-2453]-additional parameters for gadgets are lost when the gadgets are displayed - merged from EPP branch
Modified: branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/AbstractWidgetPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/AbstractWidgetPortlet.java 2009-09-09 13:03:05 UTC (rev 13802)
+++ branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/AbstractWidgetPortlet.java 2009-09-10 19:24:02 UTC (rev 13803)
@@ -28,6 +28,7 @@
import javax.portlet.PortletConfig;
import javax.portlet.PortletException;
import javax.portlet.PortletMode;
+import javax.xml.namespace.QName;
/**
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
@@ -53,6 +54,10 @@
/** .*/
protected final PortletMode EDIT_CONTENT = new PortletMode("edit_content");
+ protected static final QName CONTENT_SELECT = new QName("urn:jboss:portal:content", "select");
+
+ public static final String CONTENT_PARAMETER_PREFIX = "content.param.";
+
/**
* @return WidgetProvider
*/
Modified: branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/google/GGWidgetPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/google/GGWidgetPortlet.java 2009-09-09 13:03:05 UTC (rev 13802)
+++ branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/google/GGWidgetPortlet.java 2009-09-10 19:24:02 UTC (rev 13803)
@@ -35,7 +35,6 @@
import javax.portlet.PortletSecurityException;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
-import javax.xml.namespace.QName;
import java.io.IOException;
import java.io.PrintWriter;
@@ -50,8 +49,6 @@
*/
public class GGWidgetPortlet extends AbstractWidgetPortlet
{
- private static final QName CONTENT_SELECT = new QName("urn:jboss:portal:content", "select");
-
/** . */
private GGProvider provider = new GGProvider();
@@ -81,11 +78,11 @@
{
Map.Entry<String, String[]> entry = (Map.Entry<String, String[]>)i.next();
String contentParamName = (String)entry.getKey();
- if (contentParamName.startsWith("content.param"))
+ if (contentParamName.startsWith(CONTENT_PARAMETER_PREFIX))
{
String[] contentParamValue = (String[])entry.getValue();
params.put(contentParamName, contentParamValue);
- widgetParams.put(contentParamName, contentParamValue[0]);
+ widgetParams.put(contentParamName.substring(CONTENT_PARAMETER_PREFIX.length()), contentParamValue[0]);
}
}
Modified: branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidgetPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidgetPortlet.java 2009-09-09 13:03:05 UTC (rev 13802)
+++ branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidgetPortlet.java 2009-09-10 19:24:02 UTC (rev 13803)
@@ -36,7 +36,6 @@
import javax.portlet.PortletSecurityException;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
-import javax.xml.namespace.QName;
import org.jboss.portal.api.content.SelectedContent;
import org.jboss.portal.widget.AbstractWidgetPortlet;
@@ -51,8 +50,6 @@
public class NetvibesWidgetPortlet extends AbstractWidgetPortlet
{
- private static final QName CONTENT_SELECT = new QName("urn:jboss:portal:content", "select");
-
/** . */
private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(NetvibesWidgetPortlet.class);
@@ -112,11 +109,11 @@
{
Map.Entry<String, String[]> entry = (Map.Entry<String, String[]>)i.next();
String contentParamName = (String)entry.getKey();
- if (contentParamName.startsWith("content.param"))
+ if (contentParamName.startsWith(CONTENT_PARAMETER_PREFIX))
{
String[] contentParamValue = (String[])entry.getValue();
params.put(contentParamName, contentParamValue);
- widgetParams.put(contentParamName.substring("content.param.".length()), contentParamValue[0]);
+ widgetParams.put(contentParamName.substring(CONTENT_PARAMETER_PREFIX.length()), contentParamValue[0]);
}
}
Modified: branches/JBoss_Portal_Branch_2_7/widget/src/resources/portal-widget-netvibes-war/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/widget/src/resources/portal-widget-netvibes-war/WEB-INF/portlet.xml 2009-09-09 13:03:05 UTC (rev 13802)
+++ branches/JBoss_Portal_Branch_2_7/widget/src/resources/portal-widget-netvibes-war/WEB-INF/portlet.xml 2009-09-10 19:24:02 UTC (rev 13803)
@@ -66,7 +66,7 @@
<title>Netvibes Widget</title>
<keywords>widget,netvibes</keywords>
</portlet-info>
- <supported-publishing-event xmlns:x="urn:jboss:portal:content">x:select</supported-publishing-event>
+ <supported-publishing-event><qname xmlns:x="urn:jboss:portal:content">x:select</qname></supported-publishing-event>
<supported-public-render-parameter>uri</supported-public-render-parameter>
<supported-public-render-parameter>parameters</supported-public-render-parameter>
</portlet>
Modified: branches/JBoss_Portal_Branch_2_7/widget/src/resources/portal-widget-war/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/widget/src/resources/portal-widget-war/WEB-INF/portlet.xml 2009-09-09 13:03:05 UTC (rev 13802)
+++ branches/JBoss_Portal_Branch_2_7/widget/src/resources/portal-widget-war/WEB-INF/portlet.xml 2009-09-10 19:24:02 UTC (rev 13803)
@@ -61,8 +61,9 @@
<title>Google Widget</title>
<keywords>widget,google</keywords>
</portlet-info>
- <supported-publishing-event xmlns:x="urn:jboss:portal:content">x:select</supported-publishing-event>
+ <supported-publishing-event><qname xmlns:x="urn:jboss:portal:content">x:select</qname></supported-publishing-event>
<supported-public-render-parameter>uri</supported-public-render-parameter>
+ <supported-public-render-parameter>parameters</supported-public-render-parameter>
</portlet>
<event-definition>
@@ -75,4 +76,8 @@
<qname xmlns:c="urn:jboss:portal:content">c:uri</qname>
</public-render-parameter>
+ <public-render-parameter>
+ <identifier>parameters</identifier>
+ <qname xmlns:c="urn:jboss:portal:content">c:parameters</qname>
+ </public-render-parameter>
</portlet-app>
14 years, 7 months
JBoss Portal SVN: r13802 - in branches/Enterprise_Portal_Platform_4_3/widget/src: main/org/jboss/portal/widget/google and 3 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-09-09 09:03:05 -0400 (Wed, 09 Sep 2009)
New Revision: 13802
Modified:
branches/Enterprise_Portal_Platform_4_3/widget/src/main/org/jboss/portal/widget/AbstractWidgetPortlet.java
branches/Enterprise_Portal_Platform_4_3/widget/src/main/org/jboss/portal/widget/google/GGWidgetPortlet.java
branches/Enterprise_Portal_Platform_4_3/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidgetPortlet.java
branches/Enterprise_Portal_Platform_4_3/widget/src/resources/portal-widget-netvibes-war/WEB-INF/portlet.xml
branches/Enterprise_Portal_Platform_4_3/widget/src/resources/portal-widget-war/WEB-INF/portlet.xml
Log:
JBPORTAL-2453: additional parameters for gadgets are lost when the gadgets are displayed
Modified: branches/Enterprise_Portal_Platform_4_3/widget/src/main/org/jboss/portal/widget/AbstractWidgetPortlet.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/widget/src/main/org/jboss/portal/widget/AbstractWidgetPortlet.java 2009-09-02 11:38:42 UTC (rev 13801)
+++ branches/Enterprise_Portal_Platform_4_3/widget/src/main/org/jboss/portal/widget/AbstractWidgetPortlet.java 2009-09-09 13:03:05 UTC (rev 13802)
@@ -28,6 +28,7 @@
import javax.portlet.PortletConfig;
import javax.portlet.PortletException;
import javax.portlet.PortletMode;
+import javax.xml.namespace.QName;
/**
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
@@ -53,6 +54,10 @@
/** .*/
protected final PortletMode EDIT_CONTENT = new PortletMode("edit_content");
+ protected static final QName CONTENT_SELECT = new QName("urn:jboss:portal:content", "select");
+
+ public static final String CONTENT_PARAMETER_PREFIX = "content.param.";
+
/**
* @return WidgetProvider
*/
Modified: branches/Enterprise_Portal_Platform_4_3/widget/src/main/org/jboss/portal/widget/google/GGWidgetPortlet.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/widget/src/main/org/jboss/portal/widget/google/GGWidgetPortlet.java 2009-09-02 11:38:42 UTC (rev 13801)
+++ branches/Enterprise_Portal_Platform_4_3/widget/src/main/org/jboss/portal/widget/google/GGWidgetPortlet.java 2009-09-09 13:03:05 UTC (rev 13802)
@@ -35,7 +35,6 @@
import javax.portlet.PortletSecurityException;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
-import javax.xml.namespace.QName;
import java.io.IOException;
import java.io.PrintWriter;
@@ -50,8 +49,6 @@
*/
public class GGWidgetPortlet extends AbstractWidgetPortlet
{
- private static final QName CONTENT_SELECT = new QName("urn:jboss:portal:content", "select");
-
/** . */
private GGProvider provider = new GGProvider();
@@ -81,11 +78,11 @@
{
Map.Entry<String, String[]> entry = (Map.Entry<String, String[]>)i.next();
String contentParamName = (String)entry.getKey();
- if (contentParamName.startsWith("content.param"))
+ if (contentParamName.startsWith(CONTENT_PARAMETER_PREFIX))
{
String[] contentParamValue = (String[])entry.getValue();
params.put(contentParamName, contentParamValue);
- widgetParams.put(contentParamName, contentParamValue[0]);
+ widgetParams.put(contentParamName.substring(CONTENT_PARAMETER_PREFIX.length()), contentParamValue[0]);
}
}
Modified: branches/Enterprise_Portal_Platform_4_3/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidgetPortlet.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidgetPortlet.java 2009-09-02 11:38:42 UTC (rev 13801)
+++ branches/Enterprise_Portal_Platform_4_3/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidgetPortlet.java 2009-09-09 13:03:05 UTC (rev 13802)
@@ -36,7 +36,6 @@
import javax.portlet.PortletSecurityException;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
-import javax.xml.namespace.QName;
import org.jboss.portal.api.content.SelectedContent;
import org.jboss.portal.widget.AbstractWidgetPortlet;
@@ -51,8 +50,6 @@
public class NetvibesWidgetPortlet extends AbstractWidgetPortlet
{
- private static final QName CONTENT_SELECT = new QName("urn:jboss:portal:content", "select");
-
/** . */
private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(NetvibesWidgetPortlet.class);
@@ -112,11 +109,11 @@
{
Map.Entry<String, String[]> entry = (Map.Entry<String, String[]>)i.next();
String contentParamName = (String)entry.getKey();
- if (contentParamName.startsWith("content.param"))
+ if (contentParamName.startsWith(CONTENT_PARAMETER_PREFIX))
{
String[] contentParamValue = (String[])entry.getValue();
params.put(contentParamName, contentParamValue);
- widgetParams.put(contentParamName.substring("content.param.".length()), contentParamValue[0]);
+ widgetParams.put(contentParamName.substring(CONTENT_PARAMETER_PREFIX.length()), contentParamValue[0]);
}
}
Modified: branches/Enterprise_Portal_Platform_4_3/widget/src/resources/portal-widget-netvibes-war/WEB-INF/portlet.xml
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/widget/src/resources/portal-widget-netvibes-war/WEB-INF/portlet.xml 2009-09-02 11:38:42 UTC (rev 13801)
+++ branches/Enterprise_Portal_Platform_4_3/widget/src/resources/portal-widget-netvibes-war/WEB-INF/portlet.xml 2009-09-09 13:03:05 UTC (rev 13802)
@@ -66,7 +66,7 @@
<title>Netvibes Widget</title>
<keywords>widget,netvibes</keywords>
</portlet-info>
- <supported-publishing-event xmlns:x="urn:jboss:portal:content">x:select</supported-publishing-event>
+ <supported-publishing-event><qname xmlns:x="urn:jboss:portal:content">x:select</qname></supported-publishing-event>
<supported-public-render-parameter>uri</supported-public-render-parameter>
<supported-public-render-parameter>parameters</supported-public-render-parameter>
</portlet>
Modified: branches/Enterprise_Portal_Platform_4_3/widget/src/resources/portal-widget-war/WEB-INF/portlet.xml
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/widget/src/resources/portal-widget-war/WEB-INF/portlet.xml 2009-09-02 11:38:42 UTC (rev 13801)
+++ branches/Enterprise_Portal_Platform_4_3/widget/src/resources/portal-widget-war/WEB-INF/portlet.xml 2009-09-09 13:03:05 UTC (rev 13802)
@@ -61,8 +61,9 @@
<title>Google Widget</title>
<keywords>widget,google</keywords>
</portlet-info>
- <supported-publishing-event xmlns:x="urn:jboss:portal:content">x:select</supported-publishing-event>
+ <supported-publishing-event><qname xmlns:x="urn:jboss:portal:content">x:select</qname></supported-publishing-event>
<supported-public-render-parameter>uri</supported-public-render-parameter>
+ <supported-public-render-parameter>parameters</supported-public-render-parameter>
</portlet>
<event-definition>
@@ -75,4 +76,8 @@
<qname xmlns:c="urn:jboss:portal:content">c:uri</qname>
</public-render-parameter>
+ <public-render-parameter>
+ <identifier>parameters</identifier>
+ <qname xmlns:c="urn:jboss:portal:content">c:parameters</qname>
+ </public-render-parameter>
</portlet-app>
14 years, 8 months
JBoss Portal SVN: r13801 - in jbossexo/modules/wsrp/trunk: producer/src/main/java/org/jboss/portal/registration and 5 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-09-02 07:38:42 -0400 (Wed, 02 Sep 2009)
New Revision: 13801
Modified:
jbossexo/modules/wsrp/trunk/common/pom.xml
jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/registration/RegistrationManager.java
jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/endpoints/ProducerHolder.java
jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/exo/ExoKernelIntegration.java
jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/MarkupHandler.java
jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/PortletManagementHandler.java
jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/WSRPProducer.java
jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/WSRPProducerImpl.java
jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/ProducerConfiguration.java
jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/impl/ProducerConfigurationImpl.java
Log:
- Cleaned-up WSRPProducer interface to add configuration contract to interface.
- Moved session and init cookie configuration methods to ProducerConfiguration where they belong.
- Removed obsolete dependence on registration module.
Modified: jbossexo/modules/wsrp/trunk/common/pom.xml
===================================================================
--- jbossexo/modules/wsrp/trunk/common/pom.xml 2009-09-01 17:56:06 UTC (rev 13800)
+++ jbossexo/modules/wsrp/trunk/common/pom.xml 2009-09-02 11:38:42 UTC (rev 13801)
@@ -60,11 +60,6 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.jboss.portal.registration</groupId>
- <artifactId>registration-api</artifactId>
- <version>1.0.0-SNAPSHOT</version>
- </dependency>
- <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${version.slf4j}</version>
Modified: jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/registration/RegistrationManager.java
===================================================================
--- jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/registration/RegistrationManager.java 2009-09-01 17:56:06 UTC (rev 13800)
+++ jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/registration/RegistrationManager.java 2009-09-02 11:38:42 UTC (rev 13801)
@@ -27,6 +27,8 @@
import java.util.Map;
/**
+ * Manages consumer registrations with a producer.
+ *
* @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
* @version $Revision: 8966 $
* @since 2.6
Modified: jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/endpoints/ProducerHolder.java
===================================================================
--- jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/endpoints/ProducerHolder.java 2009-09-01 17:56:06 UTC (rev 13800)
+++ jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/endpoints/ProducerHolder.java 2009-09-02 11:38:42 UTC (rev 13801)
@@ -26,6 +26,8 @@
import org.jboss.portal.wsrp.producer.WSRPProducer;
/**
+ * Holds the current WSRPProducer as configured for a particular portlet container.
+ *
* @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
* @version $Revision$
*/
Modified: jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/exo/ExoKernelIntegration.java
===================================================================
--- jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/exo/ExoKernelIntegration.java 2009-09-01 17:56:06 UTC (rev 13800)
+++ jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/exo/ExoKernelIntegration.java 2009-09-02 11:38:42 UTC (rev 13801)
@@ -72,9 +72,9 @@
// create and wire WSRP producer
producer = new WSRPProducerImpl();
- producer.setInvoker(producerPortletInvoker);
+ producer.setPortletInvoker(producerPortletInvoker);
producer.setRegistrationManager(registrationManager);
- producer.setProducerConfigurationService(producerConfigurationService);
+ producer.setConfigurationService(producerConfigurationService);
producer.start();
Modified: jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/MarkupHandler.java
===================================================================
--- jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/MarkupHandler.java 2009-09-01 17:56:06 UTC (rev 13800)
+++ jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/MarkupHandler.java 2009-09-02 11:38:42 UTC (rev 13801)
@@ -91,7 +91,7 @@
try
{
log.debug("RenderInvocation on portlet '" + handle + "'");
- response = producer.getInvoker().invoke(requestProcessor.getInvocation());
+ response = producer.getPortletInvoker().invoke(requestProcessor.getInvocation());
log.debug("RenderInvocation done");
}
catch (PortletInvokerException e)
@@ -118,7 +118,7 @@
try
{
log.debug("ActionInvocation on portlet '" + handle + "'");
- response = producer.getInvoker().invoke(requestProcessor.getInvocation());
+ response = producer.getPortletInvoker().invoke(requestProcessor.getInvocation());
log.debug("ActionInvocation done");
}
catch (PortletStateChangeRequiredException e)
Modified: jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/PortletManagementHandler.java
===================================================================
--- jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/PortletManagementHandler.java 2009-09-01 17:56:06 UTC (rev 13800)
+++ jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/PortletManagementHandler.java 2009-09-02 11:38:42 UTC (rev 13801)
@@ -175,7 +175,7 @@
try
{
RegistrationLocal.setRegistration(registration);
- org.jboss.portal.portlet.api.PortletContext response = producer.getInvoker().createClone(portalPC);
+ org.jboss.portal.portlet.api.PortletContext response = producer.getPortletInvoker().createClone(portalPC);
return WSRPUtils.convertToWSRPPortletContext(response);
}
catch (NoSuchPortletException e)
@@ -219,7 +219,7 @@
try
{
RegistrationLocal.setRegistration(registration);
- List<DestroyCloneFailure> failuresList = producer.getInvoker().destroyClones(portletContexts);
+ List<DestroyCloneFailure> failuresList = producer.getPortletInvoker().destroyClones(portletContexts);
int failuresNumber = failuresList.size();
List<DestroyFailed> destroyFailed;
if (failuresNumber > 0)
@@ -305,7 +305,7 @@
{
RegistrationLocal.setRegistration(registration);
org.jboss.portal.portlet.api.PortletContext resultContext =
- producer.getInvoker().setProperties(WSRPUtils.convertToPortalPortletContext(portletContext),
+ producer.getPortletInvoker().setProperties(WSRPUtils.convertToPortalPortletContext(portletContext),
changes.toArray(new PropertyChange[changes.size()]));
return WSRPUtils.convertToWSRPPortletContext(resultContext);
}
@@ -357,11 +357,11 @@
RegistrationLocal.setRegistration(registration);
if (keys != null)
{
- properties = producer.getInvoker().getProperties(jbpContext, keys);
+ properties = producer.getPortletInvoker().getProperties(jbpContext, keys);
}
else
{
- properties = producer.getInvoker().getProperties(jbpContext);
+ properties = producer.getPortletInvoker().getProperties(jbpContext);
}
//todo: we need to check that the user can actually modify the properties
@@ -423,7 +423,7 @@
try
{
RegistrationLocal.setRegistration(registration);
- portlet = producer.getInvoker().getPortlet(WSRPUtils.convertToPortalPortletContext(portletContext));
+ portlet = producer.getPortletInvoker().getPortlet(WSRPUtils.convertToPortalPortletContext(portletContext));
return portlet;
}
catch (PortletInvokerException e)
Modified: jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/WSRPProducer.java
===================================================================
--- jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/WSRPProducer.java 2009-09-01 17:56:06 UTC (rev 13800)
+++ jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/WSRPProducer.java 2009-09-02 11:38:42 UTC (rev 13801)
@@ -23,11 +23,10 @@
package org.jboss.portal.wsrp.producer;
+import org.jboss.portal.portlet.api.PortletInvoker;
import org.jboss.portal.registration.RegistrationManager;
-import org.jboss.portal.wsrp.producer.config.ProducerConfiguration;
import org.jboss.portal.wsrp.producer.config.ProducerConfigurationChangeListener;
-import org.jboss.portal.wsrp.producer.config.ProducerRegistrationRequirements;
-import org.oasis.wsrp.v1.CookieProtocol;
+import org.jboss.portal.wsrp.producer.config.ProducerConfigurationService;
/**
* @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
@@ -37,69 +36,52 @@
public interface WSRPProducer extends ServiceDescriptionInterface, MarkupInterface, PortletManagementInterface,
RegistrationInterface, ProducerConfigurationChangeListener
{
- /** The default session expiration time in milliseconds. */
- int DEFAULT_SESSION_EXPIRATION_TIME = 300000;
-
- /** The value used to specify that a session will never expire. */
- int INFINITE_SESSION_EXPIRATION_TIME = -1;
-
/**
- * Indicates whether or not the Producer requires the Consumer to assist with cookie support of the HTTP protocol.
- * Supported values and semantics: <ul> <li>{@link CookieProtocol#NONE}: The Producer does not need the Consumer to
- * ever invoke {@link org.oasis.wsrp.v1.WSRPV1MarkupPortType#initCookie(org.oasis.wsrp.v1.RegistrationContext)}.</li>
- * <li>{@link CookieProtocol#PER_USER}: The Consumer MUST invoke {@link org.oasis.wsrp.v1.WSRPV1MarkupPortType#initCookie(org.oasis.wsrp.v1.RegistrationContext)}
- * once per user of the Consumer, and associate any returned cookies with subsequent invocations on behalf of that
- * user.</li> <li>{@link CookieProtocol#PER_GROUP}: The Consumer MUST invoke {@link
- * org.oasis.wsrp.v1.WSRPV1MarkupPortType#initCookie(org.oasis.wsrp.v1.RegistrationContext)} once per unique groupID
- * from the PortletDescriptions for the Portlets it is aggregating on a page for each user of the Consumer, and
- * associate any returned cookies with subsequent invocations on behalf of that user targeting Portlets with
- * identical groupIDs.</li> </ul>
+ * Retrieves the RegistrationManager used by this WSRPProducer.
*
- * @return the level of cookie support required from the Consumer
+ * @return the RegistrationManager used by this WSRPProducer to manage consumer registrations
+ * @since 2.6
*/
- CookieProtocol getRequiresInitCookie();
+ RegistrationManager getRegistrationManager();
/**
- * Sets the level of cookie support required by the Consumer.
+ * Sets the RegistrationManager used by this WSRPProducer.
*
- * @param requiresInitCookie either {@link CookieProtocol#NONE}, {@link CookieProtocol#PER_USER} or {@link
- * CookieProtocol#PER_GROUP}
+ * @param registrationManager the RegistrationManager to be used by this WSRPProducer
*/
- void setRequiresInitCookie(CookieProtocol requiresInitCookie);
+ void setRegistrationManager(RegistrationManager registrationManager);
/**
- * Maximum number of seconds between invocations referencing a session ID before this Producer will schedule
- * releasing the related resources. {@link #INFINITE_SESSION_EXPIRATION_TIME} indicates that the sessionID will never
- * expire.
+ * Retrieves the configuration service that is used to configure this WSRPProducer.
*
- * @return the expiration time (in seconds) of session associated resources
+ * @return the configuration service that is used to configure this WSRPProducer.
*/
- int getSessionExpirationTime();
+ ProducerConfigurationService getConfigurationService();
/**
- * Sets the expiration time (in seconds) of session associated resources.
+ * Sets the configuration service for this WSRPProducer
*
- * @param sessionExpirationTime the maximum number of seconds between invocations referencing a session ID before
- * this Producer will schedule releasing the related resources. If {@link
- * #INFINITE_SESSION_EXPIRATION_TIME} is passed, then the session will never expire.
+ * @param configurationService the configuration service used by this WSRPProducer
*/
- void setSessionExpirationTime(int sessionExpirationTime);
+ void setConfigurationService(ProducerConfigurationService configurationService);
/**
- * @return
- * @since 2.6
+ * Retrieves the PortletInvoker used by this WSRPProducer to dispatch portlet invocations to Portlets.
+ *
+ * @return the PortletInvoker used by this WSRPProducer to dispatch portlet invocations to Portlets.
*/
- ProducerRegistrationRequirements getProducerRegistrationRequirements();
+ PortletInvoker getPortletInvoker();
/**
- * @return
- * @since 2.6
+ * Sets the PortletInvoker used by this WSRPProducer to dispatch portlet invocations to Portlets.
+ *
+ * @param invoker PortletInvoker used by this WSRPProducer to dispatch portlet invocations to Portlets.
*/
- RegistrationManager getRegistrationManager();
+ void setPortletInvoker(PortletInvoker invoker);
- /**
- * @return
- * @since 2.6
- */
- ProducerConfiguration getProducerConfiguration();
+ /** Gets this WSRPProducer ready to use. */
+ void start();
+
+ /** Removes this WSRPProducer from active use. */
+ void stop();
}
Modified: jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/WSRPProducerImpl.java
===================================================================
--- jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/WSRPProducerImpl.java 2009-09-01 17:56:06 UTC (rev 13800)
+++ jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/WSRPProducerImpl.java 2009-09-02 11:38:42 UTC (rev 13801)
@@ -114,10 +114,6 @@
/** Registration Manager */
private RegistrationManager registrationManager;
- private int sessionExpirationTime = DEFAULT_SESSION_EXPIRATION_TIME;
-
- private CookieProtocol requiresInitCookie = CookieProtocol.NONE;
-
/** Supported locales. */
private List<String> supportedLocales = WSRPConstants.getDefaultLocales();
@@ -132,7 +128,7 @@
portletManagementHandler = new PortletManagementHandler(this);
}
- public ProducerRegistrationRequirements getProducerRegistrationRequirements()
+ ProducerRegistrationRequirements getProducerRegistrationRequirements()
{
return getProducerConfiguration().getRegistrationRequirements();
}
@@ -268,7 +264,7 @@
return descriptionResponse;
}
- public ProducerConfiguration getProducerConfiguration()
+ private ProducerConfiguration getProducerConfiguration()
{
return configurationService.getConfiguration();
}
@@ -283,7 +279,7 @@
this.registrationManager = registrationManager;
}
- public void setProducerConfigurationService(ProducerConfigurationService configurationService)
+ public void setConfigurationService(ProducerConfigurationService configurationService)
{
this.configurationService = configurationService;
}
@@ -320,35 +316,22 @@
getProducerConfiguration().removeChangeListener(this);
}
- // Producer implementation ******************************************************************************************
-
- public CookieProtocol getRequiresInitCookie()
+ int getExpirationTime()
{
- return requiresInitCookie;
+ return getProducerConfiguration().getSessionExpirationTime();
}
- public void setRequiresInitCookie(CookieProtocol requiresInitCookie)
+ CookieProtocol getRequiresInitCookie()
{
- this.requiresInitCookie = requiresInitCookie;
+ return getProducerConfiguration().getRequiresInitCookie();
}
- // Session management ***********************************************************************************************
- public int getSessionExpirationTime()
+ public PortletInvoker getPortletInvoker()
{
- return sessionExpirationTime;
- }
-
- public void setSessionExpirationTime(int sessionExpirationTime)
- {
- this.sessionExpirationTime = sessionExpirationTime;
- }
-
- public PortletInvoker getInvoker()
- {
return invoker;
}
- public void setInvoker(PortletInvoker invoker)
+ public void setPortletInvoker(PortletInvoker invoker)
{
this.invoker = invoker;
}
Modified: jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/ProducerConfiguration.java
===================================================================
--- jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/ProducerConfiguration.java 2009-09-01 17:56:06 UTC (rev 13800)
+++ jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/ProducerConfiguration.java 2009-09-02 11:38:42 UTC (rev 13801)
@@ -23,6 +23,8 @@
package org.jboss.portal.wsrp.producer.config;
+import org.oasis.wsrp.v1.CookieProtocol;
+
import java.util.List;
/**
@@ -50,4 +52,52 @@
void removeChangeListener(ProducerConfigurationChangeListener listener);
List<ProducerConfigurationChangeListener> getChangeListeners();
+
+ /** The default session expiration time in milliseconds. */
+ int DEFAULT_SESSION_EXPIRATION_TIME = 300000;
+
+ /** The value used to specify that a session will never expire. */
+ int INFINITE_SESSION_EXPIRATION_TIME = -1;
+
+ /**
+ * Indicates whether or not the Producer requires the Consumer to assist with cookie support of the HTTP protocol.
+ * Supported values and semantics: <ul> <li>{@link org.oasis.wsrp.v1.CookieProtocol#NONE}: The Producer does not need
+ * the Consumer to ever invoke {@link org.oasis.wsrp.v1.WSRPV1MarkupPortType#initCookie(org.oasis.wsrp.v1.RegistrationContext)}.</li>
+ * <li>{@link org.oasis.wsrp.v1.CookieProtocol#PER_USER}: The Consumer MUST invoke {@link
+ * org.oasis.wsrp.v1.WSRPV1MarkupPortType#initCookie(org.oasis.wsrp.v1.RegistrationContext)} once per user of the
+ * Consumer, and associate any returned cookies with subsequent invocations on behalf of that user.</li> <li>{@link
+ * org.oasis.wsrp.v1.CookieProtocol#PER_GROUP}: The Consumer MUST invoke {@link org.oasis.wsrp.v1.WSRPV1MarkupPortType#initCookie(org.oasis.wsrp.v1.RegistrationContext)}
+ * once per unique groupID from the PortletDescriptions for the Portlets it is aggregating on a page for each user of
+ * the Consumer, and associate any returned cookies with subsequent invocations on behalf of that user targeting
+ * Portlets with identical groupIDs.</li> </ul>
+ *
+ * @return the level of cookie support required from the Consumer
+ */
+ CookieProtocol getRequiresInitCookie();
+
+ /**
+ * Sets the level of cookie support required by the Consumer.
+ *
+ * @param requiresInitCookie either {@link CookieProtocol#NONE}, {@link CookieProtocol#PER_USER} or {@link
+ * CookieProtocol#PER_GROUP}
+ */
+ void setRequiresInitCookie(CookieProtocol requiresInitCookie);
+
+ /**
+ * Maximum number of seconds between invocations referencing a session ID before this Producer will schedule
+ * releasing the related resources. {@link #INFINITE_SESSION_EXPIRATION_TIME} indicates that the sessionID will never
+ * expire.
+ *
+ * @return the expiration time (in seconds) of session associated resources
+ */
+ int getSessionExpirationTime();
+
+ /**
+ * Sets the expiration time (in seconds) of session associated resources.
+ *
+ * @param sessionExpirationTime the maximum number of seconds between invocations referencing a session ID before
+ * this Producer will schedule releasing the related resources. If {@link
+ * #INFINITE_SESSION_EXPIRATION_TIME} is passed, then the session will never expire.
+ */
+ void setSessionExpirationTime(int sessionExpirationTime);
}
Modified: jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/impl/ProducerConfigurationImpl.java
===================================================================
--- jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/impl/ProducerConfigurationImpl.java 2009-09-01 17:56:06 UTC (rev 13800)
+++ jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/impl/ProducerConfigurationImpl.java 2009-09-02 11:38:42 UTC (rev 13801)
@@ -27,6 +27,7 @@
import org.jboss.portal.wsrp.producer.config.ProducerConfiguration;
import org.jboss.portal.wsrp.producer.config.ProducerConfigurationChangeListener;
import org.jboss.portal.wsrp.producer.config.ProducerRegistrationRequirements;
+import org.oasis.wsrp.v1.CookieProtocol;
import java.util.ArrayList;
import java.util.List;
@@ -45,6 +46,10 @@
private List<ProducerConfigurationChangeListener> listeners = new ArrayList<ProducerConfigurationChangeListener>(7);
+ private int sessionExpirationTime = DEFAULT_SESSION_EXPIRATION_TIME;
+
+ private CookieProtocol requiresInitCookie = CookieProtocol.NONE;
+
public ProducerRegistrationRequirements getRegistrationRequirements()
{
if (requirements == null)
@@ -93,4 +98,24 @@
{
this.requirements = requirements;
}
+
+ public CookieProtocol getRequiresInitCookie()
+ {
+ return requiresInitCookie;
+ }
+
+ public void setRequiresInitCookie(CookieProtocol requiresInitCookie)
+ {
+ this.requiresInitCookie = requiresInitCookie;
+ }
+
+ public int getSessionExpirationTime()
+ {
+ return sessionExpirationTime;
+ }
+
+ public void setSessionExpirationTime(int sessionExpirationTime)
+ {
+ this.sessionExpirationTime = sessionExpirationTime;
+ }
}
14 years, 8 months
JBoss Portal SVN: r13800 - in modules/portlet/trunk: test and 1 other directories.
by portal-commits@lists.jboss.org
Author: mwringe
Date: 2009-09-01 13:56:06 -0400 (Tue, 01 Sep 2009)
New Revision: 13800
Modified:
modules/portlet/trunk/build/pom.xml
modules/portlet/trunk/test/pom.xml
modules/portlet/trunk/test/src/test/build.xml
Log:
Fix issue with Tomcat not having jaxb in its classpath.
Update version of JBoss remoting to prevent a potential issue where the server will silently stop running some of the tests.
Modified: modules/portlet/trunk/build/pom.xml
===================================================================
--- modules/portlet/trunk/build/pom.xml 2009-09-01 15:05:32 UTC (rev 13799)
+++ modules/portlet/trunk/build/pom.xml 2009-09-01 17:56:06 UTC (rev 13800)
@@ -32,7 +32,8 @@
<version.apache.tomcat>5.5.12</version.apache.tomcat>
<version.jboss-logging>2.0.4.GA</version.jboss-logging>
<version.jbossxb>2.0.0.GA</version.jbossxb>
- <version.jboss-remoting>2.2.1.GA</version.jboss-remoting>
+ <version.jboss-remoting>2.5.0.GA</version.jboss-remoting>
+ <version.jboss.serialization>1.0.3.GA</version.jboss.serialization>
<version.jboss.portal.common>1.2.5</version.jboss.portal.common>
<version.jboss.portal.web>1.2.3</version.jboss.portal.web>
<version.jboss.unit>1.2.3</version.jboss.unit>
@@ -236,10 +237,15 @@
</dependency>
<dependency>
- <groupId>jboss</groupId>
+ <groupId>org.jboss.remoting</groupId>
<artifactId>jboss-remoting</artifactId>
<version>${version.jboss-remoting}</version>
</dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-serialization</artifactId>
+ <version>${version.jboss.serialization}</version>
+ </dependency>
<dependency>
<groupId>org.jboss.unit</groupId>
Modified: modules/portlet/trunk/test/pom.xml
===================================================================
--- modules/portlet/trunk/test/pom.xml 2009-09-01 15:05:32 UTC (rev 13799)
+++ modules/portlet/trunk/test/pom.xml 2009-09-01 17:56:06 UTC (rev 13800)
@@ -88,7 +88,7 @@
</dependency>
<dependency>
- <groupId>jboss</groupId>
+ <groupId>org.jboss.remoting</groupId>
<artifactId>jboss-remoting</artifactId>
</dependency>
@@ -107,6 +107,11 @@
<artifactId>jboss-reflect</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-serialization</artifactId>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>jboss</groupId>
@@ -162,6 +167,11 @@
<groupId>javax.portlet</groupId>
<artifactId>portlet-api</artifactId>
</dependency>
+ <dependency>
+ <groupId>sun-jaxb</groupId>
+ <artifactId>jaxb-api</artifactId>
+ <scope>test</scope>
+ </dependency>
<!-- JSTL for Tomcat -->
<dependency>
@@ -250,7 +260,7 @@
<property name="dependency.junit.jar" value="${maven.dependency.junit.junit.jar.path}"/>
<property name="dependency.jsr168api.jar" value="${maven.dependency.javax.portlet.portlet-api.jar.path}"/>
<property name="dependency.ccpp.jar" value="${maven.dependency.javax.ccpp.ccpp.jar.path}"/>
- <property name="dependency.jaxb.jar" value="${maven.dependency.javax.xml.bind.jaxb-api.jar.path}"/>
+ <property name="dependency.jaxb.jar" value="${maven.dependency.sun-jaxb.jaxb-api.jar.path}"/>
<property name="dependency.portal-common-common.jar" value="${maven.dependency.org.jboss.portal.common.common-common.jar.path}"/>
<property name="dependency.portal-common-portal.jar" value="${maven.dependency.org.jboss.portal.common.common-portal.jar.path}"/>
@@ -268,7 +278,7 @@
<property name="dependency.jboss-unit-remote.jar" value="${maven.dependency.org.jboss.unit.jboss-unit-remote.jar.path}"/>
<property name="dependency.portal-test.jar" value="${maven.dependency.org.jboss.unit.portal-test.jar.path}"/>
<property name="dependency.portal-test-generic.jar" value="${maven.dependency.org.jboss.unit.portal-test-generic.jar.path}"/>
- <property name="dependency.jboss-remoting.jar" value="${maven.dependency.jboss.jboss-remoting.jar.path}"/>
+ <property name="dependency.jboss-remoting.jar" value="${maven.dependency.org.jboss.remoting.jboss-remoting.jar.path}"/>
<property name="dependency.concurrent.jar" value="${maven.dependency.concurrent.concurrent.jar.path}"/>
<property name="dependency.trove.jar" value="${maven.dependency.trove.trove.jar.path}"/>
@@ -279,13 +289,13 @@
<property name="dependency.jboss-dependency.jar" value="${maven.dependency.org.jboss.microcontainer.jboss-dependency.jar.path}"/>
<property name="dependency.jboss-reflect.jar" value="${maven.dependency.org.jboss.jboss-reflect.jar.path}"/>
<property name="dependency.jboss-common-core.jar" value="${maven.dependency.org.jboss.jboss-common-core.jar.path}"/>
- <property name="dependency.jaxb.jar" value="${maven.dependency.javax.xml.bind.jaxb-api.jar.path}"/>
<property name="dependency.jboss-mdr.jar" value="${maven.dependency.org.jboss.jboss-mdr.jar.path}"/>
<property name="dependency.javassist.jar" value="${maven.dependency.org.jboss.javassist.jar.path}"/>
<property name="dependency.resolver.jar" value="${maven.dependency.apache-xerces.resolver.jar.path}"/>
<property name="dependency.xercesImpl.jar" value="${maven.dependency.apache-xerces.xercesImpl.jar.path}"/>
<property name="dependency.xml-apis.jar" value="${maven.dependency.apache-xerces.xml-apis.jar.path}"/>
<property name="dependency.jbossxb.jar" value="${maven.dependency.org.jboss.jbossxb.jar.path}"/>
+ <property name="dependency.jboss-serialization.jar" value="${maven.dependency.jboss.jboss-serialization.jar.path}"/>
<property name="dependency.cargo-core-uberjar.jar" value="${maven.dependency.org.codehaus.cargo.cargo-core-uberjar.jar.path}"/>
<property name="dependency.cargo-ant.jar" value="${maven.dependency.org.codehaus.cargo.cargo-ant.jar.path}"/>
Modified: modules/portlet/trunk/test/src/test/build.xml
===================================================================
--- modules/portlet/trunk/test/src/test/build.xml 2009-09-01 15:05:32 UTC (rev 13799)
+++ modules/portlet/trunk/test/src/test/build.xml 2009-09-01 17:56:06 UTC (rev 13800)
@@ -160,6 +160,7 @@
<path location="${dependency.activation.jar}"/>
<path location="${dependency.jaxb.jar}"/>
<path location="${dependency.ccpp.jar}"/>
+ <path location="${dependency.jboss-serialization.jar}"/>
</path>
<path id="jetty-6.1">
14 years, 8 months
JBoss Portal SVN: r13799 - in modules/portlet/trunk: test/src/test/resources/portlet-tck-war/WEB-INF and 1 other directories.
by portal-commits@lists.jboss.org
Author: mwringe
Date: 2009-09-01 11:05:32 -0400 (Tue, 01 Sep 2009)
New Revision: 13799
Modified:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr168/api/portletcontext/ServerInfoTestCase.java
modules/portlet/trunk/test/src/test/resources/portlet-tck-war/WEB-INF/jboss-portal-beans.xml
modules/portlet/trunk/test/src/test/resources/portlet-test-war/WEB-INF/jboss-portal-beans.xml
Log:
Fix the remote tests.
Update the server version test to consider SNAPSHOT releases.
Modified: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr168/api/portletcontext/ServerInfoTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr168/api/portletcontext/ServerInfoTestCase.java 2009-08-28 21:06:23 UTC (rev 13798)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr168/api/portletcontext/ServerInfoTestCase.java 2009-09-01 15:05:32 UTC (rev 13799)
@@ -47,7 +47,7 @@
{
/** . */
- private static final String VERSION_REGEX = "JBossPortletContainer/[0-9]+\\.[0-9]+";
+ private static final String VERSION_REGEX = "JBossPortletContainer/[0-9]+\\.[0-9]+(|\\.SNAPSHOT)";
/** . */
private static final Pattern VERSION_PATTERN = Pattern.compile(VERSION_REGEX, Pattern.CASE_INSENSITIVE);
Modified: modules/portlet/trunk/test/src/test/resources/portlet-tck-war/WEB-INF/jboss-portal-beans.xml
===================================================================
--- modules/portlet/trunk/test/src/test/resources/portlet-tck-war/WEB-INF/jboss-portal-beans.xml 2009-08-28 21:06:23 UTC (rev 13798)
+++ modules/portlet/trunk/test/src/test/resources/portlet-tck-war/WEB-INF/jboss-portal-beans.xml 2009-09-01 15:05:32 UTC (rev 13799)
@@ -36,7 +36,7 @@
<bean name="PortletApplicationDeployer" class="org.jboss.portal.portlet.test.TestPortletApplicationDeployer">
<alias>PortletApplicationRegistry</alias>
- <property name="servletContainer"><inject bean="ServletContainer"/></property>
+ <property name="servletContainerFactory"><inject bean="ServletContainerFactory"/></property>
<property name="driver"><inject bean="TestDriverServer"/></property>
<property name="containerPortletInvoker"><inject bean="ContainerPortletInvoker"/></property>
</bean>
Modified: modules/portlet/trunk/test/src/test/resources/portlet-test-war/WEB-INF/jboss-portal-beans.xml
===================================================================
--- modules/portlet/trunk/test/src/test/resources/portlet-test-war/WEB-INF/jboss-portal-beans.xml 2009-08-28 21:06:23 UTC (rev 13798)
+++ modules/portlet/trunk/test/src/test/resources/portlet-test-war/WEB-INF/jboss-portal-beans.xml 2009-09-01 15:05:32 UTC (rev 13799)
@@ -36,7 +36,7 @@
<bean name="PortletApplicationDeployer" class="org.jboss.portal.portlet.test.TestPortletApplicationDeployer">
<alias>PortletApplicationRegistry</alias>
- <property name="servletContainer"><inject bean="ServletContainer"/></property>
+ <property name="servletContainerFactory"><inject bean="ServletContainerFactory"/></property>
<property name="driver"><inject bean="TestDriverServer"/></property>
<property name="containerPortletInvoker"><inject bean="ContainerPortletInvoker"/></property>
</bean>
14 years, 8 months