JBoss Portal SVN: r11664 - in branches/JBoss_Portal_Branch_2_7/server: src/main/org/jboss/portal/server and 2 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-07-31 11:05:09 -0400 (Thu, 31 Jul 2008)
New Revision: 11664
Added:
branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/Main.java
branches/JBoss_Portal_Branch_2_7/server/src/resources/etc/
branches/JBoss_Portal_Branch_2_7/server/src/resources/etc/MANIFEST.MF
Removed:
branches/JBoss_Portal_Branch_2_7/server/src/resources/etc/MANIFEST.MF
Modified:
branches/JBoss_Portal_Branch_2_7/server/.classpath
branches/JBoss_Portal_Branch_2_7/server/build.xml
Log:
java -jar portal-server-lib.jar will display the portal version (portal-common-lib.jar must live in the same folder)
Modified: branches/JBoss_Portal_Branch_2_7/server/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/server/.classpath 2008-07-31 15:01:35 UTC (rev 11663)
+++ branches/JBoss_Portal_Branch_2_7/server/.classpath 2008-07-31 15:05:09 UTC (rev 11664)
@@ -10,7 +10,7 @@
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-system.jar"/>
<classpathentry kind="lib" path="/thirdparty/junit/lib/junit.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/jems"/>
- <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-lib.jar" sourcepath="/module-common"/>
<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"/>
Modified: branches/JBoss_Portal_Branch_2_7/server/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/server/build.xml 2008-07-31 15:01:35 UTC (rev 11663)
+++ branches/JBoss_Portal_Branch_2_7/server/build.xml 2008-07-31 15:05:09 UTC (rev 11664)
@@ -169,9 +169,9 @@
<mkdir dir="${build.lib}"/>
<!-- -->
- <jar jarfile="${build.lib}/portal-server-lib.jar">
+ <jar jarfile="${build.lib}/portal-server-lib.jar" manifest="${build.resources}/etc/MANIFEST.MF">
<fileset dir="${build.classes}" excludes="org/jboss/portal/test/**"/>
- </jar>
+ </jar>
<copy todir="${build.resources}/portal-server-sar">
<fileset dir="${jboss.portal/modules/common.lib}" includes="portal-common-lib.jar"/>
Copied: branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/Main.java (from rev 11663, branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/Main.java)
===================================================================
--- branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/Main.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/Main.java 2008-07-31 15:05:09 UTC (rev 11664)
@@ -0,0 +1,44 @@
+/******************************************************************************
+ * 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;
+
+import org.jboss.portal.common.util.Version.Format;
+
+/**
+ * @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
+ * @version $Revision$
+ */
+public class Main
+{
+
+ /** FIXME Comment this
+ *
+ * @param args
+ */
+ public static void main(String[] args)
+ {
+ System.out.println(PortalConstants.VERSION.toString(Format.JBOSS_PRODUCT_CONVENTION));
+ }
+
+}
+
Copied: branches/JBoss_Portal_Branch_2_7/server/src/resources/etc (from rev 11663, branches/JBoss_Portal_Branch_2_6/server/src/resources/etc)
Deleted: branches/JBoss_Portal_Branch_2_7/server/src/resources/etc/MANIFEST.MF
===================================================================
--- branches/JBoss_Portal_Branch_2_6/server/src/resources/etc/MANIFEST.MF 2008-07-31 15:01:35 UTC (rev 11663)
+++ branches/JBoss_Portal_Branch_2_7/server/src/resources/etc/MANIFEST.MF 2008-07-31 15:05:09 UTC (rev 11664)
@@ -1,2 +0,0 @@
-Main-Class: org.jboss.portal.server.Main
-Class-Path: portal-common-lib.jar
\ No newline at end of file
Copied: branches/JBoss_Portal_Branch_2_7/server/src/resources/etc/MANIFEST.MF (from rev 11663, branches/JBoss_Portal_Branch_2_6/server/src/resources/etc/MANIFEST.MF)
===================================================================
--- branches/JBoss_Portal_Branch_2_7/server/src/resources/etc/MANIFEST.MF (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/server/src/resources/etc/MANIFEST.MF 2008-07-31 15:05:09 UTC (rev 11664)
@@ -0,0 +1,2 @@
+Main-Class: org.jboss.portal.server.Main
+Class-Path: portal-common-lib.jar
\ No newline at end of file
15 years, 9 months
JBoss Portal SVN: r11663 - in branches/JBoss_Portal_Branch_2_6/server: src/main/org/jboss/portal/server and 2 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-07-31 11:01:35 -0400 (Thu, 31 Jul 2008)
New Revision: 11663
Added:
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/Main.java
branches/JBoss_Portal_Branch_2_6/server/src/resources/etc/
branches/JBoss_Portal_Branch_2_6/server/src/resources/etc/MANIFEST.MF
Modified:
branches/JBoss_Portal_Branch_2_6/server/.classpath
branches/JBoss_Portal_Branch_2_6/server/build.xml
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/PortalConstants.java
Log:
java -jar portal-server-lib.jar will display the portal version (portal-common-lib.jar must live in the same folder)
Modified: branches/JBoss_Portal_Branch_2_6/server/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_6/server/.classpath 2008-07-31 12:43:55 UTC (rev 11662)
+++ branches/JBoss_Portal_Branch_2_6/server/.classpath 2008-07-31 15:01:35 UTC (rev 11663)
@@ -12,7 +12,7 @@
<classpathentry kind="lib" path="/thirdparty/junit/lib/junit.jar"/>
<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/common/lib/portal-common-lib.jar" sourcepath="/module-common"/>
<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"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/test/lib/portal-test-jboss-lib.jar"/>
Modified: branches/JBoss_Portal_Branch_2_6/server/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/server/build.xml 2008-07-31 12:43:55 UTC (rev 11662)
+++ branches/JBoss_Portal_Branch_2_6/server/build.xml 2008-07-31 15:01:35 UTC (rev 11663)
@@ -168,9 +168,9 @@
<mkdir dir="${build.lib}"/>
<!-- -->
- <jar jarfile="${build.lib}/portal-server-lib.jar">
+ <jar jarfile="${build.lib}/portal-server-lib.jar" manifest="${build.resources}/etc/MANIFEST.MF">
<fileset dir="${build.classes}" excludes="org/jboss/portal/test/**"/>
- </jar>
+ </jar>
<copy todir="${build.resources}/portal-server-sar">
<fileset dir="${jboss.portal/modules/common.lib}" includes="portal-common-lib.jar"/>
Added: branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/Main.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/Main.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/Main.java 2008-07-31 15:01:35 UTC (rev 11663)
@@ -0,0 +1,44 @@
+/******************************************************************************
+ * 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;
+
+import org.jboss.portal.common.util.Version.Format;
+
+/**
+ * @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
+ * @version $Revision$
+ */
+public class Main
+{
+
+ /** FIXME Comment this
+ *
+ * @param args
+ */
+ public static void main(String[] args)
+ {
+ System.out.println(PortalConstants.VERSION.toString(Format.JBOSS_PRODUCT_CONVENTION));
+ }
+
+}
+
Modified: branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/PortalConstants.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/PortalConstants.java 2008-07-31 12:43:55 UTC (rev 11662)
+++ branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/PortalConstants.java 2008-07-31 15:01:35 UTC (rev 11663)
@@ -36,7 +36,7 @@
{
/** Current version. */
- public static final Version VERSION = new Version("JBoss Portal", 2, 6, 5, new Version.Qualifier(Version.Qualifier.Prefix.GA), "Ninja");
+ public static final Version VERSION = new Version("JBoss Portal", 2, 6, 7, new Version.Qualifier(Version.Qualifier.Prefix.SNAPSHOT), "Ninja");
/** The default portal name. */
public static final String DEFAULT_PORTAL_NAME = "default";
Added: branches/JBoss_Portal_Branch_2_6/server/src/resources/etc/MANIFEST.MF
===================================================================
--- branches/JBoss_Portal_Branch_2_6/server/src/resources/etc/MANIFEST.MF (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/server/src/resources/etc/MANIFEST.MF 2008-07-31 15:01:35 UTC (rev 11663)
@@ -0,0 +1,2 @@
+Main-Class: org.jboss.portal.server.Main
+Class-Path: portal-common-lib.jar
\ No newline at end of file
15 years, 9 months
JBoss Portal SVN: r11662 - in branches/JBoss_Portal_Branch_2_6/core-cms/src: resources/portal-cms-war/WEB-INF/classes and 1 other directory.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-07-31 08:43:55 -0400 (Thu, 31 Jul 2008)
New Revision: 11662
Modified:
branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/core/cms/ui/CMSPortlet.java
branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource.properties
branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource_de.properties
branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource_fr.properties
Log:
JBPORTAL-2097: CMS access restricted files and missing files error message should be i18n
Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/core/cms/ui/CMSPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/core/cms/ui/CMSPortlet.java 2008-07-30 21:49:18 UTC (rev 11661)
+++ branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/core/cms/ui/CMSPortlet.java 2008-07-31 12:43:55 UTC (rev 11662)
@@ -55,6 +55,7 @@
import java.io.PrintWriter;
import java.lang.reflect.UndeclaredThrowableException;
import java.util.Locale;
+import java.util.ResourceBundle;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -289,7 +290,8 @@
}
else
{
- sHTML = "<h2>404 - Page Not Found</h2>Oops! We can't really find the resource you're looking for.";
+ ResourceBundle rb = getPortletConfig().getResourceBundle(req.getLocale());
+ sHTML = "<h2>" + rb.getString("CMS_MISSING_DOCUMENT") + "</h2>" + rb.getString("CMS_MISSING_DOCUMENT_DESCRIPTION");
}
PrintWriter writer = resp.getWriter();
@@ -303,13 +305,14 @@
resp.setContentType("text/html");
PrintWriter writer = resp.getWriter();
String sHTML = "";
+ ResourceBundle rb = getPortletConfig().getResourceBundle(req.getLocale());
if (path == null || path.trim().length() == 0)
{
- sHTML = "<h2>Access Denied</h2>You are not allowed to access the following resource";
+ sHTML = "<h2>" + rb.getString("CMS_ACCESS_DENIED")+ "</h2>" + rb.getString("CMS_ACCESS_DENIED_DESCRIPTION");
}
else
{
- sHTML = "<h2>Access Denied</h2>You are not allowed to access the following resource - " + path;
+ sHTML = "<h2>" + rb.getString("CMS_ACCESS_DENIED")+ "</h2>" + rb.getString("CMS_ACCESS_DENIED_DESCRIPTION_PATH") + " - " + path;
}
writer.write(sHTML);
writer.close();
Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource.properties 2008-07-30 21:49:18 UTC (rev 11661)
+++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource.properties 2008-07-31 12:43:55 UTC (rev 11662)
@@ -131,3 +131,12 @@
CMS_ADMIN_SELECT_ROLES=Select Roles that have access to this node.
CMS_ADMIN_SELECT_USERS=Select Users that have access to this node.
CMS_ADMIN_YOU_CAN_SELECT_CTRL_ROLES=You may select multiple roles by using CTRL+click on the role names.
+
+CMS_ACCESS_DENIED=Access Denied
+CMS_ACCESS_DENIED_DESCRIPTION=You are not allowed to access this resource
+CMS_ACCESS_DENIED_DESCRIPTION_PATH=You are not allowed to access the resource
+
+CMS_MISSING_DOCUMENT=404 - Page Not Found
+CMS_MISSING_DOCUMENT_DESCRIPTION=The document you tried to access is not available
+
+
Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource_de.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource_de.properties 2008-07-30 21:49:18 UTC (rev 11661)
+++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource_de.properties 2008-07-31 12:43:55 UTC (rev 11662)
@@ -122,3 +122,11 @@
CMS_TO_MODIFY=Um das Verhalten dieses Portlets zu modifizieren,
CMS_CLICK_HERE=bitte hier klicken
+
+CMS_ACCESS_DENIED=Zugriff verweigert
+CMS_ACCESS_DENIED_DESCRIPTION=Sie sind nicht berechtigt, auf dieses Element zuzugreifen
+CMS_ACCESS_DENIED_DESCRIPTION_PATH=Sie sind nicht berechtigt, auf folgendes Element zuzugreifen
+
+CMS_MISSING_DOCUMENT=404 - Seite nicht gefunden
+CMS_MISSING_DOCUMENT_DESCRIPTION=Das von ihnen angeforderte Dokument ist nicht verf�gbar
+
Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource_fr.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource_fr.properties 2008-07-30 21:49:18 UTC (rev 11661)
+++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource_fr.properties 2008-07-31 12:43:55 UTC (rev 11662)
@@ -152,3 +152,10 @@
TITLE_UPLOAD = T\u00E9l\u00E9d\u00E9verser un fichier
TITLE_VIEWFILE = Propri\u00E9t\u00E9s du fichier
+
+CMS_ACCESS_DENIED=Acc\u00E9s interdit
+CMS_ACCESS_DENIED_DESCRIPTION=Vous n'\u00eates pas autoris\u00E9 \u00e0 acc\u00e9der a ce document
+CMS_ACCESS_DENIED_DESCRIPTION_PATH=Vous n'\u00eates pas autoris\u00E9 \u00e0 acc\u00e9der au document
+
+CMS_MISSING_DOCUMENT=404 - Page non trouv\u00E9e
+CMS_MISSING_DOCUMENT_DESCRIPTION=Le document auquel vous avez tent\u00E9 d'acc\u00E9der est introuvable
15 years, 9 months
JBoss Portal SVN: r11661 - branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/jsf/consumers.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2008-07-30 17:49:18 -0400 (Wed, 30 Jul 2008)
New Revision: 11661
Modified:
branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/jsf/consumers/editConsumer.xhtml
Log:
- Fix problem with facelets...
Modified: branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/jsf/consumers/editConsumer.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/jsf/consumers/editConsumer.xhtml 2008-07-30 20:53:42 UTC (rev 11660)
+++ branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/jsf/consumers/editConsumer.xhtml 2008-07-30 21:49:18 UTC (rev 11661)
@@ -91,15 +91,15 @@
</tr>
<c:forEach items="#{consumer.producerInfo.registrationInfo.registrationProperties}"
var="prop">
- <tr title="#{prop.description.label.value}">
- <td>#{prop.name}</td>
- <td>#{prop.description.label.value}</td>
+ <tr title="#{prop.value.description.label.value}">
+ <td>#{prop.value.name}</td>
+ <td>#{prop.value.description.label.value}</td>
<td>
- <h:inputText value="#{prop.value}" size="50"
+ <h:inputText value="#{prop.value.value}" size="50"
valueChangeListener="#{consumer.regPropListener}"
disabled="#{consumer.registrationModified}"/>
- <h:outputText styleClass="portlet-msg-error" value="#{prop.status}"
- rendered="#{prop.determinedInvalid}"
+ <h:outputText styleClass="portlet-msg-error" value="#{prop.value.status}"
+ rendered="#{prop.value.determinedInvalid}"
converter="faces.convert.RegistrationProperty.Status"/>
</td>
</tr>
@@ -137,13 +137,13 @@
</tr>
<c:forEach items="#{consumer.expectedRegistrationInfo.registrationProperties}" var="prop">
- <tr title="#{prop.description.label.value}">
- <td>#{prop.name}</td>
- <td>#{prop.description.label.value}</td>
+ <tr title="#{prop.value.description.label.value}">
+ <td>#{prop.value.name}</td>
+ <td>#{prop.value.description.label.value}</td>
<td>
- <h:inputText value="#{prop.value}" size="50"/>
- <h:outputText styleClass="portlet-msg-error" value="#{prop.status}"
- rendered="#{prop.determinedInvalid}"
+ <h:inputText value="#{prop.value.value}" size="50"/>
+ <h:outputText styleClass="portlet-msg-error" value="#{prop.value.status}"
+ rendered="#{prop.value.determinedInvalid}"
converter="faces.convert.RegistrationProperty.Status"/>
</td>
</tr>
15 years, 9 months
JBoss Portal SVN: r11660 - modules/web/trunk/web/src/test.
by portal-commits@lists.jboss.org
Author: mwringe
Date: 2008-07-30 16:53:42 -0400 (Wed, 30 Jul 2008)
New Revision: 11660
Modified:
modules/web/trunk/web/src/test/build.xml
Log:
Fix maven.test.skip behaviour to not run any parts of the tests.
Modified: modules/web/trunk/web/src/test/build.xml
===================================================================
--- modules/web/trunk/web/src/test/build.xml 2008-07-30 18:36:14 UTC (rev 11659)
+++ modules/web/trunk/web/src/test/build.xml 2008-07-30 20:53:42 UTC (rev 11660)
@@ -1,8 +1,12 @@
<?xml version="1.0"?>
<project name="identity-test">
+
+ <target name="tests" unless="maven.test.skip">
+ <antcall target="_tests"/>
+ </target>
+
+ <target name="_tests" depends="prepare_env, evaluate_properties" unless="maven.test.skip">
- <target name="tests" depends="prepare_env, evaluate_properties" unless="maven.test.skip">
-
<echo message="compile classpath: ${compile_classpath}"/>
<echo message="runtime classpath: ${runtime_classpath}"/>
<echo message="test classpath: ${test_classpath}"/>
15 years, 9 months
JBoss Portal SVN: r11659 - in tags/JBoss_Portal_2_7_0_BETA1/core-admin/src: resources/portal-admin-war/jsf/common and 1 other directory.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-07-30 14:36:14 -0400 (Wed, 30 Jul 2008)
New Revision: 11659
Modified:
tags/JBoss_Portal_2_7_0_BETA1/core-admin/src/main/org/jboss/portal/core/admin/ui/AdminPropertyResolver.java
tags/JBoss_Portal_2_7_0_BETA1/core-admin/src/resources/portal-admin-war/jsf/common/showPortletDetails.xhtml
Log:
Suddenly JSF+Facelets doesn't like Collections anymore...
Modified: tags/JBoss_Portal_2_7_0_BETA1/core-admin/src/main/org/jboss/portal/core/admin/ui/AdminPropertyResolver.java
===================================================================
--- tags/JBoss_Portal_2_7_0_BETA1/core-admin/src/main/org/jboss/portal/core/admin/ui/AdminPropertyResolver.java 2008-07-30 18:29:36 UTC (rev 11658)
+++ tags/JBoss_Portal_2_7_0_BETA1/core-admin/src/main/org/jboss/portal/core/admin/ui/AdminPropertyResolver.java 2008-07-30 18:36:14 UTC (rev 11659)
@@ -47,8 +47,10 @@
import org.jboss.portal.portlet.Portlet;
import org.jboss.portal.portlet.PortletInvokerException;
import org.jboss.portal.portlet.TransportGuarantee;
+import org.jboss.portal.portlet.info.EventInfo;
import org.jboss.portal.portlet.info.MetaInfo;
import org.jboss.portal.portlet.info.ModeInfo;
+import org.jboss.portal.portlet.info.ParameterInfo;
import org.jboss.portal.portlet.info.PortletInfo;
import org.jboss.portal.portlet.info.WindowStateInfo;
import org.jboss.portal.security.AuthorizationDomainRegistry;
@@ -63,6 +65,8 @@
import javax.faces.context.FacesContext;
import javax.faces.el.PropertyResolver;
import javax.faces.model.SelectItem;
+import javax.xml.namespace.QName;
+
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -236,6 +240,70 @@
}
}
});
+ portletDecorator.setProperty("preferenceKeys", new AbstractPropertyDecorator(List.class)
+ {
+ public Object getValue(Object bean) throws IllegalArgumentException
+ {
+ Portlet portlet = (Portlet)bean;
+ Set<String> pk = portlet.getInfo().getPreferences().getKeys();
+ if (pk != null)
+ {
+ return new ArrayList<String>(pk);
+ }
+ else
+ {
+ return Collections.emptyList();
+ }
+ }
+ });
+ portletDecorator.setProperty("publicParameters", new AbstractPropertyDecorator(List.class)
+ {
+ public Object getValue(Object bean) throws IllegalArgumentException
+ {
+ Portlet portlet = (Portlet)bean;
+ Collection<? extends ParameterInfo> pp = portlet.getInfo().getNavigation().getPublicParameters();
+ if (pp != null)
+ {
+ return new ArrayList<ParameterInfo>(pp);
+ }
+ else
+ {
+ return Collections.emptyList();
+ }
+ }
+ });
+ portletDecorator.setProperty("consumedEvents", new AbstractPropertyDecorator(List.class)
+ {
+ public Object getValue(Object bean) throws IllegalArgumentException
+ {
+ Portlet portlet = (Portlet)bean;
+ Map<QName, ? extends EventInfo> ce = portlet.getInfo().getEventing().getConsumedEvents();
+ if (ce != null)
+ {
+ return new ArrayList<EventInfo>(ce.values());
+ }
+ else
+ {
+ return Collections.emptyList();
+ }
+ }
+ });
+ portletDecorator.setProperty("producedEvents", new AbstractPropertyDecorator(List.class)
+ {
+ public Object getValue(Object bean) throws IllegalArgumentException
+ {
+ Portlet portlet = (Portlet)bean;
+ Map<QName, ? extends EventInfo> pe = portlet.getInfo().getEventing().getProducedEvents();
+ if (pe != null)
+ {
+ return new ArrayList<EventInfo>(pe.values());
+ }
+ else
+ {
+ return Collections.emptyList();
+ }
+ }
+ });
portletDecorator.setProperty("smallIconLocation", new PortletIconPropertyDecorator(PortletIconInfo.SMALL));
portletDecorator.setProperty("largeIconLocation", new PortletIconPropertyDecorator(PortletIconInfo.LARGE));
registerDecorator(Portlet.class, portletDecorator);
Modified: tags/JBoss_Portal_2_7_0_BETA1/core-admin/src/resources/portal-admin-war/jsf/common/showPortletDetails.xhtml
===================================================================
--- tags/JBoss_Portal_2_7_0_BETA1/core-admin/src/resources/portal-admin-war/jsf/common/showPortletDetails.xhtml 2008-07-30 18:29:36 UTC (rev 11658)
+++ tags/JBoss_Portal_2_7_0_BETA1/core-admin/src/resources/portal-admin-war/jsf/common/showPortletDetails.xhtml 2008-07-30 18:36:14 UTC (rev 11659)
@@ -98,7 +98,7 @@
<portal:box class="whiteWithLtGreyHeader meta-box">
<h3>#{bundle.PREFERENCES}</h3>
<dl>
- <c:forEach var="preferenceKey" items="#{portlet.info.preferences.keys}">
+ <c:forEach var="preferenceKey" items="#{portlet.preferenceKeys}">
<dt>
#{preferenceKey}
</dt>
@@ -111,12 +111,12 @@
<portal:box class="whiteWithLtGreyHeader meta-box">
<h3>#{bundle.COMMON_PUBLIC_RENDER_PARAMETERS}</h3>
<dl>
- <c:forEach var="publicParam" items="#{portlet.info.navigation.publicParameters}">
+ <c:forEach var="publicParam" items="#{portlet.publicParameters}">
<dt>
#{publicParam.name}
</dt>
<dd>
- <span><label>#{bundle.COMMON_ID}: </label>#{publicParam.id}</span> <span><label>#{bundle.COMMON_DESCRIPTION}: </label>#{publicParam.description}</span>
+ <span><label>#{bundle.COMMON_ID}: </label>#{publicParam.id}</span> <span><label>#{bundle.COMMON_DESCRIPTION}: </label>#{publicParam.description.defaultString}</span>
</dd>
</c:forEach>
</dl>
@@ -201,9 +201,9 @@
<h3>#{bundle.COMMON_PRODUCED_EVENTS}</h3>
<dl>
- <c:forEach var="producedEvent" items="#{portlet.info.eventing.producedEvents}">
+ <c:forEach var="producedEvent" items="#{portlet.producedEvents}">
<dt>
- #{producedEvent.value}
+ #{producedEvent.displayName.defaultString}
</dt>
<dd>
@@ -214,9 +214,9 @@
<portal:box class="whiteWithLtGreyHeader meta-box">
<h3>#{bundle.COMMON_CONSUMED_EVENTS}</h3>
<dl>
- <c:forEach var="consumedEvent" items="#{portlet.info.eventing.consumedEvents}">
+ <c:forEach var="consumedEvent" items="#{portlet.consumedEvents}">
<dt>
- #{consumedEvent.value}
+ #{consumedEvent.displayName.defaultString}
</dt>
<dd>
15 years, 9 months
JBoss Portal SVN: r11658 - in branches/JBoss_Portal_Branch_2_7/core-admin/src: resources/portal-admin-war/jsf/common and 1 other directory.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-07-30 14:29:36 -0400 (Wed, 30 Jul 2008)
New Revision: 11658
Modified:
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/AdminPropertyResolver.java
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/showPortletDetails.xhtml
Log:
Suddenly JSF+Facelets doesn't like Collections anymore...
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/AdminPropertyResolver.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/AdminPropertyResolver.java 2008-07-30 16:08:41 UTC (rev 11657)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/AdminPropertyResolver.java 2008-07-30 18:29:36 UTC (rev 11658)
@@ -47,8 +47,10 @@
import org.jboss.portal.portlet.Portlet;
import org.jboss.portal.portlet.PortletInvokerException;
import org.jboss.portal.portlet.TransportGuarantee;
+import org.jboss.portal.portlet.info.EventInfo;
import org.jboss.portal.portlet.info.MetaInfo;
import org.jboss.portal.portlet.info.ModeInfo;
+import org.jboss.portal.portlet.info.ParameterInfo;
import org.jboss.portal.portlet.info.PortletInfo;
import org.jboss.portal.portlet.info.WindowStateInfo;
import org.jboss.portal.security.AuthorizationDomainRegistry;
@@ -63,6 +65,8 @@
import javax.faces.context.FacesContext;
import javax.faces.el.PropertyResolver;
import javax.faces.model.SelectItem;
+import javax.xml.namespace.QName;
+
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -236,6 +240,70 @@
}
}
});
+ portletDecorator.setProperty("preferenceKeys", new AbstractPropertyDecorator(List.class)
+ {
+ public Object getValue(Object bean) throws IllegalArgumentException
+ {
+ Portlet portlet = (Portlet)bean;
+ Set<String> pk = portlet.getInfo().getPreferences().getKeys();
+ if (pk != null)
+ {
+ return new ArrayList<String>(pk);
+ }
+ else
+ {
+ return Collections.emptyList();
+ }
+ }
+ });
+ portletDecorator.setProperty("publicParameters", new AbstractPropertyDecorator(List.class)
+ {
+ public Object getValue(Object bean) throws IllegalArgumentException
+ {
+ Portlet portlet = (Portlet)bean;
+ Collection<? extends ParameterInfo> pp = portlet.getInfo().getNavigation().getPublicParameters();
+ if (pp != null)
+ {
+ return new ArrayList<ParameterInfo>(pp);
+ }
+ else
+ {
+ return Collections.emptyList();
+ }
+ }
+ });
+ portletDecorator.setProperty("consumedEvents", new AbstractPropertyDecorator(List.class)
+ {
+ public Object getValue(Object bean) throws IllegalArgumentException
+ {
+ Portlet portlet = (Portlet)bean;
+ Map<QName, ? extends EventInfo> ce = portlet.getInfo().getEventing().getConsumedEvents();
+ if (ce != null)
+ {
+ return new ArrayList<EventInfo>(ce.values());
+ }
+ else
+ {
+ return Collections.emptyList();
+ }
+ }
+ });
+ portletDecorator.setProperty("producedEvents", new AbstractPropertyDecorator(List.class)
+ {
+ public Object getValue(Object bean) throws IllegalArgumentException
+ {
+ Portlet portlet = (Portlet)bean;
+ Map<QName, ? extends EventInfo> pe = portlet.getInfo().getEventing().getProducedEvents();
+ if (pe != null)
+ {
+ return new ArrayList<EventInfo>(pe.values());
+ }
+ else
+ {
+ return Collections.emptyList();
+ }
+ }
+ });
portletDecorator.setProperty("smallIconLocation", new PortletIconPropertyDecorator(PortletIconInfo.SMALL));
portletDecorator.setProperty("largeIconLocation", new PortletIconPropertyDecorator(PortletIconInfo.LARGE));
registerDecorator(Portlet.class, portletDecorator);
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/showPortletDetails.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/showPortletDetails.xhtml 2008-07-30 16:08:41 UTC (rev 11657)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/showPortletDetails.xhtml 2008-07-30 18:29:36 UTC (rev 11658)
@@ -98,7 +98,7 @@
<portal:box class="whiteWithLtGreyHeader meta-box">
<h3>#{bundle.PREFERENCES}</h3>
<dl>
- <c:forEach var="preferenceKey" items="#{portlet.info.preferences.keys}">
+ <c:forEach var="preferenceKey" items="#{portlet.preferenceKeys}">
<dt>
#{preferenceKey}
</dt>
@@ -111,12 +111,12 @@
<portal:box class="whiteWithLtGreyHeader meta-box">
<h3>#{bundle.COMMON_PUBLIC_RENDER_PARAMETERS}</h3>
<dl>
- <c:forEach var="publicParam" items="#{portlet.info.navigation.publicParameters}">
+ <c:forEach var="publicParam" items="#{portlet.publicParameters}">
<dt>
#{publicParam.name}
</dt>
<dd>
- <span><label>#{bundle.COMMON_ID}: </label>#{publicParam.id}</span> <span><label>#{bundle.COMMON_DESCRIPTION}: </label>#{publicParam.description}</span>
+ <span><label>#{bundle.COMMON_ID}: </label>#{publicParam.id}</span> <span><label>#{bundle.COMMON_DESCRIPTION}: </label>#{publicParam.description.defaultString}</span>
</dd>
</c:forEach>
</dl>
@@ -201,9 +201,9 @@
<h3>#{bundle.COMMON_PRODUCED_EVENTS}</h3>
<dl>
- <c:forEach var="producedEvent" items="#{portlet.info.eventing.producedEvents}">
+ <c:forEach var="producedEvent" items="#{portlet.producedEvents}">
<dt>
- #{producedEvent.value}
+ #{producedEvent.displayName.defaultString}
</dt>
<dd>
@@ -214,9 +214,9 @@
<portal:box class="whiteWithLtGreyHeader meta-box">
<h3>#{bundle.COMMON_CONSUMED_EVENTS}</h3>
<dl>
- <c:forEach var="consumedEvent" items="#{portlet.info.eventing.consumedEvents}">
+ <c:forEach var="consumedEvent" items="#{portlet.consumedEvents}">
<dt>
- #{consumedEvent.value}
+ #{consumedEvent.displayName.defaultString}
</dt>
<dd>
15 years, 9 months
JBoss Portal SVN: r11657 - in tags/JBoss_Portal_2_7_0_BETA1: core/src/main/org/jboss/portal/core/impl/coordination and 4 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-07-30 12:08:41 -0400 (Wed, 30 Jul 2008)
New Revision: 11657
Modified:
tags/JBoss_Portal_2_7_0_BETA1/core-admin/src/main/org/jboss/portal/core/admin/ui/AdminPropertyResolver.java
tags/JBoss_Portal_2_7_0_BETA1/core-admin/src/resources/portal-admin-war/jsf/common/showPortletDetails.xhtml
tags/JBoss_Portal_2_7_0_BETA1/core/src/main/org/jboss/portal/core/controller/portlet/PortletInvocationFactory.java
tags/JBoss_Portal_2_7_0_BETA1/core/src/main/org/jboss/portal/core/impl/coordination/CoordinationService.java
tags/JBoss_Portal_2_7_0_BETA1/core/src/main/org/jboss/portal/core/portlet/PortletRequestEncoder.java
tags/JBoss_Portal_2_7_0_BETA1/faces/src/main/org/jboss/portal/faces/component/portlet/PortletRequestEncoder.java
Log:
- Reduced coordination prefix's size
- WSRP needs navigational state to be passed when creating an action command for templating purpose.
PortletRequestEncoder.encodeAction can just discard the NS instead of throwing an exception.
- Suddenly JSF+Facelets doesn't like Sets anymore...
Modified: tags/JBoss_Portal_2_7_0_BETA1/core/src/main/org/jboss/portal/core/controller/portlet/PortletInvocationFactory.java
===================================================================
--- tags/JBoss_Portal_2_7_0_BETA1/core/src/main/org/jboss/portal/core/controller/portlet/PortletInvocationFactory.java 2008-07-30 15:41:01 UTC (rev 11656)
+++ tags/JBoss_Portal_2_7_0_BETA1/core/src/main/org/jboss/portal/core/controller/portlet/PortletInvocationFactory.java 2008-07-30 16:08:41 UTC (rev 11657)
@@ -22,9 +22,6 @@
******************************************************************************/
package org.jboss.portal.core.controller.portlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
import org.jboss.portal.Mode;
import org.jboss.portal.WindowState;
import org.jboss.portal.common.util.MarkupInfo;
@@ -38,10 +35,10 @@
import org.jboss.portal.core.model.portal.command.action.InvokePortletWindowResourceCommand;
import org.jboss.portal.portlet.ActionURL;
import org.jboss.portal.portlet.ContainerURL;
+import org.jboss.portal.portlet.ParametersStateString;
import org.jboss.portal.portlet.RenderURL;
-import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.ResourceURL;
-import org.jboss.portal.portlet.ParametersStateString;
+import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.controller.state.PortletPageNavigationalState;
import org.jboss.portal.portlet.impl.spi.AbstractPortletInvocationContext;
import org.jboss.portal.portlet.invocation.ActionInvocation;
@@ -53,6 +50,8 @@
import org.jboss.portal.server.request.URLContext;
import org.jboss.portal.server.request.URLFormat;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
import java.util.Map;
/**
@@ -69,9 +68,9 @@
public static ThreadLocal<UserContext> userContextTL = new ThreadLocal<UserContext>();
public static InvokePortletCommandFactory createInvokePortletCommandFactory(
- ControllerContext controllerContext,
- Window window,
- PortletPageNavigationalState pageNavigationalState)
+ ControllerContext controllerContext,
+ Window window,
+ PortletPageNavigationalState pageNavigationalState)
{
return new InternalInvokePortletCommandFactory(window, controllerContext, pageNavigationalState);
}
@@ -83,24 +82,24 @@
}
public static PortletInvocationContext createInvocationContext(
- ControllerContext controllerContext,
- Window window,
- PortletPageNavigationalState pageNavigationalState)
+ ControllerContext controllerContext,
+ Window window,
+ PortletPageNavigationalState pageNavigationalState)
{
InvokePortletCommandFactory ipcf = createInvokePortletCommandFactory(controllerContext, window, pageNavigationalState);
return createInvocationContext(controllerContext, ipcf);
}
public static ActionInvocation createAction(
- ControllerContext controllerContext,
- Mode mode,
- WindowState windowState,
- StateString navigationalState,
- StateString interactionState,
- ParameterMap form,
- Window window,
- Portal portal,
- PortletPageNavigationalState pageNavigationalState)
+ ControllerContext controllerContext,
+ Mode mode,
+ WindowState windowState,
+ StateString navigationalState,
+ StateString interactionState,
+ ParameterMap form,
+ Window window,
+ Portal portal,
+ PortletPageNavigationalState pageNavigationalState)
{
PortletContextFactory cf = new PortletContextFactory(controllerContext, portal, window);
InvokePortletCommandFactory cpc = createInvokePortletCommandFactory(controllerContext, window, pageNavigationalState);
@@ -108,14 +107,14 @@
}
public static ActionInvocation createAction(
- ControllerContext controllerContext,
- Mode mode,
- WindowState windowState,
- StateString navigationalState,
- StateString interactionState,
- ParameterMap form,
- PortletContextFactory cf,
- InvokePortletCommandFactory cpc)
+ ControllerContext controllerContext,
+ Mode mode,
+ WindowState windowState,
+ StateString navigationalState,
+ StateString interactionState,
+ ParameterMap form,
+ PortletContextFactory cf,
+ InvokePortletCommandFactory cpc)
{
PortletInvocationContext portletInvocationContext = createInvocationContext(controllerContext, cpc);
@@ -137,13 +136,13 @@
}
public static RenderInvocation createRender(
- ControllerContext controllerContext,
- Mode mode,
- WindowState windowState,
- StateString navigationalState,
- Window window,
- Portal portal,
- PortletPageNavigationalState pageNavigationalState)
+ ControllerContext controllerContext,
+ Mode mode,
+ WindowState windowState,
+ StateString navigationalState,
+ Window window,
+ Portal portal,
+ PortletPageNavigationalState pageNavigationalState)
{
PortletContextFactory cf = new PortletContextFactory(controllerContext, portal, window);
InvokePortletCommandFactory cpc = createInvokePortletCommandFactory(controllerContext, window, pageNavigationalState);
@@ -153,12 +152,12 @@
}
public static RenderInvocation createRender(
- ControllerContext controllerContext,
- Mode mode,
- WindowState windowState,
- StateString navigationalState,
- PortletContextFactory cf,
- InvokePortletCommandFactory cpc)
+ ControllerContext controllerContext,
+ Mode mode,
+ WindowState windowState,
+ StateString navigationalState,
+ PortletContextFactory cf,
+ InvokePortletCommandFactory cpc)
{
PortletInvocationContext portletInvocationContext = createInvocationContext(controllerContext, cpc);
@@ -178,9 +177,9 @@
}
public static void contextualize(
- ControllerContext controllerContext,
- PortletContextFactory cf,
- PortletInvocation invocation)
+ ControllerContext controllerContext,
+ PortletContextFactory cf,
+ PortletInvocation invocation)
{
invocation.setAttribute("controller_context", controllerContext);
@@ -240,9 +239,9 @@
private ControllerContext controllerContext;
public ControllerPortletInvocationContext(
- InvokePortletCommandFactory cmdFactory,
- ControllerContext controllerContext,
- MarkupInfo markupInfo)
+ InvokePortletCommandFactory cmdFactory,
+ ControllerContext controllerContext,
+ MarkupInfo markupInfo)
{
super(markupInfo);
@@ -325,9 +324,9 @@
Map<String, String[]> publicNavigationalState;
public InternalInvokePortletCommandFactory(
- Window window,
- ControllerContext controllerContext,
- PortletPageNavigationalState pageNavigationalState)
+ Window window,
+ ControllerContext controllerContext,
+ PortletPageNavigationalState pageNavigationalState)
{
this.controllerContext = controllerContext;
this.window = window;
@@ -337,12 +336,12 @@
public ControllerCommand createInvokeActionCommand(ActionURL actionURL)
{
return new InvokePortletWindowActionCommand(
- window.getId(),
- actionURL.getMode(),
- actionURL.getWindowState(),
- null,
- actionURL.getInteractionState(),
- null);
+ window.getId(),
+ actionURL.getMode(),
+ actionURL.getWindowState(),
+ actionURL.getNavigationalState(),
+ actionURL.getInteractionState(),
+ null);
}
public ControllerCommand createInvokeRenderCommand(RenderURL renderURL)
@@ -406,20 +405,20 @@
//
return new InvokePortletWindowRenderCommand(
- window.getId(),
- renderURL.getMode(),
- renderURL.getWindowState(),
- navigationalState);
+ window.getId(),
+ renderURL.getMode(),
+ renderURL.getWindowState(),
+ navigationalState);
}
public ControllerCommand createInvokeResourceCommand(ResourceURL resourceURL)
{
return new InvokePortletWindowResourceCommand(
- window.getId(),
- resourceURL.getCacheability(),
- resourceURL.getResourceId(),
- resourceURL.getResourceState(),
- null
+ window.getId(),
+ resourceURL.getCacheability(),
+ resourceURL.getResourceId(),
+ resourceURL.getResourceState(),
+ null
);
}
}
Modified: tags/JBoss_Portal_2_7_0_BETA1/core/src/main/org/jboss/portal/core/impl/coordination/CoordinationService.java
===================================================================
--- tags/JBoss_Portal_2_7_0_BETA1/core/src/main/org/jboss/portal/core/impl/coordination/CoordinationService.java 2008-07-30 15:41:01 UTC (rev 11656)
+++ tags/JBoss_Portal_2_7_0_BETA1/core/src/main/org/jboss/portal/core/impl/coordination/CoordinationService.java 2008-07-30 16:08:41 UTC (rev 11657)
@@ -63,7 +63,7 @@
public static final String BINDING = "binding";
- public static final String PREFIX = "org.jboss.portal.core.controller.coordination";
+ public static final String PREFIX = "coordination";
public static final String QNAME_SEPARATOR = ";";
Modified: tags/JBoss_Portal_2_7_0_BETA1/core/src/main/org/jboss/portal/core/portlet/PortletRequestEncoder.java
===================================================================
--- tags/JBoss_Portal_2_7_0_BETA1/core/src/main/org/jboss/portal/core/portlet/PortletRequestEncoder.java 2008-07-30 15:41:01 UTC (rev 11656)
+++ tags/JBoss_Portal_2_7_0_BETA1/core/src/main/org/jboss/portal/core/portlet/PortletRequestEncoder.java 2008-07-30 16:08:41 UTC (rev 11657)
@@ -24,21 +24,17 @@
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.portlet.ParametersStateString;
import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.cache.CacheLevel;
-import org.jboss.portal.common.util.ParameterMap;
-import org.jboss.portal.common.NotYetImplemented;
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>
+ * 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>
@@ -67,9 +63,9 @@
}
public void encodeResource(
- CacheLevel cacheability,
- String resourceId,
- StateString resourceState)
+ CacheLevel cacheability,
+ String resourceId,
+ StateString resourceState)
{
queryParameters.clear();
@@ -110,10 +106,10 @@
}
public void encodeAction(
- StateString navigationalState,
- StateString interactionState,
- Mode mode,
- WindowState windowState) throws IllegalArgumentException
+ StateString navigationalState,
+ StateString interactionState,
+ Mode mode,
+ WindowState windowState) throws IllegalArgumentException
{
queryParameters.clear();
@@ -125,10 +121,10 @@
{
if (interactionState instanceof ParametersStateString)
{
- if (navigationalState != null)
- {
- throw new IllegalArgumentException("Cannot handle case with both non opaque interaction and navigational state");
- }
+ // we don't need to encode the navigational state in the URL (stored in session)
+ // but we shouldn't throw an exception here because it's needed for template creation in WSRP
+ // so just discard it
+ navigationalState = null;
// Add the parameters
Map<String, String[]> parameters = ((ParametersStateString)interactionState).getParameters();
@@ -154,9 +150,9 @@
}
public void encodeRender(
- StateString navigationalState,
- Mode mode,
- WindowState windowState)
+ StateString navigationalState,
+ Mode mode,
+ WindowState windowState)
{
queryParameters.clear();
Modified: tags/JBoss_Portal_2_7_0_BETA1/core-admin/src/main/org/jboss/portal/core/admin/ui/AdminPropertyResolver.java
===================================================================
--- tags/JBoss_Portal_2_7_0_BETA1/core-admin/src/main/org/jboss/portal/core/admin/ui/AdminPropertyResolver.java 2008-07-30 15:41:01 UTC (rev 11656)
+++ tags/JBoss_Portal_2_7_0_BETA1/core-admin/src/main/org/jboss/portal/core/admin/ui/AdminPropertyResolver.java 2008-07-30 16:08:41 UTC (rev 11657)
@@ -25,6 +25,7 @@
import org.jboss.portal.common.i18n.LocalizedString;
import org.jboss.portal.common.net.media.MediaType;
import org.jboss.portal.common.util.IteratorStatus;
+import org.jboss.portal.common.util.Tools;
import org.jboss.portal.core.impl.model.content.ContentProviderRegistryService;
import org.jboss.portal.core.model.content.ContentType;
import org.jboss.portal.core.model.content.spi.portlet.ContentPortlet;
@@ -45,8 +46,11 @@
import org.jboss.portal.identity.RoleModule;
import org.jboss.portal.portlet.Portlet;
import org.jboss.portal.portlet.PortletInvokerException;
+import org.jboss.portal.portlet.TransportGuarantee;
import org.jboss.portal.portlet.info.MetaInfo;
+import org.jboss.portal.portlet.info.ModeInfo;
import org.jboss.portal.portlet.info.PortletInfo;
+import org.jboss.portal.portlet.info.WindowStateInfo;
import org.jboss.portal.security.AuthorizationDomainRegistry;
import org.jboss.portal.security.spi.provider.AuthorizationDomain;
import org.jboss.portal.theme.LayoutService;
@@ -173,27 +177,38 @@
}
}
});
- portletDecorator.setProperty("modes", new AbstractPropertyDecorator(Set.class)
+ portletDecorator.setProperty("modes", new AbstractPropertyDecorator(List.class)
{
public Object getValue(Object bean) throws IllegalArgumentException
{
Portlet portlet = (Portlet)bean;
- return portlet.getInfo().getCapabilities().getModes(MediaType.TEXT_HTML);
+ Set<ModeInfo> set = portlet.getInfo().getCapabilities().getAllModes();
+ return Tools.toList(set.iterator());
}
});
- portletDecorator.setProperty("windowStates", new AbstractPropertyDecorator(Set.class)
+ portletDecorator.setProperty("windowStates", new AbstractPropertyDecorator(List.class)
{
public Object getValue(Object bean) throws IllegalArgumentException
{
Portlet portlet = (Portlet)bean;
- return portlet.getInfo().getCapabilities().getWindowStates(MediaType.TEXT_HTML);
+ Set<WindowStateInfo> set = portlet.getInfo().getCapabilities().getWindowStates(MediaType.TEXT_HTML);
+ return Tools.toList(set.iterator());
}
});
- portletDecorator.setProperty("locales", new AbstractPropertyDecorator(Set.class)
+ portletDecorator.setProperty("mediaTypes", new AbstractPropertyDecorator(List.class)
{
public Object getValue(Object bean) throws IllegalArgumentException
{
Portlet portlet = (Portlet)bean;
+ Set<MediaType> set = portlet.getInfo().getCapabilities().getMediaTypes();
+ return Tools.toList(set.iterator());
+ }
+ });
+ portletDecorator.setProperty("locales", new AbstractPropertyDecorator(List.class)
+ {
+ public Object getValue(Object bean) throws IllegalArgumentException
+ {
+ Portlet portlet = (Portlet)bean;
Set<Locale> locales = portlet.getInfo().getCapabilities().getAllLocales();
if (locales != null)
{
@@ -205,6 +220,22 @@
}
}
});
+ portletDecorator.setProperty("transportGuarantees", new AbstractPropertyDecorator(List.class)
+ {
+ public Object getValue(Object bean) throws IllegalArgumentException
+ {
+ Portlet portlet = (Portlet)bean;
+ Set<TransportGuarantee> tg = portlet.getInfo().getSecurity().getTransportGuarantees();
+ if (tg != null)
+ {
+ return new ArrayList<TransportGuarantee>(tg);
+ }
+ else
+ {
+ return Collections.emptyList();
+ }
+ }
+ });
portletDecorator.setProperty("smallIconLocation", new PortletIconPropertyDecorator(PortletIconInfo.SMALL));
portletDecorator.setProperty("largeIconLocation", new PortletIconPropertyDecorator(PortletIconInfo.LARGE));
registerDecorator(Portlet.class, portletDecorator);
Modified: tags/JBoss_Portal_2_7_0_BETA1/core-admin/src/resources/portal-admin-war/jsf/common/showPortletDetails.xhtml
===================================================================
--- tags/JBoss_Portal_2_7_0_BETA1/core-admin/src/resources/portal-admin-war/jsf/common/showPortletDetails.xhtml 2008-07-30 15:41:01 UTC (rev 11656)
+++ tags/JBoss_Portal_2_7_0_BETA1/core-admin/src/resources/portal-admin-war/jsf/common/showPortletDetails.xhtml 2008-07-30 16:08:41 UTC (rev 11657)
@@ -43,7 +43,7 @@
<div class="full-width sub-header2">
<ul>
<li class="third-width"><label>#{bundle.COMMON_TRANSPORT_GUARANTEES}: </label>
- <c:forEach var="transportGuarantees" items="#{portlet.info.security.transportGuarantees}">
+ <c:forEach var="transportGuarantees" items="#{portlet.transportGuarantees}">
#{transportGuarantees}  
</c:forEach>
</li>
@@ -59,7 +59,7 @@
<portal:box class="whiteWithLtGreyHeader meta-box">
<h3>#{bundle.COMMON_MEDIA_TYPES}</h3>
<dl>
- <c:forEach var="mediaType" items="#{portlet.info.capabilities.mediaTypes}">
+ <c:forEach var="mediaType" items="#{portlet.mediaTypes}">
<dt>
#{mediaType.value}
</dt>
@@ -72,7 +72,7 @@
<portal:box class="whiteWithLtGreyHeader meta-box">
<h3>#{bundle.COMMON_PORTLET_MODES}</h3>
<dl>
- <c:forEach var="mode" items="#{portlet.info.capabilities.allModes}">
+ <c:forEach var="mode" items="#{portlet.modes}">
<dt>
#{mode.modeName}
</dt>
@@ -85,7 +85,7 @@
<portal:box class="whiteWithLtGreyHeader meta-box">
<h3>#{bundle.COMMON_WINDOW_STATES}</h3>
<dl>
- <c:forEach var="windowState" items="#{portlet.info.capabilities.allWindowStates}">
+ <c:forEach var="windowState" items="#{portlet.windowStates}">
<dt>
#{windowState.windowStateName}
</dt>
Modified: tags/JBoss_Portal_2_7_0_BETA1/faces/src/main/org/jboss/portal/faces/component/portlet/PortletRequestEncoder.java
===================================================================
--- tags/JBoss_Portal_2_7_0_BETA1/faces/src/main/org/jboss/portal/faces/component/portlet/PortletRequestEncoder.java 2008-07-30 15:41:01 UTC (rev 11656)
+++ tags/JBoss_Portal_2_7_0_BETA1/faces/src/main/org/jboss/portal/faces/component/portlet/PortletRequestEncoder.java 2008-07-30 16:08:41 UTC (rev 11657)
@@ -25,24 +25,17 @@
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 org.jboss.portal.portlet.StateString;
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>
+ * 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 $
*/
@@ -69,10 +62,10 @@
}
public void encodeAction(
- StateString navigationalState,
- StateString interactionState,
- Mode mode,
- WindowState windowState) throws IllegalArgumentException
+ StateString navigationalState,
+ StateString interactionState,
+ Mode mode,
+ WindowState windowState) throws IllegalArgumentException
{
queryParameters.clear();
@@ -84,10 +77,10 @@
{
if (interactionState instanceof ParametersStateString)
{
- if (navigationalState != null)
- {
- throw new IllegalArgumentException("Cannot handle case with both non opaque interaction and navigational state");
- }
+ // we don't need to encode the navigational state in the URL (stored in session)
+ // but we shouldn't throw an exception here because it's needed for template creation in WSRP
+ // so just discard it
+ navigationalState = null;
// Add the parameters
Map<String, String[]> parameters = ((ParametersStateString)interactionState).getParameters();
@@ -113,9 +106,9 @@
}
public void encodeRender(
- StateString navigationalState,
- Mode mode,
- WindowState windowState)
+ StateString navigationalState,
+ Mode mode,
+ WindowState windowState)
{
queryParameters.clear();
15 years, 9 months
JBoss Portal SVN: r11656 - in branches/JBoss_Portal_Branch_2_7/core-admin/src: resources/portal-admin-war/jsf/common and 1 other directory.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-07-30 11:41:01 -0400 (Wed, 30 Jul 2008)
New Revision: 11656
Modified:
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/AdminPropertyResolver.java
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/showPortletDetails.xhtml
Log:
Suddenly JSF+Facelets doesn't like Sets anymore...
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/AdminPropertyResolver.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/AdminPropertyResolver.java 2008-07-30 13:31:11 UTC (rev 11655)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/AdminPropertyResolver.java 2008-07-30 15:41:01 UTC (rev 11656)
@@ -25,6 +25,7 @@
import org.jboss.portal.common.i18n.LocalizedString;
import org.jboss.portal.common.net.media.MediaType;
import org.jboss.portal.common.util.IteratorStatus;
+import org.jboss.portal.common.util.Tools;
import org.jboss.portal.core.impl.model.content.ContentProviderRegistryService;
import org.jboss.portal.core.model.content.ContentType;
import org.jboss.portal.core.model.content.spi.portlet.ContentPortlet;
@@ -45,8 +46,11 @@
import org.jboss.portal.identity.RoleModule;
import org.jboss.portal.portlet.Portlet;
import org.jboss.portal.portlet.PortletInvokerException;
+import org.jboss.portal.portlet.TransportGuarantee;
import org.jboss.portal.portlet.info.MetaInfo;
+import org.jboss.portal.portlet.info.ModeInfo;
import org.jboss.portal.portlet.info.PortletInfo;
+import org.jboss.portal.portlet.info.WindowStateInfo;
import org.jboss.portal.security.AuthorizationDomainRegistry;
import org.jboss.portal.security.spi.provider.AuthorizationDomain;
import org.jboss.portal.theme.LayoutService;
@@ -173,27 +177,38 @@
}
}
});
- portletDecorator.setProperty("modes", new AbstractPropertyDecorator(Set.class)
+ portletDecorator.setProperty("modes", new AbstractPropertyDecorator(List.class)
{
public Object getValue(Object bean) throws IllegalArgumentException
{
Portlet portlet = (Portlet)bean;
- return portlet.getInfo().getCapabilities().getModes(MediaType.TEXT_HTML);
+ Set<ModeInfo> set = portlet.getInfo().getCapabilities().getAllModes();
+ return Tools.toList(set.iterator());
}
});
- portletDecorator.setProperty("windowStates", new AbstractPropertyDecorator(Set.class)
+ portletDecorator.setProperty("windowStates", new AbstractPropertyDecorator(List.class)
{
public Object getValue(Object bean) throws IllegalArgumentException
{
Portlet portlet = (Portlet)bean;
- return portlet.getInfo().getCapabilities().getWindowStates(MediaType.TEXT_HTML);
+ Set<WindowStateInfo> set = portlet.getInfo().getCapabilities().getWindowStates(MediaType.TEXT_HTML);
+ return Tools.toList(set.iterator());
}
});
- portletDecorator.setProperty("locales", new AbstractPropertyDecorator(Set.class)
+ portletDecorator.setProperty("mediaTypes", new AbstractPropertyDecorator(List.class)
{
public Object getValue(Object bean) throws IllegalArgumentException
{
Portlet portlet = (Portlet)bean;
+ Set<MediaType> set = portlet.getInfo().getCapabilities().getMediaTypes();
+ return Tools.toList(set.iterator());
+ }
+ });
+ portletDecorator.setProperty("locales", new AbstractPropertyDecorator(List.class)
+ {
+ public Object getValue(Object bean) throws IllegalArgumentException
+ {
+ Portlet portlet = (Portlet)bean;
Set<Locale> locales = portlet.getInfo().getCapabilities().getAllLocales();
if (locales != null)
{
@@ -205,6 +220,22 @@
}
}
});
+ portletDecorator.setProperty("transportGuarantees", new AbstractPropertyDecorator(List.class)
+ {
+ public Object getValue(Object bean) throws IllegalArgumentException
+ {
+ Portlet portlet = (Portlet)bean;
+ Set<TransportGuarantee> tg = portlet.getInfo().getSecurity().getTransportGuarantees();
+ if (tg != null)
+ {
+ return new ArrayList<TransportGuarantee>(tg);
+ }
+ else
+ {
+ return Collections.emptyList();
+ }
+ }
+ });
portletDecorator.setProperty("smallIconLocation", new PortletIconPropertyDecorator(PortletIconInfo.SMALL));
portletDecorator.setProperty("largeIconLocation", new PortletIconPropertyDecorator(PortletIconInfo.LARGE));
registerDecorator(Portlet.class, portletDecorator);
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/showPortletDetails.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/showPortletDetails.xhtml 2008-07-30 13:31:11 UTC (rev 11655)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/showPortletDetails.xhtml 2008-07-30 15:41:01 UTC (rev 11656)
@@ -43,7 +43,7 @@
<div class="full-width sub-header2">
<ul>
<li class="third-width"><label>#{bundle.COMMON_TRANSPORT_GUARANTEES}: </label>
- <c:forEach var="transportGuarantees" items="#{portlet.info.security.transportGuarantees}">
+ <c:forEach var="transportGuarantees" items="#{portlet.transportGuarantees}">
#{transportGuarantees}  
</c:forEach>
</li>
@@ -59,7 +59,7 @@
<portal:box class="whiteWithLtGreyHeader meta-box">
<h3>#{bundle.COMMON_MEDIA_TYPES}</h3>
<dl>
- <c:forEach var="mediaType" items="#{portlet.info.capabilities.mediaTypes}">
+ <c:forEach var="mediaType" items="#{portlet.mediaTypes}">
<dt>
#{mediaType.value}
</dt>
@@ -72,7 +72,7 @@
<portal:box class="whiteWithLtGreyHeader meta-box">
<h3>#{bundle.COMMON_PORTLET_MODES}</h3>
<dl>
- <c:forEach var="mode" items="#{portlet.info.capabilities.allModes}">
+ <c:forEach var="mode" items="#{portlet.modes}">
<dt>
#{mode.modeName}
</dt>
@@ -85,7 +85,7 @@
<portal:box class="whiteWithLtGreyHeader meta-box">
<h3>#{bundle.COMMON_WINDOW_STATES}</h3>
<dl>
- <c:forEach var="windowState" items="#{portlet.info.capabilities.allWindowStates}">
+ <c:forEach var="windowState" items="#{portlet.windowStates}">
<dt>
#{windowState.windowStateName}
</dt>
15 years, 9 months
JBoss Portal SVN: r11655 - in branches/JBoss_Portal_Branch_2_7: core/src/main/org/jboss/portal/core/portlet and 1 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2008-07-30 09:31:11 -0400 (Wed, 30 Jul 2008)
New Revision: 11655
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/portlet/PortletRequestEncoder.java
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletRequestEncoder.java
Log:
- WSRP needs navigational state to be passed when creating an action command for templating purpose.
PortletRequestEncoder.encodeAction can just discard the NS instead of throwing an exception.
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-07-30 10:58:23 UTC (rev 11654)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/PortletInvocationFactory.java 2008-07-30 13:31:11 UTC (rev 11655)
@@ -22,9 +22,6 @@
******************************************************************************/
package org.jboss.portal.core.controller.portlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
import org.jboss.portal.Mode;
import org.jboss.portal.WindowState;
import org.jboss.portal.common.util.MarkupInfo;
@@ -38,10 +35,10 @@
import org.jboss.portal.core.model.portal.command.action.InvokePortletWindowResourceCommand;
import org.jboss.portal.portlet.ActionURL;
import org.jboss.portal.portlet.ContainerURL;
+import org.jboss.portal.portlet.ParametersStateString;
import org.jboss.portal.portlet.RenderURL;
-import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.ResourceURL;
-import org.jboss.portal.portlet.ParametersStateString;
+import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.controller.state.PortletPageNavigationalState;
import org.jboss.portal.portlet.impl.spi.AbstractPortletInvocationContext;
import org.jboss.portal.portlet.invocation.ActionInvocation;
@@ -53,6 +50,8 @@
import org.jboss.portal.server.request.URLContext;
import org.jboss.portal.server.request.URLFormat;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
import java.util.Map;
/**
@@ -69,9 +68,9 @@
public static ThreadLocal<UserContext> userContextTL = new ThreadLocal<UserContext>();
public static InvokePortletCommandFactory createInvokePortletCommandFactory(
- ControllerContext controllerContext,
- Window window,
- PortletPageNavigationalState pageNavigationalState)
+ ControllerContext controllerContext,
+ Window window,
+ PortletPageNavigationalState pageNavigationalState)
{
return new InternalInvokePortletCommandFactory(window, controllerContext, pageNavigationalState);
}
@@ -83,24 +82,24 @@
}
public static PortletInvocationContext createInvocationContext(
- ControllerContext controllerContext,
- Window window,
- PortletPageNavigationalState pageNavigationalState)
+ ControllerContext controllerContext,
+ Window window,
+ PortletPageNavigationalState pageNavigationalState)
{
InvokePortletCommandFactory ipcf = createInvokePortletCommandFactory(controllerContext, window, pageNavigationalState);
return createInvocationContext(controllerContext, ipcf);
}
public static ActionInvocation createAction(
- ControllerContext controllerContext,
- Mode mode,
- WindowState windowState,
- StateString navigationalState,
- StateString interactionState,
- ParameterMap form,
- Window window,
- Portal portal,
- PortletPageNavigationalState pageNavigationalState)
+ ControllerContext controllerContext,
+ Mode mode,
+ WindowState windowState,
+ StateString navigationalState,
+ StateString interactionState,
+ ParameterMap form,
+ Window window,
+ Portal portal,
+ PortletPageNavigationalState pageNavigationalState)
{
PortletContextFactory cf = new PortletContextFactory(controllerContext, portal, window);
InvokePortletCommandFactory cpc = createInvokePortletCommandFactory(controllerContext, window, pageNavigationalState);
@@ -108,14 +107,14 @@
}
public static ActionInvocation createAction(
- ControllerContext controllerContext,
- Mode mode,
- WindowState windowState,
- StateString navigationalState,
- StateString interactionState,
- ParameterMap form,
- PortletContextFactory cf,
- InvokePortletCommandFactory cpc)
+ ControllerContext controllerContext,
+ Mode mode,
+ WindowState windowState,
+ StateString navigationalState,
+ StateString interactionState,
+ ParameterMap form,
+ PortletContextFactory cf,
+ InvokePortletCommandFactory cpc)
{
PortletInvocationContext portletInvocationContext = createInvocationContext(controllerContext, cpc);
@@ -137,13 +136,13 @@
}
public static RenderInvocation createRender(
- ControllerContext controllerContext,
- Mode mode,
- WindowState windowState,
- StateString navigationalState,
- Window window,
- Portal portal,
- PortletPageNavigationalState pageNavigationalState)
+ ControllerContext controllerContext,
+ Mode mode,
+ WindowState windowState,
+ StateString navigationalState,
+ Window window,
+ Portal portal,
+ PortletPageNavigationalState pageNavigationalState)
{
PortletContextFactory cf = new PortletContextFactory(controllerContext, portal, window);
InvokePortletCommandFactory cpc = createInvokePortletCommandFactory(controllerContext, window, pageNavigationalState);
@@ -153,12 +152,12 @@
}
public static RenderInvocation createRender(
- ControllerContext controllerContext,
- Mode mode,
- WindowState windowState,
- StateString navigationalState,
- PortletContextFactory cf,
- InvokePortletCommandFactory cpc)
+ ControllerContext controllerContext,
+ Mode mode,
+ WindowState windowState,
+ StateString navigationalState,
+ PortletContextFactory cf,
+ InvokePortletCommandFactory cpc)
{
PortletInvocationContext portletInvocationContext = createInvocationContext(controllerContext, cpc);
@@ -178,9 +177,9 @@
}
public static void contextualize(
- ControllerContext controllerContext,
- PortletContextFactory cf,
- PortletInvocation invocation)
+ ControllerContext controllerContext,
+ PortletContextFactory cf,
+ PortletInvocation invocation)
{
invocation.setAttribute("controller_context", controllerContext);
@@ -240,9 +239,9 @@
private ControllerContext controllerContext;
public ControllerPortletInvocationContext(
- InvokePortletCommandFactory cmdFactory,
- ControllerContext controllerContext,
- MarkupInfo markupInfo)
+ InvokePortletCommandFactory cmdFactory,
+ ControllerContext controllerContext,
+ MarkupInfo markupInfo)
{
super(markupInfo);
@@ -325,9 +324,9 @@
Map<String, String[]> publicNavigationalState;
public InternalInvokePortletCommandFactory(
- Window window,
- ControllerContext controllerContext,
- PortletPageNavigationalState pageNavigationalState)
+ Window window,
+ ControllerContext controllerContext,
+ PortletPageNavigationalState pageNavigationalState)
{
this.controllerContext = controllerContext;
this.window = window;
@@ -337,12 +336,12 @@
public ControllerCommand createInvokeActionCommand(ActionURL actionURL)
{
return new InvokePortletWindowActionCommand(
- window.getId(),
- actionURL.getMode(),
- actionURL.getWindowState(),
- null,
- actionURL.getInteractionState(),
- null);
+ window.getId(),
+ actionURL.getMode(),
+ actionURL.getWindowState(),
+ actionURL.getNavigationalState(),
+ actionURL.getInteractionState(),
+ null);
}
public ControllerCommand createInvokeRenderCommand(RenderURL renderURL)
@@ -406,20 +405,20 @@
//
return new InvokePortletWindowRenderCommand(
- window.getId(),
- renderURL.getMode(),
- renderURL.getWindowState(),
- navigationalState);
+ window.getId(),
+ renderURL.getMode(),
+ renderURL.getWindowState(),
+ navigationalState);
}
public ControllerCommand createInvokeResourceCommand(ResourceURL resourceURL)
{
return new InvokePortletWindowResourceCommand(
- window.getId(),
- resourceURL.getCacheability(),
- resourceURL.getResourceId(),
- resourceURL.getResourceState(),
- null
+ window.getId(),
+ resourceURL.getCacheability(),
+ resourceURL.getResourceId(),
+ resourceURL.getResourceState(),
+ null
);
}
}
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/portlet/PortletRequestEncoder.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/portlet/PortletRequestEncoder.java 2008-07-30 10:58:23 UTC (rev 11654)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/portlet/PortletRequestEncoder.java 2008-07-30 13:31:11 UTC (rev 11655)
@@ -24,21 +24,17 @@
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.portlet.ParametersStateString;
import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.cache.CacheLevel;
-import org.jboss.portal.common.util.ParameterMap;
-import org.jboss.portal.common.NotYetImplemented;
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>
+ * 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>
@@ -67,9 +63,9 @@
}
public void encodeResource(
- CacheLevel cacheability,
- String resourceId,
- StateString resourceState)
+ CacheLevel cacheability,
+ String resourceId,
+ StateString resourceState)
{
queryParameters.clear();
@@ -110,10 +106,10 @@
}
public void encodeAction(
- StateString navigationalState,
- StateString interactionState,
- Mode mode,
- WindowState windowState) throws IllegalArgumentException
+ StateString navigationalState,
+ StateString interactionState,
+ Mode mode,
+ WindowState windowState) throws IllegalArgumentException
{
queryParameters.clear();
@@ -125,10 +121,10 @@
{
if (interactionState instanceof ParametersStateString)
{
- if (navigationalState != null)
- {
- throw new IllegalArgumentException("Cannot handle case with both non opaque interaction and navigational state");
- }
+ // we don't need to encode the navigational state in the URL (stored in session)
+ // but we shouldn't throw an exception here because it's needed for template creation in WSRP
+ // so just discard it
+ navigationalState = null;
// Add the parameters
Map<String, String[]> parameters = ((ParametersStateString)interactionState).getParameters();
@@ -154,9 +150,9 @@
}
public void encodeRender(
- StateString navigationalState,
- Mode mode,
- WindowState windowState)
+ StateString navigationalState,
+ Mode mode,
+ WindowState windowState)
{
queryParameters.clear();
Modified: 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 2008-07-30 10:58:23 UTC (rev 11654)
+++ branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/PortletRequestEncoder.java 2008-07-30 13:31:11 UTC (rev 11655)
@@ -25,24 +25,17 @@
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 org.jboss.portal.portlet.StateString;
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>
+ * 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 $
*/
@@ -69,10 +62,10 @@
}
public void encodeAction(
- StateString navigationalState,
- StateString interactionState,
- Mode mode,
- WindowState windowState) throws IllegalArgumentException
+ StateString navigationalState,
+ StateString interactionState,
+ Mode mode,
+ WindowState windowState) throws IllegalArgumentException
{
queryParameters.clear();
@@ -84,10 +77,10 @@
{
if (interactionState instanceof ParametersStateString)
{
- if (navigationalState != null)
- {
- throw new IllegalArgumentException("Cannot handle case with both non opaque interaction and navigational state");
- }
+ // we don't need to encode the navigational state in the URL (stored in session)
+ // but we shouldn't throw an exception here because it's needed for template creation in WSRP
+ // so just discard it
+ navigationalState = null;
// Add the parameters
Map<String, String[]> parameters = ((ParametersStateString)interactionState).getParameters();
@@ -113,9 +106,9 @@
}
public void encodeRender(
- StateString navigationalState,
- Mode mode,
- WindowState windowState)
+ StateString navigationalState,
+ Mode mode,
+ WindowState windowState)
{
queryParameters.clear();
15 years, 9 months