gatein SVN: r5604 - epp/docs/branches/EPP_5_1_Branch/Release_Notes/en-US.
by do-not-reply@jboss.org
Author: smumford
Date: 2010-12-18 00:43:46 -0500 (Sat, 18 Dec 2010)
New Revision: 5604
Modified:
epp/docs/branches/EPP_5_1_Branch/Release_Notes/en-US/5.1.0_Release_Notes.xml
Log:
JBEPP-603: Updated Issues fixed list. Added JBEPP-737 to Known Issues.
Modified: epp/docs/branches/EPP_5_1_Branch/Release_Notes/en-US/5.1.0_Release_Notes.xml
===================================================================
--- epp/docs/branches/EPP_5_1_Branch/Release_Notes/en-US/5.1.0_Release_Notes.xml 2010-12-17 14:27:10 UTC (rev 5603)
+++ epp/docs/branches/EPP_5_1_Branch/Release_Notes/en-US/5.1.0_Release_Notes.xml 2010-12-18 05:43:46 UTC (rev 5604)
@@ -78,7 +78,7 @@
JBoss Enterprise Application Platform
</entry>
<entry>
- 5.0.1-GA
+ 5.1.0 GA
</entry>
</row>
<row>
@@ -86,7 +86,7 @@
eXo Kernel
</entry>
<entry>
- 2.2.6.CR01
+ 2.2.6-GA
</entry>
</row>
<row>
@@ -94,7 +94,7 @@
eXo Core
</entry>
<entry>
- 2.3.6-CR01
+ 2.3.6-GA
</entry>
</row>
<row>
@@ -102,7 +102,7 @@
eXo WS
</entry>
<entry>
- 2.1.6-CR01
+ 2.1.6-GA
</entry>
</row>
<row>
@@ -110,7 +110,7 @@
eXo JCR
</entry>
<entry>
- 1.12.6.CR01
+ 1.12.6-GA
</entry>
</row>
<row>
@@ -126,7 +126,7 @@
Apache Shindig
</entry>
<entry>
- 1.0-r790473-Patch04
+ 1.0-r790473-Patch04
</entry>
</row>
<row>
@@ -134,7 +134,7 @@
Simple Captcha
</entry>
<entry>
- 1.1.1-GA-Patch01
+ 1.1.1-GA-Patch01
</entry>
</row>
<row>
@@ -158,7 +158,7 @@
GateIn PC
</entry>
<entry>
- 2.2.0-CR02
+ 2.2.0-GA
</entry>
</row>
<row>
@@ -166,7 +166,7 @@
GateIn WSRP
</entry>
<entry>
- 2.0.0.CR02
+ 2.0.0-epp51-GA
</entry>
</row>
<row>
@@ -182,7 +182,7 @@
PicketLink IDM
</entry>
<entry>
- 1.1.7.CR01
+ 1.1.7.GA
</entry>
</row>
<row>
@@ -198,7 +198,7 @@
Portlet Bridge
</entry>
<entry>
- 2.1.0-CR01
+ 2.1.0-epp51-GA
</entry>
</row>
<row>
@@ -225,7 +225,6 @@
<para>
The Installation Guide can be found online at <ulink type="http" url="http://docs.redhat.com/docs/en-US/JBoss_Enterprise_Portal_Platform/index...."/>.
</para>
-
</section>
<section id="sect-Release_Notes-Issues_fixed_in_this_release">
@@ -245,222 +244,455 @@
</warning> -->
<variablelist>
<title><emphasis role="bold">Issues fixed in the product:</emphasis></title>
- <varlistentry>
- <term><ulink type="http" url="https://jira.jboss.org/browse/JBEPP-546"></ulink></term>
- <listitem>
- <para>
- A bug that affected the selection of users being added to a group has been fixed.
- </para>
- <para>
- Prior to this release, user selections made on the first page of the user list, should the list span multiple pages, were lost when navigating to subsequent pages.
- </para>
- <para>
- The user selections are now persistent across pages.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><ulink type="http" url="https://jira.jboss.org/browse/JBEPP-577"></ulink></term>
- <listitem>
- <para>
- Previous versions of &PRODUCT; used <literal>HashMap</literal> in the <literal>ConfigurationManager</literal> class for multithreaded environments. This caused the following message to appear in logs while using the product under heavy load:
- </para>
-<screen>java.lang.Exception: Cannot find the configuration for the component org.exoplatform.portal.webui.container.UIContainerList, configId null
-</screen>
- <para>
- In the latest release, <literal>HashMap</literal> has been replaced with <literal>ConcurrentHashMap</literal>, which accepts default values for initial capacity, load factor and <literal>concurrencyLevel</literal> and resolves the exception.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><ulink type="http" url="https://jira.jboss.org/browse/JBEPP-508" /></term>
- <listitem>
- <para>
- A naming duplication in the pre-packaged "Simplest Hello World" and "IDM Hello World" portlet examples caused an Illegal Argument Exception when both of the portlet examples were deployed.
- </para>
- <para>
- The isses was resolved.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><ulink type="http" url="https://jira.jboss.org/browse/JBEPP-513"></ulink></term>
- <listitem>
- <para>
- A bug was found that caused site navigation to be disordered after a non-administrator deleted a page in Navigation Management.
- </para>
- <para>
- This was caused by a problem with filtering and syncronization of nodes in the <literal>UITree</literal> object.
- </para>
- <para>
- A new object (<literal>UIFilterTree</literal>) has been added to the code, which allows for node navigation persistence. This resolves the issue.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><ulink type="http" url="https://jira.jboss.org/browse/JBEPP-589"></ulink></term>
- <listitem>
- <para>
- The RSS reader gadget was displaying incorrect publication dates for items fetched from feed sources.
- </para>
- <para>
- Each item was being displayed with a publish date of <emphasis>less than a minute ago</emphasis>, regardless of when it was published by the feed.
- </para>
- <para>
- The RSS aggregator has been patched to fetch and display the correct publication date.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><ulink type="http" url="https://jira.jboss.org/browse/JBEPP-587"></ulink></term>
- <listitem>
- <para>
- Some gadgets that do not have configurable preferences were displaying an unusable edit icon.
- </para>
- <para>
- The gadget UI has been amended to remove the edit icon in gadgets that do not have configurable preferences.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><ulink type="http" url="https://jira.jboss.org/browse/JBEPP-585"></ulink></term>
- <listitem>
- <para>
- A bug was found that prevented administrators from changing the permissions of a category in the <emphasis role="bold">Application Registry</emphasis> from <emphasis>Public</emphasis> to a restricted group.
- </para>
- <para>
- The Application Registry <emphasis role="bold">UIPermissionForm</emphasis> java code has been patched to correct his behaviour.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><ulink type="http" url="https://jira.jboss.org/browse/JBEPP-584"></ulink></term>
- <listitem>
- <para>
- An ambiguous error message returned when a URL referenced in a gadget does not exist has been revised and clarified.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><ulink type="http" url="https://jira.jboss.org/browse/JBEPP-571"></ulink></term>
- <listitem>
- <para>
- A bug that caused user preferences to be lost when the ToDo gadget was dragged and dropped on a Dashboard has been resolved.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><ulink type="http" url="https://jira.jboss.org/browse/JBEPP-534"></ulink></term>
- <listitem>
- <para>
- Users may have previously encountered errors when trying to add a remote gadget to a portal instance running on a HTTPS domain.
- </para>
- <para>
- The error stated that the URL was invalid even when correct. This was because the Application Registry was expecting a valid certificate signed by a CA to verify the URL.
- </para>
- <para>
- This error can be avoided by adding the certificate to the JRE CA with the command:
- </para>
-<programlisting>keytool -import -alias toto -keystore /home/<replaceable>USER</replaceable>/Tools/Java/<replaceable>JDK_VERSION</replaceable>/jre/lib/security/cacerts -file ~/<replaceable>mycertificate</replaceable>
-</programlisting>
- <para>
- (Where <emphasis role="bold">mycertificate</emphasis> is the certificate created for SSL)
- </para>
- <para>
- This information has also been added to the &PRODUCT; User Guide.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><ulink type="http" url="https://jira.jboss.org/browse/JBEPP-533"></ulink></term>
- <listitem>
- <para>
- Prior to this release, running &PRODUCT;, configured with LDAP, in a clustered configuration (using the startup parameter <command>-Dexo.profiles=cluster</command>) would produce <literal>NotSerializableExceptions</literal> within the OrganizationManagement portlet.
- </para>
- <para>
- A number of java files in the product have been patched to resolve this issue.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><ulink type="http" url="https://jira.jboss.org/browse/JBEPP-523"></ulink></term>
- <listitem>
- <para>
- The JCR Lock Manager in previous releases of &PRODUCT; was configured to use the same channel name in all workspaces.
- </para>
- <para>
- For example: The 'portal-system' channel name was:
- </para>
-<programlisting role="XML" language="XML"><![CDATA[<property name="jbosscache-cluster-name" value="jcrlock-${container.name.suffix}-system" />
+ <!-- JBEPP-341 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/jira/browse/JBEPP-341"/></term>
+ <listitem>
+ <para>
+ A problem encountered in editing Dashboard tabs in the Chrome web browser running in a Windows environment has been corrected. Dashboard tabs can be edited as expected.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <!-- JBEPP-345 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/jira/browse/JBEPP-345"/></term>
+ <listitem>
+ <para>
+ An issue with the "Remember Me" function of the login screen being overridden by the session time-out has been corrected.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <!-- JBEPP-448 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/jira/browse/JBEPP-448"/></term>
+ <listitem>
+ <para>
+ A problem with object marshalling in clustered environments would present errors in log files. This issue has been corrected.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <!-- JBEPP-470 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/jira/browse/JBEPP-470"/></term>
+ <listitem>
+ <para>
+ An exception was encountered when adding a new remotable portlet to a category if &PRODUCT; was the producer (either self-consuming or from another EPP instance). This has been corrected.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <!-- JBEPP-479 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/jira/browse/JBEPP-479"/></term>
+ <listitem>
+ <para>
+ The upgrade to the PicketLink IDM correct instances of <literal>NotSerializableException</literal>s being thrown when working in the Organization Management portlet in a clustered portal using LDAP.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <!-- JBEPP-480 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/jira/browse/JBEPP-480"/></term>
+ <listitem>
+ <para>
+ The LDAP implementation has been updated to support paginated queries. Queries that return entries exceeding the limitations of the LDAP server are now separated into smaller queries that fall within the LDAP limitations.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <!-- JBEPP-484 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/jira/browse/JBEPP-484"/></term>
+ <listitem>
+ <para>
+ Users who attempted to use the inline composer to change a portal's language locale to be country specific (Chinese, for example), would find that the locale reverted to English after the change was saved.
+ </para>
+ <para>
+ This has been corrected.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <!-- JBEPP-490 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/jira/browse/JBEPP-490"/></term>
+ <listitem>
+ <para>
+ When editing a portal page layout by deleting a container that has PageBody content, users were able to continue deleting the container (by clicking the Finish button) while a warning message was displayed.
+ </para>
+ <para>
+ This issue has been corrected. The Finish button no longer operates while warnings are displayed.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <!-- JBEPP-508 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/jira/browse/JBEPP-508"/></term>
+ <listitem>
+ <para>
+ A naming duplication in the pre-packaged "Simplest Hello World" and "IDM Hello World" portlet examples caused an <literal>IllegalArgumentException</literal> when both of the portlet examples were deployed. This has been corrected.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <!-- JBEPP-513 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/jira/browse/JBEPP-513"/></term>
+ <listitem>
+ <para>
+ A bug was found that caused site navigation to be disordered after a non-administrator deleted a page in Navigation Management.
+ </para>
+ <para>
+ This was caused by a problem with filtering and synchronization of nodes in the <literal>UITree</literal> object.
+ </para>
+ <para>
+ A new object (UIFilterTree) has been added to the code, which allows for node navigation persistence. This resolves the issue.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <!-- JBEPP-523 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/jira/browse/JBEPP-523"/></term>
+ <listitem>
+ <para>
+ The JCR Lock Manager in previous releases of EPP was configured to use the same channel name in all workspaces.
+ </para>
+ <para>
+ For example:
+ </para>
+ <para>
+ The 'portal-system' channel name was:
+ </para>
+<programlisting><![CDATA[<property name="jbosscache-cluster-name" value="jcrlock-${container.name.suffix}-system" />
]]></programlisting>
- <para>
- Instead of:
- </para>
-<programlisting role="XML" language="XML"><![CDATA[<property name="jbosscache-cluster-name" value="jcrlock-${container.name.suffix}-portal-system" />
+ <para>
+ Instead of:
+ </para>
+<programlisting><![CDATA[<property name="jbosscache-cluster-name" value="jcrlock-${container.name.suffix}-portal-system" />
]]></programlisting>
- <para>
- This naming convention could allow data changes to affect the incorrect workspace.
- </para>
- <para>
- The <filename>repository-configuration.xml</filename> file has been updated to resolve this issue.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><ulink type="http" url="https://jira.jboss.org/browse/JBEPP-501"></ulink></term>
- <listitem>
- <para>
- Previous versions of &PRODUCT; contained a bug that caused new Dashboard tabs with names that contained language-specific special characters to redirect to the Homepage. These characters prevented the new URI from parsing correctly, resulting in the redirect.
- </para>
- <para>
- This release ensures that node URIs parse correctly, resolving the issue.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><ulink type="http" url="https://jira.jboss.org/browse/JBEPP-579"></ulink></term>
- <listitem>
- <para>
- In previous releases, a <literal>NullPointerException</literal> would be encountered if no <filename>navigation.xml</filename> had been created for an LDAP user.
- </para>
- <para>
- A change to code in <filename>UIUserToolBarDashboardPortlet.gtmpl</filename> has corrected this issue by including a clause for this circumstance.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><ulink type="http" url="https://jira.jboss.org/browse/JBEPP-484"></ulink></term>
- <listitem>
- <para>
- Users who attempted to use the inline composer to change a portal's language locale to be country specific (Chinese, for example), would find that the locale reverted to English after the change was saved.
- </para>
- <para>
- This has been corrected with an update to code in <filename>UIPortalForm.java</filename>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><ulink type="http" url="https://jira.jboss.org/browse/JBEPP-470"></ulink></term>
- <listitem>
- <para>
- Hardcoded portlet ID format expectations in the Application Registry produced an exception when adding a new remotable portlet to a category if EPP was the producer (either self-consuming or from another EPP instance).
- </para>
- <para>
- A workaround has been introduced to the code to avoid this issue.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><ulink type="http" url="https://jira.jboss.org/browse/JBEPP-562"></ulink></term>
- <listitem>
- <para>
- A <emphasis role="bold">NullPointerException</emphasis> was be seen in a server log stacktrace after a user authenticated with the SPNEGO Single Sign-On method was automatically evicted after the set time-out period has elapsed.
- </para>
- <para>
- This issue did not produce any other effects and has been resolved with a change in the code in <filename>SPNEGORolesModule.java</filename>.
- </para>
- </listitem>
- </varlistentry>
+ <para>
+ This naming convention could allow data changes to affect the incorrect workspace.
+ </para>
+ <para>
+ The <literal>repository-configuration.xml</literal> file has been updated to resolve this issue.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <!-- JBEPP-530 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/jira/browse/JBEPP-530"/></term>
+ <listitem>
+ <para>
+ Users of previous versions of &PRODUCT; encountered minor issues when portlet webapp sessions outlived the user session.
+ </para>
+ <para>
+ This behavior has been addressed in this release and portlet webapp sessions are now cleaned when a new user signs into the portal.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <!-- JBEPP-533 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/jira/browse/JBEPP-533"/></term>
+ <listitem>
+ <para>
+ Prior to this release, running EPP 5.0.1, configured with LDAP, in a clustered configuration (using the startup parameter -Dexo.profiles=cluster) would produce NotSerializableExceptions within the OrganizationManagement portlet.
+ </para>
+ <para>
+ A number of java files in the product have been patched to avoid this issue.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <!-- JBEPP-534 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/jira/browse/JBEPP-534"/></term>
+ <listitem>
+ <para>
+ Users may have previously encountered errors when trying to add a remote gadget to a portal instance running on a HTTPS domain.
+ </para>
+ <para>
+ The error stated that the URL was invalid even when correct. This was because the Application Registry was expecting a valid certificate signed by a CA to verify the URL.
+ </para>
+ <para>
+ This error can be avoided by adding the certificate to the JRE CA with the command:
+ </para>
+<programlisting><command>keytool -import -alias toto -keystore /home/<replaceable><USER></replaceable>/Tools/Java/<replaceable><JDK_VERSION></replaceable>/jre/lib/security/cacerts -file ~/<replaceable>mycertificate</replaceable></command>
+</programlisting>
+ <para>
+ (Where mycertificate is the certificate created for SSL)
+ </para>
+ <para>
+ This information has also been added to the JBoss Enterprise Portal Platform User Guide.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <!-- JBEPP-535 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/jira/browse/JBEPP-535"/></term>
+ <listitem>
+ <para>
+ LDAP queries to retrieve stores containing entries with special characters (such as parenthesis) would fail.
+ </para>
+ <para>
+ The problematic characters are now escaped correctly, resolving the issue.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <!-- JBEPP-546 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/jira/browse/JBEPP-546"/></term>
+ <listitem>
+ <para>
+ A bug that affected the selection of users being added to a group has been fixed.
+ </para>
+ <para>
+ Prior to this release, user selections made on the first page of the user list, should the list span multiple pages, were lost when navigating to subsequent pages.
+ </para>
+ <para>
+ The user selections are now persistent across pages.
+ </para>
+ </listitem>
+ </varlistentry>
+
+
+ <!-- JBEPP-550 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/jira/browse/JBEPP-550"/></term>
+ <listitem>
+ <para>
+ A bug which resulted in users without membership in the "Web Contributors" group being unable to see the Administration bar has been corrected.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <!-- JBEPP-562 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/jira/browse/JBEPP-562"/></term>
+ <listitem>
+ <para>
+ In previous versions of &PRODUCT;, a <literal>NullPointerException</literal> could be seen in a server log stacktrace after a user authenticated with the SPNEGO Single Sign-On method is automatically evicted after the set time-out period has elapsed.
+ </para>
+ <para>
+ This issue has been resolved.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <!-- JBEPP-565 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/jira/browse/JBEPP-565"/></term>
+ <listitem>
+ <para>
+ An issue with the registration Captcha not changing after a successful registration has been corrected.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <!-- JBEPP-571 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/jira/browse/JBEPP-571"/></term>
+ <listitem>
+ <para>
+ A bug that caused user preferences to be lost when the ToDo gadget was dragged and dropped on a Dashboard has been resolved.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <!-- JBEPP-577 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/jira/browse/JBEPP-577"/></term>
+ <listitem>
+ <para>
+ Previous versions of &PRODUCT; used <literal>HashMap</literal> in the <literal>ConfigurationManager</literal> class for multithreaded environments. This caused the following message to appear in logs while using the product under heavy load:
+ </para>
+<programlisting>java.lang.Exception: Cannot find the configuration for the component org.exoplatform.portal.webui.container.UIContainerList, configId null
+</programlisting>
+ <para>
+ In the latest release, <literal>HashMap</literal> has been replaced with <literal>ConcurrentHashMap</literal>, which accepts default values for initial capacity, load factor and <literal>concurrencyLevel</literal> and resolves the exception.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <!-- JBEPP-579 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/jira/browse/JBEPP-579"/></term>
+ <listitem>
+ <para>
+ In previous releases, a NullPointerException would be encountered if no <filename>navigation.xml</filename> had been created for an LDAP user.
+ </para>
+ <para>
+ A change to code in <filename>UIUserToolBarDashboardPortlet.gtmpl</filename> has corrected this issue by including a clause for this circumstance.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <!-- JBEPP-584 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/jira/browse/JBEPP-584"/></term>
+ <listitem>
+ <para>
+ An ambiguous error message returned when a URL referenced in a gadget does not exist has been revised and clarified.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <!-- JBEPP-585 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/jira/browse/JBEPP-585"/></term>
+ <listitem>
+ <para>
+ A bug was found that prevented administrators from changing the permissions of a category in the Application Registry from Public to a restricted group.
+ </para>
+ <para>
+ The Application Registry <literal>UIPermissionForm</literal> java code has been patched to correct his behavior.
+ </para>
+ </listitem>
+ </varlistentry>
+
+
+ <!-- JBEPP-587 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/jira/browse/JBEPP-587"/></term>
+ <listitem>
+ <para>
+ Some gadgets that do not have configurable preferences were displaying an unusable edit icon.
+ </para>
+ <para>
+ The gadget UI has been amended to remove the edit icon in gadgets that do not have configurable preferences.
+ </para>
+ </listitem>
+ </varlistentry>
+
+
+ <!-- JBEPP-589 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/jira/browse/JBEPP-589"/></term>
+ <listitem>
+ <para>
+ The RSS reader gadget was displaying incorrect publication dates for items fetched from feed sources.
+ </para>
+ <para>
+ Each item was being displayed with a publish date of 'less than a minute ago', regardless of when it was published by the feed.
+ </para>
+ <para>
+ The RSS aggregator has been patched to fetch and display the correct publication date.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <!-- JBEPP-600 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/jira/browse/JBEPP-600"/></term>
+ <listitem>
+ <para>
+ In previous versions of &PRODUCT; creating new portals with names that contained all or part of the word 'portal' (such as: "por", "port", "porta" and "portal") resulted in an incorrect URL writing to the Site links section of the main portal. This, in turn, produced '404: Page not found' HTTP response errors when using these links.
+ </para>
+ <para>
+ This issue has been resolved.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <!-- JBEPP-614 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/jira/browse/JBEPP-614"/></term>
+ <listitem>
+ <para>
+ An issue was reported about &PRODUCT; caching recently changed passwords.
+ </para>
+ <para>
+ After a user changed their password, both the old and new password would allow them to log into the portal. This situation persisted until the portal was restarted.
+ </para>
+ <para>
+ This issue has now been resolved.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <!-- JBEPP-626 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/jira/browse/JBEPP-626"/></term>
+ <listitem>
+ <para>
+ The portal window state and edit mode were going back to default values when not specified on subsequent calls instead of keeping the previous value.
+ </para>
+ <para>
+ This issue has been resolved.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <!-- JBEPP-635 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/jira/browse/JBEPP-635"/></term>
+ <listitem>
+ <para>
+ Previous versions of &PRODUCT; would fail to start when configured to read groups from LDAP if those groups contained circular cross references. This situation would result in a <literal>StackOverflowError</literal>.
+ </para>
+ <para>
+ The issue has been corrected.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <!-- JBEPP-636 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/jira/browse/JBEPP-636"/></term>
+ <listitem>
+ <para>
+ In previous versions of &PRODUCT; that were configured to use LDAP, configuring portlets in edit mode would fail with a <literal>NullPointerException</literal> because of a failing null check in the <literal>findGroups</literal> method.
+ </para>
+ <para>
+ This issue has been resolved.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <!-- JBEPP-642 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/jira/browse/JBEPP-642"/></term>
+ <listitem>
+ <para>
+ The gadget server includes an anonymous proxy. This release includes a filter to reject any untrusted hosts.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <!-- JBEPP-677 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/jira/browse/JBEPP-677"/></term>
+ <listitem>
+ <para>
+ If portlets from different <filename>.war</filename> files or different <literal>PortletInvokers</literal> had the same name, creating the content for the portlet would fail because the customization process only used the local portlet name instead of a fully qualified version.
+ </para>
+ <para>
+ &PRODUCT; 5.1.0 uses the complete portlet context instead of just the portlet name to avoid collisions when creating content.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/jira/browse/JBEPP-692"/></term>
+ <listitem>
+ <para>
+ Previous releases of &PRODUCT; had the same value storage id for the Portlet container JCR value storage and JCR WSRP Value Storage. These have been changed to "<literal>pc-system</literal>" and "<literal>wsrp-system</literal>" respectively.
+ </para>
+ <para>
+ In case of issues during migration, customers are asked to reset the value <literal>value-storage id="gadgets"</literal> in the declaration of the pc-system and wsrp-system workspaces.
+ </para>
+ </listitem>
+ </varlistentry>
+
</variablelist> <!--Close list: Fixed in Product-->
<variablelist>
@@ -477,33 +709,11 @@
<term><ulink type="http" url="https://jira.jboss.org/browse/JBEPP-528"></ulink></term>
<listitem>
<para>
- Changes to javascript path handling (defined in gatein-resource.xml) in this release allow users to link to external Javascript sources.
+ Changes to javascript path handling (defined in <filename>gatein-resource.xml</filename>) in this release allow users to link to external Javascript sources.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><ulink type="http" url="https://jira.jboss.org/browse/JBEPP-530"></ulink></term>
- <listitem>
- <para>
- Users of previous versions of &PRODUCT; encountered minor issues when portlet webapp sessions outlived the user session.
- </para>
- <para>
- This behaviour has been addressed in this release and portlet webapp sessions are now cleaned when a new user signs into the portal.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><ulink type="http" url="https://jira.jboss.org/browse/JBEPP-490"></ulink></term>
- <listitem>
- <para>
- When editing a portal page layout by deleting a container that has <literal>PageBody</literal> content, users were able to continue deleting the container (by clicking the <guilabel>Finish</guilabel> button) while a warning message was displayed.
- </para>
- <para>
- This issue has been corrected. The <guilabel>Finish</guilabel> button no longer operates while warnings are displayed.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
<term><ulink type="http" url="https://jira.jboss.org/browse/JBEPP-482"></ulink></term>
<listitem>
<para>
@@ -515,17 +725,6 @@
</listitem>
</varlistentry>
<varlistentry>
- <term><ulink type="http" url="https://jira.jboss.org/browse/JBEPP-480"></ulink></term>
- <listitem>
- <para>
- The LDAP implementation has been updated to support paginated queries.
- </para>
- <para>
- Queries that return entries exceeding the limitations of the LDAP server are now separated into smaller queries that fall within the LDAP limitations.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
<term><ulink type="http" url="https://jira.jboss.org/browse/JBEPP-521"></ulink></term>
<listitem>
<para>
@@ -554,11 +753,23 @@
</section> <!-- Close Section: Issues Fixed-->
<section id="sect-Release_Notes-_Known_Issues_with_this_release_">
- <title> Known Issues with this release (Issues open as at 08 Nov 2010)</title>
+ <title> Known Issues with this release</title>
<para>
The following is a list of known issues in this release:
</para>
<variablelist>
+ <!-- JBEPP-737 Known Issue -->
+ <varlistentry>
+ <term><ulink type="http" url="https://issues.jboss.org/browse/JBEPP-737"></ulink></term>
+ <listitem>
+ <para>
+ The upload service will not work with Internet Explorer 7, any application using the upload service (such as EPP SP) will not behave correctly with this web browser unless if a name has been provided.
+ </para>
+ <para>
+ A patch is available from the Red Hat Customer Support Portal.
+ </para>
+ </listitem>
+ </varlistentry>
<varlistentry>
<term><ulink type="http" url="https://jira.jboss.org/browse/JBEPP-716"></ulink></term>
<listitem>
@@ -570,17 +781,7 @@
</para>
</listitem>
</varlistentry>
- <varlistentry>
- <term><ulink type="http" url="https://jira.jboss.org/browse/JBEPP-600"></ulink></term>
- <listitem>
- <para>
- Creating new portals with names that contain all or part of the word 'portal' (such as: "por", "port", "porta" and "portal") will result in an incorrect URL writing to the Site links section of the main portal. This, in turn, will produce '404: Page not found' HTTP response errors when using these links.
- </para>
- <para>
- Customers are advised to avoid using the problematic character sequences in new portal names until this issue is resolved.
- </para>
- </listitem>
- </varlistentry>
+
<varlistentry>
<term><ulink type="http" url="https://jira.jboss.org/browse/JBEPP-599"></ulink></term>
<listitem>
@@ -592,55 +793,15 @@
</para>
</listitem>
</varlistentry>
- <varlistentry>
- <term><ulink type="http" url="https://jira.jboss.org/browse/JBEPP-554"></ulink></term>
- <listitem>
- <para>
- Safari (specifically version 4.0.4) users may experience problems adding gadgets to Dashboard pages. JavaScript errors appear when dropping a gadget onto a page and empty space appears where the gadget was placed.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><ulink type="http" url="https://jira.jboss.org/browse/JBEPP-570"></ulink></term>
- <listitem>
- <para>
- &PRODUCT; &VERSION_MAJOR; does not start when used in conjunction with Oracle 11g R2 RAC. An error will occur when attempting to start the JCR connected to this type of database.
- </para>
- </listitem>
- </varlistentry>
</variablelist>
</section> <!-- Close Section: Known Issues-->
- <section>
+<!-- <section>
<title>Security Issues</title>
<variablelist>
- <varlistentry>
- <term><ulink type="http" url="https://jira.jboss.org/browse/JBEPP-610"></ulink></term>
- <listitem>
- <para>
- Customers should be aware that passwords entered into the portal login form and submitted with the <emphasis>Remember me</emphasis> option are stored in the JCR database in plain text. This presents a possible security vulnerability.
- </para>
- <!-- <important>
- <title><emphasis role="bold"></emphasis></title>
- <para>
- As yet there is no workaround/solution to this security issue.
- </para>
- </important> -->
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><ulink type="http" url="https://jira.jboss.org/browse/JBEPP-614"></ulink></term>
- <listitem>
- <para>
- An issue has been reported about EPP caching recently changed passwords. After a user changes their password, both the old and new password will allow them to log into the portal. This situation persists until the portal is restarted.
- </para>
- <para>
- Disable LDAP connection pooling to avoid this issue.
- </para>
- </listitem>
- </varlistentry>
+
</variablelist>
- </section> <!-- Close Section: Security Issues-->
+ </section>-->
<section id="sect-Release_Notes-Migration_from_Enterprise_Portal_Platform_4.3">
<title>Migration from Enterprise Portal Platform 4.3</title>
14 years
gatein SVN: r5603 - in components/wsrp/branches/2.0.x/consumer/src: test/java/org/gatein/wsrp/consumer/handlers and 3 other directories.
by do-not-reply@jboss.org
Author: mwringe
Date: 2010-12-17 09:27:10 -0500 (Fri, 17 Dec 2010)
New Revision: 5603
Modified:
components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandler.java
components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandlerTestCase.java
components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/protocol/v1/MarkupTestCase.java
components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/protocol/v2/MarkupTestCase.java
components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/test/support/TestPortletInvocationContext.java
Log:
GTNWSRP-187, GTNWSRP-144, GTNWSRP-186, GTNWSRP-183, GTNWSRP-185: Update how we handle url escaping, we need to make sure we are not changing the encoding type when recreating the portlet resource url. Multiple issues occur if we assume that everything needs to be xhtml escaped (especially things like css and javascript urls) Update tests.
Modified: components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandler.java
===================================================================
--- components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandler.java 2010-12-17 11:24:50 UTC (rev 5602)
+++ components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandler.java 2010-12-17 14:27:10 UTC (rev 5603)
@@ -250,6 +250,7 @@
private final Set<String> supportedCustomWindowStates;
private final String namespace;
+ //TODO: the URLFormat here doesn't make any sense, the escaping needs to be unique for each url processed.
protected MarkupProcessor(String namespace, PortletInvocationContext context, org.gatein.pc.api.PortletContext target, URLFormat format, ProducerInfo info)
{
this.namespace = namespace;
@@ -261,11 +262,45 @@
public String getReplacementFor(String match, String prefix, String suffix)
{
+ // We run into some issues with url encoding. We should not be making assumptions about
+ // what url encoding we should be using. For example, we may be dealing with html encoding (ampersand as &)
+ // or xhtml/xml encoding (ampersand as &) or javascript encoding (ampersand as \x26).
+ // When we recreate the WSRP url as a portlet url, we have to use whatever encoding was used in the original wsrp url,
+ // we need to assume that is the correct encoding for the situation.
+
+ // NOTE: there may be other encoding situations we are not currently dealing with :(
+
+ boolean useJavaScriptEscaping = false;
// work around for GTNWSRP-93:
+ if (match.contains("\\x2D") || match.contains("\\x26"))
+ {
+ useJavaScriptEscaping = true;
match = match.replaceAll("\\\\x2D", "-").replaceAll("\\\\x26", "&");
+ }
WSRPPortletURL portletURL = WSRPPortletURL.create(match, supportedCustomModes, supportedCustomWindowStates, true);
- return context.renderURL(portletURL, format);
+
+ URLFormat urlFormat;
+ // If the current url is using & then specify we want to use xml escaped ampersands
+ if (match.contains("&"))
+ {
+ urlFormat = new URLFormat(format.getWantSecure(), format.getWantAuthenticated(), format.getWantRelative(), true);
+ }
+ else
+ {
+ urlFormat = new URLFormat(format.getWantSecure(), format.getWantAuthenticated(), format.getWantRelative(), false);
+ }
+
+ String value = context.renderURL(portletURL, urlFormat);
+
+ // we now need to add back the javascript url encoding if it was originally used
+ // NOTE: we should fix this by specifying the escaping to be used in URLFormat when it supported (see GTNPC-41)
+ if (useJavaScriptEscaping)
+ {
+ value = value.replaceAll("-", "\\\\x2D").replaceAll("&", "\\\\x26");
+ }
+
+ return value;
}
}
}
Modified: components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandlerTestCase.java
===================================================================
--- components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandlerTestCase.java 2010-12-17 11:24:50 UTC (rev 5602)
+++ components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandlerTestCase.java 2010-12-17 14:27:10 UTC (rev 5603)
@@ -30,6 +30,7 @@
import org.gatein.pc.api.invocation.PortletInvocation;
import org.gatein.pc.api.invocation.response.ContentResponse;
import org.gatein.pc.api.invocation.response.PortletInvocationResponse;
+import org.gatein.wsrp.WSRPResourceURL;
import org.gatein.wsrp.WSRPRewritingConstants;
import org.gatein.wsrp.WSRPTypeFactory;
import org.gatein.wsrp.test.ExtendedAssert;
@@ -43,6 +44,7 @@
import org.oasis.wsrp.v2.ResourceContext;
import java.io.UnsupportedEncodingException;
+import java.net.URL;
/**
* @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
@@ -104,6 +106,29 @@
processMarkupAndCheck(markup, expected);
}
+ public void testURLEscaping() throws Exception
+ {
+ String markup;
+ String expected;
+
+ String resourceID = WSRPResourceURL.encodeResource(null, new URL("http://localhost:8080/test-resource-portlet/gif/logo.gif"), false);
+
+ //test with &
+ markup = "<img src='wsrp_rewrite?wsrp-urlType=resource&wsrp-url=http%3A%2F%2Flocalhost%3A8080%2Ftest-resource-portlet%2Fgif%2Flogo.gif&wsrp-requiresRewrite=true/wsrp_rewrite'/>";
+ expected = "<img src='http://test/mock:type=resource?mock:ComponentID=foobar&mock:resourceID=" + resourceID + "'/>";
+ processMarkupAndCheck(markup, expected);
+
+ //test with &
+ markup = "<img src='wsrp_rewrite?wsrp-urlType=resource&wsrp-url=http%3A%2F%2Flocalhost%3A8080%2Ftest-resource-portlet%2Fgif%2Flogo.gif&wsrp-requiresRewrite=true/wsrp_rewrite'/>";
+ expected = "<img src='http://test/mock:type=resource?mock:ComponentID=foobar&mock:resourceID=" + resourceID + "'/>";
+ processMarkupAndCheck(markup, expected);
+
+ //test with /x26
+ markup = "<img src='wsrp_rewrite?wsrp-urlType=resource\\x26wsrp-url=http%3A%2F%2Flocalhost%3A8080%2Ftest-resource-portlet%2Fgif%2Flogo.gif\\x26wsrp-requiresRewrite=true/wsrp_rewrite'/>";
+ expected = "<img src='http://test/mock:type=resource?mock:ComponentID=foobar\\x26mock:resourceID=" + resourceID + "'/>";
+ processMarkupAndCheck(markup, expected);
+ }
+
/*public void testResourceURLs()
{
String markup;
Modified: components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/protocol/v1/MarkupTestCase.java
===================================================================
--- components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/protocol/v1/MarkupTestCase.java 2010-12-17 11:24:50 UTC (rev 5602)
+++ components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/protocol/v1/MarkupTestCase.java 2010-12-17 14:27:10 UTC (rev 5603)
@@ -222,7 +222,7 @@
PortletInvocationResponse response = consumer.invoke(render);
String resourceID = WSRPResourceURL.encodeResource(null, new URL("http://localhost:8080/test-resource-portlet/gif/logo.gif"), false);
- String expectedResult = "<img src='Resource id=" + resourceID + " ns=null ws=null m=null'/>";
+ String expectedResult = "<img src='http://test/mock:type=resource?mock:ComponentID=foobar&mock:resourceID=" + resourceID + "'/>";
//NOTE: the value we get back is from the TestPortletInvocationContext, not what we would normally receive
checkRenderResult(response, expectedResult);
Modified: components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/protocol/v2/MarkupTestCase.java
===================================================================
--- components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/protocol/v2/MarkupTestCase.java 2010-12-17 11:24:50 UTC (rev 5602)
+++ components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/protocol/v2/MarkupTestCase.java 2010-12-17 14:27:10 UTC (rev 5603)
@@ -225,7 +225,7 @@
PortletInvocationResponse response = consumer.invoke(render);
String resourceID = WSRPResourceURL.encodeResource(null, new URL("http://localhost:8080/test-resource-portlet/gif/logo.gif"), false);
- String expectedResult = "<img src='Resource id=" + resourceID + " ns=null ws=null m=null'/>";
+ String expectedResult = "<img src='http://test/mock:type=resource?mock:ComponentID=foobar&mock:resourceID=" + resourceID + "'/>";
//NOTE: the value we get back is from the TestPortletInvocationContext, not what we would normally receive
checkRenderResult(response, expectedResult);
Modified: components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/test/support/TestPortletInvocationContext.java
===================================================================
--- components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/test/support/TestPortletInvocationContext.java 2010-12-17 11:24:50 UTC (rev 5602)
+++ components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/test/support/TestPortletInvocationContext.java 2010-12-17 14:27:10 UTC (rev 5603)
@@ -101,9 +101,24 @@
{
result = "Render";
}
+ else //dealing with a resource
+ {
+ //fake setup which approximates what the actual PortletInvocationContext should be doing.
+ String url = "http://test/mock:type=resource?mock:ComponentID=foobar";
+ ResourceURL resourceURL = ((ResourceURL)containerURL);
+
+ if (urlFormat.getWantEscapeXML())
+ {
+ url += "&";
+ }
else
{
- result = "Resource id=" + ((ResourceURL)containerURL).getResourceId();
+ url += "&";
+ }
+
+ url += "mock:resourceID=" + resourceURL.getResourceId();
+
+ return url;
}
StateString ns = containerURL.getNavigationalState();
14 years
gatein SVN: r5602 - portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/NewSnifftest.
by do-not-reply@jboss.org
Author: hangnguyen
Date: 2010-12-17 06:24:50 -0500 (Fri, 17 Dec 2010)
New Revision: 5602
Modified:
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/NewSnifftest/Test_SNF_PRL_19_LinkToGadget.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/NewSnifftest/Test_SNF_PRL_32_MoreActionOnNodeInEditNavigationOfPortal.html.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/NewSnifftest/Test_SNF_PRL_33_EditNodePageProperties.html
Log:
TESTVN-2195 - Daily tests on GateIn - Clean and improve scripts
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/NewSnifftest/Test_SNF_PRL_19_LinkToGadget.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/NewSnifftest/Test_SNF_PRL_19_LinkToGadget.html 2010-12-17 09:24:12 UTC (rev 5601)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/NewSnifftest/Test_SNF_PRL_19_LinkToGadget.html 2010-12-17 11:24:50 UTC (rev 5602)
@@ -78,17 +78,17 @@
</tr>
<tr>
<td>click</td>
- <td>//div[@id='UISiteMap']/div[2]/div/div[4]/div[1]/a</td>
+ <td>//div[@id='UISiteMap']//a[text()='Organization']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
- <td>//div[@id='UISiteMap']/div[2]/div/div[4]/div[2]/div[2]/div/div/a</td>
+ <td>//a[@href='/portal/private/classic/organization/management']</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
- <td>//div[@id='UISiteMap']/div[2]/div/div[4]/div[2]/div[2]/div/div/a</td>
+ <td>//a[@href='/portal/private/classic/organization/management']</td>
<td></td>
</tr>
<tr>
@@ -121,7 +121,6 @@
<td>link=Sign out</td>
<td></td>
</tr>
-
</tbody></table>
</body>
</html>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/NewSnifftest/Test_SNF_PRL_32_MoreActionOnNodeInEditNavigationOfPortal.html.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/NewSnifftest/Test_SNF_PRL_32_MoreActionOnNodeInEditNavigationOfPortal.html.html 2010-12-17 09:24:12 UTC (rev 5601)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/NewSnifftest/Test_SNF_PRL_32_MoreActionOnNodeInEditNavigationOfPortal.html.html 2010-12-17 11:24:50 UTC (rev 5602)
@@ -413,12 +413,12 @@
</tr>
<tr>
<td>waitForElementPresent</td>
- <td>//div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[8]/div/a</td>
+ <td>//a[@title='Test_SNF_PRL_32']</td>
<td></td>
</tr>
<tr>
<td>click</td>
- <td>//div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[8]/div/a</td>
+ <td>//a[@title='Test_SNF_PRL_32']</td>
<td></td>
</tr>
<tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/NewSnifftest/Test_SNF_PRL_33_EditNodePageProperties.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/NewSnifftest/Test_SNF_PRL_33_EditNodePageProperties.html 2010-12-17 09:24:12 UTC (rev 5601)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/NewSnifftest/Test_SNF_PRL_33_EditNodePageProperties.html 2010-12-17 11:24:50 UTC (rev 5602)
@@ -272,6 +272,11 @@
<td></td>
</tr>
<tr>
+ <td>pause</td>
+ <td>1000</td>
+ <td></td>
+</tr>
+<tr>
<td>echo</td>
<td>-- Click Finish edit node's page--</td>
<td></td>
@@ -397,6 +402,11 @@
<td></td>
</tr>
<tr>
+ <td>pause</td>
+ <td>1000</td>
+ <td></td>
+</tr>
+<tr>
<td>echo</td>
<td>-- Click Finish edit node's page--</td>
<td></td>
@@ -437,6 +447,11 @@
<td></td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
<td>clickAndWait</td>
<td>link=Site</td>
<td></td>
@@ -521,7 +536,6 @@
<td>link=Sign out</td>
<td></td>
</tr>
-
</tbody></table>
</body>
</html>
14 years, 1 month
gatein SVN: r5601 - exo/portal/branches/webos-gatein-branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page.
by do-not-reply@jboss.org
Author: hoang_to
Date: 2010-12-17 04:24:12 -0500 (Fri, 17 Dec 2010)
New Revision: 5601
Modified:
exo/portal/branches/webos-gatein-branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java
Log:
Remove DesktopPage-related check from UIPageForm
Modified: exo/portal/branches/webos-gatein-branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java
===================================================================
--- exo/portal/branches/webos-gatein-branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java 2010-12-17 04:17:04 UTC (rev 5600)
+++ exo/portal/branches/webos-gatein-branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java 2010-12-17 09:24:12 UTC (rev 5601)
@@ -292,49 +292,6 @@
applications.add(PortalDataMapper.buildModelObject(uiPortlet));
}
- if (Page.DESKTOP_PAGE.equals(uiPage.getFactoryId()) && !Page.DESKTOP_PAGE.equals(page.getFactoryId()))
- {
- page.setShowMaxWindow(false);
- uiPage.getChildren().clear();
- page.setChildren(applications);
-
- PortalDataMapper.toUIPage(uiPage, page);
- // if(page.getTemplate() == null) page.setTemplate(uiPage.getTemplate()) ;
- if (page.getChildren() == null)
- page.setChildren(new ArrayList<ModelObject>());
-
- // uiEditBar.setUIPage(uiPage);
- // Class<?> [] childrenToRender = {UIPageEditBar.class,
- // UIPageNodeSelector.class, UIPageNavigationControlBar.class};
- // uiManagement.setRenderedChildrenOfTypes(childrenToRender);
-
- pcontext.setFullRender(true);
- UIWorkingWorkspace uiWorkingWS = uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
- pcontext.addUIComponentToUpdateByAjax(uiWorkingWS);
-
- return;
- }
-
- if (Page.DESKTOP_PAGE.equals(page.getFactoryId()))
- {
- uiPage.getChildren().clear();
- page.setChildren(applications);
-
- PortalDataMapper.toUIPage(uiPage, page);
- // if(page.getTemplate() == null) page.setTemplate(uiPage.getTemplate()) ;
- if (page.getChildren() == null)
- page.setChildren(new ArrayList<ModelObject>());
-
- UIPortalToolPanel toolPanel = Util.getUIPortalToolPanel();
- toolPanel.setShowMaskLayer(true);
- pcontext.setFullRender(true);
- UIWorkingWorkspace uiWorkingWS = uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
- pcontext.addUIComponentToUpdateByAjax(uiWorkingWS);
- DataStorage dataService = uiPageForm.getApplicationComponent(DataStorage.class);
- dataService.save(page);
- return;
- }
-
List<UIComponent> uiChildren = uiPage.getChildren();
if (uiChildren == null)
{
14 years, 1 month
gatein SVN: r5600 - portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application.
by do-not-reply@jboss.org
Author: mwringe
Date: 2010-12-16 23:17:04 -0500 (Thu, 16 Dec 2010)
New Revision: 5600
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java
Log:
GTNWSRP-187: we should not be sending queryString with & to the common module's QueryStringParser, it only accepts &
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java 2010-12-17 04:15:25 UTC (rev 5599)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java 2010-12-17 04:17:04 UTC (rev 5600)
@@ -148,6 +148,8 @@
String queryString = req.getQueryString();
if (queryString != null)
{
+ //The QueryStringParser currently only likes & and not &
+ queryString = queryString.replace("&", "&");
Map<String, String[]> queryParams = QueryStringParser.getInstance().parseQueryString(queryString);
parameterMap.putAll(queryParams);
}
14 years, 1 month
gatein SVN: r5599 - in components/wsrp/trunk/consumer/src: test/java/org/gatein/wsrp/consumer/handlers and 3 other directories.
by do-not-reply@jboss.org
Author: mwringe
Date: 2010-12-16 23:15:25 -0500 (Thu, 16 Dec 2010)
New Revision: 5599
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandler.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandlerTestCase.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v1/MarkupTestCase.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v2/MarkupTestCase.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/TestPortletInvocationContext.java
Log:
GTNWSRP-187, GTNWSRP-144, GTNWSRP-186, GTNWSRP-183, GTNWSRP-185: Update how we handle url escaping, we need to make sure we are not changing the encoding type when recreating the portlet resource url. Multiple issues occur if we assume that everything needs to be xhtml escaped (especially things like css and javascript urls) Update tests.
Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandler.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandler.java 2010-12-16 15:52:17 UTC (rev 5598)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandler.java 2010-12-17 04:15:25 UTC (rev 5599)
@@ -250,6 +250,7 @@
private final Set<String> supportedCustomWindowStates;
private final String namespace;
+ //TODO: the URLFormat here doesn't make any sense, the escaping needs to be unique for each url processed.
protected MarkupProcessor(String namespace, PortletInvocationContext context, org.gatein.pc.api.PortletContext target, URLFormat format, ProducerInfo info)
{
this.namespace = namespace;
@@ -261,11 +262,45 @@
public String getReplacementFor(String match, String prefix, String suffix)
{
+ // We run into some issues with url encoding. We should not be making assumptions about
+ // what url encoding we should be using. For example, we may be dealing with html encoding (ampersand as &)
+ // or xhtml/xml encoding (ampersand as &) or javascript encoding (ampersand as \x26).
+ // When we recreate the WSRP url as a portlet url, we have to use whatever encoding was used in the original wsrp url,
+ // we need to assume that is the correct encoding for the situation.
+
+ // NOTE: there may be other encoding situations we are not currently dealing with :(
+
+ boolean useJavaScriptEscaping = false;
// work around for GTNWSRP-93:
- match = match.replaceAll("\\\\x2D", "-").replaceAll("\\\\x26", "&");
+ if (match.contains("\\x2D") || match.contains("\\x26"))
+ {
+ useJavaScriptEscaping = true;
+ match = match.replaceAll("\\\\x2D", "-").replaceAll("\\\\x26", "&");
+ }
WSRPPortletURL portletURL = WSRPPortletURL.create(match, supportedCustomModes, supportedCustomWindowStates, true);
- return context.renderURL(portletURL, format);
+
+ URLFormat urlFormat;
+ // If the current url is using & then specify we want to use xml escaped ampersands
+ if (match.contains("&"))
+ {
+ urlFormat = new URLFormat(format.getWantSecure(), format.getWantAuthenticated(), format.getWantRelative(), true);
+ }
+ else
+ {
+ urlFormat = new URLFormat(format.getWantSecure(), format.getWantAuthenticated(), format.getWantRelative(), false);
+ }
+
+ String value = context.renderURL(portletURL, urlFormat);
+
+ // we now need to add back the javascript url encoding if it was originally used
+ // NOTE: we should fix this by specifying the escaping to be used in URLFormat when it supported (see GTNPC-41)
+ if (useJavaScriptEscaping)
+ {
+ value = value.replaceAll("-", "\\\\x2D").replaceAll("&", "\\\\x26");
+ }
+
+ return value;
}
}
}
Modified: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandlerTestCase.java
===================================================================
--- components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandlerTestCase.java 2010-12-16 15:52:17 UTC (rev 5598)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandlerTestCase.java 2010-12-17 04:15:25 UTC (rev 5599)
@@ -30,6 +30,7 @@
import org.gatein.pc.api.invocation.PortletInvocation;
import org.gatein.pc.api.invocation.response.ContentResponse;
import org.gatein.pc.api.invocation.response.PortletInvocationResponse;
+import org.gatein.wsrp.WSRPResourceURL;
import org.gatein.wsrp.WSRPRewritingConstants;
import org.gatein.wsrp.WSRPTypeFactory;
import org.gatein.wsrp.test.ExtendedAssert;
@@ -43,6 +44,7 @@
import org.oasis.wsrp.v2.ResourceContext;
import java.io.UnsupportedEncodingException;
+import java.net.URL;
/**
* @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
@@ -104,6 +106,29 @@
processMarkupAndCheck(markup, expected);
}
+ public void testURLEscaping() throws Exception
+ {
+ String markup;
+ String expected;
+
+ String resourceID = WSRPResourceURL.encodeResource(null, new URL("http://localhost:8080/test-resource-portlet/gif/logo.gif"), false);
+
+ //test with &
+ markup = "<img src='wsrp_rewrite?wsrp-urlType=resource&wsrp-url=http%3A%2F%2Flocalhost%3A8080%2Ftest-resource-portlet%2Fgif%2Flogo.gif&wsrp-requiresRewrite=true/wsrp_rewrite'/>";
+ expected = "<img src='http://test/mock:type=resource?mock:ComponentID=foobar&mock:resourceID=" + resourceID + "'/>";
+ processMarkupAndCheck(markup, expected);
+
+ //test with &
+ markup = "<img src='wsrp_rewrite?wsrp-urlType=resource&wsrp-url=http%3A%2F%2Flocalhost%3A8080%2Ftest-resource-portlet%2Fgif%2Flogo.gif&wsrp-requiresRewrite=true/wsrp_rewrite'/>";
+ expected = "<img src='http://test/mock:type=resource?mock:ComponentID=foobar&mock:resourceID=" + resourceID + "'/>";
+ processMarkupAndCheck(markup, expected);
+
+ //test with /x26
+ markup = "<img src='wsrp_rewrite?wsrp-urlType=resource\\x26wsrp-url=http%3A%2F%2Flocalhost%3A8080%2Ftest-resource-portlet%2Fgif%2Flogo.gif\\x26wsrp-requiresRewrite=true/wsrp_rewrite'/>";
+ expected = "<img src='http://test/mock:type=resource?mock:ComponentID=foobar\\x26mock:resourceID=" + resourceID + "'/>";
+ processMarkupAndCheck(markup, expected);
+ }
+
/*public void testResourceURLs()
{
String markup;
Modified: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v1/MarkupTestCase.java
===================================================================
--- components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v1/MarkupTestCase.java 2010-12-16 15:52:17 UTC (rev 5598)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v1/MarkupTestCase.java 2010-12-17 04:15:25 UTC (rev 5599)
@@ -222,7 +222,7 @@
PortletInvocationResponse response = consumer.invoke(render);
String resourceID = WSRPResourceURL.encodeResource(null, new URL("http://localhost:8080/test-resource-portlet/gif/logo.gif"), false);
- String expectedResult = "<img src='Resource id=" + resourceID + " ns=null ws=null m=null'/>";
+ String expectedResult = "<img src='http://test/mock:type=resource?mock:ComponentID=foobar&mock:resourceID=" + resourceID + "'/>";
//NOTE: the value we get back is from the TestPortletInvocationContext, not what we would normally receive
checkRenderResult(response, expectedResult);
Modified: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v2/MarkupTestCase.java
===================================================================
--- components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v2/MarkupTestCase.java 2010-12-16 15:52:17 UTC (rev 5598)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v2/MarkupTestCase.java 2010-12-17 04:15:25 UTC (rev 5599)
@@ -225,7 +225,7 @@
PortletInvocationResponse response = consumer.invoke(render);
String resourceID = WSRPResourceURL.encodeResource(null, new URL("http://localhost:8080/test-resource-portlet/gif/logo.gif"), false);
- String expectedResult = "<img src='Resource id=" + resourceID + " ns=null ws=null m=null'/>";
+ String expectedResult = "<img src='http://test/mock:type=resource?mock:ComponentID=foobar&mock:resourceID=" + resourceID + "'/>";;
//NOTE: the value we get back is from the TestPortletInvocationContext, not what we would normally receive
checkRenderResult(response, expectedResult);
Modified: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/TestPortletInvocationContext.java
===================================================================
--- components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/TestPortletInvocationContext.java 2010-12-16 15:52:17 UTC (rev 5598)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/TestPortletInvocationContext.java 2010-12-17 04:15:25 UTC (rev 5599)
@@ -101,9 +101,24 @@
{
result = "Render";
}
- else
+ else //dealing with a resource
{
- result = "Resource id=" + ((ResourceURL)containerURL).getResourceId();
+ //fake setup which approximates what the actual PortletInvocationContext should be doing.
+ String url = "http://test/mock:type=resource?mock:ComponentID=foobar";
+ ResourceURL resourceURL = ((ResourceURL)containerURL);
+
+ if (urlFormat.getWantEscapeXML())
+ {
+ url += "&";
+ }
+ else
+ {
+ url += "&";
+ }
+
+ url += "mock:resourceID=" + resourceURL.getResourceId();
+
+ return url;
}
StateString ns = containerURL.getNavigationalState();
14 years, 1 month
gatein SVN: r5598 - in epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US: images and 1 other directory.
by do-not-reply@jboss.org
Author: smumford
Date: 2010-12-16 10:52:17 -0500 (Thu, 16 Dec 2010)
New Revision: 5598
Modified:
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/Middleware_Feedback.xml
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Account.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/AccountProfiles.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/AccountProfiles3.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/AccountSetting.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/ActionGadget.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/ActivePortals.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/AddApplication.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/AddCategory1.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/AddGadgetnew.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/AddGadgetnewUrl.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/AddGroup.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/AddMember1.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/AddNode4.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/AddPermission.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/AddPortal.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/AddPortlet2.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Admin1.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Application1.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/ApplicationRegistry.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/ApplicationRegistry2.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/BannerPortlet.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Breadcrumbs.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Calculator.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Calendar.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/ChangeAccount.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/ChangePassword.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/CloneNode2.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/CodePaste.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Column.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/ContextMenu1.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/CopyNode3.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/CreateEditNode.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/CreateGadget1.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/CutNode4.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Dash2.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Dash_Column.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Dash_Workspace.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Dashboard.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Dashboard1.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/DashboardPortlet.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Dashname.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Dashname1.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/DeleteGroup.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/DeleteNode2.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Demo1.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Demo3.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/DragPage1.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/DragPage3.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/EditApplication.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/EditApplicationInformation.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/EditCategoryPermissions.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/EditLayout.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/EditLayout2.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/EditLayout3.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/EditMember1.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/EditNavigation.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/EditNavigation1.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/EditNode1.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/EditPortal2.6New.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/EditingArea1.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/EditorPortlet.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/EmailError.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/EnterLink.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/FCK1.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/FinishAbortButtons.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Footer.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Forgot1.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/ForgotEmail1.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/ForgotUserName1.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Frontpage.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/GadgetContainer.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/GadgetManagement.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/GadgetManagement1.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/GadgetWrapper.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Gadgetnew.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/GoogleGadgets.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/GroupManage.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/GroupPortlet.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/HomePage2.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Inter2.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/InterfaceLanguage.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Link.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/ManagePage.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/MembershipManage1.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/MoveUpDown.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/NavigationManagement.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/NavigationPortlet.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/NewAccount3.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/NewGadget.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/NewSearch1.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/NewSearch2.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/NewStaff.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/NodeIcons.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Non-tech-docs.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Org1.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Organization5.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/OrganizationPortlet1.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/PageNodeSetting.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/PageSelector.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/PageSetting.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/PageSetting1.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/PageWizard.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/PageWizard2.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/PageWizard3.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Pagewizard1.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/PasteNode3.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Permission2.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/PermissionSetting1.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/PermissionSetting2.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/PortalPermission.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/PortalProperties.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/PortalSetting2.5.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/PortalTemplate.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/PortalTemplates.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/PortletPermission.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/RSSReader.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Register.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/RememberMe.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Resource2.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Resource3.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/ResourceData1.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/SearchUser.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/SelectPage1.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/SignIn1.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Signin.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/SiteMap.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/SitePortlet.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Skin1.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/SkinSet1.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Source.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/StarPortlet.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/SureDelete.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Todo.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/ToolBar1.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Toolbar.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/UserManage.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/UserWorkspace.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/UserWorkspace1.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Verification.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Videos.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Wizard1.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/XMLURL.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/httpNode.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/httpPage.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/local.png
epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/tabbed_dash.png
Log:
JBEPP-516: Fix images to 32 bit for pdf bug
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/Middleware_Feedback.xml
===================================================================
--- epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/Middleware_Feedback.xml 2010-12-16 14:38:39 UTC (rev 5597)
+++ epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/Middleware_Feedback.xml 2010-12-16 15:52:17 UTC (rev 5598)
@@ -18,7 +18,7 @@
<title>Give us Feedback</title>
<para>
- If you find a typographical error, or know how this guide can be improved, we would love to hear from you. Submit a report in Bugzilla against the . The following link will take you to bug report for &PRODUCT;<ulink type="http" url="https://bugzilla.redhat.com/enter_bug.cgi?product=JBoss%20Enterprise%20Po...">https://bugzilla.redhat.com/</ulink>.
+ If you find a typographical error, or know how this guide can be improved, we would love to hear from you. Submit a report in Bugzilla against the &PRODUCT; &BOOKID;. The following link will take you to bug report for &PRODUCT; <ulink type="http" url="https://bugzilla.redhat.com/enter_bug.cgi?product=JBoss%20Enterprise%20Po...">https://bugzilla.redhat.com/</ulink>.
</para>
<para>
Select the document name and version number relevant to the document you found the error in from the available lists then complete the description with as much detail as you can provide.
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Account.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/AccountProfiles.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/AccountProfiles3.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/AccountSetting.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/ActionGadget.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/ActivePortals.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/AddApplication.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/AddCategory1.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/AddGadgetnew.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/AddGadgetnewUrl.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/AddGroup.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/AddMember1.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/AddNode4.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/AddPermission.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/AddPortal.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/AddPortlet2.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Admin1.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Application1.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/ApplicationRegistry.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/ApplicationRegistry2.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/BannerPortlet.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Breadcrumbs.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Calculator.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Calendar.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/ChangeAccount.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/ChangePassword.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/CloneNode2.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/CodePaste.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Column.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/ContextMenu1.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/CopyNode3.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/CreateEditNode.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/CreateGadget1.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/CutNode4.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Dash2.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Dash_Column.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Dash_Workspace.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Dashboard.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Dashboard1.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/DashboardPortlet.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Dashname.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Dashname1.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/DeleteGroup.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/DeleteNode2.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Demo1.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Demo3.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/DragPage1.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/DragPage3.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/EditApplication.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/EditApplicationInformation.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/EditCategoryPermissions.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/EditLayout.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/EditLayout2.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/EditLayout3.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/EditMember1.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/EditNavigation.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/EditNavigation1.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/EditNode1.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/EditPortal2.6New.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/EditingArea1.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/EditorPortlet.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/EmailError.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/EnterLink.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/FCK1.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/FinishAbortButtons.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Footer.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Forgot1.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/ForgotEmail1.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/ForgotUserName1.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Frontpage.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/GadgetContainer.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/GadgetManagement.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/GadgetManagement1.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/GadgetWrapper.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Gadgetnew.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/GoogleGadgets.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/GroupManage.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/GroupPortlet.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/HomePage2.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Inter2.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/InterfaceLanguage.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Link.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/ManagePage.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/MembershipManage1.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/MoveUpDown.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/NavigationManagement.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/NavigationPortlet.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/NewAccount3.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/NewGadget.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/NewSearch1.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/NewSearch2.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/NewStaff.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/NodeIcons.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Non-tech-docs.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Org1.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Organization5.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/OrganizationPortlet1.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/PageNodeSetting.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/PageSelector.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/PageSetting.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/PageSetting1.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/PageWizard.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/PageWizard2.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/PageWizard3.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Pagewizard1.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/PasteNode3.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Permission2.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/PermissionSetting1.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/PermissionSetting2.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/PortalPermission.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/PortalProperties.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/PortalSetting2.5.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/PortalTemplate.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/PortalTemplates.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/PortletPermission.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/RSSReader.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Register.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/RememberMe.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Resource2.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Resource3.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/ResourceData1.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/SearchUser.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/SelectPage1.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/SignIn1.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Signin.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/SiteMap.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/SitePortlet.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Skin1.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/SkinSet1.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Source.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/StarPortlet.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/SureDelete.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Todo.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/ToolBar1.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Toolbar.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/UserManage.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/UserWorkspace.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/UserWorkspace1.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Verification.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Videos.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/Wizard1.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/XMLURL.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/httpNode.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/httpPage.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/local.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/User_Guide/en-US/images/tabbed_dash.png
===================================================================
(Binary files differ)
14 years, 1 month
gatein SVN: r5597 - in components/wsrp/trunk/consumer/src: main/java/org/gatein/wsrp/consumer/handlers and 3 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-12-16 09:38:39 -0500 (Thu, 16 Dec 2010)
New Revision: 5597
Added:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/spi/
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/spi/WSRPConsumerSPI.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandlerTestCase.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/TestActionInvocation.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/TestRenderInvocation.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/TestResourceInvocation.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/TestWindowContext.java
Removed:
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/handlers/RenderHandlerTestCase.java
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/WSRPConsumerImpl.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/DirectResourceServingHandler.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/InvocationHandler.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandler.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/RenderHandler.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/ResourceHandler.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/MockWSRPConsumer.java
Log:
- GTNWSRP-189: attempt to rewrite textual content that's sent as binary. Added test cases.
- Introduced WSRPConsumerSPI interface and made WSPRConsumerImpl implement so that we could refactor the code to be more easily testable.
- Added support test classes.
Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/WSRPConsumerImpl.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/WSRPConsumerImpl.java 2010-12-16 14:38:05 UTC (rev 5596)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/WSRPConsumerImpl.java 2010-12-16 14:38:39 UTC (rev 5597)
@@ -57,6 +57,7 @@
import org.gatein.wsrp.consumer.migration.MigrationService;
import org.gatein.wsrp.consumer.portlet.WSRPPortlet;
import org.gatein.wsrp.consumer.portlet.info.WSRPPortletInfo;
+import org.gatein.wsrp.consumer.spi.WSRPConsumerSPI;
import org.gatein.wsrp.services.MarkupService;
import org.gatein.wsrp.services.PortletManagementService;
import org.gatein.wsrp.services.RegistrationService;
@@ -106,7 +107,7 @@
* @version $Revision: 11692 $
* @since 2.4
*/
-public class WSRPConsumerImpl implements WSRPConsumer
+public class WSRPConsumerImpl implements WSRPConsumerSPI
{
private final SessionHandler sessionHandler;
@@ -518,12 +519,6 @@
return Collections.unmodifiableSet(supportedUserScopes);
}
- /**
- * Determines whether the specified user scope (for markup caching) is supported.
- *
- * @param userScope the user scope which support is to be determined
- * @return <code>true</code> if the given user scope is supported, <code>false</code> otherwise
- */
public boolean supportsUserScope(String userScope)
{
return supportedUserScopes.contains(userScope);
Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/DirectResourceServingHandler.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/DirectResourceServingHandler.java 2010-12-16 14:38:05 UTC (rev 5596)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/DirectResourceServingHandler.java 2010-12-16 14:38:39 UTC (rev 5597)
@@ -27,12 +27,11 @@
import org.gatein.common.io.IOTools;
import org.gatein.common.net.media.MediaType;
import org.gatein.common.net.media.SubtypeDef;
-import org.gatein.common.net.media.TypeDef;
import org.gatein.common.util.MultiValuedPropertyMap;
import org.gatein.common.util.Tools;
import org.gatein.pc.api.invocation.response.ResponseProperties;
import org.gatein.wsrp.WSRPTypeFactory;
-import org.gatein.wsrp.consumer.WSRPConsumerImpl;
+import org.gatein.wsrp.consumer.spi.WSRPConsumerSPI;
import org.gatein.wsrp.handler.CookieUtil;
import org.gatein.wsrp.handler.RequestHeaderClientHandler;
import org.oasis.wsrp.v2.GetResource;
@@ -50,7 +49,7 @@
*/
public class DirectResourceServingHandler extends ResourceHandler
{
- protected DirectResourceServingHandler(WSRPConsumerImpl consumer)
+ protected DirectResourceServingHandler(WSRPConsumerSPI consumer)
{
super(consumer);
}
@@ -119,9 +118,8 @@
ResourceContext resourceContext;
MediaType type = MediaType.create(contentType);
- //TODO: handle this better, we should probably have a class in the common module to determine if the MediaType should be treated as a text
- // file or as binary content. We also need to implement the algorithm to determine the character encoding.
- if (TypeDef.TEXT.equals(type.getType()) || (TypeDef.APPLICATION.equals(type.getType()) && (type.getSubtype().getName().contains("javascript"))))
+ // GTNCOMMON-14
+ if (isInterpretableAsText(type))
{
// determine the charset of the content, if any
String charset = "UTF-8";
Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/InvocationHandler.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/InvocationHandler.java 2010-12-16 14:38:05 UTC (rev 5596)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/InvocationHandler.java 2010-12-16 14:38:39 UTC (rev 5597)
@@ -39,6 +39,7 @@
import org.gatein.wsrp.WSRPUtils;
import org.gatein.wsrp.consumer.ProducerInfo;
import org.gatein.wsrp.consumer.WSRPConsumerImpl;
+import org.gatein.wsrp.consumer.spi.WSRPConsumerSPI;
import org.gatein.wsrp.spec.v2.WSRP2RewritingConstants;
import org.oasis.wsrp.v2.InvalidCookie;
import org.oasis.wsrp.v2.InvalidRegistration;
@@ -65,7 +66,7 @@
*/
public abstract class InvocationHandler<Invocation extends PortletInvocation, Request, Response>
{
- protected final WSRPConsumerImpl consumer;
+ protected final WSRPConsumerSPI consumer;
protected static Logger log = LoggerFactory.getLogger(InvocationHandler.class);
protected static boolean debug = log.isDebugEnabled();
@@ -80,7 +81,7 @@
/** Maximum number of tries before giving up. */
private static final int MAXIMUM_RETRY_NUMBER = 3;
- protected InvocationHandler(WSRPConsumerImpl consumer)
+ protected InvocationHandler(WSRPConsumerSPI consumer)
{
this.consumer = consumer;
}
@@ -318,7 +319,7 @@
private static final String STREAM_INFO = "stream info in invocation context";
private static final String USER_AGENT = "User-Agent";
- public RequestPrecursor(WSRPConsumerImpl wsrpConsumer, Invocation invocation) throws PortletInvokerException
+ public RequestPrecursor(WSRPConsumerSPI wsrpConsumer, Invocation invocation) throws PortletInvokerException
{
// retrieve handle
portletContext = WSRPUtils.convertToWSRPPortletContext(WSRPConsumerImpl.getPortletContext(invocation));
Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandler.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandler.java 2010-12-16 14:38:05 UTC (rev 5596)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandler.java 2010-12-16 14:38:39 UTC (rev 5597)
@@ -23,6 +23,8 @@
package org.gatein.wsrp.consumer.handlers;
+import org.gatein.common.net.media.MediaType;
+import org.gatein.common.net.media.TypeDef;
import org.gatein.common.text.TextTools;
import org.gatein.common.util.ParameterValidation;
import org.gatein.pc.api.PortletInvokerException;
@@ -34,17 +36,19 @@
import org.gatein.pc.api.invocation.response.PortletInvocationResponse;
import org.gatein.pc.api.invocation.response.ResponseProperties;
import org.gatein.pc.api.spi.PortletInvocationContext;
+import org.gatein.pc.api.spi.SecurityContext;
import org.gatein.wsrp.WSRPConstants;
import org.gatein.wsrp.WSRPConsumer;
import org.gatein.wsrp.WSRPPortletURL;
import org.gatein.wsrp.WSRPRewritingConstants;
import org.gatein.wsrp.WSRPTypeFactory;
import org.gatein.wsrp.consumer.ProducerInfo;
-import org.gatein.wsrp.consumer.WSRPConsumerImpl;
+import org.gatein.wsrp.consumer.spi.WSRPConsumerSPI;
import org.oasis.wsrp.v2.CacheControl;
import org.oasis.wsrp.v2.MimeResponse;
import org.oasis.wsrp.v2.SessionContext;
+import java.io.UnsupportedEncodingException;
import java.util.Map;
import java.util.Set;
@@ -56,11 +60,24 @@
{
private static final org.gatein.pc.api.cache.CacheControl DEFAULT_CACHE_CONTROL = new org.gatein.pc.api.cache.CacheControl(0, CacheScope.PRIVATE, null);
- protected MimeResponseHandler(WSRPConsumerImpl consumer)
+ protected MimeResponseHandler(WSRPConsumerSPI consumer)
{
super(consumer);
}
+ /**
+ * TODO: handle this better, we should probably have a class in the common module to determine if the MediaType
+ * should be treated as a text file or as binary content. We also need to implement the algorithm to determine the
+ * character encoding. See GTNCOMMON-14
+ *
+ * @param type
+ * @return
+ */
+ public static boolean isInterpretableAsText(MediaType type)
+ {
+ return TypeDef.TEXT.equals(type.getType()) || (TypeDef.APPLICATION.equals(type.getType()) && (type.getSubtype().getName().contains("javascript")));
+ }
+
protected abstract SessionContext getSessionContextFrom(Response response);
protected abstract LocalMimeResponse getMimeResponseFrom(Response response);
@@ -72,6 +89,11 @@
requestPrecursor.getPortletHandle());
LocalMimeResponse mimeResponse = getMimeResponseFrom(response);
+ return rewriteResponseIfNeeded(mimeResponse, invocation);
+ }
+
+ PortletInvocationResponse rewriteResponseIfNeeded(final LocalMimeResponse mimeResponse, final Invocation invocation) throws PortletInvokerException
+ {
String markup = mimeResponse.getItemString();
byte[] binary = mimeResponse.getItemBinary();
if (markup != null && binary != null)
@@ -85,6 +107,7 @@
if (mimeResponse.isUseCachedItem() != null && mimeResponse.isUseCachedItem())
{
//todo: deal with cache GTNWSRP-40
+ log.debug("Consumer " + consumer.getProducerId() + " requested cached data. Not implemented yet!");
}
else
{
@@ -93,30 +116,57 @@
}
}
- if (!ParameterValidation.isNullOrEmpty(markup))
- {
- if (Boolean.TRUE.equals(mimeResponse.isRequiresRewriting()))
- {
- markup = processMarkup(
- markup,
- WSRPTypeFactory.getNamespaceFrom(invocation.getWindowContext()),
- invocation.getContext(),
- invocation.getTarget(),
- new URLFormat(invocation.getSecurityContext().isSecure(), invocation.getSecurityContext().isAuthenticated(), true, true),
- consumer
- );
- }
- }
-
String mimeType = mimeResponse.getMimeType();
if (ParameterValidation.isNullOrEmpty(mimeType))
{
return new ErrorResponse(new IllegalArgumentException("No MIME type was provided for portlet content."));
}
+ if (Boolean.TRUE.equals(mimeResponse.isRequiresRewriting()))
+ {
+ if (!ParameterValidation.isNullOrEmpty(markup))
+ {
+ markup = processMarkup(markup, invocation);
+ }
+
+ // GTNWSRP-189:
+ // if we have binary and we require rewriting, convert binary to a string assuming UTF-8 encoding and process
+ // this is seen with NetUnity producer's resource download portlet which sends CSS and JS as binary for example
+ if (binary != null && binary.length > 0 && isInterpretableAsText(MediaType.create(mimeType)))
+ {
+ try
+ {
+ String binaryAsString = new String(binary, "UTF-8");
+ binaryAsString = processMarkup(binaryAsString, invocation);
+
+ // reconvert to binary
+ binary = binaryAsString.getBytes("UTF-8");
+ }
+ catch (UnsupportedEncodingException e)
+ {
+ // shouldn't happen since UTF-8 is always supported...
+ throw new PortletInvokerException("Couldn't convert binary as String.", e);
+ }
+ }
+ }
+
return createContentResponse(mimeResponse, invocation, null, null, mimeType, binary, markup, createCacheControl(mimeResponse));
}
+ private String processMarkup(String markup, Invocation invocation)
+ {
+ SecurityContext securityContext = invocation.getSecurityContext();
+ markup = processMarkup(
+ markup,
+ WSRPTypeFactory.getNamespaceFrom(invocation.getWindowContext()),
+ invocation.getContext(),
+ invocation.getTarget(),
+ new URLFormat(securityContext.isSecure(), securityContext.isAuthenticated(), true, true),
+ consumer
+ );
+ return markup;
+ }
+
protected PortletInvocationResponse createContentResponse(LocalMimeResponse mimeResponse, Invocation invocation,
ResponseProperties properties, Map<String, Object> attributes,
String mimeType, byte[] bytes, String markup,
Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/RenderHandler.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/RenderHandler.java 2010-12-16 14:38:05 UTC (rev 5596)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/RenderHandler.java 2010-12-16 14:38:39 UTC (rev 5597)
@@ -28,7 +28,7 @@
import org.gatein.pc.api.invocation.response.PortletInvocationResponse;
import org.gatein.pc.api.invocation.response.ResponseProperties;
import org.gatein.wsrp.WSRPTypeFactory;
-import org.gatein.wsrp.consumer.WSRPConsumerImpl;
+import org.gatein.wsrp.consumer.spi.WSRPConsumerSPI;
import org.oasis.wsrp.v2.Extension;
import org.oasis.wsrp.v2.GetMarkup;
import org.oasis.wsrp.v2.MarkupContext;
@@ -49,7 +49,7 @@
public class RenderHandler extends MimeResponseHandler<RenderInvocation, GetMarkup, MarkupResponse, MarkupContext>
{
- public RenderHandler(WSRPConsumerImpl consumer)
+ public RenderHandler(WSRPConsumerSPI consumer)
{
super(consumer);
}
@@ -116,7 +116,7 @@
consumer.getMarkupService().getMarkup(request.getRegistrationContext(), request.getPortletContext(),
request.getRuntimeContext(), request.getUserContext(), request.getMarkupParams(),
markupContextHolder, sessionContextHolder, new Holder<List<Extension>>());
-
+
MarkupResponse markupResponse = WSRPTypeFactory.createMarkupResponse(markupContextHolder.value);
markupResponse.setSessionContext(sessionContextHolder.value);
return markupResponse;
Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/ResourceHandler.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/ResourceHandler.java 2010-12-16 14:38:05 UTC (rev 5596)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/ResourceHandler.java 2010-12-16 14:38:39 UTC (rev 5597)
@@ -31,7 +31,7 @@
import org.gatein.wsrp.WSRPRewritingConstants;
import org.gatein.wsrp.WSRPTypeFactory;
import org.gatein.wsrp.WSRPUtils;
-import org.gatein.wsrp.consumer.WSRPConsumerImpl;
+import org.gatein.wsrp.consumer.spi.WSRPConsumerSPI;
import org.gatein.wsrp.spec.v2.WSRP2RewritingConstants;
import org.oasis.wsrp.v2.Extension;
import org.oasis.wsrp.v2.GetResource;
@@ -54,7 +54,7 @@
public class ResourceHandler extends MimeResponseHandler<ResourceInvocation, GetResource, ResourceResponse, ResourceContext>
{
- public ResourceHandler(WSRPConsumerImpl consumer)
+ public ResourceHandler(WSRPConsumerSPI consumer)
{
super(consumer);
}
Added: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/spi/WSRPConsumerSPI.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/spi/WSRPConsumerSPI.java (rev 0)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/spi/WSRPConsumerSPI.java 2010-12-16 14:38:39 UTC (rev 5597)
@@ -0,0 +1,65 @@
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, 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.gatein.wsrp.consumer.spi;
+
+import org.gatein.pc.api.PortletInvokerException;
+import org.gatein.pc.api.invocation.PortletInvocation;
+import org.gatein.wsrp.WSRPConsumer;
+import org.gatein.wsrp.consumer.ProducerInfo;
+import org.gatein.wsrp.consumer.handlers.SessionHandler;
+import org.gatein.wsrp.services.MarkupService;
+import org.oasis.wsrp.v2.RegistrationContext;
+import org.oasis.wsrp.v2.RuntimeContext;
+import org.oasis.wsrp.v2.UserContext;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public interface WSRPConsumerSPI extends WSRPConsumer
+{
+ RegistrationContext getRegistrationContext() throws PortletInvokerException;
+
+ UserContext getUserContextFrom(PortletInvocation invocation, RuntimeContext runtimeContext) throws PortletInvokerException;
+
+ SessionHandler getSessionHandler();
+
+ void setTemplatesIfNeeded(PortletInvocation invocation, RuntimeContext runtimeContext) throws PortletInvokerException;
+
+ void refreshProducerInfo() throws PortletInvokerException;
+
+ void handleInvalidRegistrationFault() throws PortletInvokerException;
+
+ ProducerInfo getProducerInfo();
+
+ MarkupService getMarkupService() throws PortletInvokerException;
+
+ /**
+ * Determines whether the specified user scope (for markup caching) is supported.
+ *
+ * @param userScope the user scope which support is to be determined
+ * @return <code>true</code> if the given user scope is supported, <code>false</code> otherwise
+ */
+ boolean supportsUserScope(String userScope);
+}
Copied: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandlerTestCase.java (from rev 5557, components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/handlers/RenderHandlerTestCase.java)
===================================================================
--- components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandlerTestCase.java (rev 0)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandlerTestCase.java 2010-12-16 14:38:39 UTC (rev 5597)
@@ -0,0 +1,272 @@
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, 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.gatein.wsrp.consumer.handlers;
+
+import junit.framework.TestCase;
+import org.gatein.pc.api.PortletContext;
+import org.gatein.pc.api.PortletInvokerException;
+import org.gatein.pc.api.URLFormat;
+import org.gatein.pc.api.invocation.PortletInvocation;
+import org.gatein.pc.api.invocation.response.ContentResponse;
+import org.gatein.pc.api.invocation.response.PortletInvocationResponse;
+import org.gatein.wsrp.WSRPRewritingConstants;
+import org.gatein.wsrp.WSRPTypeFactory;
+import org.gatein.wsrp.test.ExtendedAssert;
+import org.gatein.wsrp.test.support.MockWSRPConsumer;
+import org.gatein.wsrp.test.support.TestPortletInvocationContext;
+import org.gatein.wsrp.test.support.TestRenderInvocation;
+import org.gatein.wsrp.test.support.TestResourceInvocation;
+import org.gatein.wsrp.test.support.TestWindowContext;
+import org.oasis.wsrp.v2.MarkupContext;
+import org.oasis.wsrp.v2.MimeResponse;
+import org.oasis.wsrp.v2.ResourceContext;
+
+import java.io.UnsupportedEncodingException;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision: 10507 $
+ * @since 2.6
+ */
+public class MimeResponseHandlerTestCase extends TestCase
+{
+ public static final String NAMESPACE = "NAMESPACE";
+ public static final String PORTLETID = "PORTLETID";
+ public static final MockWSRPConsumer CONSUMER = new MockWSRPConsumer("foo");
+ public static final PortletContext PORTLET_CONTEXT = PortletContext.createPortletContext(PORTLETID);
+ public static final TestPortletInvocationContext CONTEXT = new TestPortletInvocationContext();
+ public static final URLFormat FORMAT = new URLFormat(false, false, true, true);
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ CONSUMER.setUsingWSRP2(true);
+ }
+
+ public void testProcessMarkupV1()
+ {
+ // fake using WSRP 1
+ CONSUMER.setUsingWSRP2(false);
+
+ String markup;
+ String expected;
+ markup = "khlaksdhjflkjhsadljkwsrp_rewrite?wsrp-urlType=blockingAction&wsrp-interactionState=JBPNS_/wsrp_rewrite" +
+ "fadsfadswsrp_rewrite?wsrp-urlType=render&wsrp-navigationalState=JBPNS_/wsrp_rewritefajdshfkjdshgfgrept";
+ expected = "khlaksdhjflkjhsadljkAction is=JBPNS_ ns=null ws=null m=null" +
+ "fadsfadsRender ns=JBPNS_ ws=null m=nullfajdshfkjdshgfgrept";
+ processMarkupAndCheck(markup, expected);
+
+ markup = "<form method='post' action='wsrp_rewrite?wsrp-urlType=blockingAction&wsrp" +
+ "-interactionState=JBPNS_/wsrp_rewrite' id='wsrp_rewrite_portfolioManager'><table><tr><td>Stock symbol</t" +
+ "d><td><input name='symbol'/></td></tr><tr><td><input type='submit' value='Submit'></td></tr></table></form>";
+ expected = "<form method='post' action='Action is=JBPNS_ ns=null ws=null m=null' id='" + NAMESPACE
+ + "portfolioManager'><table><tr><td>Stock symbol</t" +
+ "d><td><input name='symbol'/></td></tr><tr><td><input type='submit' value='Submit'></td></tr></table></form>";
+ processMarkupAndCheck(markup, expected);
+ }
+
+ public void testProcessMarkupV2()
+ {
+ String markup;
+ String expected;
+ markup = "khlaksdhjflkjhsadljkwsrp_rewrite?wsrp-urlType=blockingAction&wsrp-interactionState=JBPNS_/wsrp_rewrite" +
+ "fadsfadswsrp_rewrite?wsrp-urlType=render&wsrp-navigationalState=JBPNS_/wsrp_rewritefajdshfkjdshgfgrept";
+ expected = "khlaksdhjflkjhsadljkAction is=JBPNS_ ns=null ws=null m=null" +
+ "fadsfadsRender ns=JBPNS_ ws=null m=nullfajdshfkjdshgfgrept";
+ processMarkupAndCheck(markup, expected);
+
+ markup = "<form method='post' action='wsrp_rewrite?wsrp-urlType=blockingAction&wsrp" +
+ "-interactionState=JBPNS_/wsrp_rewrite' id='wsrp_rewrite_portfolioManager'><table><tr><td>Stock symbol</t" +
+ "d><td><input name='symbol'/></td></tr><tr><td><input type='submit' value='Submit'></td></tr></table></form>";
+ expected = "<form method='post' action='Action is=JBPNS_ ns=null ws=null m=null' id='" + NAMESPACE + "portfolioManager'><table><tr><td>Stock symbol</t" +
+ "d><td><input name='symbol'/></td></tr><tr><td><input type='submit' value='Submit'></td></tr></table></form>";
+ processMarkupAndCheck(markup, expected);
+ }
+
+ /*public void testResourceURLs()
+ {
+ String markup;
+ String expected;
+ markup = "<img src='wsrp_rewrite?wsrp-urlType=resource&wsrp-url=http%3A%2F%2Flocalhost%3A8080%2Ftest-resource-portlet%2Fgif%2Flogo.gif&wsrp-requiresRewrite=true/wsrp_rewrite'/>";
+ expected = "<img src='http://localhost:8080/test-resource-portlet/gif/logo.gif'/>";
+ processMarkupAndCheck(markup, expected);
+
+ markup = "<img src='http://localhost:8080/test-resourcenoencodeurl-portlet/gif/logo.gif'/>";
+ processMarkupAndCheck(markup, markup);
+
+ markup = "wsrp_rewrite?wsrp-urlType=resource&wsrp-url=http%3A%2F%2Flocalhost%3A8080%2Fhelloworld&wsrp-requiresRewrite=true/wsrp_rewrite/helloworld.jar";
+ processMarkupAndCheck(markup, "http://localhost:8080/helloworld/helloworld.jar");
+
+ markup = "wsrp_rewrite?wsrp-urlType=resource&wsrp-url=http%3A%2F%2Flocalhost%3A8080%2Fhelloworld&wsrp-requiresRewrite=true/wsrp_rewrite&foo=bar/helloworld.jar";
+ processMarkupAndCheck(markup, "http://localhost:8080/helloworld&foo=bar/helloworld.jar");
+ }*/
+
+ public void testRegularURLIsNotAffected()
+ {
+ String markup;
+ markup = "<a href=\"/portal/portal/default/Test/EXAMPLE/EXAMPLE?action=1d&windowstate=&mode=" +
+ "&ns=_next%3D%2Fdk%2Fskat%2Fportal%2Ffront%2Fportlets%2Fexample%2Findex.jsp" +
+ "&is=_action%3D%252Fdk%252Fskat%252Fportal%252Ffront%252Fportlets%252Fexample%252FprocessLink" +
+ "%26jbpns_2fdefault_2fTest_2fEXAMPLE_2fEXAMPLEsnpbjname%3DChris\">Press to use default name.</a>";
+ processMarkupAndCheck(markup, markup);
+ }
+
+ /*public void testProcessMarkupResourceFromTemplate()
+ {
+ String url = "http%3a%2f%2fwsrp.netunitysoftware.com%2fWSRPTestService%2fWSRPTestService.asmx%3ftimeout%3d30000%2fgetResource%3fportletHandle%3d781F3EE5-22DF-4ef9-9664-F5FC759065DB%26Function%3dResource%26Name%3dNetUnity%26Type%3dGIF";
+ String markup = "<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n" +
+ "\t<tr class=\"portlet-table-header\">\n" +
+ "\t\t<td>Symbol</td>\n" +
+ "\t\t<td>Name</td>\n" +
+ "\t\t<td align=\"right\">Price</td>\n" +
+ "\t\t<td></td>\n" +
+ "\t\t<td align=\"right\">Change</td>\n" +
+ "\t\t<td align=\"right\">% Chg</td>\n" +
+ "\t</tr>\n" +
+ "</table>\n" +
+ "<A HREF=\"http://www.netunitysoftware.com\" TITLE=\"NetUnity WSRP .NET Framework\" >" +
+ "<img src=\"" + getResourceURL(url, false) + "\" border=\"0\" /></A>";
+
+ String expected = "<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n" +
+ "\t<tr class=\"portlet-table-header\">\n" +
+ "\t\t<td>Symbol</td>\n" +
+ "\t\t<td>Name</td>\n" +
+ "\t\t<td align=\"right\">Price</td>\n" +
+ "\t\t<td></td>\n" +
+ "\t\t<td align=\"right\">Change</td>\n" +
+ "\t\t<td align=\"right\">% Chg</td>\n" +
+ "\t</tr>\n" +
+ "</table>\n" +
+ "<A HREF=\"http://www.netunitysoftware.com\" TITLE=\"NetUnity WSRP .NET Framework\" >" +
+ "<img src=\"" + URLTools.decodeXWWWFormURL(url) + "\" border=\"0\" /></A>";
+ processMarkupAndCheck(markup, expected);
+ }*/
+
+ public void testGTNWSRP12Workaround()
+ {
+ String timeout = "%3ftimeout%3d100000";
+ String beforeTimeout = "http%3a%2f%2fwsrp.netunitysoftware.com%2fWSRPTestService%2fWSRPTestService.asmx";
+ String afterTimeout = "%2fgetResource%3fportletHandle%3d781F3EE5-22DF-4ef9-9664-F5FC759065DB%26Function%3dResource%26Name%3dNetUnity%26Type%3dGIF";
+ String originalURL = beforeTimeout + timeout + afterTimeout;
+ String markup = "<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n" +
+ "\t<tr class=\"portlet-table-header\">\n" +
+ "\t\t<td>Symbol</td>\n" +
+ "\t\t<td>Name</td>\n" +
+ "\t\t<td align=\"right\">Price</td>\n" +
+ "\t\t<td></td>\n" +
+ "\t\t<td align=\"right\">Change</td>\n" +
+ "\t\t<td align=\"right\">% Chg</td>\n" +
+ "\t</tr>\n" +
+ "</table>\n" +
+ "<A HREF=\"http://www.netunitysoftware.com\" TITLE=\"NetUnity WSRP .NET Framework\" >" +
+ "<img src=\"" + originalURL + "\" border=\"0\" /></A>";
+
+ String expected = "<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n" +
+ "\t<tr class=\"portlet-table-header\">\n" +
+ "\t\t<td>Symbol</td>\n" +
+ "\t\t<td>Name</td>\n" +
+ "\t\t<td align=\"right\">Price</td>\n" +
+ "\t\t<td></td>\n" +
+ "\t\t<td align=\"right\">Change</td>\n" +
+ "\t\t<td align=\"right\">% Chg</td>\n" +
+ "\t</tr>\n" +
+ "</table>\n" +
+ "<A HREF=\"http://www.netunitysoftware.com\" TITLE=\"NetUnity WSRP .NET Framework\" >" +
+ "<img src=\"" + beforeTimeout + afterTimeout + "\" border=\"0\" /></A>";
+
+ processMarkupAndCheck(markup, expected);
+ }
+
+ public void testRewritingRequiredWithBinaryContent() throws UnsupportedEncodingException, PortletInvokerException
+ {
+ String expected = "/* Style Sheet */\n" +
+ "." + TestWindowContext.NAMESPACE + "ExternalStyleClass\n" +
+ "{\n" +
+ "\tfont-weight: bold;\n" +
+ "\tcolor: green;\n" +
+ "\tfont-family: Arial;\n" +
+ "\tborder:dashed 1px black; \n" +
+ "\tpadding: 15px;\n" +
+ "}";
+ byte[] expectedBinary = expected.getBytes("UTF-8");
+ String original = "/* Style Sheet */\n" +
+ ".wsrp_rewrite_ExternalStyleClass\n" +
+ "{\n" +
+ "\tfont-weight: bold;\n" +
+ "\tcolor: green;\n" +
+ "\tfont-family: Arial;\n" +
+ "\tborder:dashed 1px black; \n" +
+ "\tpadding: 15px;\n" +
+ "}";
+ byte[] originalBinary = original.getBytes("UTF-8");
+
+ processBinaryAndCheck(expectedBinary, new RenderHandler(CONSUMER), new TestRenderInvocation(CONTEXT), WSRPTypeFactory.createMimeResponse("text/css", null, originalBinary, MarkupContext.class));
+ processBinaryAndCheck(expectedBinary, new ResourceHandler(CONSUMER), new TestResourceInvocation(CONTEXT), WSRPTypeFactory.createMimeResponse("text/css", null, originalBinary, ResourceContext.class));
+
+ original = "//JScript file\n" +
+ "function wsrp_rewrite_ExternalScriptFunction()\n" +
+ "{\n" +
+ "\talert('Script Function in Script File');\n" +
+ "}";
+ originalBinary = original.getBytes("UTF-8");
+ expected = "//JScript file\n" +
+ "function " + TestWindowContext.NAMESPACE + "ExternalScriptFunction()\n" +
+ "{\n" +
+ "\talert('Script Function in Script File');\n" +
+ "}";
+ expectedBinary = expected.getBytes("UTF-8");
+
+ processBinaryAndCheck(expectedBinary, new RenderHandler(CONSUMER), new TestRenderInvocation(CONTEXT), WSRPTypeFactory.createMimeResponse("application/x-javascript", null, originalBinary, MarkupContext.class));
+ processBinaryAndCheck(expectedBinary, new ResourceHandler(CONSUMER), new TestResourceInvocation(CONTEXT), WSRPTypeFactory.createMimeResponse("application/x-javascript", null, originalBinary, ResourceContext.class));
+ }
+
+ private void processBinaryAndCheck(byte[] expectedBinary, final MimeResponseHandler handler, final PortletInvocation invocation, final MimeResponse mimeResponse) throws PortletInvokerException
+ {
+ mimeResponse.setRequiresRewriting(true);
+ PortletInvocationResponse response = handler.rewriteResponseIfNeeded(mimeResponse, invocation);
+ assertTrue(response instanceof ContentResponse);
+ ContentResponse contentResponse = (ContentResponse)response;
+ ExtendedAssert.assertEquals(expectedBinary, contentResponse.getBytes());
+ }
+
+ private void processMarkupAndCheck(String markup, String expected)
+ {
+ String result = MimeResponseHandler.processMarkup(
+ markup,
+ NAMESPACE,
+ CONTEXT,
+ PORTLET_CONTEXT,
+ FORMAT,
+ CONSUMER
+ );
+ assertEquals(expected, result);
+ }
+
+ private String getResourceURL(String encodedURL, boolean requiresRewrite)
+ {
+ String result = WSRPRewritingConstants.FAKE_RESOURCE_URL.replace(WSRPRewritingConstants.WSRP_URL, encodedURL);
+ result = result.replace(WSRPRewritingConstants.WSRP_REQUIRES_REWRITE, Boolean.toString(requiresRewrite));
+ return result;
+ }
+}
Property changes on: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandlerTestCase.java
___________________________________________________________________
Name: svn:executable
+ *
Deleted: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/handlers/RenderHandlerTestCase.java
===================================================================
--- components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/handlers/RenderHandlerTestCase.java 2010-12-16 14:38:05 UTC (rev 5596)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/handlers/RenderHandlerTestCase.java 2010-12-16 14:38:39 UTC (rev 5597)
@@ -1,206 +0,0 @@
-/*
- * JBoss, a division of Red Hat
- * Copyright 2010, 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.gatein.wsrp.consumer.handlers;
-
-import junit.framework.TestCase;
-import org.gatein.pc.api.PortletContext;
-import org.gatein.pc.api.URLFormat;
-import org.gatein.wsrp.WSRPRewritingConstants;
-import org.gatein.wsrp.test.support.MockWSRPConsumer;
-import org.gatein.wsrp.test.support.TestPortletInvocationContext;
-
-/**
- * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
- * @version $Revision: 10507 $
- * @since 2.6
- */
-public class RenderHandlerTestCase extends TestCase
-{
- public static final String NAMESPACE = "NAMESPACE";
- public static final String PORTLETID = "PORTLETID";
- public static final MockWSRPConsumer CONSUMER = new MockWSRPConsumer("foo");
- public static final PortletContext PORTLET_CONTEXT = PortletContext.createPortletContext(PORTLETID);
- public static final TestPortletInvocationContext CONTEXT = new TestPortletInvocationContext();
- public static final URLFormat FORMAT = new URLFormat(false, false, true, true);
-
- @Override
- protected void setUp() throws Exception
- {
- CONSUMER.setUsingWSRP2(true);
- }
-
- public void testProcessMarkupV1()
- {
- // fake using WSRP 1
- CONSUMER.setUsingWSRP2(false);
-
- String markup;
- String expected;
- markup = "khlaksdhjflkjhsadljkwsrp_rewrite?wsrp-urlType=blockingAction&wsrp-interactionState=JBPNS_/wsrp_rewrite" +
- "fadsfadswsrp_rewrite?wsrp-urlType=render&wsrp-navigationalState=JBPNS_/wsrp_rewritefajdshfkjdshgfgrept";
- expected = "khlaksdhjflkjhsadljkAction is=JBPNS_ ns=null ws=null m=null" +
- "fadsfadsRender ns=JBPNS_ ws=null m=nullfajdshfkjdshgfgrept";
- processMarkupAndCheck(markup, expected);
-
- markup = "<form method='post' action='wsrp_rewrite?wsrp-urlType=blockingAction&wsrp" +
- "-interactionState=JBPNS_/wsrp_rewrite' id='wsrp_rewrite_portfolioManager'><table><tr><td>Stock symbol</t" +
- "d><td><input name='symbol'/></td></tr><tr><td><input type='submit' value='Submit'></td></tr></table></form>";
- expected = "<form method='post' action='Action is=JBPNS_ ns=null ws=null m=null' id='" + NAMESPACE
- + "portfolioManager'><table><tr><td>Stock symbol</t" +
- "d><td><input name='symbol'/></td></tr><tr><td><input type='submit' value='Submit'></td></tr></table></form>";
- processMarkupAndCheck(markup, expected);
- }
-
- public void testProcessMarkupV2()
- {
- String markup;
- String expected;
- markup = "khlaksdhjflkjhsadljkwsrp_rewrite?wsrp-urlType=blockingAction&wsrp-interactionState=JBPNS_/wsrp_rewrite" +
- "fadsfadswsrp_rewrite?wsrp-urlType=render&wsrp-navigationalState=JBPNS_/wsrp_rewritefajdshfkjdshgfgrept";
- expected = "khlaksdhjflkjhsadljkAction is=JBPNS_ ns=null ws=null m=null" +
- "fadsfadsRender ns=JBPNS_ ws=null m=nullfajdshfkjdshgfgrept";
- processMarkupAndCheck(markup, expected);
-
- markup = "<form method='post' action='wsrp_rewrite?wsrp-urlType=blockingAction&wsrp" +
- "-interactionState=JBPNS_/wsrp_rewrite' id='wsrp_rewrite_portfolioManager'><table><tr><td>Stock symbol</t" +
- "d><td><input name='symbol'/></td></tr><tr><td><input type='submit' value='Submit'></td></tr></table></form>";
- expected = "<form method='post' action='Action is=JBPNS_ ns=null ws=null m=null' id='" + NAMESPACE + "portfolioManager'><table><tr><td>Stock symbol</t" +
- "d><td><input name='symbol'/></td></tr><tr><td><input type='submit' value='Submit'></td></tr></table></form>";
- processMarkupAndCheck(markup, expected);
- }
-
- /*public void testResourceURLs()
- {
- String markup;
- String expected;
- markup = "<img src='wsrp_rewrite?wsrp-urlType=resource&wsrp-url=http%3A%2F%2Flocalhost%3A8080%2Ftest-resource-portlet%2Fgif%2Flogo.gif&wsrp-requiresRewrite=true/wsrp_rewrite'/>";
- expected = "<img src='http://localhost:8080/test-resource-portlet/gif/logo.gif'/>";
- processMarkupAndCheck(markup, expected);
-
- markup = "<img src='http://localhost:8080/test-resourcenoencodeurl-portlet/gif/logo.gif'/>";
- processMarkupAndCheck(markup, markup);
-
- markup = "wsrp_rewrite?wsrp-urlType=resource&wsrp-url=http%3A%2F%2Flocalhost%3A8080%2Fhelloworld&wsrp-requiresRewrite=true/wsrp_rewrite/helloworld.jar";
- processMarkupAndCheck(markup, "http://localhost:8080/helloworld/helloworld.jar");
-
- markup = "wsrp_rewrite?wsrp-urlType=resource&wsrp-url=http%3A%2F%2Flocalhost%3A8080%2Fhelloworld&wsrp-requiresRewrite=true/wsrp_rewrite&foo=bar/helloworld.jar";
- processMarkupAndCheck(markup, "http://localhost:8080/helloworld&foo=bar/helloworld.jar");
- }*/
-
- public void testRegularURLIsNotAffected()
- {
- String markup;
- markup = "<a href=\"/portal/portal/default/Test/EXAMPLE/EXAMPLE?action=1d&windowstate=&mode=" +
- "&ns=_next%3D%2Fdk%2Fskat%2Fportal%2Ffront%2Fportlets%2Fexample%2Findex.jsp" +
- "&is=_action%3D%252Fdk%252Fskat%252Fportal%252Ffront%252Fportlets%252Fexample%252FprocessLink" +
- "%26jbpns_2fdefault_2fTest_2fEXAMPLE_2fEXAMPLEsnpbjname%3DChris\">Press to use default name.</a>";
- processMarkupAndCheck(markup, markup);
- }
-
- /*public void testProcessMarkupResourceFromTemplate()
- {
- String url = "http%3a%2f%2fwsrp.netunitysoftware.com%2fWSRPTestService%2fWSRPTestService.asmx%3ftimeout%3d30000%2fgetResource%3fportletHandle%3d781F3EE5-22DF-4ef9-9664-F5FC759065DB%26Function%3dResource%26Name%3dNetUnity%26Type%3dGIF";
- String markup = "<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n" +
- "\t<tr class=\"portlet-table-header\">\n" +
- "\t\t<td>Symbol</td>\n" +
- "\t\t<td>Name</td>\n" +
- "\t\t<td align=\"right\">Price</td>\n" +
- "\t\t<td></td>\n" +
- "\t\t<td align=\"right\">Change</td>\n" +
- "\t\t<td align=\"right\">% Chg</td>\n" +
- "\t</tr>\n" +
- "</table>\n" +
- "<A HREF=\"http://www.netunitysoftware.com\" TITLE=\"NetUnity WSRP .NET Framework\" >" +
- "<img src=\"" + getResourceURL(url, false) + "\" border=\"0\" /></A>";
-
- String expected = "<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n" +
- "\t<tr class=\"portlet-table-header\">\n" +
- "\t\t<td>Symbol</td>\n" +
- "\t\t<td>Name</td>\n" +
- "\t\t<td align=\"right\">Price</td>\n" +
- "\t\t<td></td>\n" +
- "\t\t<td align=\"right\">Change</td>\n" +
- "\t\t<td align=\"right\">% Chg</td>\n" +
- "\t</tr>\n" +
- "</table>\n" +
- "<A HREF=\"http://www.netunitysoftware.com\" TITLE=\"NetUnity WSRP .NET Framework\" >" +
- "<img src=\"" + URLTools.decodeXWWWFormURL(url) + "\" border=\"0\" /></A>";
- processMarkupAndCheck(markup, expected);
- }*/
-
- public void testGTNWSRP12Workaround()
- {
- String timeout = "%3ftimeout%3d100000";
- String beforeTimeout = "http%3a%2f%2fwsrp.netunitysoftware.com%2fWSRPTestService%2fWSRPTestService.asmx";
- String afterTimeout = "%2fgetResource%3fportletHandle%3d781F3EE5-22DF-4ef9-9664-F5FC759065DB%26Function%3dResource%26Name%3dNetUnity%26Type%3dGIF";
- String originalURL = beforeTimeout + timeout + afterTimeout;
- String markup = "<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n" +
- "\t<tr class=\"portlet-table-header\">\n" +
- "\t\t<td>Symbol</td>\n" +
- "\t\t<td>Name</td>\n" +
- "\t\t<td align=\"right\">Price</td>\n" +
- "\t\t<td></td>\n" +
- "\t\t<td align=\"right\">Change</td>\n" +
- "\t\t<td align=\"right\">% Chg</td>\n" +
- "\t</tr>\n" +
- "</table>\n" +
- "<A HREF=\"http://www.netunitysoftware.com\" TITLE=\"NetUnity WSRP .NET Framework\" >" +
- "<img src=\"" + originalURL + "\" border=\"0\" /></A>";
-
- String expected = "<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n" +
- "\t<tr class=\"portlet-table-header\">\n" +
- "\t\t<td>Symbol</td>\n" +
- "\t\t<td>Name</td>\n" +
- "\t\t<td align=\"right\">Price</td>\n" +
- "\t\t<td></td>\n" +
- "\t\t<td align=\"right\">Change</td>\n" +
- "\t\t<td align=\"right\">% Chg</td>\n" +
- "\t</tr>\n" +
- "</table>\n" +
- "<A HREF=\"http://www.netunitysoftware.com\" TITLE=\"NetUnity WSRP .NET Framework\" >" +
- "<img src=\"" + beforeTimeout + afterTimeout + "\" border=\"0\" /></A>";
-
- processMarkupAndCheck(markup, expected);
- }
-
- private void processMarkupAndCheck(String markup, String expected)
- {
- String result = RenderHandler.processMarkup(
- markup,
- NAMESPACE,
- CONTEXT,
- PORTLET_CONTEXT,
- FORMAT,
- CONSUMER
- );
- assertEquals(expected, result);
- }
-
- private String getResourceURL(String encodedURL, boolean requiresRewrite)
- {
- String result = WSRPRewritingConstants.FAKE_RESOURCE_URL.replace(WSRPRewritingConstants.WSRP_URL, encodedURL);
- result = result.replace(WSRPRewritingConstants.WSRP_REQUIRES_REWRITE, Boolean.toString(requiresRewrite));
- return result;
- }
-}
Modified: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/MockWSRPConsumer.java
===================================================================
--- components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/MockWSRPConsumer.java 2010-12-16 14:38:05 UTC (rev 5596)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/MockWSRPConsumer.java 2010-12-16 14:38:39 UTC (rev 5597)
@@ -33,14 +33,19 @@
import org.gatein.pc.api.state.DestroyCloneFailure;
import org.gatein.pc.api.state.PropertyChange;
import org.gatein.pc.api.state.PropertyMap;
-import org.gatein.wsrp.WSRPConsumer;
import org.gatein.wsrp.api.session.SessionEvent;
import org.gatein.wsrp.consumer.ProducerInfo;
import org.gatein.wsrp.consumer.RefreshResult;
import org.gatein.wsrp.consumer.handlers.ProducerSessionInformation;
+import org.gatein.wsrp.consumer.handlers.SessionHandler;
import org.gatein.wsrp.consumer.migration.ExportInfo;
import org.gatein.wsrp.consumer.migration.ImportInfo;
import org.gatein.wsrp.consumer.migration.MigrationService;
+import org.gatein.wsrp.consumer.spi.WSRPConsumerSPI;
+import org.gatein.wsrp.services.MarkupService;
+import org.oasis.wsrp.v2.RegistrationContext;
+import org.oasis.wsrp.v2.RuntimeContext;
+import org.oasis.wsrp.v2.UserContext;
import javax.servlet.http.HttpSession;
import java.util.List;
@@ -51,7 +56,7 @@
* @version $Revision: 8784 $
* @since 2.6
*/
-public class MockWSRPConsumer implements WSRPConsumer
+public class MockWSRPConsumer implements WSRPConsumerSPI
{
private ProducerInfo producerInfo;
private boolean useWSRP2 = true;
@@ -83,10 +88,46 @@
return producerInfo;
}
+ public MarkupService getMarkupService() throws PortletInvokerException
+ {
+ throw new NotYetImplemented();
+ }
+
+ public boolean supportsUserScope(String userScope)
+ {
+ throw new NotYetImplemented();
+ }
+
+ public RegistrationContext getRegistrationContext() throws PortletInvokerException
+ {
+ throw new NotYetImplemented();
+ }
+
+ public UserContext getUserContextFrom(PortletInvocation invocation, RuntimeContext runtimeContext) throws PortletInvokerException
+ {
+ throw new NotYetImplemented();
+ }
+
+ public SessionHandler getSessionHandler()
+ {
+ throw new NotYetImplemented();
+ }
+
+ public void setTemplatesIfNeeded(PortletInvocation invocation, RuntimeContext runtimeContext) throws PortletInvokerException
+ {
+ throw new NotYetImplemented();
+ }
+
public void refreshProducerInfo() throws PortletInvokerException
{
+ throw new NotYetImplemented();
}
+ public void handleInvalidRegistrationFault() throws PortletInvokerException
+ {
+ throw new NotYetImplemented();
+ }
+
public void releaseSessions()
{
}
Added: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/TestActionInvocation.java
===================================================================
--- components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/TestActionInvocation.java (rev 0)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/TestActionInvocation.java 2010-12-16 14:38:39 UTC (rev 5597)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, 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.gatein.wsrp.test.support;
+
+import org.gatein.pc.api.invocation.ActionInvocation;
+import org.gatein.pc.api.spi.PortletInvocationContext;
+import org.gatein.pc.portlet.impl.spi.AbstractPortalContext;
+import org.gatein.pc.portlet.impl.spi.AbstractSecurityContext;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class TestActionInvocation extends ActionInvocation
+{
+ public TestActionInvocation(PortletInvocationContext ctx) throws IllegalArgumentException
+ {
+ super(ctx);
+ setPortalContext(new AbstractPortalContext());
+ setSecurityContext(new AbstractSecurityContext(MockHttpServletRequest.createMockRequest(null)));
+ setWindowContext(new TestWindowContext());
+ }
+}
Added: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/TestRenderInvocation.java
===================================================================
--- components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/TestRenderInvocation.java (rev 0)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/TestRenderInvocation.java 2010-12-16 14:38:39 UTC (rev 5597)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, 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.gatein.wsrp.test.support;
+
+import org.gatein.pc.api.invocation.RenderInvocation;
+import org.gatein.pc.api.spi.PortletInvocationContext;
+import org.gatein.pc.portlet.impl.spi.AbstractPortalContext;
+import org.gatein.pc.portlet.impl.spi.AbstractSecurityContext;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class TestRenderInvocation extends RenderInvocation
+{
+ public TestRenderInvocation(PortletInvocationContext ctx) throws IllegalArgumentException
+ {
+ super(ctx);
+ setPortalContext(new AbstractPortalContext());
+ setSecurityContext(new AbstractSecurityContext(MockHttpServletRequest.createMockRequest(null)));
+ setWindowContext(new TestWindowContext());
+ }
+}
Added: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/TestResourceInvocation.java
===================================================================
--- components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/TestResourceInvocation.java (rev 0)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/TestResourceInvocation.java 2010-12-16 14:38:39 UTC (rev 5597)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, 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.gatein.wsrp.test.support;
+
+import org.gatein.pc.api.invocation.ResourceInvocation;
+import org.gatein.pc.api.spi.PortletInvocationContext;
+import org.gatein.pc.portlet.impl.spi.AbstractPortalContext;
+import org.gatein.pc.portlet.impl.spi.AbstractSecurityContext;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class TestResourceInvocation extends ResourceInvocation
+{
+ public TestResourceInvocation(PortletInvocationContext ctx) throws IllegalArgumentException
+ {
+ super(ctx);
+ setPortalContext(new AbstractPortalContext());
+ setSecurityContext(new AbstractSecurityContext(MockHttpServletRequest.createMockRequest(null)));
+ setWindowContext(new TestWindowContext());
+ }
+}
Added: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/TestWindowContext.java
===================================================================
--- components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/TestWindowContext.java (rev 0)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/TestWindowContext.java 2010-12-16 14:38:39 UTC (rev 5597)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, 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.gatein.wsrp.test.support;
+
+import org.gatein.pc.api.spi.WindowContext;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class TestWindowContext implements WindowContext
+{
+ public static final String NAMESPACE = "namespace";
+ private static final String ID = "id";
+
+ public String getId()
+ {
+ return ID;
+ }
+
+ public String getNamespace()
+ {
+ return NAMESPACE;
+ }
+}
14 years, 1 month
gatein SVN: r5596 - in components/wsrp/branches/2.0.x/consumer/src: main/java/org/gatein/wsrp/consumer/handlers and 3 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-12-16 09:38:05 -0500 (Thu, 16 Dec 2010)
New Revision: 5596
Added:
components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/spi/
components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/spi/WSRPConsumerSPI.java
components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandlerTestCase.java
components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/test/support/TestActionInvocation.java
components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/test/support/TestRenderInvocation.java
components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/test/support/TestResourceInvocation.java
components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/test/support/TestWindowContext.java
Removed:
components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/consumer/handlers/RenderHandlerTestCase.java
Modified:
components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/WSRPConsumerImpl.java
components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/DirectResourceServingHandler.java
components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/InvocationHandler.java
components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandler.java
components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/RenderHandler.java
components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/ResourceHandler.java
components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/test/support/MockWSRPConsumer.java
Log:
- GTNWSRP-189: attempt to rewrite textual content that's sent as binary. Added test cases.
- Introduced WSRPConsumerSPI interface and made WSPRConsumerImpl implement so that we could refactor the code to be more easily testable.
- Added support test classes.
Modified: components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/WSRPConsumerImpl.java
===================================================================
--- components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/WSRPConsumerImpl.java 2010-12-15 17:18:21 UTC (rev 5595)
+++ components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/WSRPConsumerImpl.java 2010-12-16 14:38:05 UTC (rev 5596)
@@ -57,6 +57,7 @@
import org.gatein.wsrp.consumer.migration.MigrationService;
import org.gatein.wsrp.consumer.portlet.WSRPPortlet;
import org.gatein.wsrp.consumer.portlet.info.WSRPPortletInfo;
+import org.gatein.wsrp.consumer.spi.WSRPConsumerSPI;
import org.gatein.wsrp.services.MarkupService;
import org.gatein.wsrp.services.PortletManagementService;
import org.gatein.wsrp.services.RegistrationService;
@@ -106,7 +107,7 @@
* @version $Revision: 11692 $
* @since 2.4
*/
-public class WSRPConsumerImpl implements WSRPConsumer
+public class WSRPConsumerImpl implements WSRPConsumerSPI
{
private final SessionHandler sessionHandler;
@@ -518,12 +519,6 @@
return Collections.unmodifiableSet(supportedUserScopes);
}
- /**
- * Determines whether the specified user scope (for markup caching) is supported.
- *
- * @param userScope the user scope which support is to be determined
- * @return <code>true</code> if the given user scope is supported, <code>false</code> otherwise
- */
public boolean supportsUserScope(String userScope)
{
return supportedUserScopes.contains(userScope);
Modified: components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/DirectResourceServingHandler.java
===================================================================
--- components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/DirectResourceServingHandler.java 2010-12-15 17:18:21 UTC (rev 5595)
+++ components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/DirectResourceServingHandler.java 2010-12-16 14:38:05 UTC (rev 5596)
@@ -27,12 +27,11 @@
import org.gatein.common.io.IOTools;
import org.gatein.common.net.media.MediaType;
import org.gatein.common.net.media.SubtypeDef;
-import org.gatein.common.net.media.TypeDef;
import org.gatein.common.util.MultiValuedPropertyMap;
import org.gatein.common.util.Tools;
import org.gatein.pc.api.invocation.response.ResponseProperties;
import org.gatein.wsrp.WSRPTypeFactory;
-import org.gatein.wsrp.consumer.WSRPConsumerImpl;
+import org.gatein.wsrp.consumer.spi.WSRPConsumerSPI;
import org.gatein.wsrp.handler.CookieUtil;
import org.gatein.wsrp.handler.RequestHeaderClientHandler;
import org.oasis.wsrp.v2.GetResource;
@@ -50,7 +49,7 @@
*/
public class DirectResourceServingHandler extends ResourceHandler
{
- protected DirectResourceServingHandler(WSRPConsumerImpl consumer)
+ protected DirectResourceServingHandler(WSRPConsumerSPI consumer)
{
super(consumer);
}
@@ -119,9 +118,8 @@
ResourceContext resourceContext;
MediaType type = MediaType.create(contentType);
- //TODO: handle this better, we should probably have a class in the common module to determine if the MediaType should be treated as a text
- // file or as binary content. We also need to implement the algorithm to determine the character encoding.
- if (TypeDef.TEXT.equals(type.getType()) || (TypeDef.APPLICATION.equals(type.getType()) && (type.getSubtype().getName().contains("javascript"))))
+ // GTNCOMMON-14
+ if (isInterpretableAsText(type))
{
// determine the charset of the content, if any
String charset = "UTF-8";
Modified: components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/InvocationHandler.java
===================================================================
--- components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/InvocationHandler.java 2010-12-15 17:18:21 UTC (rev 5595)
+++ components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/InvocationHandler.java 2010-12-16 14:38:05 UTC (rev 5596)
@@ -39,6 +39,7 @@
import org.gatein.wsrp.WSRPUtils;
import org.gatein.wsrp.consumer.ProducerInfo;
import org.gatein.wsrp.consumer.WSRPConsumerImpl;
+import org.gatein.wsrp.consumer.spi.WSRPConsumerSPI;
import org.gatein.wsrp.spec.v2.WSRP2RewritingConstants;
import org.oasis.wsrp.v2.InvalidCookie;
import org.oasis.wsrp.v2.InvalidRegistration;
@@ -65,7 +66,7 @@
*/
public abstract class InvocationHandler<Invocation extends PortletInvocation, Request, Response>
{
- protected final WSRPConsumerImpl consumer;
+ protected final WSRPConsumerSPI consumer;
protected static Logger log = LoggerFactory.getLogger(InvocationHandler.class);
protected static boolean debug = log.isDebugEnabled();
@@ -80,7 +81,7 @@
/** Maximum number of tries before giving up. */
private static final int MAXIMUM_RETRY_NUMBER = 3;
- protected InvocationHandler(WSRPConsumerImpl consumer)
+ protected InvocationHandler(WSRPConsumerSPI consumer)
{
this.consumer = consumer;
}
@@ -318,7 +319,7 @@
private static final String STREAM_INFO = "stream info in invocation context";
private static final String USER_AGENT = "User-Agent";
- public RequestPrecursor(WSRPConsumerImpl wsrpConsumer, Invocation invocation) throws PortletInvokerException
+ public RequestPrecursor(WSRPConsumerSPI wsrpConsumer, Invocation invocation) throws PortletInvokerException
{
// retrieve handle
portletContext = WSRPUtils.convertToWSRPPortletContext(WSRPConsumerImpl.getPortletContext(invocation));
Modified: components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandler.java
===================================================================
--- components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandler.java 2010-12-15 17:18:21 UTC (rev 5595)
+++ components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandler.java 2010-12-16 14:38:05 UTC (rev 5596)
@@ -23,6 +23,8 @@
package org.gatein.wsrp.consumer.handlers;
+import org.gatein.common.net.media.MediaType;
+import org.gatein.common.net.media.TypeDef;
import org.gatein.common.text.TextTools;
import org.gatein.common.util.ParameterValidation;
import org.gatein.pc.api.PortletInvokerException;
@@ -34,17 +36,19 @@
import org.gatein.pc.api.invocation.response.PortletInvocationResponse;
import org.gatein.pc.api.invocation.response.ResponseProperties;
import org.gatein.pc.api.spi.PortletInvocationContext;
+import org.gatein.pc.api.spi.SecurityContext;
import org.gatein.wsrp.WSRPConstants;
import org.gatein.wsrp.WSRPConsumer;
import org.gatein.wsrp.WSRPPortletURL;
import org.gatein.wsrp.WSRPRewritingConstants;
import org.gatein.wsrp.WSRPTypeFactory;
import org.gatein.wsrp.consumer.ProducerInfo;
-import org.gatein.wsrp.consumer.WSRPConsumerImpl;
+import org.gatein.wsrp.consumer.spi.WSRPConsumerSPI;
import org.oasis.wsrp.v2.CacheControl;
import org.oasis.wsrp.v2.MimeResponse;
import org.oasis.wsrp.v2.SessionContext;
+import java.io.UnsupportedEncodingException;
import java.util.Map;
import java.util.Set;
@@ -56,11 +60,24 @@
{
private static final org.gatein.pc.api.cache.CacheControl DEFAULT_CACHE_CONTROL = new org.gatein.pc.api.cache.CacheControl(0, CacheScope.PRIVATE, null);
- protected MimeResponseHandler(WSRPConsumerImpl consumer)
+ protected MimeResponseHandler(WSRPConsumerSPI consumer)
{
super(consumer);
}
+ /**
+ * TODO: handle this better, we should probably have a class in the common module to determine if the MediaType
+ * should be treated as a text file or as binary content. We also need to implement the algorithm to determine the
+ * character encoding. See GTNCOMMON-14
+ *
+ * @param type
+ * @return
+ */
+ public static boolean isInterpretableAsText(MediaType type)
+ {
+ return TypeDef.TEXT.equals(type.getType()) || (TypeDef.APPLICATION.equals(type.getType()) && (type.getSubtype().getName().contains("javascript")));
+ }
+
protected abstract SessionContext getSessionContextFrom(Response response);
protected abstract LocalMimeResponse getMimeResponseFrom(Response response);
@@ -72,6 +89,11 @@
requestPrecursor.getPortletHandle());
LocalMimeResponse mimeResponse = getMimeResponseFrom(response);
+ return rewriteResponseIfNeeded(mimeResponse, invocation);
+ }
+
+ PortletInvocationResponse rewriteResponseIfNeeded(final LocalMimeResponse mimeResponse, final Invocation invocation) throws PortletInvokerException
+ {
String markup = mimeResponse.getItemString();
byte[] binary = mimeResponse.getItemBinary();
if (markup != null && binary != null)
@@ -85,6 +107,7 @@
if (mimeResponse.isUseCachedItem() != null && mimeResponse.isUseCachedItem())
{
//todo: deal with cache GTNWSRP-40
+ log.debug("Consumer " + consumer.getProducerId() + " requested cached data. Not implemented yet!");
}
else
{
@@ -93,30 +116,57 @@
}
}
- if (!ParameterValidation.isNullOrEmpty(markup))
- {
- if (Boolean.TRUE.equals(mimeResponse.isRequiresRewriting()))
- {
- markup = processMarkup(
- markup,
- WSRPTypeFactory.getNamespaceFrom(invocation.getWindowContext()),
- invocation.getContext(),
- invocation.getTarget(),
- new URLFormat(invocation.getSecurityContext().isSecure(), invocation.getSecurityContext().isAuthenticated(), true, true),
- consumer
- );
- }
- }
-
String mimeType = mimeResponse.getMimeType();
if (ParameterValidation.isNullOrEmpty(mimeType))
{
return new ErrorResponse(new IllegalArgumentException("No MIME type was provided for portlet content."));
}
+ if (Boolean.TRUE.equals(mimeResponse.isRequiresRewriting()))
+ {
+ if (!ParameterValidation.isNullOrEmpty(markup))
+ {
+ markup = processMarkup(markup, invocation);
+ }
+
+ // GTNWSRP-189:
+ // if we have binary and we require rewriting, convert binary to a string assuming UTF-8 encoding and process
+ // this is seen with NetUnity producer's resource download portlet which sends CSS and JS as binary for example
+ if (binary != null && binary.length > 0 && isInterpretableAsText(MediaType.create(mimeType)))
+ {
+ try
+ {
+ String binaryAsString = new String(binary, "UTF-8");
+ binaryAsString = processMarkup(binaryAsString, invocation);
+
+ // reconvert to binary
+ binary = binaryAsString.getBytes("UTF-8");
+ }
+ catch (UnsupportedEncodingException e)
+ {
+ // shouldn't happen since UTF-8 is always supported...
+ throw new PortletInvokerException("Couldn't convert binary as String.", e);
+ }
+ }
+ }
+
return createContentResponse(mimeResponse, invocation, null, null, mimeType, binary, markup, createCacheControl(mimeResponse));
}
+ private String processMarkup(String markup, Invocation invocation)
+ {
+ SecurityContext securityContext = invocation.getSecurityContext();
+ markup = processMarkup(
+ markup,
+ WSRPTypeFactory.getNamespaceFrom(invocation.getWindowContext()),
+ invocation.getContext(),
+ invocation.getTarget(),
+ new URLFormat(securityContext.isSecure(), securityContext.isAuthenticated(), true, true),
+ consumer
+ );
+ return markup;
+ }
+
protected PortletInvocationResponse createContentResponse(LocalMimeResponse mimeResponse, Invocation invocation,
ResponseProperties properties, Map<String, Object> attributes,
String mimeType, byte[] bytes, String markup,
Modified: components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/RenderHandler.java
===================================================================
--- components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/RenderHandler.java 2010-12-15 17:18:21 UTC (rev 5595)
+++ components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/RenderHandler.java 2010-12-16 14:38:05 UTC (rev 5596)
@@ -28,7 +28,7 @@
import org.gatein.pc.api.invocation.response.PortletInvocationResponse;
import org.gatein.pc.api.invocation.response.ResponseProperties;
import org.gatein.wsrp.WSRPTypeFactory;
-import org.gatein.wsrp.consumer.WSRPConsumerImpl;
+import org.gatein.wsrp.consumer.spi.WSRPConsumerSPI;
import org.oasis.wsrp.v2.Extension;
import org.oasis.wsrp.v2.GetMarkup;
import org.oasis.wsrp.v2.MarkupContext;
@@ -49,7 +49,7 @@
public class RenderHandler extends MimeResponseHandler<RenderInvocation, GetMarkup, MarkupResponse, MarkupContext>
{
- public RenderHandler(WSRPConsumerImpl consumer)
+ public RenderHandler(WSRPConsumerSPI consumer)
{
super(consumer);
}
@@ -116,7 +116,7 @@
consumer.getMarkupService().getMarkup(request.getRegistrationContext(), request.getPortletContext(),
request.getRuntimeContext(), request.getUserContext(), request.getMarkupParams(),
markupContextHolder, sessionContextHolder, new Holder<List<Extension>>());
-
+
MarkupResponse markupResponse = WSRPTypeFactory.createMarkupResponse(markupContextHolder.value);
markupResponse.setSessionContext(sessionContextHolder.value);
return markupResponse;
Modified: components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/ResourceHandler.java
===================================================================
--- components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/ResourceHandler.java 2010-12-15 17:18:21 UTC (rev 5595)
+++ components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/ResourceHandler.java 2010-12-16 14:38:05 UTC (rev 5596)
@@ -31,7 +31,7 @@
import org.gatein.wsrp.WSRPRewritingConstants;
import org.gatein.wsrp.WSRPTypeFactory;
import org.gatein.wsrp.WSRPUtils;
-import org.gatein.wsrp.consumer.WSRPConsumerImpl;
+import org.gatein.wsrp.consumer.spi.WSRPConsumerSPI;
import org.gatein.wsrp.spec.v2.WSRP2RewritingConstants;
import org.oasis.wsrp.v2.Extension;
import org.oasis.wsrp.v2.GetResource;
@@ -54,7 +54,7 @@
public class ResourceHandler extends MimeResponseHandler<ResourceInvocation, GetResource, ResourceResponse, ResourceContext>
{
- public ResourceHandler(WSRPConsumerImpl consumer)
+ public ResourceHandler(WSRPConsumerSPI consumer)
{
super(consumer);
}
Added: components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/spi/WSRPConsumerSPI.java
===================================================================
--- components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/spi/WSRPConsumerSPI.java (rev 0)
+++ components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/spi/WSRPConsumerSPI.java 2010-12-16 14:38:05 UTC (rev 5596)
@@ -0,0 +1,64 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2008, 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.gatein.wsrp.consumer.spi;
+
+import org.gatein.pc.api.PortletInvokerException;
+import org.gatein.pc.api.invocation.PortletInvocation;
+import org.gatein.wsrp.WSRPConsumer;
+import org.gatein.wsrp.consumer.ProducerInfo;
+import org.gatein.wsrp.consumer.handlers.SessionHandler;
+import org.gatein.wsrp.services.MarkupService;
+import org.oasis.wsrp.v2.RegistrationContext;
+import org.oasis.wsrp.v2.RuntimeContext;
+import org.oasis.wsrp.v2.UserContext;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public interface WSRPConsumerSPI extends WSRPConsumer
+{
+ RegistrationContext getRegistrationContext() throws PortletInvokerException;
+
+ UserContext getUserContextFrom(PortletInvocation invocation, RuntimeContext runtimeContext) throws PortletInvokerException;
+
+ SessionHandler getSessionHandler();
+
+ void setTemplatesIfNeeded(PortletInvocation invocation, RuntimeContext runtimeContext) throws PortletInvokerException;
+
+ void refreshProducerInfo() throws PortletInvokerException;
+
+ void handleInvalidRegistrationFault() throws PortletInvokerException;
+
+ ProducerInfo getProducerInfo();
+
+ MarkupService getMarkupService() throws PortletInvokerException;
+
+ /**
+ * Determines whether the specified user scope (for markup caching) is supported.
+ *
+ * @param userScope the user scope which support is to be determined
+ * @return <code>true</code> if the given user scope is supported, <code>false</code> otherwise
+ */
+ boolean supportsUserScope(String userScope);
+}
Copied: components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandlerTestCase.java (from rev 5555, components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/consumer/handlers/RenderHandlerTestCase.java)
===================================================================
--- components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandlerTestCase.java (rev 0)
+++ components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandlerTestCase.java 2010-12-16 14:38:05 UTC (rev 5596)
@@ -0,0 +1,272 @@
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, 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.gatein.wsrp.consumer.handlers;
+
+import junit.framework.TestCase;
+import org.gatein.pc.api.PortletContext;
+import org.gatein.pc.api.PortletInvokerException;
+import org.gatein.pc.api.URLFormat;
+import org.gatein.pc.api.invocation.PortletInvocation;
+import org.gatein.pc.api.invocation.response.ContentResponse;
+import org.gatein.pc.api.invocation.response.PortletInvocationResponse;
+import org.gatein.wsrp.WSRPRewritingConstants;
+import org.gatein.wsrp.WSRPTypeFactory;
+import org.gatein.wsrp.test.ExtendedAssert;
+import org.gatein.wsrp.test.support.MockWSRPConsumer;
+import org.gatein.wsrp.test.support.TestPortletInvocationContext;
+import org.gatein.wsrp.test.support.TestRenderInvocation;
+import org.gatein.wsrp.test.support.TestResourceInvocation;
+import org.gatein.wsrp.test.support.TestWindowContext;
+import org.oasis.wsrp.v2.MarkupContext;
+import org.oasis.wsrp.v2.MimeResponse;
+import org.oasis.wsrp.v2.ResourceContext;
+
+import java.io.UnsupportedEncodingException;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision: 10507 $
+ * @since 2.6
+ */
+public class MimeResponseHandlerTestCase extends TestCase
+{
+ public static final String NAMESPACE = "NAMESPACE";
+ public static final String PORTLETID = "PORTLETID";
+ public static final MockWSRPConsumer CONSUMER = new MockWSRPConsumer("foo");
+ public static final PortletContext PORTLET_CONTEXT = PortletContext.createPortletContext(PORTLETID);
+ public static final TestPortletInvocationContext CONTEXT = new TestPortletInvocationContext();
+ public static final URLFormat FORMAT = new URLFormat(false, false, true, true);
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ CONSUMER.setUsingWSRP2(true);
+ }
+
+ public void testProcessMarkupV1()
+ {
+ // fake using WSRP 1
+ CONSUMER.setUsingWSRP2(false);
+
+ String markup;
+ String expected;
+ markup = "khlaksdhjflkjhsadljkwsrp_rewrite?wsrp-urlType=blockingAction&wsrp-interactionState=JBPNS_/wsrp_rewrite" +
+ "fadsfadswsrp_rewrite?wsrp-urlType=render&wsrp-navigationalState=JBPNS_/wsrp_rewritefajdshfkjdshgfgrept";
+ expected = "khlaksdhjflkjhsadljkAction is=JBPNS_ ns=null ws=null m=null" +
+ "fadsfadsRender ns=JBPNS_ ws=null m=nullfajdshfkjdshgfgrept";
+ processMarkupAndCheck(markup, expected);
+
+ markup = "<form method='post' action='wsrp_rewrite?wsrp-urlType=blockingAction&wsrp" +
+ "-interactionState=JBPNS_/wsrp_rewrite' id='wsrp_rewrite_portfolioManager'><table><tr><td>Stock symbol</t" +
+ "d><td><input name='symbol'/></td></tr><tr><td><input type='submit' value='Submit'></td></tr></table></form>";
+ expected = "<form method='post' action='Action is=JBPNS_ ns=null ws=null m=null' id='" + NAMESPACE
+ + "portfolioManager'><table><tr><td>Stock symbol</t" +
+ "d><td><input name='symbol'/></td></tr><tr><td><input type='submit' value='Submit'></td></tr></table></form>";
+ processMarkupAndCheck(markup, expected);
+ }
+
+ public void testProcessMarkupV2()
+ {
+ String markup;
+ String expected;
+ markup = "khlaksdhjflkjhsadljkwsrp_rewrite?wsrp-urlType=blockingAction&wsrp-interactionState=JBPNS_/wsrp_rewrite" +
+ "fadsfadswsrp_rewrite?wsrp-urlType=render&wsrp-navigationalState=JBPNS_/wsrp_rewritefajdshfkjdshgfgrept";
+ expected = "khlaksdhjflkjhsadljkAction is=JBPNS_ ns=null ws=null m=null" +
+ "fadsfadsRender ns=JBPNS_ ws=null m=nullfajdshfkjdshgfgrept";
+ processMarkupAndCheck(markup, expected);
+
+ markup = "<form method='post' action='wsrp_rewrite?wsrp-urlType=blockingAction&wsrp" +
+ "-interactionState=JBPNS_/wsrp_rewrite' id='wsrp_rewrite_portfolioManager'><table><tr><td>Stock symbol</t" +
+ "d><td><input name='symbol'/></td></tr><tr><td><input type='submit' value='Submit'></td></tr></table></form>";
+ expected = "<form method='post' action='Action is=JBPNS_ ns=null ws=null m=null' id='" + NAMESPACE + "portfolioManager'><table><tr><td>Stock symbol</t" +
+ "d><td><input name='symbol'/></td></tr><tr><td><input type='submit' value='Submit'></td></tr></table></form>";
+ processMarkupAndCheck(markup, expected);
+ }
+
+ /*public void testResourceURLs()
+ {
+ String markup;
+ String expected;
+ markup = "<img src='wsrp_rewrite?wsrp-urlType=resource&wsrp-url=http%3A%2F%2Flocalhost%3A8080%2Ftest-resource-portlet%2Fgif%2Flogo.gif&wsrp-requiresRewrite=true/wsrp_rewrite'/>";
+ expected = "<img src='http://localhost:8080/test-resource-portlet/gif/logo.gif'/>";
+ processMarkupAndCheck(markup, expected);
+
+ markup = "<img src='http://localhost:8080/test-resourcenoencodeurl-portlet/gif/logo.gif'/>";
+ processMarkupAndCheck(markup, markup);
+
+ markup = "wsrp_rewrite?wsrp-urlType=resource&wsrp-url=http%3A%2F%2Flocalhost%3A8080%2Fhelloworld&wsrp-requiresRewrite=true/wsrp_rewrite/helloworld.jar";
+ processMarkupAndCheck(markup, "http://localhost:8080/helloworld/helloworld.jar");
+
+ markup = "wsrp_rewrite?wsrp-urlType=resource&wsrp-url=http%3A%2F%2Flocalhost%3A8080%2Fhelloworld&wsrp-requiresRewrite=true/wsrp_rewrite&foo=bar/helloworld.jar";
+ processMarkupAndCheck(markup, "http://localhost:8080/helloworld&foo=bar/helloworld.jar");
+ }*/
+
+ public void testRegularURLIsNotAffected()
+ {
+ String markup;
+ markup = "<a href=\"/portal/portal/default/Test/EXAMPLE/EXAMPLE?action=1d&windowstate=&mode=" +
+ "&ns=_next%3D%2Fdk%2Fskat%2Fportal%2Ffront%2Fportlets%2Fexample%2Findex.jsp" +
+ "&is=_action%3D%252Fdk%252Fskat%252Fportal%252Ffront%252Fportlets%252Fexample%252FprocessLink" +
+ "%26jbpns_2fdefault_2fTest_2fEXAMPLE_2fEXAMPLEsnpbjname%3DChris\">Press to use default name.</a>";
+ processMarkupAndCheck(markup, markup);
+ }
+
+ /*public void testProcessMarkupResourceFromTemplate()
+ {
+ String url = "http%3a%2f%2fwsrp.netunitysoftware.com%2fWSRPTestService%2fWSRPTestService.asmx%3ftimeout%3d30000%2fgetResource%3fportletHandle%3d781F3EE5-22DF-4ef9-9664-F5FC759065DB%26Function%3dResource%26Name%3dNetUnity%26Type%3dGIF";
+ String markup = "<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n" +
+ "\t<tr class=\"portlet-table-header\">\n" +
+ "\t\t<td>Symbol</td>\n" +
+ "\t\t<td>Name</td>\n" +
+ "\t\t<td align=\"right\">Price</td>\n" +
+ "\t\t<td></td>\n" +
+ "\t\t<td align=\"right\">Change</td>\n" +
+ "\t\t<td align=\"right\">% Chg</td>\n" +
+ "\t</tr>\n" +
+ "</table>\n" +
+ "<A HREF=\"http://www.netunitysoftware.com\" TITLE=\"NetUnity WSRP .NET Framework\" >" +
+ "<img src=\"" + getResourceURL(url, false) + "\" border=\"0\" /></A>";
+
+ String expected = "<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n" +
+ "\t<tr class=\"portlet-table-header\">\n" +
+ "\t\t<td>Symbol</td>\n" +
+ "\t\t<td>Name</td>\n" +
+ "\t\t<td align=\"right\">Price</td>\n" +
+ "\t\t<td></td>\n" +
+ "\t\t<td align=\"right\">Change</td>\n" +
+ "\t\t<td align=\"right\">% Chg</td>\n" +
+ "\t</tr>\n" +
+ "</table>\n" +
+ "<A HREF=\"http://www.netunitysoftware.com\" TITLE=\"NetUnity WSRP .NET Framework\" >" +
+ "<img src=\"" + URLTools.decodeXWWWFormURL(url) + "\" border=\"0\" /></A>";
+ processMarkupAndCheck(markup, expected);
+ }*/
+
+ public void testGTNWSRP12Workaround()
+ {
+ String timeout = "%3ftimeout%3d100000";
+ String beforeTimeout = "http%3a%2f%2fwsrp.netunitysoftware.com%2fWSRPTestService%2fWSRPTestService.asmx";
+ String afterTimeout = "%2fgetResource%3fportletHandle%3d781F3EE5-22DF-4ef9-9664-F5FC759065DB%26Function%3dResource%26Name%3dNetUnity%26Type%3dGIF";
+ String originalURL = beforeTimeout + timeout + afterTimeout;
+ String markup = "<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n" +
+ "\t<tr class=\"portlet-table-header\">\n" +
+ "\t\t<td>Symbol</td>\n" +
+ "\t\t<td>Name</td>\n" +
+ "\t\t<td align=\"right\">Price</td>\n" +
+ "\t\t<td></td>\n" +
+ "\t\t<td align=\"right\">Change</td>\n" +
+ "\t\t<td align=\"right\">% Chg</td>\n" +
+ "\t</tr>\n" +
+ "</table>\n" +
+ "<A HREF=\"http://www.netunitysoftware.com\" TITLE=\"NetUnity WSRP .NET Framework\" >" +
+ "<img src=\"" + originalURL + "\" border=\"0\" /></A>";
+
+ String expected = "<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n" +
+ "\t<tr class=\"portlet-table-header\">\n" +
+ "\t\t<td>Symbol</td>\n" +
+ "\t\t<td>Name</td>\n" +
+ "\t\t<td align=\"right\">Price</td>\n" +
+ "\t\t<td></td>\n" +
+ "\t\t<td align=\"right\">Change</td>\n" +
+ "\t\t<td align=\"right\">% Chg</td>\n" +
+ "\t</tr>\n" +
+ "</table>\n" +
+ "<A HREF=\"http://www.netunitysoftware.com\" TITLE=\"NetUnity WSRP .NET Framework\" >" +
+ "<img src=\"" + beforeTimeout + afterTimeout + "\" border=\"0\" /></A>";
+
+ processMarkupAndCheck(markup, expected);
+ }
+
+ public void testRewritingRequiredWithBinaryContent() throws UnsupportedEncodingException, PortletInvokerException
+ {
+ String expected = "/* Style Sheet */\n" +
+ "." + TestWindowContext.NAMESPACE + "ExternalStyleClass\n" +
+ "{\n" +
+ "\tfont-weight: bold;\n" +
+ "\tcolor: green;\n" +
+ "\tfont-family: Arial;\n" +
+ "\tborder:dashed 1px black; \n" +
+ "\tpadding: 15px;\n" +
+ "}";
+ byte[] expectedBinary = expected.getBytes("UTF-8");
+ String original = "/* Style Sheet */\n" +
+ ".wsrp_rewrite_ExternalStyleClass\n" +
+ "{\n" +
+ "\tfont-weight: bold;\n" +
+ "\tcolor: green;\n" +
+ "\tfont-family: Arial;\n" +
+ "\tborder:dashed 1px black; \n" +
+ "\tpadding: 15px;\n" +
+ "}";
+ byte[] originalBinary = original.getBytes("UTF-8");
+
+ processBinaryAndCheck(expectedBinary, new RenderHandler(CONSUMER), new TestRenderInvocation(CONTEXT), WSRPTypeFactory.createMimeResponse("text/css", null, originalBinary, MarkupContext.class));
+ processBinaryAndCheck(expectedBinary, new ResourceHandler(CONSUMER), new TestResourceInvocation(CONTEXT), WSRPTypeFactory.createMimeResponse("text/css", null, originalBinary, ResourceContext.class));
+
+ original = "//JScript file\n" +
+ "function wsrp_rewrite_ExternalScriptFunction()\n" +
+ "{\n" +
+ "\talert('Script Function in Script File');\n" +
+ "}";
+ originalBinary = original.getBytes("UTF-8");
+ expected = "//JScript file\n" +
+ "function " + TestWindowContext.NAMESPACE + "ExternalScriptFunction()\n" +
+ "{\n" +
+ "\talert('Script Function in Script File');\n" +
+ "}";
+ expectedBinary = expected.getBytes("UTF-8");
+
+ processBinaryAndCheck(expectedBinary, new RenderHandler(CONSUMER), new TestRenderInvocation(CONTEXT), WSRPTypeFactory.createMimeResponse("application/x-javascript", null, originalBinary, MarkupContext.class));
+ processBinaryAndCheck(expectedBinary, new ResourceHandler(CONSUMER), new TestResourceInvocation(CONTEXT), WSRPTypeFactory.createMimeResponse("application/x-javascript", null, originalBinary, ResourceContext.class));
+ }
+
+ private void processBinaryAndCheck(byte[] expectedBinary, final MimeResponseHandler handler, final PortletInvocation invocation, final MimeResponse mimeResponse) throws PortletInvokerException
+ {
+ mimeResponse.setRequiresRewriting(true);
+ PortletInvocationResponse response = handler.rewriteResponseIfNeeded(mimeResponse, invocation);
+ assertTrue(response instanceof ContentResponse);
+ ContentResponse contentResponse = (ContentResponse)response;
+ ExtendedAssert.assertEquals(expectedBinary, contentResponse.getBytes());
+ }
+
+ private void processMarkupAndCheck(String markup, String expected)
+ {
+ String result = MimeResponseHandler.processMarkup(
+ markup,
+ NAMESPACE,
+ CONTEXT,
+ PORTLET_CONTEXT,
+ FORMAT,
+ CONSUMER
+ );
+ assertEquals(expected, result);
+ }
+
+ private String getResourceURL(String encodedURL, boolean requiresRewrite)
+ {
+ String result = WSRPRewritingConstants.FAKE_RESOURCE_URL.replace(WSRPRewritingConstants.WSRP_URL, encodedURL);
+ result = result.replace(WSRPRewritingConstants.WSRP_REQUIRES_REWRITE, Boolean.toString(requiresRewrite));
+ return result;
+ }
+}
Property changes on: components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandlerTestCase.java
___________________________________________________________________
Name: svn:executable
+ *
Deleted: components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/consumer/handlers/RenderHandlerTestCase.java
===================================================================
--- components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/consumer/handlers/RenderHandlerTestCase.java 2010-12-15 17:18:21 UTC (rev 5595)
+++ components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/consumer/handlers/RenderHandlerTestCase.java 2010-12-16 14:38:05 UTC (rev 5596)
@@ -1,206 +0,0 @@
-/*
- * JBoss, a division of Red Hat
- * Copyright 2010, 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.gatein.wsrp.consumer.handlers;
-
-import junit.framework.TestCase;
-import org.gatein.pc.api.PortletContext;
-import org.gatein.pc.api.URLFormat;
-import org.gatein.wsrp.WSRPRewritingConstants;
-import org.gatein.wsrp.test.support.MockWSRPConsumer;
-import org.gatein.wsrp.test.support.TestPortletInvocationContext;
-
-/**
- * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
- * @version $Revision: 10507 $
- * @since 2.6
- */
-public class RenderHandlerTestCase extends TestCase
-{
- public static final String NAMESPACE = "NAMESPACE";
- public static final String PORTLETID = "PORTLETID";
- public static final MockWSRPConsumer CONSUMER = new MockWSRPConsumer("foo");
- public static final PortletContext PORTLET_CONTEXT = PortletContext.createPortletContext(PORTLETID);
- public static final TestPortletInvocationContext CONTEXT = new TestPortletInvocationContext();
- public static final URLFormat FORMAT = new URLFormat(false, false, true, true);
-
- @Override
- protected void setUp() throws Exception
- {
- CONSUMER.setUsingWSRP2(true);
- }
-
- public void testProcessMarkupV1()
- {
- // fake using WSRP 1
- CONSUMER.setUsingWSRP2(false);
-
- String markup;
- String expected;
- markup = "khlaksdhjflkjhsadljkwsrp_rewrite?wsrp-urlType=blockingAction&wsrp-interactionState=JBPNS_/wsrp_rewrite" +
- "fadsfadswsrp_rewrite?wsrp-urlType=render&wsrp-navigationalState=JBPNS_/wsrp_rewritefajdshfkjdshgfgrept";
- expected = "khlaksdhjflkjhsadljkAction is=JBPNS_ ns=null ws=null m=null" +
- "fadsfadsRender ns=JBPNS_ ws=null m=nullfajdshfkjdshgfgrept";
- processMarkupAndCheck(markup, expected);
-
- markup = "<form method='post' action='wsrp_rewrite?wsrp-urlType=blockingAction&wsrp" +
- "-interactionState=JBPNS_/wsrp_rewrite' id='wsrp_rewrite_portfolioManager'><table><tr><td>Stock symbol</t" +
- "d><td><input name='symbol'/></td></tr><tr><td><input type='submit' value='Submit'></td></tr></table></form>";
- expected = "<form method='post' action='Action is=JBPNS_ ns=null ws=null m=null' id='" + NAMESPACE
- + "portfolioManager'><table><tr><td>Stock symbol</t" +
- "d><td><input name='symbol'/></td></tr><tr><td><input type='submit' value='Submit'></td></tr></table></form>";
- processMarkupAndCheck(markup, expected);
- }
-
- public void testProcessMarkupV2()
- {
- String markup;
- String expected;
- markup = "khlaksdhjflkjhsadljkwsrp_rewrite?wsrp-urlType=blockingAction&wsrp-interactionState=JBPNS_/wsrp_rewrite" +
- "fadsfadswsrp_rewrite?wsrp-urlType=render&wsrp-navigationalState=JBPNS_/wsrp_rewritefajdshfkjdshgfgrept";
- expected = "khlaksdhjflkjhsadljkAction is=JBPNS_ ns=null ws=null m=null" +
- "fadsfadsRender ns=JBPNS_ ws=null m=nullfajdshfkjdshgfgrept";
- processMarkupAndCheck(markup, expected);
-
- markup = "<form method='post' action='wsrp_rewrite?wsrp-urlType=blockingAction&wsrp" +
- "-interactionState=JBPNS_/wsrp_rewrite' id='wsrp_rewrite_portfolioManager'><table><tr><td>Stock symbol</t" +
- "d><td><input name='symbol'/></td></tr><tr><td><input type='submit' value='Submit'></td></tr></table></form>";
- expected = "<form method='post' action='Action is=JBPNS_ ns=null ws=null m=null' id='" + NAMESPACE + "portfolioManager'><table><tr><td>Stock symbol</t" +
- "d><td><input name='symbol'/></td></tr><tr><td><input type='submit' value='Submit'></td></tr></table></form>";
- processMarkupAndCheck(markup, expected);
- }
-
- /*public void testResourceURLs()
- {
- String markup;
- String expected;
- markup = "<img src='wsrp_rewrite?wsrp-urlType=resource&wsrp-url=http%3A%2F%2Flocalhost%3A8080%2Ftest-resource-portlet%2Fgif%2Flogo.gif&wsrp-requiresRewrite=true/wsrp_rewrite'/>";
- expected = "<img src='http://localhost:8080/test-resource-portlet/gif/logo.gif'/>";
- processMarkupAndCheck(markup, expected);
-
- markup = "<img src='http://localhost:8080/test-resourcenoencodeurl-portlet/gif/logo.gif'/>";
- processMarkupAndCheck(markup, markup);
-
- markup = "wsrp_rewrite?wsrp-urlType=resource&wsrp-url=http%3A%2F%2Flocalhost%3A8080%2Fhelloworld&wsrp-requiresRewrite=true/wsrp_rewrite/helloworld.jar";
- processMarkupAndCheck(markup, "http://localhost:8080/helloworld/helloworld.jar");
-
- markup = "wsrp_rewrite?wsrp-urlType=resource&wsrp-url=http%3A%2F%2Flocalhost%3A8080%2Fhelloworld&wsrp-requiresRewrite=true/wsrp_rewrite&foo=bar/helloworld.jar";
- processMarkupAndCheck(markup, "http://localhost:8080/helloworld&foo=bar/helloworld.jar");
- }*/
-
- public void testRegularURLIsNotAffected()
- {
- String markup;
- markup = "<a href=\"/portal/portal/default/Test/EXAMPLE/EXAMPLE?action=1d&windowstate=&mode=" +
- "&ns=_next%3D%2Fdk%2Fskat%2Fportal%2Ffront%2Fportlets%2Fexample%2Findex.jsp" +
- "&is=_action%3D%252Fdk%252Fskat%252Fportal%252Ffront%252Fportlets%252Fexample%252FprocessLink" +
- "%26jbpns_2fdefault_2fTest_2fEXAMPLE_2fEXAMPLEsnpbjname%3DChris\">Press to use default name.</a>";
- processMarkupAndCheck(markup, markup);
- }
-
- /*public void testProcessMarkupResourceFromTemplate()
- {
- String url = "http%3a%2f%2fwsrp.netunitysoftware.com%2fWSRPTestService%2fWSRPTestService.asmx%3ftimeout%3d30000%2fgetResource%3fportletHandle%3d781F3EE5-22DF-4ef9-9664-F5FC759065DB%26Function%3dResource%26Name%3dNetUnity%26Type%3dGIF";
- String markup = "<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n" +
- "\t<tr class=\"portlet-table-header\">\n" +
- "\t\t<td>Symbol</td>\n" +
- "\t\t<td>Name</td>\n" +
- "\t\t<td align=\"right\">Price</td>\n" +
- "\t\t<td></td>\n" +
- "\t\t<td align=\"right\">Change</td>\n" +
- "\t\t<td align=\"right\">% Chg</td>\n" +
- "\t</tr>\n" +
- "</table>\n" +
- "<A HREF=\"http://www.netunitysoftware.com\" TITLE=\"NetUnity WSRP .NET Framework\" >" +
- "<img src=\"" + getResourceURL(url, false) + "\" border=\"0\" /></A>";
-
- String expected = "<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n" +
- "\t<tr class=\"portlet-table-header\">\n" +
- "\t\t<td>Symbol</td>\n" +
- "\t\t<td>Name</td>\n" +
- "\t\t<td align=\"right\">Price</td>\n" +
- "\t\t<td></td>\n" +
- "\t\t<td align=\"right\">Change</td>\n" +
- "\t\t<td align=\"right\">% Chg</td>\n" +
- "\t</tr>\n" +
- "</table>\n" +
- "<A HREF=\"http://www.netunitysoftware.com\" TITLE=\"NetUnity WSRP .NET Framework\" >" +
- "<img src=\"" + URLTools.decodeXWWWFormURL(url) + "\" border=\"0\" /></A>";
- processMarkupAndCheck(markup, expected);
- }*/
-
- public void testGTNWSRP12Workaround()
- {
- String timeout = "%3ftimeout%3d100000";
- String beforeTimeout = "http%3a%2f%2fwsrp.netunitysoftware.com%2fWSRPTestService%2fWSRPTestService.asmx";
- String afterTimeout = "%2fgetResource%3fportletHandle%3d781F3EE5-22DF-4ef9-9664-F5FC759065DB%26Function%3dResource%26Name%3dNetUnity%26Type%3dGIF";
- String originalURL = beforeTimeout + timeout + afterTimeout;
- String markup = "<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n" +
- "\t<tr class=\"portlet-table-header\">\n" +
- "\t\t<td>Symbol</td>\n" +
- "\t\t<td>Name</td>\n" +
- "\t\t<td align=\"right\">Price</td>\n" +
- "\t\t<td></td>\n" +
- "\t\t<td align=\"right\">Change</td>\n" +
- "\t\t<td align=\"right\">% Chg</td>\n" +
- "\t</tr>\n" +
- "</table>\n" +
- "<A HREF=\"http://www.netunitysoftware.com\" TITLE=\"NetUnity WSRP .NET Framework\" >" +
- "<img src=\"" + originalURL + "\" border=\"0\" /></A>";
-
- String expected = "<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n" +
- "\t<tr class=\"portlet-table-header\">\n" +
- "\t\t<td>Symbol</td>\n" +
- "\t\t<td>Name</td>\n" +
- "\t\t<td align=\"right\">Price</td>\n" +
- "\t\t<td></td>\n" +
- "\t\t<td align=\"right\">Change</td>\n" +
- "\t\t<td align=\"right\">% Chg</td>\n" +
- "\t</tr>\n" +
- "</table>\n" +
- "<A HREF=\"http://www.netunitysoftware.com\" TITLE=\"NetUnity WSRP .NET Framework\" >" +
- "<img src=\"" + beforeTimeout + afterTimeout + "\" border=\"0\" /></A>";
-
- processMarkupAndCheck(markup, expected);
- }
-
- private void processMarkupAndCheck(String markup, String expected)
- {
- String result = RenderHandler.processMarkup(
- markup,
- NAMESPACE,
- CONTEXT,
- PORTLET_CONTEXT,
- FORMAT,
- CONSUMER
- );
- assertEquals(expected, result);
- }
-
- private String getResourceURL(String encodedURL, boolean requiresRewrite)
- {
- String result = WSRPRewritingConstants.FAKE_RESOURCE_URL.replace(WSRPRewritingConstants.WSRP_URL, encodedURL);
- result = result.replace(WSRPRewritingConstants.WSRP_REQUIRES_REWRITE, Boolean.toString(requiresRewrite));
- return result;
- }
-}
Modified: components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/test/support/MockWSRPConsumer.java
===================================================================
--- components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/test/support/MockWSRPConsumer.java 2010-12-15 17:18:21 UTC (rev 5595)
+++ components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/test/support/MockWSRPConsumer.java 2010-12-16 14:38:05 UTC (rev 5596)
@@ -33,14 +33,19 @@
import org.gatein.pc.api.state.DestroyCloneFailure;
import org.gatein.pc.api.state.PropertyChange;
import org.gatein.pc.api.state.PropertyMap;
-import org.gatein.wsrp.WSRPConsumer;
import org.gatein.wsrp.api.session.SessionEvent;
import org.gatein.wsrp.consumer.ProducerInfo;
import org.gatein.wsrp.consumer.RefreshResult;
import org.gatein.wsrp.consumer.handlers.ProducerSessionInformation;
+import org.gatein.wsrp.consumer.handlers.SessionHandler;
import org.gatein.wsrp.consumer.migration.ExportInfo;
import org.gatein.wsrp.consumer.migration.ImportInfo;
import org.gatein.wsrp.consumer.migration.MigrationService;
+import org.gatein.wsrp.consumer.spi.WSRPConsumerSPI;
+import org.gatein.wsrp.services.MarkupService;
+import org.oasis.wsrp.v2.RegistrationContext;
+import org.oasis.wsrp.v2.RuntimeContext;
+import org.oasis.wsrp.v2.UserContext;
import javax.servlet.http.HttpSession;
import java.util.List;
@@ -51,7 +56,7 @@
* @version $Revision: 8784 $
* @since 2.6
*/
-public class MockWSRPConsumer implements WSRPConsumer
+public class MockWSRPConsumer implements WSRPConsumerSPI
{
private ProducerInfo producerInfo;
private boolean useWSRP2 = true;
@@ -83,10 +88,46 @@
return producerInfo;
}
+ public MarkupService getMarkupService() throws PortletInvokerException
+ {
+ throw new NotYetImplemented();
+ }
+
+ public boolean supportsUserScope(String userScope)
+ {
+ throw new NotYetImplemented();
+ }
+
+ public RegistrationContext getRegistrationContext() throws PortletInvokerException
+ {
+ throw new NotYetImplemented();
+ }
+
+ public UserContext getUserContextFrom(PortletInvocation invocation, RuntimeContext runtimeContext) throws PortletInvokerException
+ {
+ throw new NotYetImplemented();
+ }
+
+ public SessionHandler getSessionHandler()
+ {
+ throw new NotYetImplemented();
+ }
+
+ public void setTemplatesIfNeeded(PortletInvocation invocation, RuntimeContext runtimeContext) throws PortletInvokerException
+ {
+ throw new NotYetImplemented();
+ }
+
public void refreshProducerInfo() throws PortletInvokerException
{
+ throw new NotYetImplemented();
}
+ public void handleInvalidRegistrationFault() throws PortletInvokerException
+ {
+ throw new NotYetImplemented();
+ }
+
public void releaseSessions()
{
}
Added: components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/test/support/TestActionInvocation.java
===================================================================
--- components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/test/support/TestActionInvocation.java (rev 0)
+++ components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/test/support/TestActionInvocation.java 2010-12-16 14:38:05 UTC (rev 5596)
@@ -0,0 +1,43 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2008, 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.gatein.wsrp.test.support;
+
+import org.gatein.pc.api.invocation.ActionInvocation;
+import org.gatein.pc.api.spi.PortletInvocationContext;
+import org.gatein.pc.portlet.impl.spi.AbstractPortalContext;
+import org.gatein.pc.portlet.impl.spi.AbstractSecurityContext;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class TestActionInvocation extends ActionInvocation
+{
+ public TestActionInvocation(PortletInvocationContext ctx) throws IllegalArgumentException
+ {
+ super(ctx);
+ setPortalContext(new AbstractPortalContext());
+ setSecurityContext(new AbstractSecurityContext(MockHttpServletRequest.createMockRequest(null)));
+ setWindowContext(new TestWindowContext());
+ }
+}
Added: components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/test/support/TestRenderInvocation.java
===================================================================
--- components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/test/support/TestRenderInvocation.java (rev 0)
+++ components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/test/support/TestRenderInvocation.java 2010-12-16 14:38:05 UTC (rev 5596)
@@ -0,0 +1,43 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2008, 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.gatein.wsrp.test.support;
+
+import org.gatein.pc.api.invocation.RenderInvocation;
+import org.gatein.pc.api.spi.PortletInvocationContext;
+import org.gatein.pc.portlet.impl.spi.AbstractPortalContext;
+import org.gatein.pc.portlet.impl.spi.AbstractSecurityContext;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class TestRenderInvocation extends RenderInvocation
+{
+ public TestRenderInvocation(PortletInvocationContext ctx) throws IllegalArgumentException
+ {
+ super(ctx);
+ setPortalContext(new AbstractPortalContext());
+ setSecurityContext(new AbstractSecurityContext(MockHttpServletRequest.createMockRequest(null)));
+ setWindowContext(new TestWindowContext());
+ }
+}
Added: components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/test/support/TestResourceInvocation.java
===================================================================
--- components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/test/support/TestResourceInvocation.java (rev 0)
+++ components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/test/support/TestResourceInvocation.java 2010-12-16 14:38:05 UTC (rev 5596)
@@ -0,0 +1,43 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2008, 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.gatein.wsrp.test.support;
+
+import org.gatein.pc.api.invocation.ResourceInvocation;
+import org.gatein.pc.api.spi.PortletInvocationContext;
+import org.gatein.pc.portlet.impl.spi.AbstractPortalContext;
+import org.gatein.pc.portlet.impl.spi.AbstractSecurityContext;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class TestResourceInvocation extends ResourceInvocation
+{
+ public TestResourceInvocation(PortletInvocationContext ctx) throws IllegalArgumentException
+ {
+ super(ctx);
+ setPortalContext(new AbstractPortalContext());
+ setSecurityContext(new AbstractSecurityContext(MockHttpServletRequest.createMockRequest(null)));
+ setWindowContext(new TestWindowContext());
+ }
+}
Added: components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/test/support/TestWindowContext.java
===================================================================
--- components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/test/support/TestWindowContext.java (rev 0)
+++ components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/test/support/TestWindowContext.java 2010-12-16 14:38:05 UTC (rev 5596)
@@ -0,0 +1,45 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2008, 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.gatein.wsrp.test.support;
+
+import org.gatein.pc.api.spi.WindowContext;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class TestWindowContext implements WindowContext
+{
+ public static final String NAMESPACE = "namespace";
+ private static final String ID = "id";
+
+ public String getId()
+ {
+ return ID;
+ }
+
+ public String getNamespace()
+ {
+ return NAMESPACE;
+ }
+}
14 years, 1 month
gatein SVN: r5595 - epp/portal/branches.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-12-15 12:18:21 -0500 (Wed, 15 Dec 2010)
New Revision: 5595
Added:
epp/portal/branches/EPP_5_1_0_GA_JBEPP-737/
Removed:
epp/portal/branches/EPP_5_0_1_GA_JBEPP-737/
Log:
Oups
Copied: epp/portal/branches/EPP_5_1_0_GA_JBEPP-737 (from rev 5594, epp/portal/branches/EPP_5_0_1_GA_JBEPP-737)
14 years, 1 month