JBoss Portal SVN: r9537 - in branches/JBoss_Portal_Branch_2_6/core/src: bin/portal-core-war/themes/renaissance and 1 other directories.
by portal-commits@lists.jboss.org
Author: wesleyhales
Date: 2008-01-18 12:34:44 -0500 (Fri, 18 Jan 2008)
New Revision: 9537
Modified:
branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/common/modal.jsp
branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/themes/renaissance/portal_style.css
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-INF/jsp/header/header.jsp
Log:
Fix double load issue and cleanup
Modified: branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/common/modal.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/common/modal.jsp 2008-01-18 17:05:08 UTC (rev 9536)
+++ branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/common/modal.jsp 2008-01-18 17:34:44 UTC (rev 9537)
@@ -1,10 +1,7 @@
-<%@page import="org.jboss.portal.server.ServerURL"%>
-<%@page import="org.jboss.portal.server.AbstractServerURL"%>
<script src="<%=request.getContextPath()%>/js/modal.js" type="text/javascript"></script>
<link rel="stylesheet" href="<%=request.getContextPath()%>/css/modal.css" type="text/css" />
-<div id="login-modal" style="display:none">
- <div id="login-modal-msg" style="display:none;width:257px;height:157px">
- <% String loginHeight = "100%"; %>
- <iframe src="<%=request.getAttribute("org.jboss.portal.PORTAL_CONTEXT_PATH")%>/auth/?loginheight=0" frameborder="0" width="257" height="157" scrolling="no" marginheight="0" marginwidth="0" name="login-content" class="login-content" id="loginIframe"></iframe>
- </div>
-</div>
\ No newline at end of file
+ <div id="login-modal" style="display:none">
+ <div id="login-modal-msg" style="display:none;width:257px;height:157px">
+ <iframe src="" frameborder="0" width="257" height="157" scrolling="no" marginheight="0" marginwidth="0" name="login-content" class="login-content" id="loginIframe"></iframe>
+ </div>
+ </div>
\ No newline at end of file
Modified: branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/themes/renaissance/portal_style.css
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/themes/renaissance/portal_style.css 2008-01-18 17:05:08 UTC (rev 9536)
+++ branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/themes/renaissance/portal_style.css 2008-01-18 17:34:44 UTC (rev 9537)
@@ -486,7 +486,7 @@
text-indent: 5px;
padding-top: 5px;
padding-bottom: 6px;
- width:90%;
+ width:85%;
display:block;
margin-right:10px;
}
Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-INF/jsp/header/header.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-INF/jsp/header/header.jsp 2008-01-18 17:05:08 UTC (rev 9536)
+++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-INF/jsp/header/header.jsp 2008-01-18 17:34:44 UTC (rev 9537)
@@ -37,6 +37,10 @@
else
{
%>
+<script type="text/javascript">
+ //we don't need the iframe/modal if logged in
+ document.getElementById('loginIframe').src = '';
+</script>
Logged in as: <%= user.getUserName() %><br/><br/>
<%
18 years, 3 months
JBoss Portal SVN: r9536 - branches.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2008-01-18 12:05:08 -0500 (Fri, 18 Jan 2008)
New Revision: 9536
Added:
branches/JBoss_Portal_2_6_1_JBPORTAL-1872/
Log:
Patch Branch
Copied: branches/JBoss_Portal_2_6_1_JBPORTAL-1872 (from rev 9535, tags/JBoss_Portal_2_6_1)
18 years, 3 months
JBoss Portal SVN: r9535 - modules/template/module-b.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2008-01-18 10:15:16 -0500 (Fri, 18 Jan 2008)
New Revision: 9535
Modified:
modules/template/module-b/pom.xml
Log:
wrong pom content
Modified: modules/template/module-b/pom.xml
===================================================================
--- modules/template/module-b/pom.xml 2008-01-18 09:58:02 UTC (rev 9534)
+++ modules/template/module-b/pom.xml 2008-01-18 15:15:16 UTC (rev 9535)
@@ -2,18 +2,16 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.jboss.portal.template</groupId>
- <artifactId>module-aggregator</artifactId>
+ <artifactId>module-parent</artifactId>
<version>1.0-CR1</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
- <groupId>org.jboss.portal.templatemodule</groupId>
<artifactId>tempate-module-b-aggregator</artifactId>
<packaging>pom</packaging>
<name>JBoss Portal TemplateModule ModuleB (aggregator)</name>
- <version>1.0-CR1</version>
+
-
<modules>
<module>module-b1</module>
<module>module-b2</module>
18 years, 3 months
JBoss Portal SVN: r9534 - in modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168: api and 1 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-01-18 04:58:02 -0500 (Fri, 18 Jan 2008)
New Revision: 9534
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/PortletUtils.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/BaseURLImpl.java
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/PortletURLImpl.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/taglib/GenerateURLTag.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/taglib/PortletTag.java
Log:
start to implement public render parameter in PortletURL
Modified: modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/PortletUtils.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/PortletUtils.java 2008-01-18 00:34:07 UTC (rev 9533)
+++ modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/PortletUtils.java 2008-01-18 09:58:02 UTC (rev 9534)
@@ -22,15 +22,8 @@
******************************************************************************/
package org.jboss.portal.portlet.impl.jsr168;
-import org.jboss.portal.portlet.invocation.PortletInvocation;
-import org.jboss.portal.portlet.impl.jsr168.api.PortletURLImpl;
-
import javax.portlet.PortletMode;
-import javax.portlet.PortletRequest;
-import javax.portlet.PortletURL;
import javax.portlet.WindowState;
-import java.util.Iterator;
-import java.util.Map;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -42,90 +35,6 @@
public static final String SUFFIX = "snpbj";
/**
- * Check that provided map follow the constraints : <ul> <li>Not null</li> <li>Keys are non null string</li>
- * <li>Values are non null string arrays</li> </ul> If a constraint is not respected then an IllegalArgumentException
- * is thrown.
- *
- * @param map the map to check
- * @throws IllegalArgumentException
- */
- public static void checkPortletParameterMapValidity(Map map) throws IllegalArgumentException
- {
- if (map == null)
- {
- throw new IllegalArgumentException("Map cannot be null");
- }
- for (Iterator i = map.entrySet().iterator(); i.hasNext();)
- {
- Map.Entry entry = (Map.Entry)i.next();
- Object key = entry.getKey();
- Object value = entry.getValue();
- if (key == null)
- {
- throw new IllegalArgumentException("Key cannot be null");
- }
- if (key instanceof String == false)
- {
- throw new IllegalArgumentException("Key must be a String and not " + key.getClass());
- }
- if (value == null)
- {
- throw new IllegalArgumentException("Value cannot be null");
- }
- if (value instanceof String[] == false)
- {
- throw new IllegalArgumentException("Value must be a String[] and not " + value.getClass());
- }
- }
- }
-
- /**
- * Check that the passed argument are non null otherwise throw an IllegalArgumentException.
- *
- * @throws IllegalArgumentException
- */
- public static void checkPortletParameterValidity(String name, String value) throws IllegalArgumentException
- {
- if (name == null)
- {
- throw new IllegalArgumentException("Name cannot be null");
- }
- if (value == null)
- {
- throw new IllegalArgumentException("Value cannot be null");
- }
- }
-
- /**
- * Check that the passed argument are non null otherwise throw an IllegalArgumentException.
- *
- * @throws IllegalArgumentException
- */
- public static void checkPortletParameterValidity(String name, String[] values) throws IllegalArgumentException
- {
- if (name == null)
- {
- throw new IllegalArgumentException("Name cannot be null");
- }
- if (values == null)
- {
- throw new IllegalArgumentException("Values cannot be null");
- }
- }
-
- /** Creates an action URL. */
- public static PortletURL createActionURL(PortletInvocation invocation, PortletRequest preq)
- {
- return new PortletURLImpl(invocation, preq, new PortletURLImpl.InternalActionURL());
- }
-
- /** Creates an render URL. */
- public static PortletURL createRenderURL(PortletInvocation invocation, PortletRequest preq)
- {
- return new PortletURLImpl(invocation, preq, new PortletURLImpl.InternalRenderURL());
- }
-
- /**
* Creates a <code>WindowState</code> object based on the specified name.
*
* @param windowStateName the name of the window state
@@ -182,7 +91,8 @@
/**
* Generates a namespace suitable for Portlet prefixing of tokens that need to be unique in an aggregated page.
*
- * @param windowId
+ * @param windowId the window id
+ * @return the namespace value
* @since 2.6
*/
public static String generateNamespaceFrom(String windowId)
Modified: modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/BaseURLImpl.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/BaseURLImpl.java 2008-01-18 00:34:07 UTC (rev 9533)
+++ modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/BaseURLImpl.java 2008-01-18 09:58:02 UTC (rev 9534)
@@ -28,13 +28,11 @@
import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.RenderURL;
import org.jboss.portal.portlet.spi.PortletInvocationContext;
-import org.jboss.portal.portlet.impl.jsr168.PortletUtils;
+import org.jboss.portal.portlet.impl.jsr168.PortletParameterMap;
import org.jboss.portal.Mode;
import org.jboss.portal.common.NotYetImplemented;
-import org.jboss.portal.common.util.ParameterMap;
import javax.portlet.BaseURL;
-import javax.portlet.PortletRequest;
import javax.portlet.WindowState;
import javax.portlet.PortletMode;
import javax.portlet.PortletSecurityException;
@@ -49,11 +47,26 @@
public abstract class BaseURLImpl implements BaseURL
{
+ public enum Type
+ {
+ ACTION, RENDER
+ }
+
+ public static PortletURLImpl createActionURL(PortletInvocation invocation, PortletRequestImpl preq)
+ {
+ return new PortletURLImpl(invocation, preq, Type.ACTION);
+ }
+
+ public static PortletURLImpl createRenderURL(PortletInvocation invocation, PortletRequestImpl preq)
+ {
+ return new PortletURLImpl(invocation, preq, Type.RENDER);
+ }
+
/** . */
protected PortletInvocation inv;
/** . */
- protected PortletRequest preq;
+ protected PortletRequestImpl preq;
/** . */
protected Boolean secure;
@@ -61,8 +74,25 @@
/** . */
protected InternalPortletURL url;
- public BaseURLImpl(PortletInvocation invocation, PortletRequest preq, InternalPortletURL url)
+ protected BaseURLImpl(PortletInvocation invocation, PortletRequestImpl preq, Type type)
{
+ PortletParameterMap parameterMap = new PortletParameterMap(preq.navigationInfo);
+
+ //
+ InternalPortletURL url;
+ switch (type)
+ {
+ case ACTION:
+ url = new InternalActionURL(parameterMap);
+ break;
+ case RENDER:
+ url = new InternalRenderURL(parameterMap);
+ break;
+ default:
+ throw new AssertionError();
+ }
+
+ //
this.inv = invocation;
this.preq = preq;
this.url = url;
@@ -71,26 +101,17 @@
/** @throws IllegalArgumentException if the name is null */
public void setParameter(String name, String value)
{
- PortletUtils.checkPortletParameterValidity(name, value);
-
- //
- url.getInternalParameters().setValue(name, value);
+ url.parameters.setParameterValue(name, value);
}
public void setParameter(String name, String[] values)
{
- PortletUtils.checkPortletParameterValidity(name, values);
-
- //
- url.getInternalParameters().setValues(name, values);
+ url.parameters.setParameterValues(name, values);
}
public void setParameters(Map<String, String[]> parameters)
{
- PortletUtils.checkPortletParameterMapValidity(parameters);
-
- //
- url.getInternalParameters().replace(parameters);
+ url.parameters.setMap(parameters);
}
public void setSecure(boolean secure) throws PortletSecurityException
@@ -129,7 +150,7 @@
return responseContext.renderURL(url, secure, null, true);
}
- public static abstract class InternalPortletURL implements org.jboss.portal.portlet.PortletURL
+ protected abstract class InternalPortletURL implements org.jboss.portal.portlet.PortletURL
{
/** . */
@@ -138,6 +159,14 @@
/** . */
protected PortletMode portletMode;
+ /** . */
+ protected final PortletParameterMap parameters;
+
+ protected InternalPortletURL(PortletParameterMap parameters)
+ {
+ this.parameters = parameters;
+ }
+
public Mode getMode()
{
if (portletMode != null)
@@ -155,24 +184,19 @@
}
return null;
}
-
- protected abstract ParameterMap getInternalParameters();
}
- public static class InternalActionURL extends InternalPortletURL implements ActionURL
+ protected class InternalActionURL extends InternalPortletURL implements ActionURL
{
- /** . */
- private ParametersStateString parameters = new ParametersStateString();
-
- protected ParameterMap getInternalParameters()
+ private InternalActionURL(PortletParameterMap parameters)
{
- return parameters.getParameters();
+ super(parameters);
}
public StateString getInteractionState()
{
- return parameters;
+ return new ParametersStateString(parameters.getPrivateMapSnapshot());
}
/** The portlet container does not need to have the navigational state provided. */
@@ -182,20 +206,17 @@
}
}
- public static class InternalRenderURL extends InternalPortletURL implements RenderURL
+ protected class InternalRenderURL extends InternalPortletURL implements RenderURL
{
- /** . */
- private ParametersStateString navigationalState = new ParametersStateString();
-
- protected ParameterMap getInternalParameters()
+ private InternalRenderURL(PortletParameterMap parameters)
{
- return navigationalState.getParameters();
+ super(parameters);
}
public StateString getNavigationalState()
{
- return navigationalState;
+ return new ParametersStateString(parameters.getPrivateMapSnapshot());
}
}
}
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 2008-01-18 00:34:07 UTC (rev 9533)
+++ modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/MimeResponseImpl.java 2008-01-18 09:58:02 UTC (rev 9534)
@@ -122,12 +122,12 @@
public PortletURL createRenderURL()
{
- return PortletUtils.createRenderURL(invocation, preq);
+ return BaseURLImpl.createRenderURL(invocation, preq);
}
public PortletURL createActionURL()
{
- return PortletUtils.createActionURL(invocation, preq);
+ return BaseURLImpl.createActionURL(invocation, preq);
}
public String getCharacterEncoding()
Modified: modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/PortletURLImpl.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/PortletURLImpl.java 2008-01-18 00:34:07 UTC (rev 9533)
+++ modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/PortletURLImpl.java 2008-01-18 09:58:02 UTC (rev 9534)
@@ -27,7 +27,6 @@
import javax.portlet.PortletMode;
import javax.portlet.PortletModeException;
-import javax.portlet.PortletRequest;
import javax.portlet.PortletURL;
import javax.portlet.WindowState;
import javax.portlet.WindowStateException;
@@ -39,9 +38,9 @@
public class PortletURLImpl extends BaseURLImpl implements PortletURL
{
- public PortletURLImpl(PortletInvocation invocation, PortletRequest preq, InternalPortletURL url)
+ protected PortletURLImpl(PortletInvocation invocation, PortletRequestImpl preq, Type type)
{
- super(invocation, preq, url);
+ super(invocation, preq, type);
}
public void setWindowState(WindowState windowState) throws WindowStateException
Modified: modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/taglib/GenerateURLTag.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/taglib/GenerateURLTag.java 2008-01-18 00:34:07 UTC (rev 9533)
+++ modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/taglib/GenerateURLTag.java 2008-01-18 09:58:02 UTC (rev 9534)
@@ -22,13 +22,13 @@
******************************************************************************/
package org.jboss.portal.portlet.impl.jsr168.taglib;
-import org.jboss.portal.portlet.impl.jsr168.PortletUtils;
+import org.jboss.portal.portlet.impl.jsr168.api.BaseURLImpl;
+import org.jboss.portal.portlet.impl.jsr168.api.RenderRequestImpl;
import javax.portlet.PortletMode;
import javax.portlet.PortletModeException;
import javax.portlet.PortletSecurityException;
import javax.portlet.PortletURL;
-import javax.portlet.RenderRequest;
import javax.portlet.WindowState;
import javax.portlet.WindowStateException;
import javax.servlet.jsp.JspException;
@@ -186,16 +186,16 @@
*/
private PortletURL getBasePortletEnvironmentAndURL()
{
- RenderRequest preq = getRequest();
+ RenderRequestImpl preq = getRequest();
// Create the URL
if ("action".equals(getTypeValue()))
{
- return PortletUtils.createActionURL(getInvocation(), preq);
+ return BaseURLImpl.createActionURL(getInvocation(), preq);
}
else if ("render".equals(getTypeValue()))
{
- return PortletUtils.createRenderURL(getInvocation(), preq);
+ return BaseURLImpl.createRenderURL(getInvocation(), preq);
}
else
{
Modified: modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/taglib/PortletTag.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/taglib/PortletTag.java 2008-01-18 00:34:07 UTC (rev 9533)
+++ modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/taglib/PortletTag.java 2008-01-18 09:58:02 UTC (rev 9534)
@@ -24,9 +24,9 @@
import org.jboss.portal.portlet.aspects.portlet.ContextDispatcherInterceptor;
import org.jboss.portal.portlet.invocation.PortletInvocation;
+import org.jboss.portal.portlet.impl.jsr168.api.RenderRequestImpl;
import javax.portlet.PortletConfig;
-import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
import javax.servlet.ServletRequest;
import javax.servlet.http.HttpServletRequest;
@@ -52,10 +52,10 @@
return invocation.getDispatchedRequest();
}
- protected RenderRequest getRequest()
+ protected RenderRequestImpl getRequest()
{
HttpServletRequest dreq = getDispatchedRequest();
- return (RenderRequest)dreq.getAttribute("javax.portlet.request");
+ return (RenderRequestImpl)dreq.getAttribute("javax.portlet.request");
}
protected RenderResponse getResponse()
18 years, 3 months
JBoss Portal SVN: r9533 - modules/web/trunk/web/src/main/java/org/jboss/portal/web/command.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2008-01-17 19:34:07 -0500 (Thu, 17 Jan 2008)
New Revision: 9533
Modified:
modules/web/trunk/web/src/main/java/org/jboss/portal/web/command/CommandServlet.java
Log:
- Typo.
Modified: modules/web/trunk/web/src/main/java/org/jboss/portal/web/command/CommandServlet.java
===================================================================
--- modules/web/trunk/web/src/main/java/org/jboss/portal/web/command/CommandServlet.java 2008-01-18 00:28:19 UTC (rev 9532)
+++ modules/web/trunk/web/src/main/java/org/jboss/portal/web/command/CommandServlet.java 2008-01-18 00:34:07 UTC (rev 9533)
@@ -22,19 +22,19 @@
******************************************************************************/
package org.jboss.portal.web.command;
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import javax.servlet.RequestDispatcher;
-import javax.servlet.ServletException;
-import javax.servlet.ServletContext;
import java.io.IOException;
-import java.lang.reflect.Method;
import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
/**
- * This servlet is used to execute command coming from another context through a dispatching request.
- * The invocation is detyped in order to allow redeployment and avoid class cast exception.
+ * This servlet is used to execute command coming from another context through a dispatching request. The invocation is
+ * detyped in order to allow redeployment and avoid class cast exception.
*
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
@@ -53,18 +53,17 @@
/**
* <p>Execute a command after having performed a request dispatch in the target servlet context.</p>
+ * <p/>
+ * <p>The provided callback argument must expose a public non static and non abstract method with the signature
+ * <code>execute(HttpServletRequest,HttpServletResponse)</code>. This method must return an object and can declare
+ * any exception. This method will be invoked after the request dispatch operation is done.</p>
+ * <p/>
+ * <p>Any throwable thrown by the callback invocation will be wrapped in a <code>ServletException</code> and
+ * rethrown, unless it is an instance of <code>ServletException</code> or <code>IOException</code>.</p>
*
- * <p>The provided callback argment must expose a public non static and non abstract method
- * with the signature <code>execute(HttpServletRequest,HttpServletResponse)</code>.
- * This method must return an object and can declare any exception. This method will be invoked
- * after the request dispatch operation is done.</p>
- *
- * <p>Any throwable thrown by the callback invocation will be wrapped in a <code>ServletException</code>
- * and rethrown, unless it is an instance of <code>ServletException</code> or <code>IOException</code>.</p>
- *
- * @param callback the callback to invoke after the inclusion is done
+ * @param callback the callback to invoke after the inclusion is done
* @param targetContext the target servlet context
- * @throws IOException likely thrown by the request dispatch operation
+ * @throws IOException likely thrown by the request dispatch operation
* @throws ServletException wraps any exception thrown by the callback
*/
public static Object include(
18 years, 3 months
JBoss Portal SVN: r9532 - modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/invocation/response.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-01-17 19:28:19 -0500 (Thu, 17 Jan 2008)
New Revision: 9532
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/invocation/response/FragmentResponse.java
Log:
Write should keep the offset and length parameters
Modified: modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/invocation/response/FragmentResponse.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/invocation/response/FragmentResponse.java 2008-01-18 00:28:07 UTC (rev 9531)
+++ modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/invocation/response/FragmentResponse.java 2008-01-18 00:28:19 UTC (rev 9532)
@@ -289,7 +289,7 @@
}
//
- out.write(b);
+ out.write(b, off, len);
}
public void write(int b) throws IOException
18 years, 3 months
JBoss Portal SVN: r9531 - modules/portlet/branches/JBP_PORTLET_BRANCH_1_0/portlet/src/main/org/jboss/portal/portlet/invocation/response.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-01-17 19:28:07 -0500 (Thu, 17 Jan 2008)
New Revision: 9531
Modified:
modules/portlet/branches/JBP_PORTLET_BRANCH_1_0/portlet/src/main/org/jboss/portal/portlet/invocation/response/FragmentResponse.java
Log:
Write should keep the offset and length parameters
Modified: modules/portlet/branches/JBP_PORTLET_BRANCH_1_0/portlet/src/main/org/jboss/portal/portlet/invocation/response/FragmentResponse.java
===================================================================
--- modules/portlet/branches/JBP_PORTLET_BRANCH_1_0/portlet/src/main/org/jboss/portal/portlet/invocation/response/FragmentResponse.java 2008-01-17 22:42:31 UTC (rev 9530)
+++ modules/portlet/branches/JBP_PORTLET_BRANCH_1_0/portlet/src/main/org/jboss/portal/portlet/invocation/response/FragmentResponse.java 2008-01-18 00:28:07 UTC (rev 9531)
@@ -279,7 +279,7 @@
}
//
- out.write(b);
+ out.write(b, off, len);
}
public void write(int b) throws IOException
18 years, 3 months
JBoss Portal SVN: r9530 - in modules/portlet/trunk: portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api and 8 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-01-17 17:42:31 -0500 (Thu, 17 Jan 2008)
New Revision: 9530
Added:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletrequests/
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletrequests/PublicRenderParameterTestCase.java
modules/portlet/trunk/test/src/test/resources/jsr286/tck/portletrequests-war/
modules/portlet/trunk/test/src/test/resources/jsr286/tck/portletrequests-war/WEB-INF/
modules/portlet/trunk/test/src/test/resources/jsr286/tck/portletrequests-war/WEB-INF/portlet.xml
modules/portlet/trunk/test/src/test/resources/jsr286/tck/portletrequests-war/WEB-INF/web.xml
Removed:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/RequestParameters.java
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/PortletParameterMap.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/PortletRequestImpl.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/PortletController.java
modules/portlet/trunk/test/src/test/build.xml
modules/portlet/trunk/test/src/test/resources/test/remote-jboss-unit.xml
Log:
an initial test case for public render parameter
Modified: modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/PortletParameterMap.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/PortletParameterMap.java 2008-01-17 22:32:44 UTC (rev 9529)
+++ modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/PortletParameterMap.java 2008-01-17 22:42:31 UTC (rev 9530)
@@ -212,7 +212,12 @@
public Map<String, String[]> getPrivateMapSnapshot()
{
- Map<String, String[]> snapshot = getMapSnapshot(PortletParameter.Scope.PRIVATE);
+ return getMapSnapshot(PortletParameter.Scope.PRIVATE);
+ }
+
+ public Map<String, String[]> getPublicMapSnapshot()
+ {
+ Map<String, String[]> snapshot = getMapSnapshot(PortletParameter.Scope.PUBLIC);
for (String removal : publicEntryRemovals)
{
snapshot.put(removal, EMPTY_STRINGS);
@@ -220,11 +225,6 @@
return snapshot;
}
- public Map<String, String[]> getPublicMapSnapshot()
- {
- return getMapSnapshot(PortletParameter.Scope.PUBLIC);
- }
-
private Map<String, String[]> getMapSnapshot(PortletParameter.Scope scope)
{
Map<String, String[]> snapshot = new HashMap<String, String[]>();
Deleted: modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/RequestParameters.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/RequestParameters.java 2008-01-17 22:32:44 UTC (rev 9529)
+++ modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/RequestParameters.java 2008-01-17 22:42:31 UTC (rev 9530)
@@ -1,196 +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.portlet.impl.jsr168;
-
-import org.jboss.portal.common.util.ParameterMap;
-import org.jboss.portal.portlet.spi.PortletInvocationContext;
-import org.jboss.portal.portlet.spi.ActionContext;
-import org.jboss.portal.portlet.StateString;
-import org.jboss.portal.portlet.ParametersStateString;
-
-/**
- * The main responsibility of this class is to combine the different parameter sources (private navigational state,
- * public navigational state, interaction state, form) into the private map, public map and parameter map.
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class RequestParameters
-{
-
- /** . */
- protected final ParameterMap parameters;
-
- /** . */
- protected final ParameterMap privateParameters;
-
- /** . */
- protected final ParameterMap publicParameters;
-
- public RequestParameters(PortletInvocationContext context)
- {
- if (context instanceof ActionContext)
- {
- ActionContext actionContext = (ActionContext)context;
-
- // Get the possibly null interaction state
- StateString interactionState = actionContext.getInteractionState();
-
- // Take care of the interaction state if any
- ParameterMap privateParameters = null;
-
- //
- if (interactionState != null)
- {
- // Unserialize the interaction state if necessary
- ParametersStateString parametersState;
- if (interactionState instanceof ParametersStateString)
- {
- parametersState = (ParametersStateString)interactionState;
- }
- else
- {
- parametersState = new ParametersStateString(interactionState.getStringValue());
- }
-
- //
- privateParameters = parametersState.getParameters();
- }
-
- //
- ParameterMap form = actionContext.getForm();
- if (form != null)
- {
- if (privateParameters == null)
- {
- privateParameters = form;
- }
- else
- {
- privateParameters = ParameterMap.clone(privateParameters);
- privateParameters.append(form);
- }
- }
-
- //
- ParameterMap publicParameters = actionContext.getPublicNavigationalState();
-
- //
- ParameterMap parameters;
- if (publicParameters != null)
- {
- if (privateParameters != null)
- {
- ParameterMap tmp = ParameterMap.clone(privateParameters);
- tmp.append(publicParameters);
- parameters = tmp;
- }
- else
- {
- parameters = publicParameters;
- }
- }
- else
- {
- if (privateParameters != null)
- {
- parameters = privateParameters;
- }
- else
- {
- parameters = null;
- }
- }
-
- //
- this.privateParameters = privateParameters;
- this.publicParameters = publicParameters;
- this.parameters = parameters;
- }
- else
- {
- // Get the possibly null navigational state
- StateString navigationalState = context.getNavigationalState();
-
- //
- ParameterMap privateParameters;
- if (navigationalState == null)
- {
- privateParameters = null;
- }
- else
- {
- privateParameters = ParametersStateString.create(navigationalState).getParameters();
- }
-
- //
- ParameterMap publicParameters = context.getPublicNavigationalState();
-
- // Build combined map
- ParameterMap parameters;
- if (publicParameters != null)
- {
- if (privateParameters != null)
- {
- parameters = ParameterMap.clone(privateParameters);
- parameters.putAll(publicParameters);
- }
- else
- {
- parameters = publicParameters;
- }
- }
- else
- {
- if (privateParameters != null)
- {
- parameters = privateParameters;
- }
- else
- {
- parameters = null;
- }
- }
-
- //
- this.privateParameters = privateParameters;
- this.publicParameters = publicParameters;
- this.parameters = parameters;
- }
- }
-
- public ParameterMap getParameters()
- {
- return parameters;
- }
-
- public ParameterMap getPrivateParameters()
- {
- return privateParameters;
- }
-
- public ParameterMap getPublicParameters()
- {
- return publicParameters;
- }
-}
Modified: modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/PortletRequestImpl.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/PortletRequestImpl.java 2008-01-17 22:32:44 UTC (rev 9529)
+++ modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/PortletRequestImpl.java 2008-01-17 22:42:31 UTC (rev 9530)
@@ -103,20 +103,22 @@
PreferencesValidator validator = container.getPreferencesValidator();
ContainerPortletInfo info = container.getInfo();
ContainerPreferencesInfo containerPrefs = info.getPreferences();
+ ContainerNavigationInfo navigationInfo = info.getNavigation();
+ UserContext userContext = invocation.getUserContext();
//
this.invocation = invocation;
- this.requestParameterMap = new PortletRequestParameterMap(navigationInfo, invocation.getPortletContext());
- this.userContext = invocation.getUserContext();
+ this.userContext = userContext;
this.securityContext = invocation.getSecurityContext();
this.requestContext = invocation.getRequestContext();
this.windowContext = invocation.getWindowContext();
this.container = container;
this.dreq = invocation.getDispatchedRequest();
this.portalContext = new PortalContextImpl(invocation.getPortalContext());
- this.attributes = new PortletRequestAttributes(this.container, userContext);
+ this.attributes = new PortletRequestAttributes(container, userContext);
this.preferences = new PortletPreferencesImpl(prefs, containerPrefs, validator, mode);
- this.navigationInfo = info.getNavigation();
+ this.navigationInfo = navigationInfo;
+ this.requestParameterMap = new PortletRequestParameterMap(navigationInfo, invocation.getPortletContext());
}
// PLT.11.1.1
Added: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletrequests/PublicRenderParameterTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletrequests/PublicRenderParameterTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletrequests/PublicRenderParameterTestCase.java 2008-01-17 22:42:31 UTC (rev 9530)
@@ -0,0 +1,134 @@
+/******************************************************************************
+ * 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.portlet.jsr286.tck.portletrequests;
+
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
+import org.jboss.portal.unit.PortletTestCase;
+import org.jboss.portal.unit.PortletTestContext;
+import org.jboss.portal.unit.base.AbstractUniversalTestPortlet;
+import org.jboss.portal.unit.actions.PortletRenderTestAction;
+import org.jboss.portal.unit.actions.PortletActionTestAction;
+import org.jboss.portal.test.portlet.framework.UTP9;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.portal.test.portlet.framework.UTP2;
+import org.jboss.portal.common.util.Tools;
+import static org.jboss.unit.api.Assert.*;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
+
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.Portlet;
+import javax.portlet.PortletConfig;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletException;
+import javax.portlet.PortletURL;
+import java.util.Enumeration;
+import java.util.Locale;
+import java.util.List;
+import java.util.HashSet;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+(a)TestCase({Assertion.JSR168_1000})
+public class PublicRenderParameterTestCase
+{
+
+ /** . */
+ int renderCount = 0;
+
+ public PublicRenderParameterTestCase(PortletTestCase seq)
+ {
+ seq.bindAction(0, UTP1.RENDER_JOIN_POINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ return new InvokeGetResponse(response.createActionURL().toString());
+ }
+ });
+ seq.bindAction(1, UTP1.ACTION_JOIN_POINT, new PortletActionTestAction()
+ {
+ protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws PortletException, IOException
+ {
+ response.setRenderParameter("foo", "foo");
+ }
+ });
+ seq.bindAction(1, UTP1.RENDER_JOIN_POINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ String foo = request.getParameter("foo");
+ assertEquals("foo", foo);
+ renderCount++;
+ PortletURL url = response.createActionURL();
+ url.setParameter("foo", "bar");
+ return new InvokeGetResponse(url.toString());
+ }
+ });
+ seq.bindAction(1, UTP2.RENDER_JOIN_POINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ String foo = request.getParameter("foo");
+ assertEquals("foo", foo);
+ renderCount++;
+ return null;
+ }
+ });
+ seq.bindAction(2, UTP1.ACTION_JOIN_POINT, new PortletActionTestAction()
+ {
+ protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws PortletException, IOException
+ {
+ assertEquals(2, renderCount);
+ assertEquals(new String[]{"bar","foo"}, request.getParameterMap().get("foo"));
+ response.removePublicRenderParameter("foo");
+ renderCount = 0;
+ }
+ });
+ seq.bindAction(2, UTP1.RENDER_JOIN_POINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ String foo = request.getParameter("foo");
+ assertEquals(null, foo);
+ return ++renderCount == 2 ? new EndTestResponse() : null;
+ }
+ });
+ seq.bindAction(2, UTP2.RENDER_JOIN_POINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ String foo = request.getParameter("foo");
+ assertEquals(null, foo);
+ renderCount++;
+ return ++renderCount == 2 ? new EndTestResponse() : null;
+ }
+ });
+ }
+}
\ No newline at end of file
Modified: modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/PortletController.java
===================================================================
--- modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/PortletController.java 2008-01-17 22:32:44 UTC (rev 9529)
+++ modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/PortletController.java 2008-01-17 22:42:31 UTC (rev 9530)
@@ -502,23 +502,32 @@
portalNS.setWindowNavigationalState(portletId, windowNS);
// Now update shared state scoped at page
-// Map<String, String[]> publicNS = update.getPublicNavigationalStateUpdates();
-// if (publicNS != null)
-// {
-// NavigationInfo navigationInfo = portlet.getInfo().getNavigation();
-// for (Map.Entry<String, String[]> entry : publicNS.entrySet())
-// {
-// String id = entry.getKey();
-// ParameterInfo parameterInfo = navigationInfo.getPublicParameter(id);
-//
-// //
-// if (parameterInfo != null)
-// {
-// QName name = parameterInfo.getName();
-// portalNS.getPageNavigationalState().put(name, entry.getValue());
-// }
-// }
-// }
+ Map<String, String[]> publicNS = update.getPublicNavigationalStateUpdates();
+ if (publicNS != null)
+ {
+ NavigationInfo navigationInfo = portlet.getInfo().getNavigation();
+ Map<QName, String[]> pageNS = portalNS.getPageNavigationalState();
+ for (Map.Entry<String, String[]> entry : publicNS.entrySet())
+ {
+ String id = entry.getKey();
+ ParameterInfo parameterInfo = navigationInfo.getPublicParameter(id);
+
+ //
+ if (parameterInfo != null)
+ {
+ QName name = parameterInfo.getName();
+ String[] value = entry.getValue();
+ if (value.length > 0)
+ {
+ pageNS.put(name, value);
+ }
+ else
+ {
+ pageNS.remove(name);
+ }
+ }
+ }
+ }
}
static class Action
Modified: modules/portlet/trunk/test/src/test/build.xml
===================================================================
--- modules/portlet/trunk/test/src/test/build.xml 2008-01-17 22:32:44 UTC (rev 9529)
+++ modules/portlet/trunk/test/src/test/build.xml 2008-01-17 22:42:31 UTC (rev 9530)
@@ -229,6 +229,7 @@
<package-jsr286-tck-test test="event"/>
<package-jsr286-tck-test test="eventnonamespace"/>
<package-jsr286-tck-test test="stateawareresponse"/>
+ <package-jsr286-tck-test test="portletrequests"/>
<package-jsr286-api-test test="event"/>
Added: modules/portlet/trunk/test/src/test/resources/jsr286/tck/portletrequests-war/WEB-INF/portlet.xml
===================================================================
--- modules/portlet/trunk/test/src/test/resources/jsr286/tck/portletrequests-war/WEB-INF/portlet.xml (rev 0)
+++ modules/portlet/trunk/test/src/test/resources/jsr286/tck/portletrequests-war/WEB-INF/portlet.xml 2008-01-17 22:42:31 UTC (rev 9530)
@@ -0,0 +1,53 @@
+<?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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
+ version="2.0">
+
+ <portlet>
+ <portlet-name>UniversalTestPortletA</portlet-name>
+ <portlet-class>org.jboss.portal.test.portlet.framework.UTP1</portlet-class>
+ <supports>
+ <mime-type>text/html</mime-type>
+ </supports>
+ <supported-public-render-parameter>foo</supported-public-render-parameter>
+ </portlet>
+
+ <portlet>
+ <portlet-name>UniversalTestPortletB</portlet-name>
+ <portlet-class>org.jboss.portal.test.portlet.framework.UTP2</portlet-class>
+ <supports>
+ <mime-type>text/html</mime-type>
+ </supports>
+ <supported-public-render-parameter>foo</supported-public-render-parameter>
+ </portlet>
+
+ <public-render-parameter>
+ <identifier>foo</identifier>
+ <name>Foo</name>
+ </public-render-parameter>
+
+</portlet-app>
Added: modules/portlet/trunk/test/src/test/resources/jsr286/tck/portletrequests-war/WEB-INF/web.xml
===================================================================
--- modules/portlet/trunk/test/src/test/resources/jsr286/tck/portletrequests-war/WEB-INF/web.xml (rev 0)
+++ modules/portlet/trunk/test/src/test/resources/jsr286/tck/portletrequests-war/WEB-INF/web.xml 2008-01-17 22:42:31 UTC (rev 9530)
@@ -0,0 +1,32 @@
+<?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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+ <listener>
+ <listener-class>org.jboss.portal.unit.PortletTestSuite</listener-class>
+ </listener>
+</web-app>
Modified: modules/portlet/trunk/test/src/test/resources/test/remote-jboss-unit.xml
===================================================================
--- modules/portlet/trunk/test/src/test/resources/test/remote-jboss-unit.xml 2008-01-17 22:32:44 UTC (rev 9529)
+++ modules/portlet/trunk/test/src/test/resources/test/remote-jboss-unit.xml 2008-01-17 22:42:31 UTC (rev 9530)
@@ -167,6 +167,10 @@
<class name="org.jboss.unit.remote.driver.RemoteTestDriverClient"/>
<property name="archiveId" value="test-jsr286-tck-stateawareresponse.war"/>
</generic>
+ <generic>
+ <class name="org.jboss.unit.remote.driver.RemoteTestDriverClient"/>
+ <property name="archiveId" value="test-jsr286-tck-portletrequests.war"/>
+ </generic>
<!--Spec API Assertions tests-->
<generic>
18 years, 3 months
JBoss Portal SVN: r9529 - modules/common/trunk/common/src/main/java/org/jboss/portal/common/util.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-01-17 17:32:44 -0500 (Thu, 17 Jan 2008)
New Revision: 9529
Modified:
modules/common/trunk/common/src/main/java/org/jboss/portal/common/util/TypedMap.java
Log:
just make code easier to debug
Modified: modules/common/trunk/common/src/main/java/org/jboss/portal/common/util/TypedMap.java
===================================================================
--- modules/common/trunk/common/src/main/java/org/jboss/portal/common/util/TypedMap.java 2008-01-17 14:38:55 UTC (rev 9528)
+++ modules/common/trunk/common/src/main/java/org/jboss/portal/common/util/TypedMap.java 2008-01-17 22:32:44 UTC (rev 9529)
@@ -206,7 +206,15 @@
IK ik = keyConverter.unwrap(ek);
IV iv = valueConverter.unwrap(ev);
iv = accessor.getMap(true).put(ik, iv);
- return iv == null ? null : valueConverter.wrap(iv);
+ if (iv == null)
+ {
+ ev = null;
+ }
+ else
+ {
+ ev = valueConverter.wrap(iv);
+ }
+ return ev;
}
public final EV get(Object key)
@@ -214,19 +222,25 @@
EK ek = (EK)key;
IK ik = keyConverter.unwrap(ek);
IV iv = accessor.getMap(false).get(ik);
- return iv == null ? null : valueConverter.wrap(iv);
+ EV ev = null;
+ if (iv != null)
+ {
+ ev = valueConverter.wrap(iv);
+ }
+ return ev;
}
public final EV remove(Object key)
{
EK ek = (EK)key;
IK ik = keyConverter.unwrap(ek);
- IV iv = null;
- if (!isEmpty())
+ IV iv = accessor.getMap(true).remove(ik);
+ EV ev = null;
+ if (iv != null)
{
- iv = accessor.getMap(true).remove(ik);
+ ev = valueConverter.wrap(iv);
}
- return iv == null ? null : valueConverter.wrap(iv);
+ return ev;
}
public final boolean containsValue(Object value)
18 years, 3 months
JBoss Portal SVN: r9528 - modules/common/trunk/common/src/main/java/org/jboss/portal/common/util.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-01-17 09:38:55 -0500 (Thu, 17 Jan 2008)
New Revision: 9528
Modified:
modules/common/trunk/common/src/main/java/org/jboss/portal/common/util/ParameterMap.java
Log:
a few minor improvements
Modified: modules/common/trunk/common/src/main/java/org/jboss/portal/common/util/ParameterMap.java
===================================================================
--- modules/common/trunk/common/src/main/java/org/jboss/portal/common/util/ParameterMap.java 2008-01-17 13:44:09 UTC (rev 9527)
+++ modules/common/trunk/common/src/main/java/org/jboss/portal/common/util/ParameterMap.java 2008-01-17 14:38:55 UTC (rev 9528)
@@ -295,7 +295,7 @@
/**
* Defines how the state of the values are managed.
*/
- public static class AccessMode
+ public static class AccessMode implements Serializable
{
public static AccessMode get(boolean copyValueOnRead, boolean copyValueOnWrite)
@@ -342,7 +342,7 @@
}
}
- private static class ValueConverter extends Converter<String[], String[]>
+ private static class ValueConverter extends Converter<String[], String[]> implements Serializable
{
/** . */
18 years, 3 months