JBoss Portal SVN: r11077 - branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/aspects/portlet.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-06-18 05:26:13 -0400 (Wed, 18 Jun 2008)
New Revision: 11077
Modified:
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/aspects/portlet/ContextTrackerInterceptor.java
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/aspects/portlet/PortalSessionSynchronizationInterceptor.java
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/aspects/portlet/PortletSessionSynchronizationInterceptor.java
Log:
Oups
Modified: branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/aspects/portlet/ContextTrackerInterceptor.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/aspects/portlet/ContextTrackerInterceptor.java 2008-06-18 04:14:58 UTC (rev 11076)
+++ branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/aspects/portlet/ContextTrackerInterceptor.java 2008-06-18 09:26:13 UTC (rev 11077)
@@ -23,8 +23,10 @@
package org.jboss.portal.portlet.aspects.portlet;
import org.jboss.portal.common.invocation.InvocationException;
-import org.jboss.portal.portlet.invocation.PortletInterceptor;
+import org.jboss.portal.portlet.PortletInvokerException;
+import org.jboss.portal.portlet.PortletInvokerInterceptor;
import org.jboss.portal.portlet.invocation.PortletInvocation;
+import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
/**
* This interceptor get the current webapp context path and adds it to the set of the collected context path.
@@ -32,9 +34,9 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision$
*/
-public class ContextTrackerInterceptor extends PortletInterceptor
+public class ContextTrackerInterceptor extends PortletInvokerInterceptor
{
- protected Object invoke(PortletInvocation invocation) throws Exception, InvocationException
+ public PortletInvocationResponse invoke(PortletInvocation invocation) throws IllegalArgumentException, PortletInvokerException
{
//
String contextPath = (String)invocation.getDispatchedRequest().getAttribute("javax.servlet.include.context_path");
@@ -43,6 +45,6 @@
org.jboss.portal.server.aspects.server.SignOutInterceptor.getSet().add(contextPath);
// Invoke next command
- return invocation.invokeNext();
+ return super.invoke(invocation);
}
}
Modified: branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/aspects/portlet/PortalSessionSynchronizationInterceptor.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/aspects/portlet/PortalSessionSynchronizationInterceptor.java 2008-06-18 04:14:58 UTC (rev 11076)
+++ branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/aspects/portlet/PortalSessionSynchronizationInterceptor.java 2008-06-18 09:26:13 UTC (rev 11077)
@@ -24,8 +24,10 @@
import org.apache.log4j.Logger;
import org.jboss.portal.common.invocation.InvocationException;
-import org.jboss.portal.portlet.invocation.PortletInterceptor;
+import org.jboss.portal.portlet.PortletInvokerException;
+import org.jboss.portal.portlet.PortletInvokerInterceptor;
import org.jboss.portal.portlet.invocation.PortletInvocation;
+import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
import org.jboss.portal.portlet.session.SubSession;
import org.jboss.portal.portlet.spi.PortletInvocationContext;
@@ -38,13 +40,13 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision$
*/
-public class PortalSessionSynchronizationInterceptor extends PortletInterceptor
+public class PortalSessionSynchronizationInterceptor extends PortletInvokerInterceptor
{
/** . */
private final Logger log = Logger.getLogger(PortalSessionSynchronizationInterceptor.class);
- protected Object invoke(PortletInvocation invocation) throws Exception, InvocationException
+ public PortletInvocationResponse invoke(PortletInvocation invocation) throws IllegalArgumentException, PortletInvokerException
{
HttpServletRequest req = null;
@@ -84,21 +86,21 @@
// Set the sub session for the portlet synchronization
if (ss != null && ss.isActivated())
{
- invocation.setAttribute(PortletInvocation.INVOCATION_SCOPE, "subsession", ss);
+ invocation.setAttribute("subsession", ss);
}
//
- return invocation.invokeNext();
+ return super.invoke(invocation);
}
finally
{
- List modifications = (List)invocation.getAttribute(PortletInvocation.INVOCATION_SCOPE, "subsession");
+ List modifications = (List)invocation.getAttribute("subsession");
// If we have any modifications propagate them
if (modifications != null)
{
//
- invocation.removeAttribute(PortletInvocation.INVOCATION_SCOPE, "subsession");
+ invocation.removeAttribute("subsession");
//
if (ss == null)
@@ -113,7 +115,7 @@
}
else
{
- return invocation.invokeNext();
+ return super.invoke(invocation);
}
}
}
Modified: branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/aspects/portlet/PortletSessionSynchronizationInterceptor.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/aspects/portlet/PortletSessionSynchronizationInterceptor.java 2008-06-18 04:14:58 UTC (rev 11076)
+++ branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/aspects/portlet/PortletSessionSynchronizationInterceptor.java 2008-06-18 09:26:13 UTC (rev 11077)
@@ -23,12 +23,14 @@
package org.jboss.portal.portlet.aspects.portlet;
import org.jboss.portal.common.invocation.InvocationException;
+import org.jboss.portal.portlet.PortletInvokerException;
+import org.jboss.portal.portlet.PortletInvokerInterceptor;
import org.jboss.portal.portlet.container.PortletContainer;
import org.jboss.portal.portlet.container.ContainerPortletInvoker;
import org.jboss.portal.portlet.deployment.jboss.info.SessionInfo;
import org.jboss.portal.portlet.info.PortletInfo;
-import org.jboss.portal.portlet.invocation.PortletInterceptor;
import org.jboss.portal.portlet.invocation.PortletInvocation;
+import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
import org.jboss.portal.portlet.session.SessionListener;
import org.jboss.portal.portlet.session.SubSession;
@@ -38,17 +40,17 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision$
*/
-public class PortletSessionSynchronizationInterceptor extends PortletInterceptor
+public class PortletSessionSynchronizationInterceptor extends PortletInvokerInterceptor
{
- protected Object invoke(PortletInvocation invocation) throws Exception, InvocationException
+ public PortletInvocationResponse invoke(PortletInvocation invocation) throws IllegalArgumentException, PortletInvokerException
{
- PortletContainer container = (PortletContainer)invocation.getAttribute(PortletInvocation.INVOCATION_SCOPE, ContainerPortletInvoker.PORTLET_CONTAINER);
+ PortletContainer container = (PortletContainer)invocation.getAttribute(ContainerPortletInvoker.PORTLET_CONTAINER);
PortletInfo portletInfo = container.getInfo();
SessionInfo sessionInfo = portletInfo.getAttachment(SessionInfo.class);
if (sessionInfo != null && Boolean.TRUE.equals(sessionInfo.getDistributed()))
{
- SubSession ss = (SubSession)invocation.getAttribute(PortletInvocation.INVOCATION_SCOPE, "subsession");
+ SubSession ss = (SubSession)invocation.getAttribute("subsession");
// If we detect an activation then we copy the content in the dispatched session
if (ss != null)
@@ -64,7 +66,7 @@
SessionListener.activate();
//
- return invocation.invokeNext();
+ return super.invoke(invocation);
}
finally
{
@@ -72,12 +74,12 @@
List modifications = SessionListener.desactivate();
// Set modifications for portal session synchronization
- invocation.setAttribute(PortletInvocation.INVOCATION_SCOPE, "subsession", modifications);
+ invocation.setAttribute("subsession", modifications);
}
}
else
{
- return invocation.invokeNext();
+ return super.invoke(invocation);
}
}
}
17 years, 10 months
JBoss Portal SVN: r11076 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-06-18 00:14:58 -0400 (Wed, 18 Jun 2008)
New Revision: 11076
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/trademarks.xml
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml
Log:
trademark marks for "Sun". This should finish
all Sun trademarks...
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/trademarks.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/trademarks.xml 2008-06-18 03:56:01 UTC (rev 11075)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/trademarks.xml 2008-06-18 04:14:58 UTC (rev 11076)
@@ -1,7 +1,7 @@
<preface id="trademarks">
<title>Please Read: Important Trademark Information</title>
<para>
- JavaServer, JSP, Java, JMX, JDK, Java runtime environment, J2EE, JVM, Javadoc, 100% Pure Java, and JavaScript are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.
+ Sun, JavaServer, JSP, Java, JMX, JDK, Java runtime environment, J2EE, JVM, Javadoc, 100% Pure Java, and JavaScript are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.
</para>
<para>
JBoss is a registered trademark of Red Hat, Inc. in the U.S. and other countries.
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml 2008-06-18 03:56:01 UTC (rev 11075)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml 2008-06-18 04:14:58 UTC (rev 11076)
@@ -996,7 +996,7 @@
</sect3>
</sect2>
<sect2 id="sunri_42x">
- <title>An example Sun JSF Reference Implementation (RI) portlet</title>
+ <title>An example <trademark class="trade">Sun</trademark> JSF Reference Implementation (RI) portlet</title>
<sect3>
<title>Introduction</title>
<para>
@@ -1020,9 +1020,9 @@
</para>
<para>
<note>
- <title>Bundled Sun JSF RI</title>
+ <title>Bundled <trademark class="trade">Sun</trademark> JSF RI</title>
<para>
- JBoss AS version 4.2.<replaceable>x</replaceable> and JBoss EAP bundle Sun's JSF RI libraries in the
+ JBoss AS version 4.2.<replaceable>x</replaceable> and JBoss EAP bundle the <trademark class="trade">Sun</trademark> JSF RI libraries in the
<filename>$JBOSS_HOME/server/default/deploy/jboss-web.deployer/jsf-libs/</filename> directory. Therefore, you do not need to package the Sun JSF RI libraries with your portlet application.
</para>
</note>
17 years, 10 months
JBoss Portal SVN: r11075 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-06-17 23:56:01 -0400 (Tue, 17 Jun 2008)
New Revision: 11075
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/supported.xml
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/trademarks.xml
Log:
- minor fixes
- trademarks for "100% Pure Java"
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/supported.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/supported.xml 2008-06-18 03:39:00 UTC (rev 11074)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/supported.xml 2008-06-18 03:56:01 UTC (rev 11075)
@@ -31,7 +31,7 @@
</sect1>
<sect1>
<title>Supported Operating Systems</title>
- <para>JBoss Portal is 100% pure <trademark class="trade">Java</trademark> technology, and therefore it is interoperable with most operating systems
+ <para>JBoss Portal is <trademark class="trade">100% Pure Java</trademark>, and therefore it is interoperable with most operating systems
capable of running a Java Virtual Machine (<trademark class="trade">JVM</trademark>), including <trademark class="registered">Linux</trademark>, <trademark class="registered">Windows</trademark>, <trademark class="registered">UNIX</trademark> operating systems, and Mac OS X.
</para>
</sect1>
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/trademarks.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/trademarks.xml 2008-06-18 03:39:00 UTC (rev 11074)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/trademarks.xml 2008-06-18 03:56:01 UTC (rev 11075)
@@ -1,7 +1,7 @@
<preface id="trademarks">
<title>Please Read: Important Trademark Information</title>
<para>
- JavaServer, JSP, Java, JMX, JDK, Java runtime environment, J2EE, JVM, Javadoc, and JavaScript are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.
+ JavaServer, JSP, Java, JMX, JDK, Java runtime environment, J2EE, JVM, Javadoc, 100% Pure Java, and JavaScript are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.
</para>
<para>
JBoss is a registered trademark of Red Hat, Inc. in the U.S. and other countries.
17 years, 10 months
JBoss Portal SVN: r11074 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-06-17 23:39:00 -0400 (Tue, 17 Jun 2008)
New Revision: 11074
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/sso.xml
Log:
minor title edits
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/sso.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/sso.xml 2008-06-18 02:31:40 UTC (rev 11073)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/sso.xml 2008-06-18 03:39:00 UTC (rev 11074)
@@ -24,13 +24,13 @@
mechanisms.</para>
</sect1>
<sect1>
- <title>Using Apache Tomcat Valve</title>
+ <title>Using an Apache Tomcat Valve</title>
<para>JBoss Application Server embeds Apache Tomcat as the default servlet container. Tomcat provides a builtin SSO support
using a valve. The Single Sign On Valve caches credentials on the server side, and then invisibly authenticate users when they
reach different web applications. Credentials are stored in a host-wide session which means that SSO will be effective throughout the session.
</para>
<sect2>
- <title>Enabling Apache Tomcat SSO Valve</title>
+ <title>Enabling the Apache Tomcat SSO Valve</title>
<para>
To enable SSO valve in Apache Tomcat you should uncomment the following line
<programlisting><![CDATA[<Valve className=’org.apache.catalina.authenticator.SingleSignOn’/>]]></programlisting>
17 years, 10 months
JBoss Portal SVN: r11073 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-06-17 22:31:40 -0400 (Tue, 17 Jun 2008)
New Revision: 11073
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/clustering.xml
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/sso.xml
Log:
adding "Apache" to "Tomcat" references...
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/clustering.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/clustering.xml 2008-06-18 02:12:37 UTC (rev 11072)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/clustering.xml 2008-06-18 02:31:40 UTC (rev 11073)
@@ -201,11 +201,11 @@
<sect1>
<title>Setup</title>
<para>We are going to outline how to setup a two node cluster on the same machine in order to test JBoss Portal HA. The only
- missing part from the full fledged setup is the addition of a load balancer in front of Tomcat. However a lot of documentation
+ missing part from the full fledged setup is the addition of a load balancer in front of Apache Tomcat. However a lot of documentation
exist on the subject. A detailed step by step setup of Apache and mod_jk is available from the
<ulink url="http://wiki.jboss.org/wiki/Wiki.jsp?page=UsingMod_jk1.2WithJBoss">JBoss Wiki</ulink>.</para>
<para>As we need two application servers running at the same time, we must avoid any conflict. For instance we will
- need Tomcat to bind its socket on two different ports otherwise a network conflict will occur. We will leverage
+ need Apache Tomcat to bind its socket on two different ports otherwise a network conflict will occur. We will leverage
the service binding manager <ulink url="http://docs.jboss.org/jbossas/jboss4guide/r3/html/ch10.html">this chapter</ulink> of
the JBoss AS documentation.</para>
<para>The first step is to copy the <emphasis>all</emphasis> configuration of JBoss into two separate
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml 2008-06-18 02:12:37 UTC (rev 11072)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml 2008-06-18 02:31:40 UTC (rev 11073)
@@ -19,7 +19,7 @@
<sect1>
<title>Changing the Port</title>
<para>
- It is common for web services to run on port 80. By default, JBoss EAP and JBoss AS use port 8080. If you can not use <ulink url="http://wiki.jboss.org/wiki/Wiki.jsp?page=UsingPortForwardingWithJBoss">port forwarding</ulink>, it is recommended to change the port JBoss EAP or JBoss AS listens on. To change the default port, open the <filename>$JBOSS_HOME/server/default/deploy/jboss-web.deployer/server.xml</filename> file, and edit the <computeroutput>Connector port</computeroutput> value for the <computeroutput>jboss.web</computeroutput> service; however, this configuration only applies to Tomcat:
+ It is common for web services to run on port 80. By default, JBoss EAP and JBoss AS use port 8080. If you can not use <ulink url="http://wiki.jboss.org/wiki/Wiki.jsp?page=UsingPortForwardingWithJBoss">port forwarding</ulink>, it is recommended to change the port JBoss EAP or JBoss AS listens on. To change the default port, open the <filename>$JBOSS_HOME/server/default/deploy/jboss-web.deployer/server.xml</filename> file, and edit the <computeroutput>Connector port</computeroutput> value for the <computeroutput>jboss.web</computeroutput> service; however, this configuration only applies to Apache Tomcat:
</para>
<para>
<screen>
@@ -31,7 +31,7 @@
This example changes the default port to port 8088. The JBoss EAP or JBoss AS server must be restarted before the new port settings take affect.
</para>
<para>
- The default SSL port is 8843. To enable HTTPS support, refer to the <ulink url="http://docs.jboss.org/jbossas/jboss4guide/r4/html/ch9.chapt.html#d0e21962">JBoss AS Guide</ulink>. For further information, refer to <ulink url="http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html">Tomcat's SSL configuration how-to</ulink>.
+ The default SSL port is 8843. To enable HTTPS support, refer to the <ulink url="http://docs.jboss.org/jbossas/jboss4guide/r4/html/ch9.chapt.html#d0e21962">JBoss AS Guide</ulink>. For further information, refer to the <ulink url="http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html">Apache Tomcat SSL configuration how-to</ulink>.
</para>
<para>
Please refer to <xref linkend="wsrp-ports"/> to update the WSRP service after having changed the port.
@@ -126,9 +126,9 @@
<note>
<title>Changing the context-root</title>
<para>
- By default, Tomcat holds on to the root context, <emphasis>/</emphasis>. You may need to remove the <filename>$JBOSS_HOME/server/default/deploy/jboss-web.deployer/ROOT.war/</filename> directory,
+ By default, Apache Tomcat holds on to the root context, <emphasis>/</emphasis>. You may need to remove the <filename>$JBOSS_HOME/server/default/deploy/jboss-web.deployer/ROOT.war/</filename> directory,
or add a <filename>jboss-web.xml</filename> file, which declares another
- context-root other than <emphasis>/</emphasis>, under the <filename>$JBOSS_HOME/server/default/deploy/jboss-web.deployer/ROOT.war/WEB-INF/</filename> directory, for the above changes to take affect. The following is an example <filename>jboss-web.xml</filename> file, which changes the Tomcat context path to <computeroutput>/tomcat-root</computeroutput>:
+ context-root other than <emphasis>/</emphasis>, under the <filename>$JBOSS_HOME/server/default/deploy/jboss-web.deployer/ROOT.war/WEB-INF/</filename> directory, for the above changes to take affect. The following is an example <filename>jboss-web.xml</filename> file, which changes the Apache Tomcat context path to <computeroutput>/tomcat-root</computeroutput>:
</para>
<para>
<screen><![CDATA[
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/sso.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/sso.xml 2008-06-18 02:12:37 UTC (rev 11072)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/sso.xml 2008-06-18 02:31:40 UTC (rev 11073)
@@ -24,15 +24,15 @@
mechanisms.</para>
</sect1>
<sect1>
- <title>Using Tomcat Valve</title>
+ <title>Using Apache Tomcat Valve</title>
<para>JBoss Application Server embeds Apache Tomcat as the default servlet container. Tomcat provides a builtin SSO support
using a valve. The Single Sign On Valve caches credentials on the server side, and then invisibly authenticate users when they
reach different web applications. Credentials are stored in a host-wide session which means that SSO will be effective throughout the session.
</para>
<sect2>
- <title>Enabling Tomcat SSO Valve</title>
+ <title>Enabling Apache Tomcat SSO Valve</title>
<para>
- To enable SSO valve in Tomcat you should uncomment the following line
+ To enable SSO valve in Apache Tomcat you should uncomment the following line
<programlisting><![CDATA[<Valve className=’org.apache.catalina.authenticator.SingleSignOn’/>]]></programlisting>
in the <literal>$JBOSS_HOME/server/default/deploy/jboss-web.deployer/server.xml</literal> file.
More information can be found <ulink url="http://www.jboss.org/wiki/Wiki.jsp?page=SingleSignOn">here</ulink>.
@@ -168,7 +168,7 @@
<emphasis>$JBOSS_HOME/server/default/deploy/cas.war/WEB-INF/lib</emphasis>.
</listitem>
<listitem>
- Edit <emphasis>$JBOSS_HOME/server/default/deploy/jboss-portal.sar/portal-server.war/WEB-INF/context.xml</emphasis> file and enable proper tomcat valve
+ Edit <emphasis>$JBOSS_HOME/server/default/deploy/jboss-portal.sar/portal-server.war/WEB-INF/context.xml</emphasis> file and enable proper Apache Tomcat Valve
by uncommenting following lines:
<programlisting>
<![CDATA[
@@ -278,7 +278,7 @@
slightly different for other deployment scenarios. Both JBoss Portal and JOSSO will need to be configured to authenticate against
same database or LDAP server. Please see JOSSO documentation to learn how to setup it up against proper identity store.</note>
<note>Configuration below assumes that JOSSO is already installed and deployed in the JBoss Application Server. This involves adding proper jar files
- into the classpath and altering several configuration files (adding tomcat valves, security realm and specific JOSSO configuration files).
+ into the classpath and altering several configuration files (adding Apache Tomcat Valves, security realm and specific JOSSO configuration files).
For JBoss setup please refer to JOSSO <ulink url="http://www.josso.org/jboss4-howto.html">documentation</ulink></note>
<sect2>
<title>Integration steps</title>
@@ -291,7 +291,7 @@
<emphasis>$JBOSS_HOME/server/default/deploy/josso.ear/josso.war/WEB-INF/lib</emphasis>.
</listitem>
<listitem>
- Edit <emphasis>$JBOSS_HOME/server/default/deploy/jboss-portal.sar/portal-server.war/WEB-INF/context.xml</emphasis> file and enable proper tomcat valve
+ Edit <emphasis>$JBOSS_HOME/server/default/deploy/jboss-portal.sar/portal-server.war/WEB-INF/context.xml</emphasis> file and enable proper Apache Tomcat Valve
by uncommenting following lines:
<programlisting>
<![CDATA[
17 years, 10 months
JBoss Portal SVN: r11072 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-06-17 22:12:37 -0400 (Tue, 17 Jun 2008)
New Revision: 11072
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/clustering.xml
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/cmsPortlet.xml
Log:
adding "Apache" in front of "Jackrabbit" in certain places
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/clustering.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/clustering.xml 2008-06-18 02:03:54 UTC (rev 11071)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/clustering.xml 2008-06-18 02:12:37 UTC (rev 11072)
@@ -35,7 +35,7 @@
concurrency issues when
deploying the various *-object.xml files. Without that, each node would try to create the
same objects in the database when it deploys an archive containing such descriptors.</listitem>
- <listitem>Used with JCR. The Jackrabbit server is not able to run in a cluster
+ <listitem>Used with JCR. The Apache Jackrabbit server is not able to run in a cluster
by itself, therefore we make a singleton on the cluster. This provides HA-CMS, which is
similar to the current HA JBossMQ provided in JBoss AS.</listitem>
</orderedlist>
@@ -185,7 +185,7 @@
<sect2>
<title>CMS clustering</title>
<para>The CMS backend storage relies on the Apache Jackrabbit project. Jackrabbit does not support clustering out of the box.
- So the portal run the Jackrabbit servicey on one node of the cluster using the
+ So the portal run the Jackrabbit service on one node of the cluster using the
<ulink url="http://www.onjava.com/pub/a/onjava/2003/08/20/jboss_clustering.html">HA-Singleton</ulink> technology.
The file <emphasis>jboss-portal.sar/portal-cms.sar/META-INF/jboss-service.xml</emphasis> contains the configuration. We will
not reproduce it in this documentation as the changes are quite complex and numerous. Access from all nodes of the cluster
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/cmsPortlet.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/cmsPortlet.xml 2008-06-18 02:03:54 UTC (rev 11071)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/cmsPortlet.xml 2008-06-18 02:12:37 UTC (rev 11072)
@@ -97,7 +97,7 @@
<section>
<title>Service Configuration</title>
<section>
- <title>Tuning Jackrabbit</title>
+ <title>Tuning Apache Jackrabbit</title>
<para>JBoss Portal uses Apache Jackrabbit as its Java Content Repository implementation.
Configuration of the service descriptor, allows for changing many of the variables
associated with the service.</para>
17 years, 10 months
JBoss Portal SVN: r11071 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-06-17 22:03:54 -0400 (Tue, 17 Jun 2008)
New Revision: 11071
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/xmldescriptors.xml
Log:
changing case for "Portlet" for certain headings, to
avoid mistaken acronym issues...
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml 2008-06-18 01:39:09 UTC (rev 11070)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml 2008-06-18 02:03:54 UTC (rev 11071)
@@ -996,7 +996,7 @@
</sect3>
</sect2>
<sect2 id="sunri_42x">
- <title>An example Sun JSF Reference Implementation (RI) Portlet</title>
+ <title>An example Sun JSF Reference Implementation (RI) portlet</title>
<sect3>
<title>Introduction</title>
<para>
@@ -1169,7 +1169,7 @@
</para>
</sect3>
<sect3>
- <title>Building your JSF Portlet</title>
+ <title>Building your JSF portlet</title>
<para>
The <filename>HelloWorldJSFSunRIPortlet.zip</filename> file contains a pre-compiled <filename>helloworldjsfsunriportlet.war</filename> file; however, to manually build the <filename>helloworldjsfsunriportlet.war</filename> file:
</para>
@@ -1234,7 +1234,7 @@
</para>
</sect3>
<sect3>
- <title>Deploying your JSF Portlet</title>
+ <title>Deploying your JSF portlet</title>
<para>
If you did not expand the <filename>helloworldjsfsunriportlet.war</filename> file, copy the <filename>HelloWorldJSFSunRIPortlet/helloworldjsfsunriportlet.war</filename> file into the correct JBoss AS or JBoss EAP <filename>deploy/</filename> directory. If you expanded the <filename>helloworldjsfsunriportlet.war</filename> file, copy the <filename>HelloWorldJSFSunRIPortlet/output/lib/exploded/helloworldjsfsunriportlet.war/</filename> directory into the correct JBoss AS or JBoss EAP <filename>deploy/</filename> directory. For example, if you are using <computeroutput>default</computeroutput> JBoss AS profile, copy the WAR file or the expanded directory into the <filename>$JBOSS_HOME/server/default/deploy/</filename> directory.
</para>
@@ -1324,7 +1324,7 @@
</sect3>
</sect2>-->
<sect2 id="myfaces_42x">
- <title>An example Apache MyFaces JSF Portlet</title>
+ <title>An example Apache MyFaces JSF portlet</title>
<sect3>
<title>Introduction</title>
<para>
@@ -1423,7 +1423,7 @@
</para>
<para>
<note>
- <title>Adding Functionality to an Apache MyFaces JSF Portlet</title>
+ <title>Adding Functionality to an Apache MyFaces JSF portlet</title>
<para>
To add functionality to an Apache MyFaces JSF portlet, sub-class it and create your own class.
</para>
@@ -1474,7 +1474,7 @@
</para>
</sect3>
<sect3>
- <title>Building your Apache MyFaces JSF Portlet</title>
+ <title>Building your Apache MyFaces JSF portlet</title>
<para>
The <filename>HelloWorldJSFMyFaces42Portlet.zip</filename> file contains a pre-compiled <filename>helloworldjsfmyfacesportlet.war</filename> file; however, to manually build the <filename>helloworldjsfmyfacesportlet.war</filename> file:
</para>
@@ -1539,7 +1539,7 @@
</para>
</sect3>
<sect3>
- <title>Deploying your Apache MyFaces JSF Portlet</title>
+ <title>Deploying your Apache MyFaces JSF portlet</title>
<para>
If you did not expand the <filename>helloworldjsfmyfacesportlet.war</filename> file, copy the <filename>HelloWorldJSFMyFaces42Portlet/helloworldjsfmyfacesportlet.war</filename> file into the correct JBoss AS or JBoss EAP <filename>deploy/</filename> directory. If you expanded the <filename>helloworldjsfmyfacesportlet.war</filename> file, copy the <filename>HelloWorldJSFMyFaces42Portlet/output/lib/exploded/helloworldjsfmyfacesportlet.war/</filename> directory into the correct JBoss AS or JBoss EAP <filename>deploy/</filename> directory. For example, if you are using the <computeroutput>default</computeroutput> JBoss AS profile, copy the WAR file or the expanded directory into the <filename>$JBOSS_HOME/server/default/deploy/</filename> directory.
</para>
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/xmldescriptors.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/xmldescriptors.xml 2008-06-18 01:39:09 UTC (rev 11070)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/xmldescriptors.xml 2008-06-18 02:03:54 UTC (rev 11071)
@@ -1319,7 +1319,7 @@
</para>
</sect3>
<sect3>
- <title>Injecting Services in the Portlet Context</title>
+ <title>Injecting Services in the portlet Context</title>
<para>
The following example injects the <computeroutput>UserModule</computeroutput> service as an attribute to the portlet context:
</para>
@@ -1350,7 +1350,7 @@
</para>
</sect3>
<sect3>
- <title>Defining Extra Portlet Information</title>
+ <title>Defining extra portlet Information</title>
<para>
As of JBoss Portal 2.6.3, icons can be defined for a portlet by using the <computeroutput><icon></computeroutput>, <computeroutput><small-icon></computeroutput>, and <computeroutput><large-icon></computeroutput> elements:
</para>
17 years, 10 months
JBoss Portal SVN: r11069 - branches/JBoss_Portal_Branch_2_6/workflow.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2008-06-17 19:26:55 -0400 (Tue, 17 Jun 2008)
New Revision: 11069
Modified:
branches/JBoss_Portal_Branch_2_6/workflow/build.xml
Log:
- Fixed messed-up comments...
Modified: branches/JBoss_Portal_Branch_2_6/workflow/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/workflow/build.xml 2008-06-17 22:43:44 UTC (rev 11068)
+++ branches/JBoss_Portal_Branch_2_6/workflow/build.xml 2008-06-17 23:26:55 UTC (rev 11069)
@@ -45,7 +45,14 @@
<project default="main" name="JBoss Portal">
- <!--+====================================================================+--><!--| Setup |--><!--| |--><!--| Include the common build elements. |--><!--| |--><!--| This defines several different targets, properties and paths. |--><!--| It also sets up the basic extention tasks amoung other things. |--><!--+====================================================================+-->
+ <!--+====================================================================+-->
+ <!--| Setup |-->
+ <!--| |-->
+ <!--| Include the common build elements. |-->
+ <!--| |-->
+ <!--| This defines several different targets, properties and paths. |-->
+ <!--| It also sets up the basic extention tasks amoung other things. |-->
+ <!--+====================================================================+-->
&buildmagic;
&modules;
@@ -53,7 +60,9 @@
&tools;
&targets;
- <!-- ================================================================== --><!-- Initialization --><!-- ================================================================== -->
+ <!-- ================================================================== -->
+ <!-- Initialization -->
+ <!-- ================================================================== -->
<!--
| Initialize the build system. Must depend on '_buildmagic:init'.
@@ -63,7 +72,12 @@
<target name="init" unless="init.disable" depends="_buildmagic:init">
</target>
- <!--+====================================================================+--><!--| Configuration |--><!--| |--><!--| This target is invoked by the Buildmagic initialization logic |--><!--| and should contain module specific configuration elements. |--><!--+====================================================================+-->
+ <!--+====================================================================+-->
+ <!--| Configuration |-->
+ <!--| |-->
+ <!--| This target is invoked by the Buildmagic initialization logic |-->
+ <!--| and should contain module specific configuration elements. |-->
+ <!--+====================================================================+-->
<target name="configure" unless="configure.disable">
@@ -107,13 +121,17 @@
</path>
- <!--+=======================================+--><!--| Override any default properties here. |--><!--+=======================================+-->
+ <!--+=======================================+-->
+ <!--| Override any default properties here. |-->
+ <!--+=======================================+-->
<!-- Configure defaults & build tools -->
<call target="configure-defaults"/>
<call target="configure-tools"/>
- <!--+=======================================+--><!--| Define module specific elements here. |--><!--+=======================================+-->
+ <!--+=======================================+-->
+ <!--| Define module specific elements here. |-->
+ <!--+=======================================+-->
<property name="javadoc.private" value="true"/>
<property name="javadoc.protected" value="false"/>
@@ -139,7 +157,13 @@
</target>
- <!--+====================================================================+--><!--| Compile |--><!--| |--><!--| This target should depend on other compile-* targets for each |--><!--| different type of compile that needs to be performed, short of |--><!--| documentation compiles. |--><!--+====================================================================+-->
+ <!--+====================================================================+-->
+ <!--| Compile |-->
+ <!--| |-->
+ <!--| This target should depend on other compile-* targets for each |-->
+ <!--| different type of compile that needs to be performed, short of |-->
+ <!--| documentation compiles. |-->
+ <!--+====================================================================+-->
<target name="compile"
description="Compile all source files."
@@ -149,7 +173,13 @@
<!-- Add module specific elements here. -->
</target>
- <!--+====================================================================+--><!--| Generate Output |--><!--| |--><!--| Generates the target output for this module. Target output is |--><!--| the output which is ment to be released or used by external |--><!--| modules. |--><!--+====================================================================+-->
+ <!--+====================================================================+-->
+ <!--| Generate Output |-->
+ <!--| |-->
+ <!--| Generates the target output for this module. Target output is |-->
+ <!--| the output which is ment to be released or used by external |-->
+ <!--| modules. |-->
+ <!--+====================================================================+-->
<target name="output"
description="Generate all target output."
@@ -208,27 +238,37 @@
depends="output">
</target>
- <!-- ================================================================== --><!-- Cleaning --><!-- ================================================================== -->
+ <!-- ================================================================== -->
+ <!-- Cleaning -->
+ <!-- ================================================================== -->
<!-- Clean up all build output -->
<target name="clean" depends="_default:clean">
<!-- Add module specific elements here. -->
</target>
- <!--+====================================================================+--><!--| Documents |--><!--| |--><!--| Generate all documentation for this module. |--><!--+====================================================================+-->
+ <!--+====================================================================+-->
+ <!--| Documents |-->
+ <!--| |-->
+ <!--| Generate all documentation for this module. |-->
+ <!--+====================================================================+-->
<target name="docs" depends="_default:docs">
<!-- Add module specific elements here. -->
</target>
- <!-- ================================================================== --><!-- Misc. --><!-- ================================================================== -->
+ <!-- ================================================================== -->
+ <!-- Misc. -->
+ <!-- ================================================================== -->
<target name="main" depends="most"/>
<target name="all" depends="_default:all"/>
<target name="most" depends="_default:most"/>
<target name="help" depends="_default:help"/>
- <!-- ================================================================== --><!-- Test. --><!-- ================================================================== -->
+ <!-- ================================================================== -->
+ <!-- Test. -->
+ <!-- ================================================================== -->
<target name="tests" depends="init">
<execute-tests>
<x-test>
17 years, 10 months
JBoss Portal SVN: r11068 - in branches/JBoss_Portal_Branch_2_7: build and 44 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-06-17 18:43:44 -0400 (Tue, 17 Jun 2008)
New Revision: 11068
Added:
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletRequestDecoder.java
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletRequestEncoder.java
branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/JBossPortletInterceptorStack.java
branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/JBossPortletInterceptorStackFactory.java
branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/PortletInterceptorStack.java
branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/PortletInterceptorStackFactory.java
Modified:
branches/JBoss_Portal_Branch_2_7/api/src/main/org/jboss/portal/api/node/event/WindowActionEvent.java
branches/JBoss_Portal_Branch_2_7/api/src/main/org/jboss/portal/api/node/event/WindowNavigationEvent.java
branches/JBoss_Portal_Branch_2_7/build/build-thirdparty.xml
branches/JBoss_Portal_Branch_2_7/core-admin/.classpath
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/InstanceManagerBean.java
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/PreferenceBean.java
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/PreferencesBean.java
branches/JBoss_Portal_Branch_2_7/core-cms/.classpath
branches/JBoss_Portal_Branch_2_7/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSContentEditorPortlet.java
branches/JBoss_Portal_Branch_2_7/core-identity/.classpath
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/EditProfileAction.java
branches/JBoss_Portal_Branch_2_7/core-management/src/main/org/jboss/portal/core/management/PortletDiscoveryService.java
branches/JBoss_Portal_Branch_2_7/core-search/.classpath
branches/JBoss_Portal_Branch_2_7/core-wsrp/.classpath
branches/JBoss_Portal_Branch_2_7/core/.classpath
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/controller/node/EventBroadcasterInterceptor.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/AjaxInterceptor.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/CorePortletInterceptor.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/HeaderInterceptor.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/SignOutInterceptor.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/TransactionInterceptor.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/ControllerContext.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPageNavigationalState.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPortletControllerContext.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerStateControllerContext.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerUserContext.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/CoreEventControllerContext.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/PortletInvocationFactory.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/deployment/jboss/PortletAppDeployment.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/InternalContentProvider.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/generic/InternalGenericContentProvider.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/instance/AbstractInstance.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/instance/InstanceContainerImpl.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/state/PersistentPortletState.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/state/PersistentPortletStateEntry.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/state/PersistentPortletStatePersistenceManager.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/metadata/portlet/MarkupAttribute.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/instance/InstanceSecurityInterceptor.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowActionCommand.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowRenderCommand.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowResourceCommand.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokeWindowCommand.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/render/RenderPageCommand.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/render/RenderWindowCommand.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/content/ContentRendererContext.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/IfTag.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/instance/InstanceContainerTestCase.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/instance/PortletInvocationContextImpl.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/instance/PortletInvokerSupport.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/instance/ValueMapAssert.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/state/ProducerTestCase.java
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/META-INF/jboss-service.xml
branches/JBoss_Portal_Branch_2_7/faces/.classpath
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFInvocation.java
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFUserContext.java
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletActionEvent.java
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletRenderEvent.java
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/UIPortlet.java
branches/JBoss_Portal_Branch_2_7/migration/.classpath
branches/JBoss_Portal_Branch_2_7/server/.classpath
branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/ServerInvocationContextImpl.java
branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/servlet/PortalServlet.java
branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/test/theme/ObjectURL.java
branches/JBoss_Portal_Branch_2_7/wsrp/.classpath
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/framework/support/BasicUserContext.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/framework/support/TestPortletInvocationContext.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/UserContextConverter.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/aspects/portlet/DumpInterceptor.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/ActionHandler.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/WSRPConsumerImpl.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/portlet/info/WSRPPortletInfo.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/PortletManagementHandler.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/WSRPPortletInvocationContext.java
Log:
Portlet Container 2.0.0
Common 1.2.0
Web 1.2.0
Modified: branches/JBoss_Portal_Branch_2_7/api/src/main/org/jboss/portal/api/node/event/WindowActionEvent.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/api/src/main/org/jboss/portal/api/node/event/WindowActionEvent.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/api/src/main/org/jboss/portal/api/node/event/WindowActionEvent.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -36,19 +36,19 @@
{
/** The parameters from the query string. */
- protected Map parameters;
+ protected Map<String, String[]> parameters;
public WindowActionEvent(PortalNode node)
{
super(node);
}
- public Map getParameters()
+ public Map<String, String[]> getParameters()
{
return parameters;
}
- public void setParameters(Map parameters)
+ public void setParameters(Map<String, String[]> parameters)
{
this.parameters = parameters;
}
Modified: branches/JBoss_Portal_Branch_2_7/api/src/main/org/jboss/portal/api/node/event/WindowNavigationEvent.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/api/src/main/org/jboss/portal/api/node/event/WindowNavigationEvent.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/api/src/main/org/jboss/portal/api/node/event/WindowNavigationEvent.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -36,19 +36,19 @@
{
/** . */
- protected Map parameters;
+ protected Map<String, String[]> parameters;
public WindowNavigationEvent(PortalNode node)
{
super(node);
}
- public Map getParameters()
+ public Map<String, String[]> getParameters()
{
return parameters;
}
- public void setParameters(Map parameters)
+ public void setParameters(Map<String, String[]> parameters)
{
this.parameters = parameters;
}
Modified: branches/JBoss_Portal_Branch_2_7/build/build-thirdparty.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/build/build-thirdparty.xml 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/build/build-thirdparty.xml 2008-06-17 22:43:44 UTC (rev 11068)
@@ -47,10 +47,10 @@
are pushed to the http://repository.jboss.com site.
-->
- <componentref name="jboss-portal/modules/common" version="1.2.0.Beta3"/>
- <componentref name="jboss-portal/modules/web" version="1.2.0.Beta3"/>
+ <componentref name="jboss-portal/modules/common" version="1.2.0"/>
+ <componentref name="jboss-portal/modules/web" version="1.2.0"/>
<componentref name="jboss-portal/modules/test" version="1.0.1"/>
- <componentref name="jboss-portal/modules/portlet" version="2.0.0.CR2"/>
+ <componentref name="jboss-portal/modules/portlet" version="trunk-SNAPSHOT"/>
<componentref name="jboss-portal/modules/identity" version="1.0-SNAPSHOT"/>
<componentref name="antlr" version="2.7.6.ga"/>
<componentref name="apache-ant" version="1.6.5"/>
Modified: branches/JBoss_Portal_Branch_2_7/core/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/.classpath 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core/.classpath 2008-06-17 22:43:44 UTC (rev 11068)
@@ -7,7 +7,6 @@
<classpathentry kind="lib" path="/thirdparty/sun-servlet/lib/servlet-api.jar"/>
<classpathentry kind="lib" path="/thirdparty/oswego-concurrent/lib/concurrent.jar"/>
<classpathentry kind="lib" path="/thirdparty/sun-javamail/lib/mail.jar"/>
- <classpathentry kind="lib" path="/thirdparty/apache-myfaces/lib/myfaces-api.jar"/>
<classpathentry kind="lib" path="/thirdparty/beanshell/lib/bsh-1.3.0.jar"/>
<classpathentry kind="lib" path="/thirdparty/apache-fileupload/lib/commons-fileupload.jar"/>
<classpathentry kind="lib" path="/thirdparty/apache-httpclient/lib/commons-httpclient.jar"/>
@@ -43,7 +42,7 @@
<classpathentry combineaccessrules="false" kind="src" path="/portlet-server"/>
<classpathentry kind="lib" path="/thirdparty/apache-xerces/lib/xml-apis.jar"/>
<classpathentry kind="lib" path="/thirdparty/freemarker/lib/freemarker.jar"/>
- <classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/common/lib/portal-common-lib.jar" sourcepath="/module-common"/>
+ <classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/common/lib/portal-common-lib.jar" sourcepath="/module-common-trunk"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/web/lib/portal-web-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/common/lib/portal-common-portal-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/identity/lib/portal-identity-lib.jar"/>
@@ -52,8 +51,8 @@
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jbossha.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss/backport-concurrent/lib/jboss-backport-concurrent.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/test/lib/portal-test-lib.jar"/>
- <classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-federation-lib.jar"/>
- <classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-lib.jar" sourcepath="/module-portlet-2.0.0.CR2"/>
+ <classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-federation-lib.jar" sourcepath="/module-portlet-trunk"/>
+ <classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-lib.jar" sourcepath="/module-portlet-trunk"/>
<classpathentry kind="lib" path="/thirdparty/portlet/lib/portlet-api.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-controller-lib.jar" sourcepath="/module-portlet-2.0.0.CR2"/>
<classpathentry kind="output" path="bin"/>
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/controller/node/EventBroadcasterInterceptor.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/controller/node/EventBroadcasterInterceptor.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/controller/node/EventBroadcasterInterceptor.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -144,20 +144,17 @@
if (event instanceof WindowActionEvent)
{
WindowActionEvent wae = (WindowActionEvent)event;
- Map params = wae.getParameters();
+ Map<String, String[]> params = wae.getParameters();
//
- ParameterMap interactionParams = asParameters(params);
-
- //
- if (interactionParams != null)
+ if (params != null)
{
return new InvokePortletWindowActionCommand(
nodeRef,
mode,
windowState,
null,
- ParametersStateString.create(interactionParams),
+ ParametersStateString.create(params),
null);
}
}
@@ -166,9 +163,8 @@
WindowNavigationEvent wne = (WindowNavigationEvent)event;
//
- Map params = wne.getParameters();
- ParameterMap navigationalParams = asParameters(params);
- StateString state = navigationalParams != null ? ParametersStateString.create(navigationalParams) : null;
+ Map<String, String[]> params = wne.getParameters();
+ StateString state = params != null ? ParametersStateString.create(params) : null;
//
return new InvokePortletWindowRenderCommand(nodeRef, mode, windowState, state);
@@ -201,14 +197,14 @@
ParameterMap formParameters = iwac.getFormParameters();
// Get interaction parameters
- ParameterMap interactionParameters = null;
+ Map<String, String[]> interactionParameters = null;
if (iwac.getInteractionState() instanceof ParametersStateString)
{
interactionParameters = ((ParametersStateString)iwac.getInteractionState()).getParameters();
}
// Build a map that represents the parameters of the action
- Map actionParameters;
+ Map<String, String[]> actionParameters;
if (interactionParameters != null)
{
if (formParameters != null)
@@ -252,7 +248,7 @@
StateString navigationalState = iwrc.getNavigationalState();
if (navigationalState instanceof ParametersStateString)
{
- Map params = ((ParametersStateString)navigationalState).getParameters();
+ Map<String, String[]> params = ((ParametersStateString)navigationalState).getParameters();
event.setParameters(params);
}
@@ -275,7 +271,7 @@
StateString parametersState = navstate.getContentState();
if (parametersState instanceof ParametersStateString)
{
- Map params = ((ParametersStateString)parametersState).getParameters();
+ Map<String, String[]> params = ((ParametersStateString)parametersState).getParameters();
event.setParameters(params);
}
}
@@ -294,41 +290,11 @@
}
/**
- * @param map
- * @return
- */
- private ParameterMap asParameters(Map map)
- {
- if (map == null)
- {
- return null;
- }
- else if (map instanceof ParameterMap)
- {
- return (ParameterMap)map;
- }
- else
- {
- try
- {
- return new ParameterMap(map);
- }
- catch (IllegalArgumentException e)
- {
- log.error("Window action event received wrong parameter set", e);
-
- //
- return null;
- }
- }
- }
-
- /**
*
*/
private static class ActionParameterMap extends LazyMap<String, String[]>
{
- public ActionParameterMap(final ParameterMap interactionParams, final ParameterMap formParams)
+ public ActionParameterMap(final Map<String, String[]> interactionParams, final Map<String, String[]> formParams)
{
super(new MapAccessor<String, String[]>()
{
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/AjaxInterceptor.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/AjaxInterceptor.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/AjaxInterceptor.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -23,6 +23,7 @@
package org.jboss.portal.core.aspects.portlet;
import org.jboss.portal.core.portlet.info.AjaxInfo;
+import org.jboss.portal.portlet.PortletInvokerException;
import org.jboss.portal.portlet.info.PortletInfo;
import org.jboss.portal.portlet.invocation.PortletInvocation;
import org.jboss.portal.portlet.invocation.response.FragmentResponse;
@@ -43,9 +44,9 @@
/** . */
public static final String PARTIAL_REFRESH = "partialRefresh";
- protected Object invoke(PortletInvocation invocation) throws Exception
+ public PortletInvocationResponse invoke(PortletInvocation invocation) throws IllegalArgumentException, PortletInvokerException
{
- PortletInvocationResponse response = (PortletInvocationResponse)invocation.invokeNext();
+ PortletInvocationResponse response = super.invoke(invocation);
//
if (response instanceof FragmentResponse)
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/CorePortletInterceptor.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/CorePortletInterceptor.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/CorePortletInterceptor.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -23,10 +23,10 @@
package org.jboss.portal.core.aspects.portlet;
+import org.jboss.portal.portlet.PortletInvokerInterceptor;
import org.jboss.portal.portlet.container.PortletContainer;
import org.jboss.portal.portlet.container.ContainerPortletInvoker;
import org.jboss.portal.portlet.info.PortletInfo;
-import org.jboss.portal.portlet.invocation.PortletInterceptor;
import org.jboss.portal.portlet.invocation.PortletInvocation;
import org.jboss.portal.portlet.invocation.response.FragmentResponse;
import org.jboss.portal.portlet.invocation.response.ResponseProperties;
@@ -35,7 +35,7 @@
* @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
* @version $Revision$
*/
-public abstract class CorePortletInterceptor extends PortletInterceptor
+public abstract class CorePortletInterceptor extends PortletInvokerInterceptor
{
/**
* Retrieve the CorePortetInfo, if any, associated with the Portlet being invoked.
@@ -46,7 +46,7 @@
*/
protected PortletInfo getPortletInfo(PortletInvocation invocation)
{
- PortletContainer container = (PortletContainer)invocation.getAttribute(PortletInvocation.INVOCATION_SCOPE, ContainerPortletInvoker.PORTLET_CONTAINER);
+ PortletContainer container = (PortletContainer)invocation.getAttribute(ContainerPortletInvoker.PORTLET_CONTAINER);
return container.getInfo();
}
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/HeaderInterceptor.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/HeaderInterceptor.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/HeaderInterceptor.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -25,6 +25,7 @@
import org.jboss.portal.common.util.MultiValuedPropertyMap;
import org.jboss.portal.core.metadata.portlet.MarkupElement;
import org.jboss.portal.core.portlet.info.MarkupHeaderInfo;
+import org.jboss.portal.portlet.PortletInvokerException;
import org.jboss.portal.portlet.info.PortletInfo;
import org.jboss.portal.portlet.invocation.PortletInvocation;
import org.jboss.portal.portlet.invocation.response.FragmentResponse;
@@ -43,9 +44,9 @@
public class HeaderInterceptor extends CorePortletInterceptor
{
- protected Object invoke(PortletInvocation invocation) throws Exception
+ public PortletInvocationResponse invoke(PortletInvocation invocation) throws IllegalArgumentException, PortletInvokerException
{
- PortletInvocationResponse response = (PortletInvocationResponse)invocation.invokeNext();
+ PortletInvocationResponse response = super.invoke(invocation);
// Only affect fragments
if (response instanceof FragmentResponse)
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/SignOutInterceptor.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/SignOutInterceptor.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/SignOutInterceptor.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -24,7 +24,8 @@
import org.jboss.portal.core.controller.portlet.CoreEventControllerContext;
import org.jboss.portal.core.controller.portlet.SignOutResponse;
-import org.jboss.portal.portlet.invocation.PortletInterceptor;
+import org.jboss.portal.portlet.PortletInvokerException;
+import org.jboss.portal.portlet.PortletInvokerInterceptor;
import org.jboss.portal.portlet.invocation.PortletInvocation;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
import org.jboss.portal.portlet.invocation.response.UpdateNavigationalStateResponse;
@@ -35,13 +36,13 @@
* @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
* @version $Revision$
*/
-public class SignOutInterceptor extends PortletInterceptor
+public class SignOutInterceptor extends PortletInvokerInterceptor
{
@Override
- protected Object invoke(PortletInvocation invocation) throws Exception
+ public PortletInvocationResponse invoke(PortletInvocation invocation) throws IllegalArgumentException, PortletInvokerException
{
- PortletInvocationResponse response = (PortletInvocationResponse)invocation.invokeNext();
+ PortletInvocationResponse response = super.invoke(invocation);
if (response instanceof UpdateNavigationalStateResponse)
{
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/TransactionInterceptor.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/TransactionInterceptor.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/TransactionInterceptor.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -25,8 +25,11 @@
import org.jboss.portal.common.invocation.InvocationException;
import org.jboss.portal.common.transaction.Transactions;
import org.jboss.portal.core.portlet.info.TransactionInfo;
+import org.jboss.portal.portlet.PortletInvokerException;
import org.jboss.portal.portlet.info.PortletInfo;
import org.jboss.portal.portlet.invocation.PortletInvocation;
+import org.jboss.portal.portlet.invocation.response.ErrorResponse;
+import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -35,7 +38,7 @@
public class TransactionInterceptor extends CorePortletInterceptor
{
- protected Object invoke(PortletInvocation invocation) throws Exception
+ public PortletInvocationResponse invoke(PortletInvocation invocation) throws IllegalArgumentException, PortletInvokerException
{
// Override tx type if found
PortletInfo portletInfo = getPortletInfo(invocation);
@@ -46,68 +49,76 @@
if (transactionInfo != null)
{
Transactions.Type txType = transactionInfo.getTransactionType();
+
//
- if (txType == Transactions.TYPE_NOT_SUPPORTED)
+ try
{
- return invokeNotSupported(invocation);
+ if (txType == Transactions.TYPE_NOT_SUPPORTED)
+ {
+ return invokeNotSupported(invocation);
+ }
+ else if (txType == Transactions.TYPE_NEVER)
+ {
+ return invokeNever(invocation);
+ }
+ else if (txType == Transactions.TYPE_MANDATORY)
+ {
+ return invokeMandatory(invocation);
+ }
+ else if (txType == Transactions.TYPE_SUPPORTS)
+ {
+ return invokeSupports(invocation);
+ }
+ else if (txType == Transactions.TYPE_REQUIRED)
+ {
+ return invokeRequired(invocation);
+ }
+ else if (txType == Transactions.TYPE_REQUIRES_NEW)
+ {
+ return invokeRequiresNew(invocation);
+ }
+ else
+ {
+ throw new InvocationException("Should not happen");
+ }
}
- else if (txType == Transactions.TYPE_NEVER)
+ catch (PortletInvokerException e)
{
- return invokeNever(invocation);
+ return new ErrorResponse(e);
}
- else if (txType == Transactions.TYPE_MANDATORY)
- {
- return invokeMandatory(invocation);
- }
- else if (txType == Transactions.TYPE_SUPPORTS)
- {
- return invokeSupports(invocation);
- }
- else if (txType == Transactions.TYPE_REQUIRED)
- {
- return invokeRequired(invocation);
- }
- else if (txType == Transactions.TYPE_REQUIRES_NEW)
- {
- return invokeRequiresNew(invocation);
- }
- else
- {
- throw new InvocationException("Should not happen");
- }
}
}
- return invocation.invokeNext();
+ return super.invoke(invocation);
}
- protected Object invokeNotSupported(PortletInvocation invocation) throws Exception, InvocationException
+ protected PortletInvocationResponse invokeNotSupported(PortletInvocation invocation) throws PortletInvokerException
{
- return invocation.invokeNext();
+ return super.invoke(invocation);
}
- protected Object invokeNever(PortletInvocation invocation) throws Exception, InvocationException
+ protected PortletInvocationResponse invokeNever(PortletInvocation invocation) throws PortletInvokerException
{
- return invocation.invokeNext();
+ return super.invoke(invocation);
}
- protected Object invokeMandatory(PortletInvocation invocation) throws Exception, InvocationException
+ protected PortletInvocationResponse invokeMandatory(PortletInvocation invocation) throws PortletInvokerException
{
- return invocation.invokeNext();
+ return super.invoke(invocation);
}
- protected Object invokeSupports(PortletInvocation invocation) throws Exception, InvocationException
+ protected PortletInvocationResponse invokeSupports(PortletInvocation invocation) throws PortletInvokerException
{
- return invocation.invokeNext();
+ return super.invoke(invocation);
}
- protected Object invokeRequired(PortletInvocation invocation) throws Exception, InvocationException
+ protected PortletInvocationResponse invokeRequired(PortletInvocation invocation) throws PortletInvokerException
{
- return invocation.invokeNext();
+ return super.invoke(invocation);
}
- protected Object invokeRequiresNew(PortletInvocation invocation) throws Exception, InvocationException
+ protected PortletInvocationResponse invokeRequiresNew(PortletInvocation invocation) throws PortletInvokerException
{
- return invocation.invokeNext();
+ return super.invoke(invocation);
}
}
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/ControllerContext.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/ControllerContext.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/ControllerContext.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -196,9 +196,9 @@
return (User)getAttribute(ServerInvocation.PRINCIPAL_SCOPE, UserInterceptor.USER_KEY);
}
- public Map getUserProfile()
+ public Map<String, String> getUserProfile()
{
- return (Map)getAttribute(ServerInvocation.PRINCIPAL_SCOPE, UserInterceptor.PROFILE_KEY);
+ return (Map<String, String>)getAttribute(ServerInvocation.PRINCIPAL_SCOPE, UserInterceptor.PROFILE_KEY);
}
public ControllerRequestDispatcher getRequestDispatcher(String contextPath, String path)
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -57,8 +57,6 @@
import org.jboss.portal.core.navstate.NavigationalStateObjectChange;
import org.jboss.portal.core.theme.WindowContextFactory;
import org.jboss.portal.portlet.StateString;
-import org.jboss.portal.portlet.controller.PortletControllerContext;
-import org.jboss.portal.portlet.controller.state.PageNavigationalState;
import org.jboss.portal.server.ServerInvocation;
import org.jboss.portal.theme.LayoutService;
import org.jboss.portal.theme.PageService;
@@ -285,7 +283,7 @@
//
ControllerPortletControllerContext portletControllerContext = new ControllerPortletControllerContext(controllerContext, page);
- ControllerPageNavigationalState pageNavigationalState = portletControllerContext.getStateControllerContext().createPageNavigationalState(true);
+ ControllerPageNavigationalState pageNavigationalState = portletControllerContext.getStateControllerContext().createPortletPageNavigationalState(true);
//
for (Iterator i = refreshedWindows.iterator(); i.hasNext() && !fullRefresh;)
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPageNavigationalState.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPageNavigationalState.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPageNavigationalState.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -23,12 +23,11 @@
package org.jboss.portal.core.controller.portlet;
import org.jboss.portal.portlet.ParametersStateString;
-import org.jboss.portal.portlet.controller.state.PageNavigationalState;
-import org.jboss.portal.portlet.controller.state.WindowNavigationalState;
+import org.jboss.portal.portlet.controller.state.PortletPageNavigationalState;
+import org.jboss.portal.portlet.controller.state.PortletWindowNavigationalState;
import org.jboss.portal.portlet.info.NavigationInfo;
import org.jboss.portal.portlet.info.ParameterInfo;
import org.jboss.portal.portlet.info.PortletInfo;
-import org.jboss.portal.common.util.ParameterMap;
import org.jboss.portal.core.CoreConstants;
import org.jboss.portal.core.navstate.NavigationalStateContext;
import org.jboss.portal.core.model.portal.Window;
@@ -44,7 +43,7 @@
* @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
* @version $Revision: 630 $
*/
-public class ControllerPageNavigationalState implements PageNavigationalState
+public class ControllerPageNavigationalState implements PortletPageNavigationalState
{
/** . */
@@ -184,7 +183,7 @@
/**
*
*/
- public Set<String> getWindowIds()
+ public Set<String> getPortletWindowIds()
{
return controllerContext.getWindowNames();
}
@@ -192,7 +191,7 @@
/**
*
*/
- public WindowNavigationalState getWindowNavigationalState(String windowName) throws IllegalArgumentException
+ public PortletWindowNavigationalState getPortletWindowNavigationalState(String windowName) throws IllegalArgumentException
{
org.jboss.portal.core.model.portal.navstate.WindowNavigationalState update = null;
@@ -205,7 +204,7 @@
//
if (update != null)
{
- return new WindowNavigationalState(update.getContentState(), update.getMode(), update.getWindowState());
+ return new PortletWindowNavigationalState(update.getContentState(), update.getMode(), update.getWindowState());
}
//
@@ -220,11 +219,11 @@
//
if (wns != null)
{
- return new WindowNavigationalState(wns.getContentState(), wns.getMode(), wns.getWindowState());
+ return new PortletWindowNavigationalState(wns.getContentState(), wns.getMode(), wns.getWindowState());
}
else
{
- return new WindowNavigationalState(null, window.getInitialMode(), window.getInitialWindowState());
+ return new PortletWindowNavigationalState(null, window.getInitialMode(), window.getInitialWindowState());
}
}
@@ -235,7 +234,7 @@
/**
*
*/
- public void setWindowNavigationalState(String windowName, WindowNavigationalState windowNavigationalState) throws IllegalArgumentException, IllegalStateException
+ public void setPortletWindowNavigationalState(String windowName, PortletWindowNavigationalState windowNavigationalState) throws IllegalArgumentException, IllegalStateException
{
if (!mutable)
{
@@ -316,14 +315,14 @@
/**
* For now we do not implement any kind of mapping between qnames, it's the basic straightforward 1-1 mapping.
*/
- public ParameterMap getPublicNavigationalState(String windowName) throws IllegalArgumentException
+ public Map<String, String[]> getPortletPublicNavigationalState(String windowName) throws IllegalArgumentException
{
PortletInfo info = controllerContext.getPortletInfo(windowName);
//
if (info != null)
{
- ParameterMap publicNavigationalState = new ParameterMap();
+ Map<String, String[]> publicNavigationalState = new HashMap<String, String[]>();
for (ParameterInfo parameterInfo : info.getNavigation().getPublicParameters())
{
// Don't store the URI as a page scoped public render parameter but window scoped
@@ -390,7 +389,7 @@
/**
*
*/
- public void setPublicNavigationalState(String windowName, Map<String, String[]> update)
+ public void setPortletPublicNavigationalState(String windowName, Map<String, String[]> update)
{
if (!mutable)
{
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPortletControllerContext.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPortletControllerContext.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPortletControllerContext.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -41,11 +41,12 @@
import org.jboss.portal.portlet.PortletInvokerException;
import org.jboss.portal.portlet.controller.PortletControllerContext;
import org.jboss.portal.portlet.controller.event.EventControllerContext;
-import org.jboss.portal.portlet.controller.state.PageNavigationalState;
+import org.jboss.portal.portlet.controller.state.PortletPageNavigationalState;
import org.jboss.portal.portlet.info.PortletInfo;
import org.jboss.portal.portlet.invocation.ActionInvocation;
import org.jboss.portal.portlet.invocation.EventInvocation;
import org.jboss.portal.portlet.invocation.PortletInvocation;
+import org.jboss.portal.portlet.invocation.RenderInvocation;
import org.jboss.portal.portlet.invocation.ResourceInvocation;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
import org.jboss.portal.portlet.spi.PortletInvocationContext;
@@ -182,7 +183,7 @@
return infos.get(windowName);
}
- public PortletInvocationContext createPortletInvocationContext(String s, PageNavigationalState pageNavigationalState)
+ public PortletInvocationContext createPortletInvocationContext(String s, PortletPageNavigationalState pageNavigationalState)
{
Window window = windows.get(s);
@@ -201,6 +202,12 @@
return internalInvoke(eventInvocation);
}
+ /** todo : handle cookies redistribution */
+ public PortletInvocationResponse invoke(List<Cookie> cookies, RenderInvocation renderInvocation) throws PortletInvokerException
+ {
+ return internalInvoke(renderInvocation);
+ }
+
public PortletInvocationResponse invoke(ResourceInvocation resourceInvocation) throws PortletInvokerException
{
return internalInvoke(resourceInvocation);
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerStateControllerContext.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerStateControllerContext.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerStateControllerContext.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -23,12 +23,9 @@
package org.jboss.portal.core.controller.portlet;
import org.jboss.portal.portlet.controller.state.StateControllerContext;
-import org.jboss.portal.portlet.controller.state.PageNavigationalState;
-import org.jboss.portal.core.model.portal.Window;
+import org.jboss.portal.portlet.controller.state.PortletPageNavigationalState;
import org.jboss.portal.core.navstate.NavigationalStateContext;
-import java.util.Map;
-
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
* @version $Revision: 630 $
@@ -50,12 +47,12 @@
this.controllerContext = controllerContext;
}
- public PageNavigationalState clonePageNavigationalState(PageNavigationalState pageNavigationalState, boolean mutable)
+ public PortletPageNavigationalState clonePortletPageNavigationalState(PortletPageNavigationalState pageNavigationalState, boolean mutable)
{
return new ControllerPageNavigationalState((ControllerPageNavigationalState)pageNavigationalState, mutable);
}
- public ControllerPageNavigationalState createPageNavigationalState(boolean mutable)
+ public ControllerPageNavigationalState createPortletPageNavigationalState(boolean mutable)
{
return new ControllerPageNavigationalState(navigationalStateContext, controllerContext, mutable);
}
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerUserContext.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerUserContext.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerUserContext.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -28,6 +28,7 @@
import org.jboss.portal.portlet.spi.UserContext;
import org.jboss.portal.server.ServerInvocation;
+import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
@@ -39,8 +40,6 @@
public class ControllerUserContext implements UserContext
{
- private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(ControllerUserContext.class);
-
/** . */
private final ServerInvocation invocation;
@@ -48,7 +47,10 @@
private final User user;
/** . */
- private final Map profile;
+ private final Map<String, String> profile;
+
+ /** . */
+ private Map<String, Object> attributes;
public ControllerUserContext(ControllerContext controllerContext)
{
@@ -62,7 +64,7 @@
return user != null ? user.getUserName() : null;
}
- public Map getInformations()
+ public Map<String, String> getInformations()
{
return profile;
}
@@ -77,8 +79,28 @@
return invocation.getRequest().getLocale();
}
- public List getLocales()
+ public List<Locale> getLocales()
{
return Tools.toList(invocation.getRequest().getLocales());
}
+
+ public Object getAttribute(String arg0)
+ {
+ if (attributes != null)
+ {
+ return attributes.get(arg0);
+ }
+ return null;
+ }
+
+ public void setAttribute(String arg0, Object arg1)
+ {
+ if (attributes == null)
+ {
+ attributes = new HashMap<String, Object>();
+ }
+ attributes.put(arg0, arg1);
+
+ }
+
}
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/CoreEventControllerContext.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/CoreEventControllerContext.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/CoreEventControllerContext.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -26,7 +26,7 @@
import org.jboss.portal.portlet.controller.event.EventControllerContext;
import org.jboss.portal.portlet.controller.event.EventPhaseContext;
-import org.jboss.portal.portlet.controller.event.Event;
+import org.jboss.portal.portlet.controller.event.PortletWindowEvent;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
import org.jboss.portal.portlet.info.PortletInfo;
import org.apache.log4j.Logger;
@@ -47,16 +47,16 @@
private final ControllerPortletControllerContext portletControllerContext;
/** Events to be consumed by the portal, unused at the moment */
- private LinkedList<Event> toConsumeEvents;
+ private LinkedList<PortletWindowEvent> toConsumeEvents;
public CoreEventControllerContext(ControllerPortletControllerContext portletControllerContext)
{
this.portletControllerContext = portletControllerContext;
- this.toConsumeEvents = new LinkedList<Event>();
+ this.toConsumeEvents = new LinkedList<PortletWindowEvent>();
}
- public void eventProduced(EventPhaseContext context, Event producedEvent, Event sourceEvent)
+ public void eventProduced(EventPhaseContext context, PortletWindowEvent producedEvent, PortletWindowEvent sourceEvent)
{
try
{
@@ -67,7 +67,7 @@
//
if (info.getEventing().getConsumedEvents().containsKey(producedEvent.getName()))
{
- Event distributedEvent = new Event(producedEvent.getName(), producedEvent.getPayload(), windowName);
+ PortletWindowEvent distributedEvent = new PortletWindowEvent(producedEvent.getName(), producedEvent.getPayload(), windowName);
context.queueEvent(distributedEvent);
}
}
@@ -87,16 +87,16 @@
}
}
- public void eventConsumed(EventPhaseContext context, Event consumedEvent, PortletInvocationResponse consumerResponse)
+ public void eventConsumed(EventPhaseContext context, PortletWindowEvent consumedEvent, PortletInvocationResponse consumerResponse)
{
}
- public void eventFailed(EventPhaseContext context, Event failedEvent, Throwable throwable)
+ public void eventFailed(EventPhaseContext context, PortletWindowEvent failedEvent, Throwable throwable)
{
log.error("Could not deliver event " + failedEvent.getName() + " to portlet window " + failedEvent.getWindowId(), throwable);
}
- public void eventDiscarded(EventPhaseContext context, Event discardedEvent, int cause)
+ public void eventDiscarded(EventPhaseContext context, PortletWindowEvent discardedEvent, int cause)
{
}
}
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/PortletInvocationFactory.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/PortletInvocationFactory.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/PortletInvocationFactory.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -27,7 +27,6 @@
import org.jboss.portal.Mode;
import org.jboss.portal.WindowState;
-import org.jboss.portal.common.invocation.resolver.MapAttributeResolver;
import org.jboss.portal.common.util.MarkupInfo;
import org.jboss.portal.common.util.ParameterMap;
import org.jboss.portal.core.controller.ControllerCommand;
@@ -43,7 +42,7 @@
import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.ResourceURL;
import org.jboss.portal.portlet.ParametersStateString;
-import org.jboss.portal.portlet.controller.state.PageNavigationalState;
+import org.jboss.portal.portlet.controller.state.PortletPageNavigationalState;
import org.jboss.portal.portlet.impl.spi.AbstractPortletInvocationContext;
import org.jboss.portal.portlet.invocation.ActionInvocation;
import org.jboss.portal.portlet.invocation.PortletInvocation;
@@ -72,7 +71,7 @@
public static InvokePortletCommandFactory createInvokePortletCommandFactory(
ControllerContext controllerContext,
Window window,
- PageNavigationalState pageNavigationalState)
+ PortletPageNavigationalState pageNavigationalState)
{
return new InternalInvokePortletCommandFactory(window, controllerContext, pageNavigationalState);
}
@@ -86,7 +85,7 @@
public static PortletInvocationContext createInvocationContext(
ControllerContext controllerContext,
Window window,
- PageNavigationalState pageNavigationalState)
+ PortletPageNavigationalState pageNavigationalState)
{
InvokePortletCommandFactory ipcf = createInvokePortletCommandFactory(controllerContext, window, pageNavigationalState);
return createInvocationContext(controllerContext, ipcf);
@@ -101,7 +100,7 @@
ParameterMap form,
Window window,
Portal portal,
- PageNavigationalState pageNavigationalState)
+ PortletPageNavigationalState pageNavigationalState)
{
PortletContextFactory cf = new PortletContextFactory(controllerContext, portal, window);
InvokePortletCommandFactory cpc = createInvokePortletCommandFactory(controllerContext, window, pageNavigationalState);
@@ -144,12 +143,12 @@
StateString navigationalState,
Window window,
Portal portal,
- PageNavigationalState pageNavigationalState)
+ PortletPageNavigationalState pageNavigationalState)
{
PortletContextFactory cf = new PortletContextFactory(controllerContext, portal, window);
InvokePortletCommandFactory cpc = createInvokePortletCommandFactory(controllerContext, window, pageNavigationalState);
RenderInvocation render = createRender(controllerContext, mode, windowState, navigationalState, cf, cpc);
- render.setPublicNavigationalState(pageNavigationalState.getPublicNavigationalState(window.getName()));
+ render.setPublicNavigationalState(pageNavigationalState.getPortletPublicNavigationalState(window.getName()));
return render;
}
@@ -183,7 +182,7 @@
PortletContextFactory cf,
PortletInvocation invocation)
{
- invocation.setAttribute(PortletInvocation.INVOCATION_SCOPE, "controller_context", controllerContext);
+ invocation.setAttribute("controller_context", controllerContext);
//
UserContext userContext = cf.createUserContext();
@@ -250,11 +249,6 @@
//
this.cmdFactory = cmdFactory;
this.controllerContext = controllerContext;
-
- //
- addResolver(PortletInvocation.INVOCATION_SCOPE, new MapAttributeResolver());
- addResolver(PortletInvocation.REQUEST_SCOPE, controllerContext);
- addResolver(PortletInvocation.PRINCIPAL_SCOPE, controllerContext);
}
public HttpServletRequest getClientRequest() throws IllegalStateException
@@ -333,11 +327,11 @@
public InternalInvokePortletCommandFactory(
Window window,
ControllerContext controllerContext,
- PageNavigationalState pageNavigationalState)
+ PortletPageNavigationalState pageNavigationalState)
{
this.controllerContext = controllerContext;
this.window = window;
- this.publicNavigationalState = pageNavigationalState.getPublicNavigationalState(window.getName());
+ this.publicNavigationalState = pageNavigationalState.getPortletPublicNavigationalState(window.getName());
}
public ControllerCommand createInvokeActionCommand(ActionURL actionURL)
@@ -361,7 +355,7 @@
ParametersStateString navigationalParameters = (ParametersStateString)navigationalState;
//
- ParameterMap parameters = navigationalParameters.getParameters();
+ Map<String, String[]> parameters = navigationalParameters.getParameters();
// We add the changes desired by the portlet
Map<String, String[]> publicChanges = renderURL.getPublicNavigationalStateChanges();
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/deployment/jboss/PortletAppDeployment.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/deployment/jboss/PortletAppDeployment.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/deployment/jboss/PortletAppDeployment.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -82,9 +82,6 @@
/** . */
private PortletAppDeploymentFactory factory;
- /** . */
- private String appId;
-
public PortletAppDeployment(URL url, PortalWebApp pwa, ManagedObjectRegistryEventListener listener, MBeanServer mbeanServer, PortletAppDeploymentFactory factory)
{
super(url, pwa, listener, mbeanServer, factory);
@@ -112,7 +109,7 @@
if (jbossAppMD instanceof JBossApplicationMetaData)
{
JBossApplicationMetaData jBossApplicationMetaData = ((JBossApplicationMetaData)jbossAppMD);
- for (Iterator i = jBossApplicationMetaData.getServices().values().iterator(); i.hasNext();)
+ for (Iterator<ServiceMetaData> i = jBossApplicationMetaData.getServices().values().iterator(); i.hasNext();)
{
ServiceMetaData serviceMD = (ServiceMetaData)i.next();
@@ -426,7 +423,7 @@
{
PortletPreferenceMetaData preference = (PortletPreferenceMetaData)i.next();
Value value = new StringValue(preference.getValue());
- changes.add(PropertyChange.newUpdate(preference.getName(), value));
+ changes.add(PropertyChange.newUpdate(preference.getName(), value.asStringArray()));
}
}
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/InternalContentProvider.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/InternalContentProvider.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/InternalContentProvider.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -44,7 +44,7 @@
import org.jboss.portal.core.model.portal.content.WindowRendition;
import org.jboss.portal.portlet.NoSuchPortletException;
import org.jboss.portal.portlet.PortletInvokerException;
-import org.jboss.portal.portlet.controller.state.WindowNavigationalState;
+import org.jboss.portal.portlet.controller.state.PortletWindowNavigationalState;
import org.jboss.portal.portlet.info.CapabilitiesInfo;
import org.jboss.portal.portlet.info.ModeInfo;
import org.jboss.portal.portlet.info.WindowStateInfo;
@@ -202,7 +202,7 @@
}
//
- WindowNavigationalState windowNS = rendererContext.getNavigationalState();
+ PortletWindowNavigationalState windowNS = rendererContext.getPortletNavigationalState();
if (windowNS == null)
{
@@ -234,7 +234,7 @@
}
// Create invocation
- RenderInvocation invocation = rendererContext.createRenderInvocation(new WindowNavigationalState(windowNS.getPortletNavigationalState(), mode, windowState));
+ RenderInvocation invocation = rendererContext.createRenderInvocation(new PortletWindowNavigationalState(windowNS.getPortletNavigationalState(), mode, windowState));
//
List<WindowState> supportedWindowStates = Collections.emptyList();
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/generic/InternalGenericContentProvider.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/generic/InternalGenericContentProvider.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/generic/InternalGenericContentProvider.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -44,7 +44,7 @@
import org.jboss.portal.identity.User;
import org.jboss.portal.portlet.Portlet;
import org.jboss.portal.portlet.PortletInvokerException;
-import org.jboss.portal.portlet.controller.state.WindowNavigationalState;
+import org.jboss.portal.portlet.controller.state.PortletWindowNavigationalState;
import org.jboss.portal.portlet.info.NavigationInfo;
import org.jboss.portal.portlet.info.ParameterInfo;
import org.jboss.portal.portlet.info.PortletInfo;
@@ -182,9 +182,9 @@
return rendererContext.getWindow();
}
- public WindowNavigationalState getNavigationalState()
+ public PortletWindowNavigationalState getPortletNavigationalState()
{
- return rendererContext.getNavigationalState();
+ return rendererContext.getPortletNavigationalState();
}
public User getUser()
@@ -192,7 +192,7 @@
return rendererContext.getUser();
}
- public RenderInvocation createRenderInvocation(WindowNavigationalState navigationalState)
+ public RenderInvocation createRenderInvocation(PortletWindowNavigationalState navigationalState)
{
RenderInvocation invocation = rendererContext.createRenderInvocation(navigationalState);
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/instance/AbstractInstance.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/instance/AbstractInstance.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/instance/AbstractInstance.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -222,7 +222,7 @@
try
{
- invocation.setAttribute(PortletInvocation.INVOCATION_SCOPE, INSTANCE_ID_ATTRIBUTE, getInstanceId());
+ invocation.setAttribute(INSTANCE_ID_ATTRIBUTE, getInstanceId());
invocation.setTarget(portletContext);
invocation.setInstanceContext(instanceContext);
@@ -270,7 +270,7 @@
finally
{
// Reset state before invocation
- invocation.removeAttribute(PortletInvocation.INVOCATION_SCOPE, INSTANCE_ID_ATTRIBUTE);
+ invocation.removeAttribute(INSTANCE_ID_ATTRIBUTE);
invocation.setTarget(null);
invocation.setInstanceContext(null);
}
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/instance/InstanceContainerImpl.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/instance/InstanceContainerImpl.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/instance/InstanceContainerImpl.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -37,6 +37,7 @@
import org.jboss.portal.portlet.PortletContext;
import org.jboss.portal.portlet.PortletInvoker;
import org.jboss.portal.portlet.PortletInvokerException;
+import org.jboss.portal.portlet.PortletInvokerInterceptor;
import org.jboss.portal.portlet.invocation.PortletInvocation;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
import org.jboss.portal.portlet.state.DestroyCloneFailure;
@@ -53,6 +54,9 @@
import org.jboss.portal.security.spi.provider.PermissionFactory;
import org.jboss.portal.security.spi.provider.PermissionRepository;
import org.jboss.portal.security.spi.provider.SecurityConfigurationException;
+import org.jboss.portal.server.impl.invocation.JBossPortletInterceptorStackFactory;
+import org.jboss.portal.server.impl.invocation.PortletInterceptorStack;
+import org.jboss.portal.server.impl.invocation.PortletInterceptorStackFactory;
import java.util.ArrayList;
import java.util.Collection;
@@ -76,7 +80,7 @@
/** . */
- protected InterceptorStackFactory stackFactory;
+ protected PortletInterceptorStackFactory stackFactory;
/** . */
protected PortletInvoker portletInvoker;
@@ -88,20 +92,12 @@
protected JBossAuthorizationDomainRegistry authorizationDomainRegistry;
/** . */
- protected InvocationHandler handler = new InvocationHandler()
+ protected PortletInvoker handler = new PortletInvokerInterceptor()
{
- public Object invoke(Invocation invocation) throws Exception, InvocationException
+ public PortletInvocationResponse invoke(PortletInvocation invocation) throws IllegalArgumentException, PortletInvokerException
{
PortletInvocation portletInvocation = (PortletInvocation)invocation;
- try
- {
- portletInvocation.setHandler(null);
- return portletInvoker.invoke(portletInvocation);
- }
- finally
- {
- portletInvocation.setHandler(this);
- }
+ return portletInvoker.invoke(portletInvocation);
}
};
@@ -120,12 +116,12 @@
cloneOnCreate = false;
}
- public InterceptorStackFactory getStackFactory()
+ public PortletInterceptorStackFactory getStackFactory()
{
return stackFactory;
}
- public void setStackFactory(InterceptorStackFactory stackFactory)
+ public void setStackFactory(PortletInterceptorStackFactory stackFactory)
{
this.stackFactory = stackFactory;
}
@@ -420,11 +416,11 @@
PortletInvocationResponse invoke(PortletInvocation invocation) throws PortletInvokerException
{
- InvocationHandler prevHandler = invocation.getHandler();
+ PortletInterceptorStack stack = stackFactory.getInterceptorStack();
try
{
- invocation.setHandler(handler);
- return (PortletInvocationResponse)invocation.invoke(stackFactory.getInterceptorStack());
+ stack.getInterceptor(stack.getLength()-1).setNext(handler);
+ return stack.getInterceptor(0).invoke(invocation);
}
catch (Exception e)
{
@@ -443,7 +439,7 @@
}
finally
{
- invocation.setHandler(prevHandler);
+ stack.getInterceptor(stack.getLength()-1).setNext(null);
}
}
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/state/PersistentPortletState.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/state/PersistentPortletState.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/state/PersistentPortletState.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -22,7 +22,6 @@
******************************************************************************/
package org.jboss.portal.core.impl.portlet.state;
-import org.jboss.portal.common.value.Value;
import org.jboss.portal.common.util.TypedMap;
import org.jboss.portal.portlet.state.AbstractPropertyMap;
import org.jboss.portal.portlet.state.PropertyMap;
@@ -34,6 +33,7 @@
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
+import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -100,7 +100,7 @@
for (Iterator i = propertyMap.keySet().iterator(); i.hasNext();)
{
String key = (String)i.next();
- Value value = propertyMap.getProperty(key);
+ List<String> value = propertyMap.getProperty(key);
entries.put(key, new PersistentPortletStateEntry(key, value));
}
}
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/state/PersistentPortletStateEntry.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/state/PersistentPortletStateEntry.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/state/PersistentPortletStateEntry.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -22,10 +22,9 @@
******************************************************************************/
package org.jboss.portal.core.impl.portlet.state;
-import org.jboss.portal.common.value.StringValue;
-import org.jboss.portal.common.value.Value;
-
import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -48,10 +47,9 @@
/** The preference values. */
private String[] strings;
+
+ private List<String> value;
- /** The value implementation. */
- private Value value;
-
// This flag is used because the value is made up of strings and type
// and it is not possible to update the value when strings or type
// is updated, so when strings of type is modified with set dirty
@@ -68,7 +66,7 @@
this.dirty = false;
}
- public PersistentPortletStateEntry(String name, Value value)
+ public PersistentPortletStateEntry(String name, List<String> value)
{
if (value == null)
{
@@ -78,7 +76,7 @@
this.name = name;
this.readOnly = false;
this.type = 1;
- this.strings = value.asStringArray();
+ this.strings = value.toArray(new String[value.size()]);
this.value = value;
this.dirty = false;
}
@@ -147,25 +145,20 @@
this.dirty = true;
}
- public Value getValue()
+ public List<String> getValue()
{
if (dirty)
{
- value = new StringValue(strings);
+ for (int i=0; i<strings.length; i++)
+ {
+ value = new ArrayList<String>();
+ value.add(strings[i]);
+ }
dirty = false;
}
return value;
}
- /**
- *
- */
- public void setValue(Value value)
- {
- this.value = value;
- this.strings = value.asStringArray();
- }
-
/** Provide a default impl. */
public String toString()
{
@@ -184,7 +177,7 @@
}
buffer.append("),");
}
- buffer.append(value).append("]");
+ buffer.append("]");
return buffer.toString();
}
}
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/state/PersistentPortletStatePersistenceManager.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/state/PersistentPortletStatePersistenceManager.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/state/PersistentPortletStatePersistenceManager.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -25,7 +25,6 @@
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
-import org.jboss.portal.common.value.Value;
import org.jboss.portal.jems.as.system.AbstractJBossService;
import org.jboss.portal.jems.hibernate.ObjectContextualizer;
import org.jboss.portal.portlet.state.InvalidStateIdException;
@@ -47,6 +46,7 @@
import javax.naming.InitialContext;
import java.util.Collection;
import java.util.Iterator;
+import java.util.List;
import java.util.Map;
/**
@@ -198,7 +198,7 @@
for (Iterator i = propertyMap.keySet().iterator(); i.hasNext();)
{
String key = (String)i.next();
- Value value = propertyMap.getProperty(key);
+ List<String> value = propertyMap.getProperty(key);
PersistentPortletStateEntry entry = new PersistentPortletStateEntry(key, value);
context.entries.put(key, entry);
}
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/metadata/portlet/MarkupAttribute.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/metadata/portlet/MarkupAttribute.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/metadata/portlet/MarkupAttribute.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -216,6 +216,26 @@
FastURLEncoder.getUTF8Instance().encode(c, writer);
}
}
+
+ @Override
+ protected void safeEncode(char[] chars, int off, int len, CharWriter writer) throws EncodingException
+ {
+ //
+ int to = off + len;
+
+ // Perform lookup char by char
+ for (int current = off; current < to; current++)
+ {
+ if (chars[current] == '/')
+ {
+ writer.append(SLASH_ARRAY);
+ }
+ else
+ {
+ writer.append(chars[current]);
+ }
+ }
+ }
};
}
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/instance/InstanceSecurityInterceptor.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/instance/InstanceSecurityInterceptor.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/instance/InstanceSecurityInterceptor.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -25,9 +25,11 @@
import org.jboss.logging.Logger;
import org.jboss.portal.Mode;
import org.jboss.portal.common.invocation.InvocationException;
-import org.jboss.portal.portlet.invocation.PortletInterceptor;
+import org.jboss.portal.portlet.PortletInvokerException;
+import org.jboss.portal.portlet.PortletInvokerInterceptor;
import org.jboss.portal.portlet.invocation.PortletInvocation;
import org.jboss.portal.portlet.invocation.response.InsufficientPrivilegesResponse;
+import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
import org.jboss.portal.security.PortalSecurityException;
import org.jboss.portal.security.spi.auth.PortalAuthorizationManager;
import org.jboss.portal.security.spi.auth.PortalAuthorizationManagerFactory;
@@ -36,7 +38,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision$
*/
-public class InstanceSecurityInterceptor extends PortletInterceptor
+public class InstanceSecurityInterceptor extends PortletInvokerInterceptor
{
/** . */
@@ -58,7 +60,7 @@
this.pamf = portalAuthorizationManagerFactory;
}
- protected Object invoke(PortletInvocation invocation) throws Exception, InvocationException
+ public PortletInvocationResponse invoke(PortletInvocation invocation) throws IllegalArgumentException, PortletInvokerException
{
try
{
@@ -71,7 +73,7 @@
}
//
- String instanceid = (String)invocation.getAttribute(PortletInvocation.INVOCATION_SCOPE, Instance.INSTANCE_ID_ATTRIBUTE);
+ String instanceid = (String)invocation.getAttribute(Instance.INSTANCE_ID_ATTRIBUTE);
PortalAuthorizationManager pam = pamf.getManager();
InstancePermission perm = new InstancePermission(instanceid, mask);
boolean authorized = pam.checkPermission(perm);
@@ -88,7 +90,7 @@
}
else
{
- return invocation.invokeNext();
+ return super.invoke(invocation);
}
}
catch (PortalSecurityException e)
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowActionCommand.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowActionCommand.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowActionCommand.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -37,8 +37,8 @@
import org.jboss.portal.portlet.info.PortletInfo;
import org.jboss.portal.portlet.controller.request.PortletActionRequest;
import org.jboss.portal.portlet.controller.request.ContainerRequest;
-import org.jboss.portal.portlet.controller.state.PageNavigationalState;
-import org.jboss.portal.portlet.controller.state.WindowNavigationalState;
+import org.jboss.portal.portlet.controller.state.PortletPageNavigationalState;
+import org.jboss.portal.portlet.controller.state.PortletWindowNavigationalState;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -130,7 +130,7 @@
return context.getController().getCustomizationManager().getInstance(window, user);
}
- protected ContainerRequest createPortletRequest(PortletInfo portletInfo, PageNavigationalState pageNS, WindowNavigationalState windowNS)
+ protected ContainerRequest createPortletRequest(PortletInfo portletInfo, PortletPageNavigationalState pageNS, PortletWindowNavigationalState windowNS)
{
return new PortletActionRequest(
window.getName(),
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowRenderCommand.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowRenderCommand.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowRenderCommand.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -24,7 +24,6 @@
import org.jboss.portal.Mode;
import org.jboss.portal.WindowState;
-import org.jboss.portal.common.util.ParameterMap;
import org.jboss.portal.core.controller.command.info.CommandInfo;
import org.jboss.portal.core.controller.command.info.ActionCommandInfo;
import org.jboss.portal.core.model.portal.PortalObjectId;
@@ -34,8 +33,8 @@
import org.jboss.portal.portlet.info.ParameterInfo;
import org.jboss.portal.portlet.controller.request.PortletRenderRequest;
import org.jboss.portal.portlet.controller.request.ContainerRequest;
-import org.jboss.portal.portlet.controller.state.PageNavigationalState;
-import org.jboss.portal.portlet.controller.state.WindowNavigationalState;
+import org.jboss.portal.portlet.controller.state.PortletPageNavigationalState;
+import org.jboss.portal.portlet.controller.state.PortletWindowNavigationalState;
import java.util.HashMap;
import java.util.Map;
@@ -81,8 +80,8 @@
}
protected ContainerRequest createPortletRequest(
- PortletInfo portletInfo, PageNavigationalState pageNS,
- WindowNavigationalState windowNS)
+ PortletInfo portletInfo, PortletPageNavigationalState pageNS,
+ PortletWindowNavigationalState windowNS)
{
Mode newMode = null;
WindowState newWindowState = null;
@@ -119,7 +118,7 @@
ParametersStateString navigationalParameters = (ParametersStateString)navigationalState;
//
- ParameterMap parameters = navigationalParameters.getParameters();
+ Map<String, String[]> parameters = navigationalParameters.getParameters();
//
for (ParameterInfo parameterInfo : portletInfo.getNavigation().getPublicParameters())
@@ -149,7 +148,7 @@
//
return new PortletRenderRequest(
window.getName(),
- new WindowNavigationalState(newNavigationalState, newMode, newWindowState),
+ new PortletWindowNavigationalState(newNavigationalState, newMode, newWindowState),
publicChanges,
pageNS
);
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowResourceCommand.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowResourceCommand.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowResourceCommand.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -28,8 +28,8 @@
import org.jboss.portal.common.util.ParameterMap;
import org.jboss.portal.portlet.controller.request.PortletResourceRequest;
import org.jboss.portal.portlet.controller.request.ContainerRequest;
-import org.jboss.portal.portlet.controller.state.PageNavigationalState;
-import org.jboss.portal.portlet.controller.state.WindowNavigationalState;
+import org.jboss.portal.portlet.controller.state.PortletPageNavigationalState;
+import org.jboss.portal.portlet.controller.state.PortletWindowNavigationalState;
import org.jboss.portal.portlet.cache.CacheLevel;
import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.info.PortletInfo;
@@ -98,7 +98,7 @@
return info;
}
- protected ContainerRequest createPortletRequest(PortletInfo portletInfo, PageNavigationalState pageNS, WindowNavigationalState windowNS)
+ protected ContainerRequest createPortletRequest(PortletInfo portletInfo, PortletPageNavigationalState pageNS, PortletWindowNavigationalState windowNS)
{
PortletResourceRequest.Scope scope;
@@ -107,7 +107,7 @@
// does not provide window NS during resource serving.
if (windowNS == null)
{
- windowNS = new WindowNavigationalState();
+ windowNS = new PortletWindowNavigationalState();
}
//
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokeWindowCommand.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokeWindowCommand.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokeWindowCommand.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.core.model.portal.command.action;
-import org.jboss.portal.portlet.controller.state.PageNavigationalState;
-import org.jboss.portal.portlet.controller.state.WindowNavigationalState;
+import org.jboss.portal.portlet.controller.state.PortletPageNavigationalState;
+import org.jboss.portal.portlet.controller.state.PortletWindowNavigationalState;
import org.jboss.portal.portlet.controller.request.ContainerRequest;
import org.jboss.portal.portlet.controller.PortletController;
import org.jboss.portal.portlet.controller.response.PageUpdateResponse;
@@ -54,8 +54,8 @@
protected abstract ContainerRequest createPortletRequest(
PortletInfo portletInfo,
- PageNavigationalState pageNS,
- WindowNavigationalState windowNS);
+ PortletPageNavigationalState pageNS,
+ PortletWindowNavigationalState windowNS);
public ControllerResponse execute() throws ControllerException
{
@@ -67,10 +67,10 @@
);
//
- PageNavigationalState pageNS = cpcc.getStateControllerContext().createPageNavigationalState(false);
+ PortletPageNavigationalState pageNS = cpcc.getStateControllerContext().createPortletPageNavigationalState(false);
//
- WindowNavigationalState windowNS = pageNS.getWindowNavigationalState(window.getName());
+ PortletWindowNavigationalState windowNS = pageNS.getPortletWindowNavigationalState(window.getName());
PortletInfo portletInfo = cpcc.getPortletInfo(window.getName());
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/render/RenderPageCommand.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/render/RenderPageCommand.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/render/RenderPageCommand.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -53,8 +53,6 @@
import org.jboss.portal.theme.ThemeConstants;
import org.jboss.portal.theme.ThemeService;
import org.jboss.portal.theme.page.PageResult;
-import org.jboss.portal.portlet.controller.PortletControllerContext;
-import org.jboss.portal.portlet.controller.state.PageNavigationalState;
import org.jboss.portal.server.ServerInvocation;
import javax.naming.InitialContext;
@@ -151,7 +149,7 @@
//
ControllerPortletControllerContext portletControllerContext = new ControllerPortletControllerContext(context, page);
- ControllerPageNavigationalState pageNavigationalState = portletControllerContext.getStateControllerContext().createPageNavigationalState(true);
+ ControllerPageNavigationalState pageNavigationalState = portletControllerContext.getStateControllerContext().createPortletPageNavigationalState(true);
// Determine theme
if (personalizable)
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/render/RenderWindowCommand.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/render/RenderWindowCommand.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/render/RenderWindowCommand.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -40,7 +40,7 @@
import org.jboss.portal.core.model.portal.content.WindowRendition;
import org.jboss.portal.core.model.portal.control.page.PageControlContext;
import org.jboss.portal.identity.User;
-import org.jboss.portal.portlet.controller.state.WindowNavigationalState;
+import org.jboss.portal.portlet.controller.state.PortletWindowNavigationalState;
import org.jboss.portal.portlet.invocation.RenderInvocation;
import java.util.Map;
@@ -113,12 +113,12 @@
public Map<String, String[]> getPublicNavigationalState()
{
- return pageNavigationalState.getPublicNavigationalState(window.getName());
+ return pageNavigationalState.getPortletPublicNavigationalState(window.getName());
}
- public WindowNavigationalState getNavigationalState()
+ public PortletWindowNavigationalState getPortletNavigationalState()
{
- return pageNavigationalState.getWindowNavigationalState(window.getName());
+ return pageNavigationalState.getPortletWindowNavigationalState(window.getName());
}
public User getUser()
@@ -126,7 +126,7 @@
return context.getUser();
}
- public RenderInvocation createRenderInvocation(WindowNavigationalState navigationalState)
+ public RenderInvocation createRenderInvocation(PortletWindowNavigationalState navigationalState)
{
return PortletInvocationFactory.createRender(
context,
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/content/ContentRendererContext.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/content/ContentRendererContext.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/content/ContentRendererContext.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -25,7 +25,7 @@
import org.jboss.portal.core.model.portal.Window;
import org.jboss.portal.identity.User;
import org.jboss.portal.portlet.invocation.RenderInvocation;
-import org.jboss.portal.portlet.controller.state.WindowNavigationalState;
+import org.jboss.portal.portlet.controller.state.PortletWindowNavigationalState;
/**
* Abstract the services provided to a content renderer for the render phase.
@@ -38,9 +38,9 @@
Window getWindow();
- WindowNavigationalState getNavigationalState();
+ PortletWindowNavigationalState getPortletNavigationalState();
User getUser();
- RenderInvocation createRenderInvocation(WindowNavigationalState navigationalState);
+ RenderInvocation createRenderInvocation(PortletWindowNavigationalState navigationalState);
}
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/IfTag.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/IfTag.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/servlet/jsp/taglib/IfTag.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -94,44 +94,4 @@
}
return SKIP_BODY;
}
-
- /*
- private String isTrue;
- private String isFalse;
-
-
- public int doStartTag() throws JspException {
- ServletRequest servletRequest = pageContext.getRequest();
- try {
- System.out.println("Hello:" + isTrue);
- PortletRequest portletRequest = (PortletRequest)servletRequest.getAttribute("javax.portlet.request");
- Enumeration enum2 = portletRequest.getPreferences().getNames();
- System.out.println("<<<<<< PorletPreferences");
- while (enum2.hasMoreElements()) {
- System.out.println(enum2.nextElement());
- }
- System.out.println(">>>>>> PorletPreferences");
-
-
- } catch (Exception ex) {
- throw new JspTagException("SimpleTag: " +
- ex.getMessage());
- }
- return SKIP_BODY;
- }
-
- public int doEndTag() {
- return EVAL_PAGE;
- }
-
- public void setIsFalse(String isFalse)
- {
- this.isFalse = isFalse;
- }
-
- public void setIsTrue(String isTrue)
- {
- this.isTrue = isTrue;
- }
- */
}
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/instance/InstanceContainerTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/instance/InstanceContainerTestCase.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/instance/InstanceContainerTestCase.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -29,6 +29,7 @@
*/
package org.jboss.portal.test.core.model.instance;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Set;
@@ -42,7 +43,6 @@
import org.apache.log4j.SimpleLayout;
import org.jboss.portal.common.junit.TransactionAssert;
import org.jboss.portal.common.util.CollectionBuilder;
-import org.jboss.portal.common.value.StringValue;
import org.jboss.portal.core.impl.model.instance.AbstractInstanceCustomization;
import org.jboss.portal.core.impl.model.instance.AbstractInstanceDefinition;
import org.jboss.portal.core.impl.model.instance.InstanceContainerImpl;
@@ -129,8 +129,8 @@
public void setProperty(String key, String value) throws IllegalStateException
{
- AbstractPropertyContext props = (AbstractPropertyContext)invocation.getAttribute(PortletInvocation.INVOCATION_SCOPE, PropertyContext.PREFERENCES_ATTRIBUTE);
- props.update(new PropertyChange[]{PropertyChange.newUpdate(key, new StringValue(value))});
+ AbstractPropertyContext props = (AbstractPropertyContext)invocation.getAttribute( PropertyContext.PREFERENCES_ATTRIBUTE);
+ props.update(new PropertyChange[]{PropertyChange.newUpdate(key, value)});
}
}
@@ -307,7 +307,9 @@
public void testConfigureInstance() throws Exception
{
PortletInvokerSupport.InternalPortlet internalPortlet = portletContainer.addInternalPortlet("MyPortlet", new PortletSupport());
- internalPortlet.addPreference("abc", new StringValue("def"));
+ java.util.List<String> list = new ArrayList<String>();
+ list.add("def");
+ internalPortlet.addPreference("abc", list);
//
TransactionAssert.beginTransaction();
@@ -331,7 +333,7 @@
//
TransactionAssert.beginTransaction();
instance = instanceContainer.getDefinition("MyInstance");
- instance.setProperties(new PropertyChange[]{PropertyChange.newUpdate("abc", new StringValue("_def")), PropertyChange.newUpdate("ghi", new StringValue("_jkl"))});
+ instance.setProperties(new PropertyChange[]{PropertyChange.newUpdate("abc", "_def"), PropertyChange.newUpdate("ghi", "_jkl")});
TransactionAssert.commitTransaction();
//
@@ -339,8 +341,12 @@
instance = instanceContainer.getDefinition("MyInstance");
PropertyMap props = instance.getProperties((Set)CollectionBuilder.hashSet().add("abc").add("ghi").get());
PropertyMap expectedProps = new SimplePropertyMap();
- expectedProps.setProperty("abc", new StringValue("_def"));
- expectedProps.setProperty("ghi", new StringValue("_jkl"));
+ list = new ArrayList<String>();
+ list.add("_def");
+ expectedProps.setProperty("abc", list);
+ list = new ArrayList<String>();
+ list.add("_jkl");
+ expectedProps.setProperty("ghi", list);
ValueMapAssert.assertEquals(expectedProps, props);
TransactionAssert.commitTransaction();
@@ -428,7 +434,9 @@
return TestCloneBeforeWrite.this.execute(this);
}
});
- internalPortlet.addPreference("_abc", new StringValue("_def"));
+ java.util.List<String> list = new ArrayList<String>();
+ list.add("_def");
+ internalPortlet.addPreference("_abc", list);
String popId = getSinglePOP().getContext().getId();
//
@@ -558,8 +566,12 @@
PropertyMap userProps = instanceContainer.getPortletInvoker().getProperties(userPortletContext);
assertNotNull(userProps);
PropertyMap expectedProps = new SimplePropertyMap();
- expectedProps.setProperty("abc", new StringValue("def"));
- expectedProps.setProperty("_abc", new StringValue("_def"));
+ java.util.List<String> list = new ArrayList<String>();
+ list.add("def");
+ expectedProps.setProperty("abc", list);
+ list = new ArrayList<String>();
+ list.add("_def");
+ expectedProps.setProperty("_abc", list);
ValueMapAssert.assertEquals(expectedProps, userProps);
Portlet userPortlet = instanceContainer.getPortletInvoker().getPortlet(userPortletContext);
assertNotNull(userPortlet);
@@ -623,8 +635,12 @@
PropertyMap userProps = instanceContainer.getPortletInvoker().getProperties(userPortletContext);
assertNotNull(userProps);
PropertyMap expectedProps = new SimplePropertyMap();
- expectedProps.setProperty("abc", new StringValue("def"));
- expectedProps.setProperty("_abc", new StringValue("_def"));
+ java.util.List<String> list = new ArrayList<String>();
+ list.add("def");
+ expectedProps.setProperty("abc", list);
+ list = new ArrayList<String>();
+ list.add("_def");
+ expectedProps.setProperty("_abc", list);
ValueMapAssert.assertEquals(expectedProps, userProps);
Portlet userPortlet = instanceContainer.getPortletInvoker().getPortlet(userPortletContext);
assertNotNull(userPortlet);
@@ -760,7 +776,9 @@
return null;
}
});
- internalPortlet.addPreference("_abc", new StringValue("_def"));
+ java.util.List<String> list = new ArrayList<String>();
+ list.add("_def");
+ internalPortlet.addPreference("_abc", list);
// Create the instance
TransactionAssert.beginTransaction();
@@ -822,7 +840,9 @@
public void testRecreate() throws Exception
{
PortletInvokerSupport.InternalPortlet internalPortlet = portletContainer.addInternalPortlet("MyPortlet", new TestPortletSupport());
- internalPortlet.addPreference("_abc", new StringValue("_def"));
+ java.util.List<String> list = new ArrayList<String>();
+ list.add("_def");
+ internalPortlet.addPreference("_abc", list);
//
TransactionAssert.beginTransaction();
@@ -851,7 +871,9 @@
public void testCreateDefinitionThrowsDuplicateInstanceException() throws PortletInvokerException, DuplicateInstanceException
{
PortletInvokerSupport.InternalPortlet internalPortlet = portletContainer.addInternalPortlet("MyPortlet", new TestPortletSupport());
- internalPortlet.addPreference("_abc", new StringValue("_def"));
+ java.util.List<String> list = new ArrayList<String>();
+ list.add("_def");
+ internalPortlet.addPreference("_abc", list);
//
TransactionAssert.beginTransaction();
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/instance/PortletInvocationContextImpl.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/instance/PortletInvocationContextImpl.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/instance/PortletInvocationContextImpl.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -41,9 +41,6 @@
public PortletInvocationContextImpl()
{
super(null);
- //
- addResolver(PortletInvocation.REQUEST_SCOPE, new MapAttributeResolver());
- addResolver(PortletInvocation.INVOCATION_SCOPE, new MapAttributeResolver());
}
@Override
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/instance/PortletInvokerSupport.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/instance/PortletInvokerSupport.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/instance/PortletInvokerSupport.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -22,7 +22,6 @@
******************************************************************************/
package org.jboss.portal.test.core.model.instance;
-import org.jboss.portal.common.value.Value;
import org.jboss.portal.portlet.InvalidPortletIdException;
import org.jboss.portal.portlet.NoSuchPortletException;
import org.jboss.portal.portlet.Portlet;
@@ -177,13 +176,13 @@
this.state = new HashMap();
}
- public void addPreference(String key, Value value)
+ public void addPreference(String key, List<String> value)
{
((ContainerPortletInfo)support.getPortletInfo()).getPreferences().addContainerPreference(key, value, false, null, null);
state.put(key, value);
}
- public void addPreference(String key, Value value, Boolean readOnly)
+ public void addPreference(String key, List<String> value, Boolean readOnly)
{
((ContainerPortletInfo)support.getPortletInfo()).getPreferences().addContainerPreference(key, value, readOnly, null, null);
state.put(key, value);
@@ -217,10 +216,10 @@
for (Iterator i = keys.iterator(); i.hasNext();)
{
String key = (String)i.next();
- Value value = (Value)internalPortlet.state.get(key);
+ List<String> value = (List<String>)internalPortlet.state.get(key);
if (value != null)
{
- props.put(key, value.clone());
+ props.put(key, value);
}
}
return props;
@@ -233,10 +232,10 @@
for (Iterator i = internalPortlet.state.keySet().iterator(); i.hasNext();)
{
String key = (String)i.next();
- Value value = (Value)internalPortlet.state.get(key);
+ List<String> value = (List<String>)internalPortlet.state.get(key);
if (value != null)
{
- props.put(key, value.clone());
+ props.put(key, value);
}
}
return props;
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/instance/ValueMapAssert.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/instance/ValueMapAssert.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/instance/ValueMapAssert.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -28,6 +28,7 @@
import java.util.HashSet;
import java.util.Iterator;
+import java.util.List;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -54,8 +55,8 @@
for (Iterator i = vm1.keySet().iterator(); i.hasNext();)
{
String key = (String)i.next();
- Value v1 = vm1.getProperty(key);
- Value v2 = vm2.getProperty(key);
+ List<String> v1 = vm1.getProperty(key);
+ List<String> v2 = vm2.getProperty(key);
assertEquals("Values for key " + key + " are not equals", v1, v2);
}
}
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/state/ProducerTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/state/ProducerTestCase.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/state/ProducerTestCase.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -31,7 +31,6 @@
import org.apache.log4j.SimpleLayout;
import org.jboss.portal.Mode;
import org.jboss.portal.common.junit.TransactionAssert;
-import org.jboss.portal.common.value.StringValue;
import org.jboss.portal.core.impl.portlet.state.PersistentPortletState;
import org.jboss.portal.core.impl.portlet.state.PersistentPortletStatePersistenceManager;
import org.jboss.portal.core.impl.portlet.state.PersistentRegistration;
@@ -72,6 +71,7 @@
import javax.xml.namespace.QName;
import java.net.URL;
+import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
@@ -218,23 +218,31 @@
{
public PortletInvocationResponse invoke(PortletInvocation invocation)
{
- AbstractPropertyContext props = (AbstractPropertyContext)invocation.getAttribute(PortletInvocation.INVOCATION_SCOPE, PropertyContext.PREFERENCES_ATTRIBUTE);
- props.update(new PropertyChange[]{PropertyChange.newUpdate("_abc", new StringValue("_def"))});
+ AbstractPropertyContext props = (AbstractPropertyContext)invocation.getAttribute(PropertyContext.PREFERENCES_ATTRIBUTE);
+ List<String> list = new ArrayList<String>();
+ list.add("_def");
+ props.update(new PropertyChange[]{PropertyChange.newUpdate("_abc", list)});
return null;
}
});
- internalSimplePortlet.addPreference("abc", new StringValue("def"));
+ List<String> list = new ArrayList<String>();
+ list.add("def");
+ internalSimplePortlet.addPreference("abc", list);
PortletInvokerSupport.InternalPortlet internalCloningPortlet = portletContainer.addInternalPortlet("CloningPortlet", new PortletSupport()
{
public PortletInvocationResponse invoke(PortletInvocation invocation)
{
- AbstractPropertyContext props = (AbstractPropertyContext)invocation.getAttribute(PortletInvocation.INVOCATION_SCOPE, PropertyContext.PREFERENCES_ATTRIBUTE);
- props.update(new PropertyChange[]{PropertyChange.newUpdate("_abc", new StringValue("_def"))});
+ AbstractPropertyContext props = (AbstractPropertyContext)invocation.getAttribute(PropertyContext.PREFERENCES_ATTRIBUTE);
+ List<String> list = new ArrayList<String>();
+ list.add("_def");
+ props.update(new PropertyChange[]{PropertyChange.newUpdate("_abc", list)});
return null;
}
});
- internalCloningPortlet.addPreference("abc", new StringValue("def"));
+ list = new ArrayList<String>();
+ list.add("def");
+ internalCloningPortlet.addPreference("abc", list);
PortletInvokerSupport.InternalPortlet internalCloneFailedCloningPortlet = portletContainer.addInternalPortlet("CloneFailedCloningPortlet", new PortletSupport()
{
@@ -242,8 +250,10 @@
{
try
{
- AbstractPropertyContext props = (AbstractPropertyContext)invocation.getAttribute(PortletInvocation.INVOCATION_SCOPE, PropertyContext.PREFERENCES_ATTRIBUTE);
- props.update(new PropertyChange[]{PropertyChange.newUpdate("_abc", new StringValue("_def"))});
+ AbstractPropertyContext props = (AbstractPropertyContext)invocation.getAttribute(PropertyContext.PREFERENCES_ATTRIBUTE);
+ List<String> list = new ArrayList<String>();
+ list.add("_def");
+ props.update(new PropertyChange[]{PropertyChange.newUpdate("_abc", list)});
fail("Was expecting an IllegalStateException");
}
catch (IllegalStateException expected)
@@ -252,18 +262,24 @@
return null;
}
});
- internalCloneFailedCloningPortlet.addPreference("abc", new StringValue("def"));
+ list = new ArrayList<String>();
+ list.add("def");
+ internalCloneFailedCloningPortlet.addPreference("abc", list);
PortletInvokerSupport.InternalPortlet internalCloningPortletThrowingRuntimeException = portletContainer.addInternalPortlet("CloningPortletThrowingRuntimeException", new PortletSupport()
{
public PortletInvocationResponse invoke(PortletInvocation invocation)
{
- AbstractPropertyContext props = (AbstractPropertyContext)invocation.getAttribute(PortletInvocation.INVOCATION_SCOPE, PropertyContext.PREFERENCES_ATTRIBUTE);
- props.update(new PropertyChange[]{PropertyChange.newUpdate("_abc", new StringValue("_def"))});
+ AbstractPropertyContext props = (AbstractPropertyContext)invocation.getAttribute(PropertyContext.PREFERENCES_ATTRIBUTE);
+ List<String> list = new ArrayList<String>();
+ list.add("_def");
+ props.update(new PropertyChange[]{PropertyChange.newUpdate("_abc", list)});
throw new RuntimeException("custom_message");
}
});
- internalCloningPortletThrowingRuntimeException.addPreference("abc", new StringValue("def"));
+ list = new ArrayList<String>();
+ list.add("def");
+ internalCloningPortletThrowingRuntimeException.addPreference("abc", list);
// Create registration
if (useRegistration)
@@ -347,7 +363,9 @@
assertNotNull(cloneValues);
assertNotNull(cloneValues.keySet());
assertEquals(1, cloneValues.keySet().size());
- assertEquals(new StringValue("def"), cloneValues.getProperty("abc"));
+ List<String> list = new ArrayList<String>();
+ list.add("def");
+ assertEquals(list, cloneValues.getProperty("abc"));
if (useRegistration)
{
PersistentRegistration registration = cloneState.getRelatedRegistration();
@@ -368,7 +386,9 @@
beginTX();
PropertyMap cloneValues = consumer.getProperties(cloneCtx);
PropertyMap newCloneValues = new SimplePropertyMap(cloneValues);
- newCloneValues.setProperty("abc", new StringValue("fed"));
+ List<String> list = new ArrayList<String>();
+ list.add("fed");
+ newCloneValues.setProperty("abc", list);
persistenceManager.updateState(cloneCtx.getId().substring(1), newCloneValues);
commitTX();
@@ -388,7 +408,9 @@
assertNotNull(cloneCloneValues);
assertNotNull(cloneCloneValues.keySet());
assertEquals(1, cloneCloneValues.keySet().size());
- assertEquals(new StringValue("fed"), cloneCloneValues.getProperty("abc"));
+ list = new ArrayList<String>();
+ list.add("fed");
+ assertEquals(list, cloneCloneValues.getProperty("abc"));
if (useRegistration)
{
PersistentRegistration registration = cloneCloneState.getRelatedRegistration();
@@ -509,8 +531,12 @@
assertEquals(clone.getId().substring(1), cloneState.getId());
assertEquals("CloningPortlet", cloneState.getState().getPortletId());
SimplePropertyMap expectedValue = new SimplePropertyMap();
- expectedValue.setProperty("abc", new StringValue("def"));
- expectedValue.setProperty("_abc", new StringValue("_def"));
+ List<String> list = new ArrayList<String>();
+ list.add("def");
+ expectedValue.setProperty("abc", list);
+ list = new ArrayList<String>();
+ list.add("_def");
+ expectedValue.setProperty("_abc", list);
ValueMapAssert.assertEquals(expectedValue, cloneState.getState().getProperties());
if (useRegistration)
{
@@ -567,7 +593,9 @@
beginTX();
PortletState cloningPortletState = persistenceManager.loadState(cloningPortletId.getId().substring(1)).getState();
SimplePropertyMap newCloningPortletStateValue = new SimplePropertyMap(cloningPortletState.getProperties());
- newCloningPortletStateValue.setProperty("abc", new StringValue("deff"));
+ List<String> list = new ArrayList<String>();
+ list.add("deff");
+ newCloningPortletStateValue.setProperty("abc", list);
persistenceManager.updateState(cloningPortletId.getId().substring(1), newCloningPortletStateValue);
commitTX();
@@ -590,8 +618,12 @@
assertEquals(clone.getId().substring(1), cloneState.getId());
assertEquals("CloningPortlet", cloneState.getState().getPortletId());
SimplePropertyMap expectedValue = new SimplePropertyMap();
- expectedValue.setProperty("abc", new StringValue("deff"));
- expectedValue.setProperty("_abc", new StringValue("_def"));
+ list = new ArrayList<String>();
+ list.add("deff");
+ expectedValue.setProperty("abc", list);
+ list = new ArrayList<String>();
+ list.add("_def");
+ expectedValue.setProperty("_abc", list);
ValueMapAssert.assertEquals(expectedValue, cloneState.getState().getProperties());
if (useRegistration)
{
@@ -626,8 +658,12 @@
assertEquals("CloningPortlet", state.getState().getPortletId());
assertEquals(cloningPortletId.getId().substring(1), state.getId());
SimplePropertyMap expectedValue = new SimplePropertyMap();
- expectedValue.setProperty("abc", new StringValue("def"));
- expectedValue.setProperty("_abc", new StringValue("_def"));
+ List<String> list = new ArrayList<String>();
+ list.add("def");
+ expectedValue.setProperty("abc", list);
+ list = new ArrayList<String>();
+ list.add("_def");
+ expectedValue.setProperty("_abc", list);
ValueMapAssert.assertEquals(expectedValue, state.getState().getProperties());
commitTX();
}
Modified: branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/META-INF/jboss-service.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/META-INF/jboss-service.xml 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/META-INF/jboss-service.xml 2008-06-17 22:43:44 UTC (rev 11068)
@@ -242,6 +242,11 @@
</mbean>
<!-- Instance stack -->
+ <mbean code="org.jboss.portal.portlet.aspects.portlet.ConsumerCacheInterceptor"
+ name="portal:service=Interceptor,type=Portlet,name=ConsumerCache" xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ </mbean>
<mbean code="org.jboss.portal.core.model.instance.InstanceSecurityInterceptor"
name="portal:service=Interceptor,type=Portlet,name=InstanceSecurity" xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
@@ -250,28 +255,24 @@
portal:service=PortalAuthorizationManagerFactory
</depends>
</mbean>
- <mbean code="org.jboss.portal.portlet.aspects.portlet.ConsumerCacheInterceptor"
- name="portal:service=Interceptor,type=Portlet,name=ConsumerCache" xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- </mbean>
<mbean code="org.jboss.portal.portlet.aspects.portlet.PortalSessionSynchronizationInterceptor"
name="portal:service=Interceptor,type=Portlet,name=PortalSessionSynchronization" xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
</mbean>
- <mbean code="org.jboss.portal.server.impl.invocation.JBossInterceptorStackFactory"
+
+ <mbean code="org.jboss.portal.server.impl.invocation.JBossPortletInterceptorStackFactory"
name="portal:service=InterceptorStackFactory,type=Instance" xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
<depends-list optional-attribute-name="InterceptorNames">
<depends-list-element>portal:service=Interceptor,type=Portlet,name=ConsumerCache</depends-list-element>
<depends-list-element>portal:service=Interceptor,type=Portlet,name=InstanceSecurity</depends-list-element>
- <depends-list-element>portal:service=Interceptor,type=Portlet,name=PortalSessionSynchronization
- </depends-list-element>
+ <depends-list-element>portal:service=Interceptor,type=Portlet,name=PortalSessionSynchronization</depends-list-element>
</depends-list>
</mbean>
-
+
+
<!-- Producer stack -->
<mbean code="org.jboss.portal.portlet.aspects.portlet.ValveInterceptor"
name="portal:service=Interceptor,type=Portlet,name=Valve" xmbean-dd=""
@@ -331,7 +332,16 @@
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
</mbean>
- <mbean code="org.jboss.portal.server.impl.invocation.JBossInterceptorStackFactory"
+ <bean name="PortletContainerDispatcher" class="org.jboss.portal.portlet.container.ContainerPortletDispatcher">
+ </bean>
+ <mbean code="org.jboss.portal.portlet.container.ContainerPortletDispatcher"
+ name="portal:service=Dispatcher,type=Portlet,name=ContainerPortlet" xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ </mbean>
+
+
+ <mbean code="org.jboss.portal.server.impl.invocation.JBossPortletInterceptorStackFactory"
name="portal:service=InterceptorStackFactory,type=Producer" xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
@@ -340,14 +350,14 @@
<depends-list-element>portal:service=Interceptor,type=Portlet,name=SecureTransport</depends-list-element>
<depends-list-element>portal:service=Interceptor,type=Portlet,name=ContextDispatcher</depends-list-element>
<depends-list-element>portal:service=Interceptor,type=Portlet,name=ContextTracker</depends-list-element>
- <depends-list-element>portal:service=Interceptor,type=Portlet,name=PortletSessionSynchronization
- </depends-list-element>
+ <depends-list-element>portal:service=Interceptor,type=Portlet,name=PortletSessionSynchronization</depends-list-element>
<depends-list-element>portal:service=Interceptor,type=Portlet,name=Bridge</depends-list-element>
<depends-list-element>portal:service=Interceptor,type=Portlet,name=Ajax</depends-list-element>
<depends-list-element>portal:service=Interceptor,type=Portlet,name=SignOut</depends-list-element>
<depends-list-element>portal:service=Interceptor,type=Portlet,name=ProducerCache</depends-list-element>
<depends-list-element>portal:service=Interceptor,type=Portlet,name=Header</depends-list-element>
<depends-list-element>portal:service=Interceptor,type=Portlet,name=Transaction</depends-list-element>
+ <depends-list-element>portal:service=Dispatcher,type=Portlet,name=ContainerPortlet</depends-list-element>
</depends-list>
</mbean>
@@ -839,9 +849,10 @@
name="portal:service=PortletInvoker,type=Container" xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
- <depends optional-attribute-name="StackFactory" proxy-type="attribute">
- portal:service=InterceptorStackFactory,type=Producer
+ <depends optional-attribute-name="Next" proxy-type="attribute">
+ portal:service=Interceptor,type=Portlet,name=Valve
</depends>
+ <depends>portal:service=InterceptorStackFactory,type=Producer</depends>
</mbean>
<!-- The producer portlet invoker -->
@@ -866,9 +877,14 @@
name="portal:service=PortletInvoker,type=Producer" xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
+ <!--
<depends optional-attribute-name="PortletInvoker" proxy-type="attribute">
portal:service=PortletInvoker,type=Container
</depends>
+ -->
+ <depends optional-attribute-name="Next" proxy-type="attribute">
+ portal:service=PortletInvoker,type=Container
+ </depends>
<depends optional-attribute-name="PersistenceManager" proxy-type="attribute">
portal:service=PersistenceManager,type=Producer
</depends>
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/.classpath 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/.classpath 2008-06-17 22:43:44 UTC (rev 11068)
@@ -4,7 +4,6 @@
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src" path="/faces"/>
<classpathentry combineaccessrules="false" kind="src" path="/security"/>
- <classpathentry kind="lib" path="/thirdparty/apache-myfaces/lib/myfaces-api.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/api"/>
<classpathentry combineaccessrules="false" kind="src" path="/core"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-common.jar"/>
@@ -24,5 +23,6 @@
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-lib.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/portlet-server"/>
<classpathentry kind="lib" path="/thirdparty/portlet/lib/portlet-api.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/sun-jsf/lib/jsf-api.jar"/>
<classpathentry kind="output" path="output/classes"/>
</classpath>
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/InstanceManagerBean.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/InstanceManagerBean.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/InstanceManagerBean.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -23,7 +23,6 @@
package org.jboss.portal.core.admin.ui;
import org.jboss.portal.Mode;
-import org.jboss.portal.common.value.Value;
import org.jboss.portal.core.model.instance.Instance;
import org.jboss.portal.core.model.instance.InstanceContainer;
import org.jboss.portal.core.model.instance.InstanceDefinition;
@@ -227,7 +226,7 @@
{
String key = (String)i.next();
PreferenceInfo prefInfo = prefsInfo.getPreference(key);
- Value value = props.getProperty(key);
+ List<String> value = props.getProperty(key);
selectedPrefs.addEntry(prefInfo, value);
}
}
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/PreferenceBean.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/PreferenceBean.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/PreferenceBean.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -23,8 +23,6 @@
package org.jboss.portal.core.admin.ui;
import org.jboss.portal.common.i18n.LocalizedString;
-import org.jboss.portal.common.value.StringValue;
-import org.jboss.portal.common.value.Value;
import org.jboss.portal.faces.el.PropertyValue;
import org.jboss.portal.faces.el.dynamic.DynamicBean;
import org.jboss.portal.portlet.info.PreferenceInfo;
@@ -53,7 +51,7 @@
private LocalizedString description;
/** . */
- private Value value;
+ private List<String> value;
/** . */
private String line;
@@ -64,7 +62,7 @@
/** . */
private boolean stale;
- public PreferenceBean(PreferenceInfo prefInfo, Value value)
+ public PreferenceBean(PreferenceInfo prefInfo, List<String> value)
{
this.name = prefInfo.getKey();
this.readOnly = Boolean.TRUE.equals(prefInfo.isReadOnly());
@@ -108,12 +106,12 @@
this.description = description;
}
- public Value getValue()
+ public List<String> getValue()
{
return value;
}
- public void setValue(Value value)
+ public void setValue(List<String> value)
{
this.value = value;
}
@@ -123,12 +121,15 @@
return stale;
}
- public List getIndices()
+ public List<String> getIndices()
{
- List list = new ArrayList(value.size());
- for (int i = 0; i < value.size(); i++)
+ List<String> list = new ArrayList<String>();
+ if (value != null)
{
- list.add("index_" + i);
+ for (int i = 0; i < value.size(); i++)
+ {
+ list.add("index_" + i);
+ }
}
return list;
}
@@ -156,19 +157,13 @@
{
String s = event.getComponent().getId();
int index = Integer.parseInt(s.substring(4));
- List list = new ArrayList(value.asStringList());
- list.remove(index);
- String[] strings = (String[])list.toArray(new String[list.size()]);
- value = new StringValue(strings);
+ value.remove(index);
stale = true;
}
public void appendLine()
{
- List list = new ArrayList(value.asStringList());
- list.add(line);
- String[] strings = (String[])list.toArray(new String[list.size()]);
- value = new StringValue(strings);
+ value.add(line);
stale = true;
line = null;
}
@@ -194,7 +189,7 @@
if (s.startsWith("index_"))
{
int index = Integer.parseInt(s.substring(6));
- return new PropertyValue(value.asStringList().get(index));
+ return new PropertyValue(value.get(index));
}
}
return null;
@@ -207,10 +202,8 @@
String s = (String)propertyName;
if (s.startsWith("index_"))
{
- String[] tmp = this.value.asStringArray();
int index = Integer.parseInt(s.substring(6));
- tmp[index] = (String)value;
- this.value = new StringValue(tmp);
+ this.value.set(index, (String)value);
stale = true;
return true;
}
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/PreferencesBean.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/PreferencesBean.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/PreferencesBean.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -22,7 +22,6 @@
******************************************************************************/
package org.jboss.portal.core.admin.ui;
-import org.jboss.portal.common.value.Value;
import org.jboss.portal.portlet.info.PreferenceInfo;
import java.util.ArrayList;
@@ -96,7 +95,7 @@
addEntry(new PreferenceBean(prefInfo, null));
}
- public void addEntry(PreferenceInfo prefInfo, Value value)
+ public void addEntry(PreferenceInfo prefInfo, List<String> value)
{
if (mutable == false)
{
Modified: branches/JBoss_Portal_Branch_2_7/core-cms/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-cms/.classpath 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core-cms/.classpath 2008-06-17 22:43:44 UTC (rev 11068)
@@ -17,7 +17,6 @@
<classpathentry kind="lib" path="/thirdparty/apache-fileupload/lib/commons-fileupload.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/security"/>
<classpathentry kind="lib" path="/thirdparty/jbpm/jaronly/lib/jbpm.jar"/>
- <classpathentry kind="lib" path="/thirdparty/apache-myfaces/lib/myfaces-api.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/core-admin"/>
<classpathentry kind="lib" path="/thirdparty/hibernate/lib/hibernate3.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/search"/>
@@ -27,5 +26,6 @@
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/common/lib/portal-common-portal-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/portlet/lib/portlet-api.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/sun-jsf/lib/jsf-api.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: branches/JBoss_Portal_Branch_2_7/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSContentEditorPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSContentEditorPortlet.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSContentEditorPortlet.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -96,7 +96,6 @@
if (EDIT_CONTENT.equals(req.getPortletMode()))
{
javax.portlet.PortletURL url = resp.createRenderURL();
- System.out.println(url);
doEditContent(req, resp);
}
Modified: branches/JBoss_Portal_Branch_2_7/core-identity/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-identity/.classpath 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core-identity/.classpath 2008-06-17 22:43:44 UTC (rev 11068)
@@ -36,9 +36,6 @@
<classpathentry kind="lib" path="/thirdparty/jbpm/jaronly/lib/jbpm.jar"/>
<classpathentry kind="lib" path="/thirdparty/jbpm/jaronly/lib/jbpm-identity.jar"/>
<classpathentry kind="lib" path="/thirdparty/facelets/lib/jsf-facelets.jar"/>
- <classpathentry kind="lib" path="/thirdparty/apache-myfaces/lib/jstl.jar"/>
- <classpathentry kind="lib" path="/thirdparty/apache-myfaces/lib/myfaces-api.jar"/>
- <classpathentry kind="lib" path="/thirdparty/apache-myfaces/lib/myfaces-impl.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/identity/lib/portal-identity-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/common/lib/portal-common-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-jmx.jar" sourcepath="/JBoss_AS_4.0.5/jmx/src/main"/>
@@ -48,5 +45,8 @@
<classpathentry combineaccessrules="false" kind="src" path="/theme"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/portlet/lib/portlet-api.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/sun-jsf/lib/jsf-api.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/sun-jsf/lib/jsf-impl.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/sun-jstl/lib/jstl.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/EditProfileAction.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/EditProfileAction.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/EditProfileAction.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -46,7 +46,6 @@
import org.jboss.portal.identity.User;
import org.jboss.portal.portlet.aspects.portlet.ContextDispatcherInterceptor;
import org.jboss.portal.portlet.invocation.ActionInvocation;
-import org.jboss.portal.server.ServerInvocation;
import org.jboss.portal.server.ServerInvocationContext;
import org.jboss.portlet.JBossActionRequest;
import org.jboss.portlet.JBossActionResponse;
@@ -243,8 +242,8 @@
// Removing user properties caching so that the changes are immediately available
ActionInvocation rInvocation = (ActionInvocation)((PortletRequest)ctx.getExternalContext().getRequest()).getAttribute(ContextDispatcherInterceptor.REQ_ATT_COMPONENT_INVOCATION);
- rInvocation.setAttribute(ServerInvocation.PRINCIPAL_SCOPE, UserInterceptor.PROFILE_KEY, null);
- rInvocation.setAttribute(ServerInvocation.PRINCIPAL_SCOPE, UserInterceptor.USER_KEY, null);
+ rInvocation.setAttribute(UserInterceptor.PROFILE_KEY, null);
+ rInvocation.setAttribute(UserInterceptor.USER_KEY, null);
// JSR crap is also keeping a reference to a previous locale...
// Let's fix that for this portlet only
Modified: branches/JBoss_Portal_Branch_2_7/core-management/src/main/org/jboss/portal/core/management/PortletDiscoveryService.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-management/src/main/org/jboss/portal/core/management/PortletDiscoveryService.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core-management/src/main/org/jboss/portal/core/management/PortletDiscoveryService.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -5,6 +5,7 @@
import org.jboss.portal.portlet.federation.FederatingPortletInvoker;
import org.jboss.portal.portlet.management.LocalPortletManagement;
import org.jboss.portal.portlet.management.PortletContainerManagementInterceptor;
+import org.jboss.portal.portlet.management.PortletInfo;
import org.jboss.system.ServiceMBeanSupport;
import javax.management.ObjectName;
@@ -97,6 +98,8 @@
{
Portlet portlet = (Portlet)it.next();
String portletId = portlet.getContext().getId();
+
+ PortletInfo pinfo = interceptor.getPortletInfo(portletId);
boolean used = interceptor.getPortletInfo(portletId).isUsed();
if ((!registeredPortlets.containsKey(portletId)) && (used))
{
Modified: branches/JBoss_Portal_Branch_2_7/core-search/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-search/.classpath 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core-search/.classpath 2008-06-17 22:43:44 UTC (rev 11068)
@@ -6,7 +6,6 @@
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-jmx.jar" sourcepath="/JBoss_AS_4.0.5/jmx/src/main"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-common.jar"/>
<classpathentry kind="lib" path="/thirdparty/apache-lucene/lib/lucene.jar"/>
- <classpathentry kind="lib" path="/thirdparty/apache-myfaces/lib/myfaces-api.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/core"/>
<classpathentry combineaccessrules="false" kind="src" path="/api"/>
<classpathentry combineaccessrules="false" kind="src" path="/server"/>
@@ -17,5 +16,6 @@
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/common/lib/portal-common-portal-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/portlet/lib/portlet-api.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/sun-jsf/lib/jsf-api.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: branches/JBoss_Portal_Branch_2_7/core-wsrp/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-wsrp/.classpath 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/core-wsrp/.classpath 2008-06-17 22:43:44 UTC (rev 11068)
@@ -2,7 +2,6 @@
<classpath>
<classpathentry kind="src" path="src/main"/>
<classpathentry combineaccessrules="false" kind="src" path="/wsrp"/>
- <classpathentry kind="lib" path="/thirdparty/apache-myfaces/lib/myfaces-api.jar"/>
<classpathentry kind="lib" path="/thirdparty/junit/lib/junit.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/common/lib/portal-common-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-lib.jar"/>
@@ -13,5 +12,6 @@
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-jaxrpc.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-common.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/sun-jsf/lib/jsf-api.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: branches/JBoss_Portal_Branch_2_7/faces/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/faces/.classpath 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/faces/.classpath 2008-06-17 22:43:44 UTC (rev 11068)
@@ -2,8 +2,6 @@
<classpath>
<classpathentry kind="src" path="src/main"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="lib" path="/thirdparty/apache-myfaces/lib/myfaces-api.jar"/>
- <classpathentry kind="lib" path="/thirdparty/sun-servlet/lib/jsp-api.jar"/>
<classpathentry kind="lib" path="/thirdparty/apache-log4j/lib/log4j.jar"/>
<classpathentry kind="lib" path="/thirdparty/facelets/lib/jsf-facelets.jar"/>
<classpathentry kind="lib" path="/thirdparty/el/lib/el-api.jar"/>
@@ -15,7 +13,10 @@
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/common/lib/portal-common-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/common/lib/portal-common-portal-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-bridge-lib.jar"/>
- <classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-lib.jar" sourcepath="/module-portlet-2.0.0.CR2"/>
+ <classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-lib.jar" sourcepath="/module-portlet-trunk"/>
<classpathentry kind="lib" path="/thirdparty/portlet/lib/portlet-api.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/sun-jsf/lib/jsf-api.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/sun-jsf/lib/jsf-impl.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/jboss/web/lib/jsp-api.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFInvocation.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFInvocation.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFInvocation.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -32,12 +32,10 @@
import org.jboss.portal.Mode;
import org.jboss.portal.WindowState;
-import org.jboss.portal.common.invocation.resolver.MapAttributeResolver;
-import org.jboss.portal.common.invocation.resolver.PrincipalAttributeResolver;
import org.jboss.portal.common.net.media.MediaType;
+import org.jboss.portal.common.text.CharBuffer;
import org.jboss.portal.common.text.FastURLEncoder;
import org.jboss.portal.common.util.MarkupInfo;
-import org.jboss.portal.common.util.ParameterMap;
import org.jboss.portal.portlet.ActionURL;
import org.jboss.portal.portlet.ContainerURL;
import org.jboss.portal.portlet.ParametersStateString;
@@ -48,7 +46,6 @@
import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.URLFormat;
import org.jboss.portal.portlet.bridge.JBossServletContextProvider;
-import org.jboss.portal.portlet.impl.PortletRequestEncoder;
import org.jboss.portal.portlet.impl.spi.AbstractPortletInvocationContext;
import org.jboss.portal.portlet.impl.spi.AbstractRequestContext;
import org.jboss.portal.portlet.invocation.ActionInvocation;
@@ -121,7 +118,6 @@
String renderURL(ContainerURL containerURL, Boolean wantSecure, Boolean wantAuthenticated, boolean relative)
{
-
ViewHandler vh = faces.getApplication().getViewHandler();
String viewId = faces.getViewRoot().getViewId();
String clientId = uiportlet.getClientId(faces);
@@ -129,7 +125,8 @@
String actionURL = vh.getActionURL(faces, viewId);
actionURL = faces.getExternalContext().encodeActionURL(actionURL);
- StringBuffer url = new StringBuffer(actionURL);
+ CharBuffer url = new CharBuffer();
+ url.append(actionURL);
//
url.append("&").append(clientId).append("=jbp");
@@ -147,9 +144,9 @@
encoder.encodeRender(renderURL.getNavigationalState(), renderURL.getMode(), renderURL.getWindowState());
}
- for (Iterator i = encoder.getQueryParameters().entrySet().iterator(); i.hasNext();)
+ for (Iterator<Map.Entry<String, String[]>> i = encoder.getQueryParameters().entrySet().iterator(); i.hasNext();)
{
- Map.Entry entry = (Map.Entry)i.next();
+ Map.Entry<String, String[]> entry = (Map.Entry<String, String[]>)i.next();
String name = FastURLEncoder.getUTF8Instance().encode((String)entry.getKey());
String[] values = (String[])entry.getValue();
for (int j = 0; j < values.length; j++)
@@ -161,7 +158,7 @@
}
//
- return url.toString();
+ return url.asString();
}
public PortletInvocationResponse action(
@@ -202,7 +199,7 @@
Portlet portlet,
Mode mode,
WindowState windowState,
- ParameterMap navState) throws PortletInvokerException
+ Map<String, String[]> navState) throws PortletInvokerException
{
PortletInvocationContext portletInvocationContext = new JSFPortletInvocationContext(clientRequest, clientResponse, new MarkupInfo(MediaType.TEXT_HTML, "UTF-8"), this);
@@ -253,33 +250,19 @@
private static class JSFPortletInvocationContext extends AbstractPortletInvocationContext
{
- //private InvokePortletCommandFactory cmdFactory;
- //private ControllerContext controllerContext;
private HttpServletRequest clientRequest;
private HttpServletResponse clientResponse;
private JSFInvocation invocation;
- private StateString navigationalState;
-
public JSFPortletInvocationContext(HttpServletRequest clientRequest, HttpServletResponse clientResponse, MarkupInfo markupInfo, JSFInvocation invocation)
{
super(markupInfo);
- //
-// this.cmdFactory = cmdFactory;
-// this.controllerContext = controllerContext;
this.clientRequest = clientRequest;
this.clientResponse = clientResponse;
this.invocation = invocation;
-
- //
- addResolver(PortletInvocation.INVOCATION_SCOPE, new MapAttributeResolver());
-// addResolver(PortletInvocation.REQUEST_SCOPE, controllerContext);
- addResolver(PortletInvocation.PRINCIPAL_SCOPE, new PrincipalAttributeResolver(clientRequest));
-// addResolver(PortletInvocation.REQUEST_PROPERTIES_SCOPE, EmptyAttributeResolver.getInstance());
-// addResolver(PortletInvocation.RESPONSE_PROPERTIES_SCOPE, new MapAttributeResolver());
}
public HttpServletRequest getClientRequest() throws IllegalStateException
Modified: branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFUserContext.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFUserContext.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFUserContext.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -26,6 +26,8 @@
import org.jboss.portal.portlet.spi.UserContext;
import javax.faces.context.FacesContext;
+
+import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
@@ -39,6 +41,9 @@
/** . */
private final FacesContext faces;
+
+ /** . */
+ private Map<String, Object> attributes;
public JSFUserContext(FacesContext faces)
{
@@ -50,7 +55,7 @@
return null;
}
- public Map getInformations()
+ public Map<String, String> getInformations()
{
return null;
}
@@ -60,8 +65,26 @@
return faces.getExternalContext().getRequestLocale();
}
- public List getLocales()
+ public List<Locale> getLocales()
{
return Tools.toList(faces.getExternalContext().getRequestLocales());
}
+
+ public Object getAttribute(String arg0)
+ {
+ if (attributes != null)
+ {
+ return attributes.get(arg0);
+ }
+ return null;
+ }
+
+ public void setAttribute(String arg0, Object arg1)
+ {
+ if (attributes == null)
+ {
+ attributes = new HashMap<String, Object>();
+ }
+ attributes.put(arg0, arg1);
+ }
}
Modified: branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletActionEvent.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletActionEvent.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletActionEvent.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -24,7 +24,6 @@
import org.jboss.portal.Mode;
import org.jboss.portal.WindowState;
-import org.jboss.portal.common.util.ParameterMap;
import org.jboss.portal.portlet.Portlet;
import org.jboss.portal.portlet.PortletInvokerException;
import org.jboss.portal.portlet.ParametersStateString;
@@ -44,7 +43,7 @@
{
/** . */
- private final ParameterMap interactionState;
+ private final Map<String, String[]> interactionState;
/** . */
private Mode mode;
@@ -52,7 +51,7 @@
/** . */
private WindowState windowState;
- PortletActionEvent(UIComponent uiComponent, ParameterMap interactionState, Mode mode, WindowState windowState)
+ PortletActionEvent(UIComponent uiComponent, Map<String, String[]> interactionState, Mode mode, WindowState windowState)
{
super(uiComponent);
@@ -72,7 +71,7 @@
this.windowState = windowState;
}
- public Map getParameterMap()
+ public Map<String, String[]> getParameterMap()
{
return interactionState;
}
Modified: branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletRenderEvent.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletRenderEvent.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletRenderEvent.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -24,7 +24,6 @@
import org.jboss.portal.Mode;
import org.jboss.portal.WindowState;
-import org.jboss.portal.common.util.ParameterMap;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
@@ -38,7 +37,7 @@
{
/** . */
- private final ParameterMap navState;
+ private final Map<String, String[]> navState;
/** . */
private Mode mode;
@@ -46,7 +45,7 @@
/** . */
private WindowState windowState;
- public PortletRenderEvent(UIComponent uiComponent, ParameterMap navState, Mode mode, WindowState windowState)
+ public PortletRenderEvent(UIComponent uiComponent, Map<String, String[]> navState, Mode mode, WindowState windowState)
{
super(uiComponent);
Added: branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletRequestDecoder.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletRequestDecoder.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletRequestDecoder.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -0,0 +1,324 @@
+/******************************************************************************
+ * 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.faces.component.portlet;
+
+import org.jboss.portal.Mode;
+import org.jboss.portal.WindowState;
+import org.jboss.portal.common.util.ParameterMap;
+import org.jboss.portal.portlet.StateString;
+import org.jboss.portal.portlet.ParametersStateString;
+import org.jboss.portal.portlet.OpaqueStateString;
+
+import java.util.Iterator;
+import java.util.Map;
+
+/**
+ * This class is a possible implementation for the behavior of a request made to a portlet. Which means that this
+ * implementation does not preclude other implementations.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 6549 $
+ */
+public class PortletRequestDecoder
+{
+
+ /** The mask for action. */
+ public static final int ACTION_MASK = 0x00000001;
+
+ /** The mask for render. */
+ public static final int RENDER_MASK = 0x00000002;
+
+ /** The mask for mode. */
+ public static final int MODE_MASK = 0x00000004;
+
+ /** The mask for window state. */
+ public static final int WINDOW_STATE_MASK = 0x00000008;
+
+ /** The mask for opacity. */
+ public static final int OPAQUE_MASK = 0x00000010;
+
+ /** The name of the URL parameter containing the mode. */
+ public static final String MODE_PARAMETER = "mode";
+
+ /** The name of the URL parameter containing the window state. */
+ public static final String WINDOW_STATE_PARAMETER = "windowstate";
+
+ /** The name of the URL parameter containing the interaction state. */
+ public static final String INTERACTION_STATE_PARAMETER = "is";
+
+ /** The name of the URL parameter containing the navigational state. */
+ public static final String NAVIGATIONAL_STATE_PARAMETER = "ns";
+
+ /** The name of the URL parameter containing the meta information. */
+ public static final String META_PARAMETER = "action";
+
+ /** . */
+ public static final int ACTION_TYPE = 0;
+
+ /** . */
+ public static final int RENDER_TYPE = 1;
+
+ /** . */
+ public static final int NAV_TYPE = 2;
+
+ /** . */
+ private Mode mode;
+
+ /** . */
+ private WindowState windowState;
+
+ /** . */
+ private StateString navigationalstate;
+
+ /** . */
+ private StateString interactionState;
+
+ /** . */
+ private ParameterMap form;
+
+ /** . */
+ private int type;
+
+ public void decode(Map queryParams, Map bodyParams) throws IllegalArgumentException
+ {
+ // The meta info from the URL
+ int meta = 0;
+ String[] metaParam = (String[])queryParams.get(META_PARAMETER);
+ if (metaParam != null)
+ {
+ try
+ {
+ meta = Integer.parseInt(metaParam[0], 16);
+ }
+ catch (NumberFormatException ignore)
+ {
+ // If mask is not present then we assume that it can only be a navigation URL (NAV_TYPE)
+ }
+ }
+
+ //
+ if ((meta & (ACTION_MASK | RENDER_MASK)) != 0)
+ {
+ // Check validity
+ if ((meta & (ACTION_MASK | RENDER_MASK)) == (ACTION_MASK | RENDER_MASK))
+ {
+ throw new IllegalArgumentException("Cannot have both action and render in the mask at the same time");
+ }
+
+ //
+ if ((meta & ACTION_MASK) != 0)
+ {
+ type = ACTION_TYPE;
+ }
+ else
+ {
+ type = RENDER_TYPE;
+ }
+
+ // Get the mode from the parameters if it exists
+ if ((meta & MODE_MASK) != 0)
+ {
+ String[] modeParam = (String[])queryParams.get(MODE_PARAMETER);
+ if (modeParam == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ mode = Mode.create(modeParam[0]);
+ }
+ else
+ {
+ mode = null;
+ }
+
+ // Get the window state from the parameters if it exists
+ if ((meta & WINDOW_STATE_MASK) != 0)
+ {
+ String[] windowStateParam = (String[])queryParams.get(WINDOW_STATE_PARAMETER);
+ if (windowStateParam == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ windowState = WindowState.create(windowStateParam[0]);
+ }
+ else
+ {
+ windowState = null;
+ }
+
+ //
+ boolean opaque = (meta & OPAQUE_MASK) != 0;
+ if (!opaque)
+ {
+ // Compute the parameters skipping the portlet navigational state that may be encoded as well
+ ParametersStateString query = ParametersStateString.create();
+ for (Iterator i = queryParams.entrySet().iterator(); i.hasNext();)
+ {
+ Map.Entry entry = (Map.Entry)i.next();
+ int index = 0;
+ String name = (String)entry.getKey();
+ String[] queryValues = (String[])entry.getValue();
+
+ //
+ if (META_PARAMETER.equals(name))
+ {
+ index = 1;
+ }
+ else if ((meta & MODE_MASK) != 0 && MODE_PARAMETER.equals(name))
+ {
+ index = 1;
+ }
+ else if ((meta & WINDOW_STATE_MASK) != 0 && WINDOW_STATE_PARAMETER.equals(name))
+ {
+ index = 1;
+ }
+
+ // We have interaction param(s) in the query string
+ if (index < queryValues.length)
+ {
+ String[] values = new String[queryValues.length - index];
+ System.arraycopy(queryValues, index, values, 0, values.length);
+ query.setValues(name, values);
+ }
+ }
+
+ // Julien :
+ ParameterMap form = new ParameterMap();
+ if (bodyParams != null)
+ {
+ form.putAll(bodyParams);
+ }
+
+ //
+ if (type == ACTION_TYPE)
+ {
+ this.navigationalstate = null;
+ this.interactionState = query;
+ this.form = form;
+ }
+ else
+ {
+ this.navigationalstate = query;
+ this.interactionState = null;
+ this.form = null;
+ }
+ }
+ else
+ {
+ // Decode the navigational state
+ String[] ns = (String[])queryParams.get(NAVIGATIONAL_STATE_PARAMETER);
+ if (ns != null)
+ {
+ navigationalstate = new OpaqueStateString(ns[0]);
+ }
+ else
+ {
+ navigationalstate = null;
+ }
+
+ // Decode more if we have an action
+ if (type == ACTION_TYPE)
+ {
+ // Decode the interaction state
+ String[] is = (String[])queryParams.get(INTERACTION_STATE_PARAMETER);
+ if (is != null)
+ {
+ interactionState = new OpaqueStateString(is[0]);
+ }
+ else
+ {
+ interactionState = null;
+ }
+
+ //
+ form = new ParameterMap();
+ if (bodyParams != null)
+ {
+ form.putAll(bodyParams);
+ }
+ }
+ else
+ {
+ interactionState = null;
+ form = null;
+ }
+ }
+ }
+ else
+ {
+ // Set to nav type
+ type = NAV_TYPE;
+
+ // Get the mode from the parameters if it exists
+ String[] modeParam = (String[])queryParams.get(MODE_PARAMETER);
+ if (modeParam != null)
+ {
+ mode = Mode.create(modeParam[0]);
+ }
+ else
+ {
+ mode = null;
+ }
+
+ // Get the window state from the parameters if it exists
+ String[] windowStateParam = (String[])queryParams.get(WINDOW_STATE_PARAMETER);
+ if (windowStateParam != null)
+ {
+ windowState = WindowState.create(windowStateParam[0]);
+ }
+ else
+ {
+ windowState = null;
+ }
+ }
+ }
+
+ public Mode getMode()
+ {
+ return mode;
+ }
+
+ public WindowState getWindowState()
+ {
+ return windowState;
+ }
+
+ public StateString getNavigationalState()
+ {
+ return navigationalstate;
+ }
+
+ public StateString getInteractionState()
+ {
+ return interactionState;
+ }
+
+ public ParameterMap getForm()
+ {
+ return form;
+ }
+
+ public int getType()
+ {
+ return type;
+ }
+}
Property changes on: branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletRequestDecoder.java
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletRequestEncoder.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletRequestEncoder.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletRequestEncoder.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -0,0 +1,207 @@
+/******************************************************************************
+ * 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.faces.component.portlet;
+
+import org.jboss.portal.Mode;
+import org.jboss.portal.WindowState;
+import org.jboss.portal.common.util.ParameterMap;
+import org.jboss.portal.portlet.StateString;
+import org.jboss.portal.portlet.ParametersStateString;
+import org.jboss.portal.portlet.PortletURL;
+import org.jboss.portal.portlet.RenderURL;
+import org.jboss.portal.portlet.ActionURL;
+
+import java.util.Iterator;
+import java.util.Map;
+
+/**
+ * This class is designed to provide the encoding in the query string of a URL of the following state :
+ * <ul>
+ * <li>A set of parameters</li>
+ * <li>A mode value</li>
+ * <li>A window state value</li>
+ * <li>A invocation type (action or render)</li>
+ * </ul>
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class PortletRequestEncoder
+{
+
+ /** . */
+ private ParameterMap queryParameters;
+
+ public PortletRequestEncoder(ParameterMap queryParameters)
+ {
+ if (queryParameters == null)
+ {
+ throw new IllegalArgumentException();
+ }
+
+ //
+ this.queryParameters = queryParameters;
+ }
+
+ public PortletRequestEncoder()
+ {
+ this(new ParameterMap());
+ }
+
+ public void encodeAction(
+ StateString navigationalState,
+ StateString interactionState,
+ Mode mode,
+ WindowState windowState) throws IllegalArgumentException
+ {
+ queryParameters.clear();
+
+ //
+ int meta = PortletRequestDecoder.ACTION_MASK;
+
+ //
+ if (interactionState != null)
+ {
+ if (interactionState instanceof ParametersStateString)
+ {
+ if (navigationalState != null)
+ {
+ throw new IllegalArgumentException("Cannot handle case with both non opaque interaction and navigational state");
+ }
+
+ // Add the parameters
+ Map<String, String[]> parameters = ((ParametersStateString)interactionState).getParameters();
+ configure(parameters);
+ }
+ else
+ {
+ meta |= PortletRequestDecoder.OPAQUE_MASK;
+
+ // Set interaction state
+ queryParameters.setValue(PortletRequestDecoder.INTERACTION_STATE_PARAMETER, interactionState.getStringValue());
+
+ // We may have navigational state
+ if (navigationalState != null)
+ {
+ queryParameters.setValue(PortletRequestDecoder.NAVIGATIONAL_STATE_PARAMETER, navigationalState.getStringValue());
+ }
+ }
+ }
+
+ //
+ configure(meta, mode, windowState);
+ }
+
+ public void encodeRender(
+ StateString navigationalState,
+ Mode mode,
+ WindowState windowState)
+ {
+ queryParameters.clear();
+
+ //
+ if (navigationalState != null)
+ {
+ int meta = PortletRequestDecoder.RENDER_MASK;
+
+ //
+ if (navigationalState instanceof ParametersStateString)
+ {
+ // Add the parameters
+ Map<String, String[]> parameters = ((ParametersStateString)navigationalState).getParameters();
+ configure(parameters);
+ }
+ else
+ {
+ meta |= PortletRequestDecoder.OPAQUE_MASK;
+
+ //
+ queryParameters.setValue(PortletRequestDecoder.NAVIGATIONAL_STATE_PARAMETER, navigationalState.getStringValue());
+ }
+
+ //
+ configure(meta, mode, windowState);
+ }
+ else
+ {
+ if (mode != null)
+ {
+ queryParameters.setValue(PortletRequestDecoder.MODE_PARAMETER, mode.toString());
+ }
+
+ //
+ if (windowState != null)
+ {
+ queryParameters.setValue(PortletRequestDecoder.WINDOW_STATE_PARAMETER, windowState.toString());
+ }
+ }
+ }
+
+ public ParameterMap getQueryParameters()
+ {
+ return queryParameters;
+ }
+
+ private void configure(Map<String, String[]> parameters)
+ {
+ for (Iterator i = parameters.entrySet().iterator(); i.hasNext();)
+ {
+ Map.Entry entry = (Map.Entry)i.next();
+ String name = (String)entry.getKey();
+ String[] values = (String[])entry.getValue();
+ queryParameters.setValues(name, values);
+ }
+ }
+
+ private void configure(int meta, Mode mode, WindowState windowState)
+ {
+ if (mode != null)
+ {
+ meta |= PortletRequestDecoder.MODE_MASK;
+ setMetaParameter(PortletRequestDecoder.MODE_PARAMETER, mode.toString());
+ }
+ if (windowState != null)
+ {
+ meta |= PortletRequestDecoder.WINDOW_STATE_MASK;
+ setMetaParameter(PortletRequestDecoder.WINDOW_STATE_PARAMETER, windowState.toString());
+ }
+ setMetaParameter(PortletRequestDecoder.META_PARAMETER, Integer.toHexString(meta));
+ }
+
+ private void setMetaParameter(String name, String value)
+ {
+ String[] values = queryParameters.getValues(name);
+ if (values == null)
+ {
+ values = new String[]{value};
+ }
+ else
+ {
+ String[] tmp = new String[values.length + 1];
+ System.arraycopy(values, 0, tmp, 1, values.length);
+ tmp[0] = value;
+ values = tmp;
+ }
+ queryParameters.setValues(name, values);
+ }
+}
Modified: branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/UIPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/UIPortlet.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/UIPortlet.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -22,9 +22,24 @@
******************************************************************************/
package org.jboss.portal.faces.component.portlet;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.faces.component.UICommand;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import javax.faces.el.MethodBinding;
+import javax.faces.el.ValueBinding;
+import javax.faces.event.AbortProcessingException;
+import javax.faces.event.FacesEvent;
+import javax.faces.event.PhaseId;
+
import org.jboss.portal.Mode;
import org.jboss.portal.WindowState;
-import org.jboss.portal.common.NotYetImplemented;
import org.jboss.portal.common.util.ParameterMap;
import org.jboss.portal.faces.util.ActionEventDispatcher;
import org.jboss.portal.portlet.ParametersStateString;
@@ -32,30 +47,11 @@
import org.jboss.portal.portlet.PortletContext;
import org.jboss.portal.portlet.PortletInvoker;
import org.jboss.portal.portlet.PortletInvokerException;
-import org.jboss.portal.portlet.impl.PortletRequestDecoder;
import org.jboss.portal.portlet.invocation.response.FragmentResponse;
import org.jboss.portal.portlet.invocation.response.InsufficientPrivilegesResponse;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
import org.jboss.portal.portlet.invocation.response.UpdateNavigationalStateResponse;
-import javax.faces.component.UICommand;
-import javax.faces.context.ExternalContext;
-import javax.faces.context.FacesContext;
-import javax.faces.context.ResponseWriter;
-import javax.faces.el.MethodBinding;
-import javax.faces.el.ValueBinding;
-import javax.faces.event.AbortProcessingException;
-import javax.faces.event.FacesEvent;
-import javax.faces.event.PhaseId;
-import javax.portlet.ActionRequest;
-import javax.portlet.EventRequest;
-import javax.portlet.RenderRequest;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision$
@@ -96,7 +92,7 @@
private String onClick;
/** The internal nav state. */
- private ParameterMap internalNavState;
+ private Map<String, String[]> internalNavState;
/** The internal window state value. */
private WindowState internalWindowState;
@@ -323,12 +319,12 @@
this.internalMode = mode;
}
- void setInternalNavState(ParameterMap navState)
+ void setInternalNavState(Map<String, String[]> navState)
{
ValueBinding vb = getValueBinding("renderParameters");
if (vb != null)
{
- Map renderParameters = (Map)vb.getValue(getFacesContext());
+ Map<String, String[]> renderParameters = (Map<String, String[]>)vb.getValue(getFacesContext());
renderParameters.clear();
renderParameters.putAll(navState);
}
@@ -338,12 +334,12 @@
}
}
- ParameterMap getInternalNavState()
+ Map<String, String[]> getInternalNavState()
{
ValueBinding vb = getValueBinding("renderParameters");
if (vb != null)
{
- Map renderParameters = (Map)vb.getValue(getFacesContext());
+ Map<String, String[]> renderParameters = (Map<String, String[]>)vb.getValue(getFacesContext());
return ParameterMap.wrap(renderParameters);
}
else
@@ -473,11 +469,11 @@
// We have been targeted
if ("jbp".equals(clientIdValue))
{
- Map jsfParams = externalContext.getRequestParameterValuesMap();
- Map portletParams = new HashMap();
- for (Object o : jsfParams.entrySet())
+ @SuppressWarnings("unchecked")
+ Map<String, String[]> jsfParams = externalContext.getRequestParameterValuesMap();
+ Map<String, String[]> portletParams = new HashMap<String, String[]>();
+ for (Map.Entry<String, String[]> entry : jsfParams.entrySet())
{
- Map.Entry entry = (Map.Entry)o;
String name = (String)entry.getKey();
if (clientId.equals(name))
{
@@ -491,7 +487,7 @@
}
faces.getExternalContext().getRequest();
-
+
// Decode the request
PortletRequestDecoder decoder = new PortletRequestDecoder();
Modified: branches/JBoss_Portal_Branch_2_7/migration/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/migration/.classpath 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/migration/.classpath 2008-06-17 22:43:44 UTC (rev 11068)
@@ -7,7 +7,7 @@
<classpathentry kind="lib" path="/thirdparty/dbunit/lib/dbunit.jar"/>
<classpathentry kind="lib" path="/thirdparty/hibernate/lib/hibernate3.jar"/>
<classpathentry kind="lib" path="/thirdparty/junit/lib/junit.jar"/>
- <classpathentry kind="lib" path="/thirdparty/apache-myfaces/lib/myfaces-api.jar"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-common.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/sun-jsf/lib/jsf-api.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: branches/JBoss_Portal_Branch_2_7/server/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/server/.classpath 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/server/.classpath 2008-06-17 22:43:44 UTC (rev 11068)
@@ -13,9 +13,9 @@
<classpathentry combineaccessrules="false" kind="src" path="/jems"/>
<classpathentry kind="lib" path="/thirdparty/jboss/backport-concurrent/lib/jboss-backport-concurrent.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/common/lib/portal-common-lib.jar"/>
- <classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/web/lib/portal-web-lib.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/web/lib/portal-web-lib.jar" sourcepath="/module-web"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/test/lib/portal-test-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/test/lib/portal-test-jboss-lib.jar"/>
- <classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-lib.jar" sourcepath="/module-portlet"/>
+ <classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-lib.jar" sourcepath="/module-portlet-trunk"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/ServerInvocationContextImpl.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/ServerInvocationContextImpl.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/ServerInvocationContextImpl.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -153,7 +153,7 @@
public String getMediaType()
{
- return webReq.getMediaType();
+ return webReq.getMediaType().getValue();
}
public URLContext getURLContext()
@@ -163,7 +163,7 @@
public ParameterMap getQueryParameterMap()
{
- return webReq.getQueryParameterMap();
+ return ParameterMap.wrap(webReq.getQueryParameterMap());
}
public ParameterMap getBodyParameterMap()
@@ -173,7 +173,7 @@
//
if (body instanceof Body.Form)
{
- return ((Body.Form)body).getParameters();
+ return ParameterMap.wrap(((Body.Form)body).getParameters());
}
//
Added: branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/JBossPortletInterceptorStack.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/JBossPortletInterceptorStack.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/JBossPortletInterceptorStack.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -0,0 +1,64 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.server.impl.invocation;
+
+import org.jboss.portal.portlet.PortletInvokerInterceptor;
+
+/**
+ * @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
+ * @version $Revision$
+ */
+public class JBossPortletInterceptorStack implements PortletInterceptorStack
+{
+
+ /** . */
+ public static final PortletInterceptorStack EMPTY_STACK = new JBossPortletInterceptorStack(new PortletInvokerInterceptor[0]);
+
+ /** . */
+ private final PortletInvokerInterceptor[] interceptors;
+
+ public JBossPortletInterceptorStack(PortletInvokerInterceptor interceptor)
+ {
+ this.interceptors = new PortletInvokerInterceptor[]{interceptor};
+ }
+
+ public JBossPortletInterceptorStack(PortletInvokerInterceptor[] interceptors)
+ {
+ if (interceptors == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ this.interceptors = interceptors;
+ }
+
+ public int getLength()
+ {
+ return interceptors.length;
+ }
+
+ public PortletInvokerInterceptor getInterceptor(int index) throws ArrayIndexOutOfBoundsException
+ {
+ return interceptors[index];
+ }
+}
+
Added: branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/JBossPortletInterceptorStackFactory.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/JBossPortletInterceptorStackFactory.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/JBossPortletInterceptorStackFactory.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -0,0 +1,148 @@
+/******************************************************************************
+ * 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.server.impl.invocation;
+
+import org.jboss.portal.jems.as.system.AbstractJBossService;
+import org.jboss.portal.portlet.PortletInvokerInterceptor;
+
+import javax.management.ObjectName;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 8784 $
+ */
+public class JBossPortletInterceptorStackFactory extends AbstractJBossService implements PortletInterceptorStackFactory
+{
+
+ /** . */
+ protected List<ObjectName> interceptorNames;
+
+ /** . */
+ protected List<ObjectName> dynamicInterceptorNames;
+
+ /** . */
+ protected PortletInterceptorStack stack;
+
+ public JBossPortletInterceptorStackFactory()
+ {
+ interceptorNames = null;
+ dynamicInterceptorNames = new ArrayList<ObjectName>();
+ }
+
+ public List<ObjectName> getInterceptorNames()
+ {
+ return interceptorNames;
+ }
+
+ public void setInterceptorNames(List<ObjectName> interceptorNames)
+ {
+ this.interceptorNames = interceptorNames;
+ }
+
+ public List<ObjectName> getDynamicInterceptorNames()
+ {
+ return Collections.unmodifiableList(dynamicInterceptorNames);
+ }
+
+ /**
+ * Add's the supplied name to the list of interceptor names.
+ *
+ * @param name the intercptor's ObjectName.
+ * @throws Exception
+ */
+ public void addInterceptor(ObjectName name) throws Exception
+ {
+ dynamicInterceptorNames.add(name);
+ }
+
+ /**
+ * Remove's the supplied name from the list of interceptor names.
+ *
+ * @param name the intercptor's ObjectName.
+ * @throws Exception
+ */
+ public void removeInterceptor(ObjectName name) throws Exception
+ {
+ dynamicInterceptorNames.remove(name);
+ }
+
+ public void startService() throws Exception
+ {
+ rebuild();
+ }
+
+ /** Rebuild the interceptor stack. */
+ public void rebuild() throws Exception
+ {
+ List<ObjectName> names = new ArrayList<ObjectName>();
+
+ //
+ if (interceptorNames != null)
+ {
+ names.addAll(interceptorNames);
+ }
+
+ //
+ names.addAll(dynamicInterceptorNames);
+
+ //
+ log.debug("Building interceptor stack " + getName());
+ PortletInvokerInterceptor[] interceptors = new PortletInvokerInterceptor[names.size()];
+ if (names.size() == 1)
+ {
+ ObjectName name = (ObjectName)names.get(0);
+ log.debug("Adding interceptor " + name + " to the stack");
+ PortletInvokerInterceptor a = (PortletInvokerInterceptor)server.getAttribute(name, "ManagedResource");
+ interceptors[0] = a;
+ }
+ for (int i = 0; i < names.size()-1; i++)
+ {
+ ObjectName name = (ObjectName)names.get(i);
+ log.debug("Adding interceptor " + name + " to the stack");
+ PortletInvokerInterceptor a = (PortletInvokerInterceptor)server.getAttribute(name, "ManagedResource");
+ name = (ObjectName)names.get(i+1);
+ log.debug("Adding interceptor " + name + " to the stack");
+ PortletInvokerInterceptor b = (PortletInvokerInterceptor)server.getAttribute(name, "ManagedResource");
+ a.setNext(b);
+ interceptors[i] = a;
+ interceptors[i+1] = b;
+ }
+
+ //
+ stack = new JBossPortletInterceptorStack(interceptors);
+
+ }
+
+ public void stopService()
+ {
+ this.stack = JBossPortletInterceptorStack.EMPTY_STACK;
+ }
+
+ public PortletInterceptorStack getInterceptorStack()
+ {
+ return stack;
+ }
+}
Added: branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/PortletInterceptorStack.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/PortletInterceptorStack.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/PortletInterceptorStack.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -0,0 +1,52 @@
+/******************************************************************************
+ * 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.server.impl.invocation;
+
+import org.jboss.portal.common.invocation.Interceptor;
+import org.jboss.portal.portlet.PortletInvokerInterceptor;
+
+/**
+ * @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
+ * @version $Revision$
+ */
+public interface PortletInterceptorStack
+{
+ /**
+ * Returns the stack length.
+ *
+ * @return the length
+ */
+ int getLength();
+
+ /**
+ * Return the interceptor at the specified index.
+ *
+ * @param index the interceptor index in the stack
+ * @return the specified interceptor
+ * @throws ArrayIndexOutOfBoundsException if the index is not valid
+ */
+ PortletInvokerInterceptor getInterceptor(int index) throws ArrayIndexOutOfBoundsException;
+
+
+}
+
Added: branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/PortletInterceptorStackFactory.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/PortletInterceptorStackFactory.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/PortletInterceptorStackFactory.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -0,0 +1,34 @@
+/******************************************************************************
+ * 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.server.impl.invocation;
+
+/**
+ * @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
+ * @version $Revision$
+ */
+public interface PortletInterceptorStackFactory
+{
+ PortletInterceptorStack getInterceptorStack();
+
+}
+
Modified: branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/servlet/PortalServlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/servlet/PortalServlet.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/servlet/PortalServlet.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -41,6 +41,8 @@
import org.jboss.portal.server.impl.ServerInvocationContextImpl;
import org.jboss.portal.server.request.URLContext;
import org.jboss.portal.web.WebRequest;
+import org.jboss.portal.web.endpoint.EndPointRequest;
+import org.jboss.portal.web.endpoint.EndPointServlet;
import javax.management.MBeanServer;
import javax.management.ObjectName;
@@ -206,7 +208,7 @@
URLContext urlContext = URLContext.newInstance(req.isSecure(), req.getRemoteUser() != null);
//
- WebRequest webReq = new WebRequest(req);
+ WebRequest webReq = new EndPointRequest(req, portalRequestPath, portalContextPath, EndPointServlet.ROOT_PATH_MAPPING);
// ***************
// ***************
Modified: branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/test/theme/ObjectURL.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/test/theme/ObjectURL.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/test/theme/ObjectURL.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -22,6 +22,8 @@
******************************************************************************/
package org.jboss.portal.test.theme;
+import org.jboss.portal.common.text.CharBuffer;
+import org.jboss.portal.common.text.CharWriter;
import org.jboss.portal.common.text.FastURLEncoder;
import org.jboss.portal.common.util.IteratorStatus;
import org.jboss.portal.test.theme.model.RenderedObject;
@@ -61,7 +63,7 @@
public String toString()
{
- StringBuffer url = new StringBuffer();
+ CharWriter url = new CharBuffer();
//
url.append(requestContext.request.getContextPath());
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/.classpath 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/.classpath 2008-06-17 22:43:44 UTC (rev 11068)
@@ -25,7 +25,6 @@
<classpathentry combineaccessrules="false" kind="src" path="/core"/>
<classpathentry combineaccessrules="false" kind="src" path="/registration"/>
<classpathentry kind="lib" path="/thirdparty/hibernate/lib/hibernate3.jar"/>
- <classpathentry kind="lib" path="/thirdparty/apache-myfaces/lib/myfaces-api.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/common/lib/portal-common-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/web/lib/portal-web-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/test/lib/portal-test-lib.jar"/>
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/framework/support/BasicUserContext.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/framework/support/BasicUserContext.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/framework/support/BasicUserContext.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -26,6 +26,7 @@
import org.jboss.portal.portlet.spi.UserContext;
import java.util.Collections;
+import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
@@ -38,6 +39,8 @@
*/
public class BasicUserContext implements UserContext
{
+ /** . */
+ private Map<String, Object> attributes;
public String getId()
{
@@ -58,4 +61,23 @@
{
return Collections.singletonList(getLocale());
}
+
+ public Object getAttribute(String arg0)
+ {
+ if (attributes != null)
+ {
+ return attributes.get(arg0);
+ }
+ return null;
+ }
+
+ public void setAttribute(String arg0, Object arg1)
+ {
+ if (attributes == null)
+ {
+ attributes = new HashMap<String, Object>();
+ }
+ attributes.put(arg0, arg1);
+ }
+
}
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/framework/support/TestPortletInvocationContext.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/framework/support/TestPortletInvocationContext.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/framework/support/TestPortletInvocationContext.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -65,8 +65,6 @@
new MockHttpServletRequest(session));
mockResponse = (HttpServletResponse)Proxy.newProxyInstance(classLoader, new Class[]{HttpServletResponse.class},
new MockHttpServletResponse());
-
- addResolver(PortletInvocation.REQUEST_SCOPE, new RequestAttributeResolver(mockRequest));
}
public void setMockRequest(HttpServletRequest mockRequest)
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/UserContextConverter.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/UserContextConverter.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/UserContextConverter.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -152,6 +152,7 @@
private String[] desiredLocales;
private Locale locale;
private String id;
+ private Map<String, Object> attributes;
public WSRPMappedUserContext(org.jboss.portal.wsrp.core.UserContext userContext, String[] desiredLocales, String preferredLocale)
{
@@ -287,5 +288,23 @@
return Collections.EMPTY_LIST;
}
}
+
+ public Object getAttribute(String arg0)
+ {
+ if (attributes != null)
+ {
+ return attributes.get(arg0);
+ }
+ return null;
+ }
+
+ public void setAttribute(String arg0, Object arg1)
+ {
+ if (attributes == null)
+ {
+ attributes = new HashMap<String, Object>();
+ }
+ attributes.put(arg0, arg1);
+ }
}
}
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/aspects/portlet/DumpInterceptor.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/aspects/portlet/DumpInterceptor.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/aspects/portlet/DumpInterceptor.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -22,8 +22,10 @@
******************************************************************************/
package org.jboss.portal.wsrp.aspects.portlet;
-import org.jboss.portal.portlet.invocation.PortletInterceptor;
+import org.jboss.portal.portlet.PortletInvokerException;
+import org.jboss.portal.portlet.PortletInvokerInterceptor;
import org.jboss.portal.portlet.invocation.PortletInvocation;
+import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
@@ -32,13 +34,14 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision$
*/
-public class DumpInterceptor extends PortletInterceptor
+public class DumpInterceptor extends PortletInvokerInterceptor
{
- protected Object invoke(PortletInvocation invocation) throws Exception
+ public PortletInvocationResponse invoke(PortletInvocation invocation) throws IllegalArgumentException, PortletInvokerException
{
HttpServletRequest drq = invocation.getDispatchedRequest();
HttpSession session = drq.getSession();
System.out.println("DumpInterceptor: session.getId() = " + session.getId());
- return invocation.invokeNext();
+
+ return super.invoke(invocation);
}
}
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/ActionHandler.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/ActionHandler.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/ActionHandler.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -173,7 +173,7 @@
else
{
// if the content is not multipart, then check for form parameters
- ParameterMap params = actionInvocation.getForm();
+ Map<String, String[]> params = actionInvocation.getForm();
if (params != null && !params.isEmpty())
{
int capacity = params.size();
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/WSRPConsumerImpl.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/WSRPConsumerImpl.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/WSRPConsumerImpl.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -304,7 +304,9 @@
Property prop = props[i];
String name = prop.getName();
String value = prop.getStringValue();
- result.put(name, new StringValue(value)); // todo: is that all?!?
+ List<String> list = new ArrayList<String>();
+ list.add(value);
+ result.put(name, list); // todo: is that all?!?
}
return result;
@@ -356,7 +358,7 @@
case PropertyChange.PREF_UPDATE:
// todo: deal with language more appropriately
updates.add(WSRPTypeFactory.createProperty(change.getKey(),
- WSRPUtils.toString(Locale.getDefault()), change.getValue().asString()));
+ WSRPUtils.toString(Locale.getDefault()), change.getValue().get(0)));
break;
default:
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/portlet/info/WSRPPortletInfo.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/portlet/info/WSRPPortletInfo.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/portlet/info/WSRPPortletInfo.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -50,6 +50,7 @@
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
@@ -640,5 +641,10 @@
// in the protocol
return null;
}
+
+ public List<String> getDefaultValue()
+ {
+ return null;
+ }
}
}
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/PortletManagementHandler.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/PortletManagementHandler.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/PortletManagementHandler.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -295,7 +295,7 @@
SOAPElement[] values = property.get_any();
String lang = property.getLang(); // todo: deal with language?
- changes.add(PropertyChange.newUpdate(property.getName(), new StringValue(value)));
+ changes.add(PropertyChange.newUpdate(property.getName(), value));
}
}
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/WSRPPortletInvocationContext.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/WSRPPortletInvocationContext.java 2008-06-17 22:21:24 UTC (rev 11067)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/WSRPPortletInvocationContext.java 2008-06-17 22:43:44 UTC (rev 11068)
@@ -84,10 +84,6 @@
request = ServletAccess.getRequest();
response = ServletAccess.getResponse();
-
- //
- addResolver(PortletInvocation.INVOCATION_SCOPE, new MapAttributeResolver());
- addResolver(PortletInvocation.REQUEST_SCOPE, new RequestAttributeResolver(ServletAccess.getRequest()));
}
public HttpServletRequest getClientRequest()
17 years, 10 months