gatein SVN: r4705 - components/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/render.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-10-18 06:01:08 -0400 (Mon, 18 Oct 2010)
New Revision: 4705
Modified:
components/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/render/DefaultServiceFetcher.java
Log:
GTNPORTAL-1539: Remove gadget Error 404 in logs
Modified: components/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/render/DefaultServiceFetcher.java
===================================================================
--- components/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/render/DefaultServiceFetcher.java 2010-10-18 10:00:10 UTC (rev 4704)
+++ components/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/render/DefaultServiceFetcher.java 2010-10-18 10:01:08 UTC (rev 4705)
@@ -51,7 +51,7 @@
static final Logger logger = Logger.getLogger(Renderer.class.getName());
- static final String JSON_RESPONSE_WRAPPER_ELEMENT = "data";
+ static final String JSON_RESPONSE_WRAPPER_ELEMENT = "result";
static final String OSAPI_FEATURE_CONFIG = "osapi";
14 years, 3 months
gatein SVN: r4704 - in components/shindig/trunk: java/gadgets and 1 other directories.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-10-18 06:00:10 -0400 (Mon, 18 Oct 2010)
New Revision: 4704
Modified:
components/shindig/trunk/java/gadgets/pom.xml
components/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/JsLibrary.java
components/shindig/trunk/pom.xml
Log:
GTNPORTAL-1538: Remove Shindig warnings at startup
Also added a dependency that was preventing from building, not sure how it built before...
Modified: components/shindig/trunk/java/gadgets/pom.xml
===================================================================
--- components/shindig/trunk/java/gadgets/pom.xml 2010-10-18 09:57:48 UTC (rev 4703)
+++ components/shindig/trunk/java/gadgets/pom.xml 2010-10-18 10:00:10 UTC (rev 4704)
@@ -132,6 +132,10 @@
so we have a single place to change the version
-->
<dependency>
+ <groupId>org.jdom</groupId>
+ <artifactId>jdom</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
</dependency>
Modified: components/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/JsLibrary.java
===================================================================
--- components/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/JsLibrary.java 2010-10-18 09:57:48 UTC (rev 4703)
+++ components/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/JsLibrary.java 2010-10-18 10:00:10 UTC (rev 4704)
@@ -129,6 +129,9 @@
loadOptimizedAndDebugData(content, type, opt, dbg);
optimizedContent = opt.toString();
debugContent = dbg.toString();
+ if(optimizedContent == null || optimizedContent.equalsIgnoreCase("null") || optimizedContent.length() == 0) {
+ optimizedContent = debugContent;
+ }
break;
case URL:
if (fetcher == null) {
@@ -255,7 +258,7 @@
try {
return ResourceLoader.getContent(name);
} catch (IOException e) {
- logger.warning("Could not find resource: " + name + '-' + e.getMessage());
+ logger.finest("Could not find resource: " + name + '-' + e.getMessage());
return null;
}
}
Modified: components/shindig/trunk/pom.xml
===================================================================
--- components/shindig/trunk/pom.xml 2010-10-18 09:57:48 UTC (rev 4703)
+++ components/shindig/trunk/pom.xml 2010-10-18 10:00:10 UTC (rev 4704)
@@ -1301,6 +1301,11 @@
<!-- external dependencies -->
<dependency>
+ <groupId>org.jdom</groupId>
+ <artifactId>jdom</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
<groupId>com.google.code.guice</groupId>
<artifactId>guice</artifactId>
<version>2.0</version>
14 years, 3 months
gatein SVN: r4703 - components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-10-18 05:57:48 -0400 (Mon, 18 Oct 2010)
New Revision: 4703
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/ActionHandler.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/NavigationalStateUpdatingHandler.java
Log:
- Removed comment on GTNWSRP-36 as this is actually done in SessionHandler.
Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/ActionHandler.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/ActionHandler.java 2010-10-18 08:40:42 UTC (rev 4702)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/ActionHandler.java 2010-10-18 09:57:48 UTC (rev 4703)
@@ -263,7 +263,7 @@
protected PortletInvocationResponse processResponse(BlockingInteractionResponse response, ActionInvocation invocation, RequestPrecursor<ActionInvocation> requestPrecursor) throws PortletInvokerException
{
- BlockingInteractionResponse blockingInteractionResponse = (BlockingInteractionResponse)response;
+ BlockingInteractionResponse blockingInteractionResponse = response;
String redirectURL = blockingInteractionResponse.getRedirectURL();
UpdateResponse updateResponse = blockingInteractionResponse.getUpdateResponse();
Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/NavigationalStateUpdatingHandler.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/NavigationalStateUpdatingHandler.java 2010-10-18 08:40:42 UTC (rev 4702)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/NavigationalStateUpdatingHandler.java 2010-10-18 09:57:48 UTC (rev 4703)
@@ -126,8 +126,6 @@
String handle = portletContext.getPortletHandle();
if (!originalContext.getPortletHandle().equals(handle))
{
- // todo: GTNWSRP-36 If the Producer returns a new portletHandle without returning a new sessionID, the Consumer MUST
- // associate the current sessionID with the new portletHandle rather than the previous portletHandle.
if (debug)
{
log.debug("Portlet '" + requestPrecursor.getPortletHandle() + "' was implicitely cloned. New handle is '"
14 years, 3 months
gatein SVN: r4702 - components/wci/branches/adf/wci/src/main/doc.
by do-not-reply@jboss.org
Author: alain_defrance
Date: 2010-10-18 04:40:42 -0400 (Mon, 18 Oct 2010)
New Revision: 4702
Modified:
components/wci/branches/adf/wci/src/main/doc/wci-authentication.odp
components/wci/branches/adf/wci/src/main/doc/wci-authentication.pdf
Log:
Documentation updated
Modified: components/wci/branches/adf/wci/src/main/doc/wci-authentication.odp
===================================================================
(Binary files differ)
Modified: components/wci/branches/adf/wci/src/main/doc/wci-authentication.pdf
===================================================================
(Binary files differ)
14 years, 3 months
gatein SVN: r4701 - in epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide: en-US/images and 1 other directories.
by do-not-reply@jboss.org
Author: smumford
Date: 2010-10-18 02:45:43 -0400 (Mon, 18 Oct 2010)
New Revision: 4701
Added:
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/actionsinfotab.png
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/addactionstab.png
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/categoryreferencednodes.png
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/manageactionsbutton.png
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/managecategoriesicon.png
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/managepublicationsbutton.png
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/managepublicationsform.png
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/managepublicationstab.png
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/managerelationsicon.png
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/relationsbutton.png
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/relationslist.png
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/restoreversionicon.png
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/showcategoriestab.png
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/versionlist.png
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/versionviewlist.png
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/viewdetailsbutton.png
Modified:
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/modules/Usage/SitesExplorer.xml
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/publican.cfg
Log:
JBEPP-518: Further conversion
Added: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/actionsinfotab.png
===================================================================
(Binary files differ)
Property changes on: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/actionsinfotab.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/addactionstab.png
===================================================================
(Binary files differ)
Property changes on: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/addactionstab.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/categoryreferencednodes.png
===================================================================
(Binary files differ)
Property changes on: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/categoryreferencednodes.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/manageactionsbutton.png
===================================================================
(Binary files differ)
Property changes on: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/manageactionsbutton.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/managecategoriesicon.png
===================================================================
(Binary files differ)
Property changes on: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/managecategoriesicon.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/managepublicationsbutton.png
===================================================================
(Binary files differ)
Property changes on: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/managepublicationsbutton.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/managepublicationsform.png
===================================================================
(Binary files differ)
Property changes on: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/managepublicationsform.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/managepublicationstab.png
===================================================================
(Binary files differ)
Property changes on: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/managepublicationstab.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/managerelationsicon.png
===================================================================
(Binary files differ)
Property changes on: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/managerelationsicon.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/relationsbutton.png
===================================================================
(Binary files differ)
Property changes on: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/relationsbutton.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/relationslist.png
===================================================================
(Binary files differ)
Property changes on: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/relationslist.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/restoreversionicon.png
===================================================================
(Binary files differ)
Property changes on: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/restoreversionicon.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/showcategoriestab.png
===================================================================
(Binary files differ)
Property changes on: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/showcategoriestab.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/versionlist.png
===================================================================
(Binary files differ)
Property changes on: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/versionlist.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/versionviewlist.png
===================================================================
(Binary files differ)
Property changes on: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/versionviewlist.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/viewdetailsbutton.png
===================================================================
(Binary files differ)
Property changes on: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/viewdetailsbutton.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/modules/Usage/SitesExplorer.xml
===================================================================
--- epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/modules/Usage/SitesExplorer.xml 2010-10-18 03:12:45 UTC (rev 4700)
+++ epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/modules/Usage/SitesExplorer.xml 2010-10-18 06:45:43 UTC (rev 4701)
@@ -2108,7 +2108,7 @@
icon to delete category in <emphasis role="bold">Upload a file</emphasis> form.
</para>
<para>
- You also manage categories which added for files by using the <emphasis role="bold">Manage Categories</emphasis> function. See xref="".
+ You also manage categories which added for files by using the <emphasis role="bold">Manage Categories</emphasis> function. See <xref linkend="sect-Site_Publisher_User_Guide-Manage_Site_Content_with_Sites_Explorer-Admin-Manage_Categories"/>.
</para>
</note>
@@ -3776,7 +3776,7 @@
</listitem>
<listitem>
<para>
- Information about the Manage Categories function can be found in xref=""
+ Information about the Manage Categories function can be found in xref
</para>
</listitem>
@@ -3798,7 +3798,7 @@
<title></title>
<step>
<para>
- Open the <emphasis role="bold">Add New Document</emphasis> form (instructions in xref=""), then select <emphasis role="bold">File</emphasis> from the drop-down list.
+ Open the <emphasis role="bold">Add New Document</emphasis> form (instructions in <xref linkend="proc-Site_Publisher_User_Guide-Create_a_new_web_content-Add_new_content"/>), then select <emphasis role="bold">File</emphasis> from the drop-down list.
</para>
</step>
@@ -6057,7 +6057,7 @@
You can view the document in the new language by clicking the corresponding link in <emphasis role="bold">Languages List</emphasis>.
</para>
<para>
- For more details about <emphasis role="bold">Relations</emphasis>, refer to xref="" (View Relations of nodes)
+ For more details about <emphasis role="bold">Relations</emphasis>, refer to <xref linkend="sect-Site_Publisher_User_Guide-Manage_Site_Content_with_Sites_Explorer-Admin-Manage_Relations"/> (View Relations of nodes)
</para>
</step>
@@ -6504,7 +6504,7 @@
</step>
<step>
<para>
- Click the <inlinemediaobject><imageobject><imagedata fileref="images/viewresultcontent.png"/></imageobject></inlinemediaobject> to view the content containing the search string.
+ Click the <inlinemediaobject><imageobject><imagedata fileref="images/viewdetailsbutton.png"/></imageobject></inlinemediaobject> to view the content containing the search string.
</para>
<para>
Or click the <inlinemediaobject><imageobject><imagedata fileref="images/viewresultnode.png"/></imageobject></inlinemediaobject> icon to go to the node that contains the search result.
@@ -7512,12 +7512,623 @@
</section> <!-- Close Section: 3.3.7.1.2 Adding Removing labels -->
<section id="sect-Site_Publisher_User_Guide-Manage_Site_Content_with_Sites_Explorer-Admin-Manage_Nodes-View_versions">
<title>View versions</title>
+ <procedure>
+ <title></title>
+ <step>
+ <para>
+ Select a versioned node.
+ </para>
+ </step>
+ <step>
+ <para>
+ Click <inlinemediaobject><imageobject><imagedata fileref="images/manageversionsbutton.png"/></imageobject></inlinemediaobject>.
+ </para>
+ </step>
+ <step>
+ <para>
+ Click <inlinemediaobject><imageobject><imagedata fileref="images/viewdetailsbutton.png"/></imageobject></inlinemediaobject> to see the current versions of the selected node.
+ </para>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata fileref="images/versionviewlist.png" format="PNG" align="center" scale="90" />
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/versionviewlist.png" format="PNG" align="center" contentwidth="150mm" />
+ </imageobject>
+ </mediaobject>
+ </step>
+ </procedure>
+ <note>
+ <title>Folder Nodes</title>
+ <para>
+ Version viewing is not supported on folder nodes.
+ </para>
+ <para>
+ If you click <inlinemediaobject><imageobject><imagedata fileref="images/viewdetails.png"/></imageobject></inlinemediaobject> while the selected node is a folder, a message to this effect will appear.
+ </para>
+ </note>
+ </section> <!-- Close Section: 3.3.7.1.3 View Versions -->
+ <section id="sect-Site_Publisher_User_Guide-Manage_Site_Content_with_Sites_Explorer-Admin-Manage_Nodes-Restore_versions">
+ <title>Restore versions</title>
+ <procedure>
+ <title></title>
+ <step>
+ <para>
+ Select a node that has at least two versions stored.
+ </para>
+ </step>
+ <step>
+ <para>
+ Click <inlinemediaobject><imageobject><imagedata fileref="images/manageversionsbutton.png"/></imageobject></inlinemediaobject>.
+ </para>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata fileref="images/versionlist.png" format="PNG" align="center" scale="100" />
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/versionlist.png" format="PNG" align="center" contentwidth="150mm" />
+ </imageobject>
+ </mediaobject>
+ </step>
+ <step>
+ <para>
+ Select the version that you wish to restore as the base version.
+ </para>
+ </step>
+ <step>
+ <para>
+ Click <inlinemediaobject><imageobject><imagedata fileref="images/restoreversionicon.png"/></imageobject></inlinemediaobject> to restore the selected version
+ </para>
+ </step>
+ </procedure>
+ </section> <!-- Close Section: 3.3.7.1.4 Restore versions -->
+ <section id="sect-Site_Publisher_User_Guide-Manage_Site_Content_with_Sites_Explorer-Admin-Manage_Nodes-Delete_versions">
+ <title>Delete versions</title>
+ <procedure>
+ <title></title>
+ <step>
+ <para>
+ Select a node with at least two versions:
+ </para>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata fileref="images/versionlist.png" format="PNG" align="center" scale="90" />
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/versionlist.png" format="PNG" align="center" contentwidth="150mm" />
+ </imageobject>
+ </mediaobject>
+ </step>
+ <step>
+ <para>
+ Click <inlinemediaobject><imageobject><imagedata fileref="images/manageversionsbutton.png"/></imageobject></inlinemediaobject>.
+ </para>
+ </step>
+ <step>
+ <para>
+ Click the <inlinemediaobject><imageobject><imagedata fileref="images/trashicon.png"/></imageobject></inlinemediaobject> icon that corresponding to the version you want to delete.
+ </para>
+ <para>
+ A confirmation message will appear.
+ </para>
+ </step>
+ <step>
+ <para>
+ Click <emphasis role="bold">OK</emphasis> to delete the version or <emphasis role="bold">Cancel</emphasis> to quit.
+ </para>
+ </step>
+ </procedure>
+ <note>
+ <title>Base Versions</title>
+ <para>
+ You cannot delete a base version.
+ </para>
+ </note>
+ </section> <!-- Close Section: 3.3.7.1.5 -->
+ </section> <!-- Close Section: 3.3.7.1 Manage Nodes -->
+ <section id="sect-Site_Publisher_User_Guide-Manage_Site_Content_with_Sites_Explorer-Admin-Manage_Publications">
+ <title>Manage Publications</title>
+ <para>
+ This function is used to manage node publication.
+ </para>
+ <procedure>
+ <title></title>
+ <step>
+ <para>
+ Select a node (on the left or right panel) which you want to manage the publication.
+ </para>
+ </step>
+ <step>
+ <para>
+ Select the <emphasis role="bold">Admin</emphasis> tab to show administration actions in the <emphasis role="bold">Action</emphasis> bar:
+ </para>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata fileref="images/admintab.png" format="PNG" align="center" scale="" />
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/admintab.png" format="PNG" align="center" contentwidth="150mm" />
+ </imageobject>
+ </mediaobject>
+ </step>
+ <step>
+ <para>
+ Click <inlinemediaobject><imageobject><imagedata fileref="images/managepublicationsbutton.png"/></imageobject></inlinemediaobject> on the actions bar.
+ </para>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata fileref="images/managepublicationstab.png" format="PNG" align="center" scale="" />
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/managepublicationstab.png" format="PNG" align="center" contentwidth="150mm" />
+ </imageobject>
+ </mediaobject>
+ <para>
+ The <emphasis role="bold">Manage Publications</emphasis> form appears:
+ </para>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata fileref="images/managepublicationsform.png" format="PNG" align="center" scale="" />
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/managepublicationsform.png" format="PNG" align="center" contentwidth="150mm" />
+ </imageobject>
+ </mediaobject>
+ <para>
+ The <emphasis role="bold">Publication status</emphasis> tab displays some basic information and the current state of the selected node.
+ </para>
+ </step>
+ <step>
+ <para>
+ Click <inlinemediaobject><imageobject><imagedata fileref="images/viewdetailsbutton.png"/></imageobject></inlinemediaobject> to view the content of the node or click <inlinemediaobject><imageobject><imagedata fileref="images/restoreversionicon.png"/></imageobject></inlinemediaobject> to restore a version (refer to <xref linkend="sect-Site_Publisher_User_Guide-Manage_Site_Content_with_Sites_Explorer-Admin-Manage_Nodes"/> for information about versioning)
+ </para>
+ </step>
+ <step>
+ <para>
+ Select the <emphasis role="bold">Publication History</emphasis> tab to view the nodes publication history.
+ </para>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata fileref="images/publicationhistorytab.png" format="PNG" align="center" scale="" />
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/publicationhistorytab.png" format="PNG" align="center" contentwidth="150mm" />
+ </imageobject>
+ </mediaobject>
+ </step>
+ <step>
+ <para>
+ Click save to commit any changes made.
+ </para>
+ </step>
+ </procedure>
+ </section> <!-- Close Section: 3.3.7.2 Manage Publications -->
+ <section id="sect-Site_Publisher_User_Guide-Manage_Site_Content_with_Sites_Explorer-Admin-Manage_Categories">
+ <title>Manage Categories</title>
+ <section id="sect-Site_Publisher_User_Guide-Manage_Site_Content_with_Sites_Explorer-Admin-Manage_Categories-Add_a_category_for_a_node">
+ <title>Add a category for a node</title>
<para>
-
+ You can add categories to document type nodes only:
</para>
+ <procedure>
+ <title></title>
+ <step>
+ <para>
+ Select the node that you want to add a category to:
+ </para>
+ </step>
+ <step>
+ <para>
+ Select the <emphasis role="bold">Admin</emphasis> tab.
+ </para>
+ </step>
+ <step>
+ <para>
+ Click on <inlinemediaobject><imageobject><imagedata fileref="images/managecategoriesicon.png"/></imageobject></inlinemediaobject>.
+ </para>
+ <para>
+ The <emphasis role="bold">Add category</emphasis> form appears.
+ </para>
+ </step>
+ <step>
+ <para>
+ Select the <emphasis role="bold">Select category</emphasis> tab to show the available categories.
+ </para>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata fileref="images/showcategoriestab.png" format="PNG" align="center" scale="" />
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/showcategoriestab.png" format="PNG" align="center" contentwidth="150mm" />
+ </imageobject>
+ </mediaobject>
+ </step>
+ <step>
+ <para>
+ Click <inlinemediaobject><imageobject><imagedata fileref="images/greentick.png"/></imageobject></inlinemediaobject> to add the corresponding category to the node.
+ </para>
+ </step>
+ </procedure>
+ <para>
+ Categories that have been added to a node are listed in the <emphasis role="bold">Referenced categories</emphasis> tab of the <emphasis role="bold">Add categories</emphasis> form.
+ </para>
+ <para>
+ All nodes belonging to a category can be viewed by doing the following:
+ </para>
+ <procedure>
+ <title></title>
+ <step>
+ <para>
+ Go to the drive that contains the category you have added. There will be a list of categories available.
+ </para>
+ </step>
+ <step>
+ <para>
+ Select the category you want. The documents in that category will be listed.
+ </para>
+ </step>
+ </procedure>
+ <note>
+ <title>Copy/pasting nodes</title>
+ <para>
+ When copy and pasting a node in a drive, a new node with the same content will be created with a different name.
+ </para>
+ <para>
+ When copy and pasting a node in the category tree, a reference to the original node will be created. This reference is a link rather than a copy. This feature preserves disk space.
+ </para>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata fileref="images/categoryreferencednodes.png" format="PNG" align="center" scale="" />
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/categoryreferencednodes.png" format="PNG" align="center" contentwidth="150mm" />
+ </imageobject>
+ </mediaobject>
+ </note>
+ </section> <!-- Close Section: 3.3.7.3.1 Add a Category -->
+ <section id="sect-Site_Publisher_User_Guide-Manage_Site_Content_with_Sites_Explorer-Admin-Manage_Categories-Delete_a_Category">
+ <title>Delete a Category</title>
+ <procedure>
+ <title></title>
+ <step>
+ <para>
+ Select a categorized node.
+ </para>
+ </step>
+ <step>
+ <para>
+ Click the <inlinemediaobject><imageobject><imagedata fileref="images/managecategoriesicon.png"/></imageobject></inlinemediaobject> icon.
+ </para>
+ </step>
+ <step>
+ <para>
+ Select the <emphasis role="bold">Referenced categories</emphasis> tab.
+ </para>
+ </step>
+ <step>
+ <para>
+ Click the <inlinemediaobject><imageobject><imagedata fileref="images/trashicon.png"/></imageobject></inlinemediaobject> that corresponds to the category you want to delete.
+ </para>
+ </step>
+ </procedure>
+ </section> <!-- Close Section: 3.3.7.3.2 Delete a category -->
+ </section> <!-- Close Section: 3.3.7.3 Manage Categories -->
+ <section id="sect-Site_Publisher_User_Guide-Manage_Site_Content_with_Sites_Explorer-Admin-Manage_Relations">
+ <title>Manage Relations</title>
+ <para>
+ You can use this function to create relationships between nodes
+ </para>
+ <section id="sect-Site_Publisher_User_Guide-Manage_Site_Content_with_Sites_Explorer-Admin-Manage_Relations-Add_a_relation">
+ <title>Add a relation</title>
+ <procedure>
+ <title></title>
+ <step>
+ <para>
+ Select the node you want to add a relations to.
+ </para>
+ </step>
+ <step>
+ <para>
+ Select the <emphasis role="bold">Admin</emphasis> tab.
+ </para>
+ </step>
+ <step>
+ <para>
+ Click the <inlinemediaobject><imageobject><imagedata fileref="images/managerelationsicon.png"/></imageobject></inlinemediaobject>.
+ </para>
+ <para>
+ The <emphasis role="bold">Add relation</emphasis> form appears.
+ </para>
+ </step>
+ <step>
+ <para>
+ Select the <emphasis role="bold">Select relation</emphasis> tab to see a list of other documents.
+ </para>
+ </step>
+ <step>
+ <para>
+ Click the <inlinemediaobject><imageobject><imagedata fileref="images/greentick.png"/></imageobject></inlinemediaobject> that corresponds to the document(s) that relate to the document selected in the <emphasis role="bold">Step 1</emphasis>.
+ </para>
+ <para>
+ Documents linked to the original via a relation will be listed in the <emphasis role="bold">Relation List</emphasis> tab.
+ </para>
+ </step>
+ </procedure>
+ <note>
+ <title>Relation Rules</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Relations can only be added to document and uploaded file node types
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ A node cannot have a relation to itself.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </note>
+ </section> <!-- Close Section: 3.3.7.4.1 Add a relation -->
+ <section id="sect-Site_Publisher_User_Guide-Manage_Site_Content_with_Sites_Explorer-Admin-Manage_Relations-Delete_a_relation">
+ <title>Delete a relation</title>
+ <procedure>
+ <title></title>
+ <step>
+ <para>
+ Select a node that has links to related documents.
+ </para>
+ </step>
+ <step>
+ <para>
+ Click on <inlinemediaobject><imageobject><imagedata fileref="images/managerelationsicons.png"/></imageobject></inlinemediaobject>.
+ </para>
+ </step>
+ <step>
+ <para>
+ Select the <emphasis role="bold">Relation List</emphasis> to view the relations for the selected node.
+ </para>
+ </step>
+ <step>
+ <para>
+ Click <inlinemediaobject><imageobject><imagedata fileref="images/trashicon.png"/></imageobject></inlinemediaobject> corresponding to the relation you want to remove.
+ </para>
+ </step>
+ <step>
+ <para>
+ Click <emphasis role="bold">OK</emphasis> on the confirmation message to delete the relation.
+ </para>
+ <para>
+ The related document will be removed from the list.
+ </para>
+ </step>
+ </procedure>
+ </section> <!-- Close Section: 3.3.7.4.2 Delete a relation -->
+ <section id="sect-Site_Publisher_User_Guide-Manage_Site_Content_with_Sites_Explorer-Admin-Manage_Relations-View_Relations">
+ <title>View Relations</title>
+ <procedure>
+ <title></title>
+ <step>
+ <para>
+ Select a node that has links to related documents.
+ </para>
+ </step>
+ <step>
+ <para>
+ Click the relation button on the side panel:
+ </para>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata fileref="images/relationsbutton.png" format="PNG" align="center" scale="" />
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/relationsbutton.png" format="PNG" align="center" contentwidth="150mm" />
+ </imageobject>
+ </mediaobject>
+ <para>
+ All nodes related to the selected node will be displayed in the left pane:
+ </para>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata fileref="images/relationslist.png" format="PNG" align="center" scale="" />
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/relationslist.png" format="PNG" align="center" contentwidth="150mm" />
+ </imageobject>
+ </mediaobject>
+ </step>
+ <step>
+ <para>
+ Click on the name of the related node to view the document.
+ </para>
+ </step>
+ </procedure>
+ </section> <!-- Close Section: 3.3.7.4.3. View Relations -->
+ </section> <!-- Close Section: 3.3.7.4 Manage Relations -->
+ <section id="sect-Site_Publisher_User_Guide-Manage_Site_Content_with_Sites_Explorer-Admin-Manage_Actions">
+ <title>Manage Actions</title>
+ <section id="sect-Site_Publisher_User_Guide-Manage_Site_Content_with_Sites_Explorer-Admin-Manage_Actions-Add_an_action">
+ <title>Add an action</title>
+ <procedure>
+ <title></title>
+ <step>
+ <para>
+ Select the node you want to add an action to.
+ </para>
+ </step>
+ <step>
+ <para>
+ Select the <emphasis role="bold">Admin</emphasis> tab.
+ </para>
+ </step>
+ <step>
+ <para>
+ Click on <inlinemediaobject><imageobject><imagedata fileref="images/magaeactionsbutton.png"/></imageobject></inlinemediaobject>.
+ </para>
+ <para>
+ The <emphasis role="bold">Manage Actions</emphasis> form will appear.
+ </para>
+ </step>
+ <step>
+ <para>
+ Select the <emphasis role="bold">Add Actions</emphasis> tab.
+ </para>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata fileref="images/addactionstab.png" format="PNG" align="center" scale="" />
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/addactionstab.png" format="PNG" align="center" contentwidth="150mm" />
+ </imageobject>
+ </mediaobject>
+ </step>
+ <step>
+ <para>
+ Click on <inlinemediaobject><imageobject><imagedata fileref="images/droparrow.png"/></imageobject></inlinemediaobject> and select the type of action from the drop down menu
+ </para>
+ <table>
+ <title></title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ Field
+ </entry>
+ <entry>
+ Details
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ exo:action
+ </entry>
+ <entry>
+ This action is not supported.
+ </entry>
+ </row>
+ <row>
+ <entry>
+ exo:AddMetadataAction
+ </entry>
+ <entry>
+ This action adds metadata
+ </entry>
+ </row>
+ <row>
+ <entry>
+ exo:autoVersioning
+ </entry>
+ <entry>
+ This action automatically adds a version.
+ </entry>
+ </row>
+ <row>
+ <entry>
+ exo:createRSSFeedAction
+ </entry>
+ <entry>
+ This action creates an RSS file.
+ </entry>
+ </row>
+ <row>
+ <entry>
+ exo:enableVersioning
+ </entry>
+ <entry>
+ This action enables versioning.
+ </entry>
+ </row>
+ <row>
+ <entry>
+ exo:getMailAction
+ </entry>
+ <entry>
+ This action fetches mail
+ </entry>
+ </row>
+ <row>
+ <entry>
+ exo:sendMailAction
+ </entry>
+ <entry>
+ This action sends mail.
+ </entry>
+ </row>
+ <row>
+ <entry>
+ exo:taxonomy/Action
+ </entry>
+ <entry>
+ ???
+ </entry>
+ </row>
+ <row>
+ <entry>
+ exo:transformBinaryTo TextAction
+ </entry>
+ <entry>
+ This action converts <emphasis>.pdf</emphasis> or <emphasis>.doc</emphasis> file types to plain text.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </step>
+ <step>
+ <para>
+ Complete the required fields in the form for the selected action.
+ </para>
+ </step>
+ <step>
+ <para>
+ Click <emphasis role="bold">Save</emphasis> to commit the action.
+ </para>
+ </step>
+ </procedure>
+ <para>
+ All actions of a node are listed in the <emphasis role="bold">Available Actions</emphasis> tab.
+ </para>
+ <para>
+ Once an action is added to a node it is automatically added to any child nodes of the selected node.
+ </para>
+ <note>
+ <title>Actions in menus</title>
+ <para>
+ Not all actions are listed in a nodes right-click menu. Some will be performed immediately when that action is added.
+ </para>
+ </note>
+ </section> <!-- Close Section: 3.3.7.5.1 Add an action -->
+ <section id="sect-Site_Publisher_User_Guide-Manage_Site_Content_with_Sites_Explorer-Admin-Manage_Actions-View_Actions">
+ <title>Add Actions</title>
+ <procedure>
+ <title></title>
+ <step>
+ <para>
+ Open the <emphasis role="bold">Manage Actions</emphasis> form and select the <emphasis role="bold">Available Actions</emphasis> tab.
+ </para>
+ </step>
+ <step>
+ <para>
+ Click the <inlinemediaobject><imageobject><imagedata fileref="images/viewdetailsbutton.png"/></imageobject></inlinemediaobject> icon that corresponds to the action you want to view.
+ </para>
+ <para>
+ The details will be displayed in the <emphasis role="bold">Action info</emphasis> tab:
+ </para>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata fileref="images/actionsinfotab.png" format="PNG" align="center" scale="" />
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/actionsinfotab.png" format="PNG" align="center" contentwidth="150mm" />
+ </imageobject>
+ </mediaobject>
+ </step>
+ </procedure>
- </section> <!-- Close Section: 3.3.7.7.1.3 View Versions -->
- </section> <!-- Close Section: 3.3.7.1 Manage Nodes -->
+ </section> <!-- Close Section: 3.3.7.5.2 View Actions -->
+ </section> <!-- Close Section: 3.3.7.5 Manage Actions -->
</section> <!-- Close Section: 3.3.7 Admin -->
</section> <!-- Close Section: 3.3 Manage Site Content with Sites Explorer -->
Modified: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/publican.cfg
===================================================================
--- epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/publican.cfg 2010-10-18 03:12:45 UTC (rev 4700)
+++ epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/publican.cfg 2010-10-18 06:45:43 UTC (rev 4701)
@@ -3,6 +3,6 @@
xml_lang: en-US
type: Book
-brand: JBoss-ECS
+brand: JBoss
debug:1
toc_section_depth:10
14 years, 3 months
gatein SVN: r4700 - in portal/branches/branch-GTNPORTAL-1537: web/portal/src/main/webapp/groovy/portal/webui/application and 6 other directories.
by do-not-reply@jboss.org
Author: phuong_vu
Date: 2010-10-17 23:12:45 -0400 (Sun, 17 Oct 2010)
New Revision: 4700
Modified:
portal/branches/branch-GTNPORTAL-1537/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js
portal/branches/branch-GTNPORTAL-1537/web/portal/src/main/webapp/groovy/portal/webui/application/UIPortlet.gtmpl
portal/branches/branch-GTNPORTAL-1537/web/portal/src/main/webapp/groovy/portal/webui/container/UIContainer.gtmpl
portal/branches/branch-GTNPORTAL-1537/web/portal/src/main/webapp/groovy/portal/webui/container/UITableAutofitColumnContainer.gtmpl
portal/branches/branch-GTNPORTAL-1537/web/portal/src/main/webapp/groovy/portal/webui/container/UITableColumnContainer.gtmpl
portal/branches/branch-GTNPORTAL-1537/web/portal/src/main/webapp/groovy/portal/webui/container/UIToolbarContainer.gtmpl
portal/branches/branch-GTNPORTAL-1537/web/portal/src/main/webapp/groovy/portal/webui/portal/UIPortalComposer.gtmpl
portal/branches/branch-GTNPORTAL-1537/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java
portal/branches/branch-GTNPORTAL-1537/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UIContainerForm.java
portal/branches/branch-GTNPORTAL-1537/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java
portal/branches/branch-GTNPORTAL-1537/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java
Log:
GTNPORTAL-1498 Show Status of Finish button is not correct in Edition page when don't do anything on this page
Modified: portal/branches/branch-GTNPORTAL-1537/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js
===================================================================
--- portal/branches/branch-GTNPORTAL-1537/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js 2010-10-18 01:48:48 UTC (rev 4699)
+++ portal/branches/branch-GTNPORTAL-1537/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js 2010-10-18 03:12:45 UTC (rev 4700)
@@ -196,6 +196,38 @@
DragDrop.dropCallback = function(dndEvent) {
this.origDragObjectStyle.setProperties(dndEvent.dragObject.style, false) ;
+
+ var hasChanged = true;
+ //When press esc key, we want to cancel the dragdrop, but now it only works with FF
+ if (dndEvent.backupMouseEvent && dndEvent.backupMouseEvent.keyCode == 27 && eXo.core.Browser.isFF()) {
+ hasChanged = false;
+ }
+ //When dragObject is outside
+ var targetElement = dndEvent.foundTargetObject;
+ if(!targetElement || targetElement.foundIndex == null) {
+ hasChanged = false;
+ }
+ //When dragobject is next to preview object (position is not changed)
+ if(!dndEvent.dragObject.isAddingNewly) {
+ var DOMUtil = eXo.core.DOMUtil;
+ var previewClass = "DragAndDropPreview";
+ var previewTagName = "div";
+ var previewSibling = dndEvent.dragObject;
+ if (dndEvent.dragObject.parentNode.tagName.toLowerCase() == "td") {
+ previewSibling = dndEvent.dragObject.parentNode;
+ previewClass = "PreviewTDBlock";
+ previewTagName = "td";
+ }
+ var tempObj = DOMUtil.findNextElementByTagName(previewSibling, previewTagName);
+ if (tempObj != null && tempObj.className == previewClass) {
+ hasChanged = false;
+ } else {
+ tempObj = DOMUtil.findPreviousElementByTagName(previewSibling, previewTagName);
+ if (tempObj != null && tempObj.className == previewClass) {
+ hasChanged = false;
+ }
+ }
+ }
if(dndEvent.foundTargetObject != null || (dndEvent.backupMouseEvent && dndEvent.backupMouseEvent.keyCode != 27)) {
eXo.portal.PortalDragDrop.doDropCallback(dndEvent) ;
@@ -219,7 +251,9 @@
previewBlock = previewTD = null;
eXo.portal.isInDragging = false;
- eXo.portal.UIPortal.changeComposerSaveButton();
+ if (hasChanged) {
+ eXo.portal.UIPortal.changeComposerSaveButton();
+ }
// fix bug WEBOS-196
dndEvent.dragObject.style.width = "auto" ;
};
Modified: portal/branches/branch-GTNPORTAL-1537/web/portal/src/main/webapp/groovy/portal/webui/application/UIPortlet.gtmpl
===================================================================
--- portal/branches/branch-GTNPORTAL-1537/web/portal/src/main/webapp/groovy/portal/webui/application/UIPortlet.gtmpl 2010-10-18 01:48:48 UTC (rev 4699)
+++ portal/branches/branch-GTNPORTAL-1537/web/portal/src/main/webapp/groovy/portal/webui/application/UIPortlet.gtmpl 2010-10-18 03:12:45 UTC (rev 4700)
@@ -286,7 +286,7 @@
%>
<div class="PortletIcon $portletIcon"><%=hasPermission ? title : _ctx.appRes("UIPortlet.label.protectedContent")%></div>
<%if(hasPermission) {%>
- <a href="<%=uicomponent.event("EditPortlet","$uicomponent.id")%>;eXo.portal.UIPortal.changeComposerSaveButton()" class="EditPortletPropertiesIcon" title="<%=_ctx.appRes("UIPortlet.tooltip.editPortlet");%>"></a>
+ <a href="<%=uicomponent.event("EditPortlet","$uicomponent.id")%>;" class="EditPortletPropertiesIcon" title="<%=_ctx.appRes("UIPortlet.tooltip.editPortlet");%>"></a>
<a href="<%=uicomponent.event("DeleteComponent","$uicomponent.id")%>" class="DeletePortletIcon" title="<%=_ctx.appRes("UIPortlet.tooltip.deletePortlet");%>"></a>
<%}%>
</div>
Modified: portal/branches/branch-GTNPORTAL-1537/web/portal/src/main/webapp/groovy/portal/webui/container/UIContainer.gtmpl
===================================================================
--- portal/branches/branch-GTNPORTAL-1537/web/portal/src/main/webapp/groovy/portal/webui/container/UIContainer.gtmpl 2010-10-18 01:48:48 UTC (rev 4699)
+++ portal/branches/branch-GTNPORTAL-1537/web/portal/src/main/webapp/groovy/portal/webui/container/UIContainer.gtmpl 2010-10-18 03:12:45 UTC (rev 4700)
@@ -42,9 +42,9 @@
<div class="VIEW-CONTAINER VIEW-BLOCK">
<%} %>
<%if(hasPermission) {%>
- <div class="UIRowContainer <%=(portalMode != UIPortalApplication.NORMAL_MODE && uicomponent.getChildren().size() == 0) ? "EmptyContainer" : ""%>">
- <div>
- <%uicomponent.renderChildren();%>
+ <div>
+ <div class="UIRowContainer <%=(portalMode != UIPortalApplication.NORMAL_MODE && uicomponent.getChildren().size() == 0) ? "EmptyContainer" : ""%>">
+ <%uicomponent.renderChildren();%>
</div>
</div>
<%} else out.print("<div class='ProtectedContent'>"+_ctx.appRes("UIPortlet.label.protectedContent")+"</div>");%>
@@ -72,7 +72,7 @@
%>
<div class="ContainerIcon"><%=hasPermission ? strTitle : _ctx.appRes("UIPortlet.label.protectedContent")%></div>
<%if(hasPermission) {%>
- <a href="<%=uicomponent.event("EditContainer")%>;eXo.portal.UIPortal.changeComposerSaveButton()" class="EditContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.editContainer")%>"><span></span></a>
+ <a href="<%=uicomponent.event("EditContainer")%>" class="EditContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.editContainer")%>"><span></span></a>
<a href="<%=uicomponent.event("DeleteComponent")%>" class="DeleteContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.closeContainer")%>"><span></span></a>
<%}%>
Modified: portal/branches/branch-GTNPORTAL-1537/web/portal/src/main/webapp/groovy/portal/webui/container/UITableAutofitColumnContainer.gtmpl
===================================================================
--- portal/branches/branch-GTNPORTAL-1537/web/portal/src/main/webapp/groovy/portal/webui/container/UITableAutofitColumnContainer.gtmpl 2010-10-18 01:48:48 UTC (rev 4699)
+++ portal/branches/branch-GTNPORTAL-1537/web/portal/src/main/webapp/groovy/portal/webui/container/UITableAutofitColumnContainer.gtmpl 2010-10-18 03:12:45 UTC (rev 4700)
@@ -73,7 +73,7 @@
%>
<div class="ContainerIcon DefaultContainer16x16Icon"><%=hasPermission ? strTitle : _ctx.appRes("UIPortlet.label.protectedContent")%></div>
<%if(hasPermission) {%>
- <a href="<%=uicomponent.event("EditContainer","$uicomponent.id")%>;eXo.portal.UIPortal.changeComposerSaveButton()" class="EditContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.editContainer")%>"><span></span></a>
+ <a href="<%=uicomponent.event("EditContainer","$uicomponent.id")%>" class="EditContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.editContainer")%>"><span></span></a>
<a href="<%=uicomponent.event("DeleteComponent","$uicomponent.id")%>" class="DeleteContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.closeContainer")%>"><span></span></a>
<%}%>
</div>
Modified: portal/branches/branch-GTNPORTAL-1537/web/portal/src/main/webapp/groovy/portal/webui/container/UITableColumnContainer.gtmpl
===================================================================
--- portal/branches/branch-GTNPORTAL-1537/web/portal/src/main/webapp/groovy/portal/webui/container/UITableColumnContainer.gtmpl 2010-10-18 01:48:48 UTC (rev 4699)
+++ portal/branches/branch-GTNPORTAL-1537/web/portal/src/main/webapp/groovy/portal/webui/container/UITableColumnContainer.gtmpl 2010-10-18 03:12:45 UTC (rev 4700)
@@ -73,7 +73,7 @@
%>
<div class="ContainerIcon DefaultContainer16x16Icon"><%=hasPermission ? strTitle : _ctx.appRes("UIPortlet.label.protectedContent")%></div>
<%if(hasPermission) {%>
- <a href="<%=uicomponent.event("EditContainer","$uicomponent.id")%>;eXo.portal.UIPortal.changeComposerSaveButton()" class="EditContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.editContainer")%>"><span></span></a>
+ <a href="<%=uicomponent.event("EditContainer","$uicomponent.id")%>" class="EditContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.editContainer")%>"><span></span></a>
<a href="<%=uicomponent.event("DeleteComponent","$uicomponent.id")%>" class="DeleteContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.closeContainer")%>"><span></span></a>
<%}%>
</div>
Modified: portal/branches/branch-GTNPORTAL-1537/web/portal/src/main/webapp/groovy/portal/webui/container/UIToolbarContainer.gtmpl
===================================================================
--- portal/branches/branch-GTNPORTAL-1537/web/portal/src/main/webapp/groovy/portal/webui/container/UIToolbarContainer.gtmpl 2010-10-18 01:48:48 UTC (rev 4699)
+++ portal/branches/branch-GTNPORTAL-1537/web/portal/src/main/webapp/groovy/portal/webui/container/UIToolbarContainer.gtmpl 2010-10-18 03:12:45 UTC (rev 4700)
@@ -70,7 +70,7 @@
%>
<div class="ContainerIcon DefaultContainer16x16Icon"><%=hasPermission ? strTitle : _ctx.appRes("UIPortlet.label.protectedContent")%></div>
<%if(hasPermission) {%>
- <a href="<%=uicomponent.event("EditContainer","$uicomponent.id")%>;eXo.portal.UIPortal.changeComposerSaveButton()" class="EditContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.editContainer")%>"><span></span></a>
+ <a href="<%=uicomponent.event("EditContainer","$uicomponent.id")%>;" class="EditContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.editContainer")%>"><span></span></a>
<a href="<%=uicomponent.event("DeleteComponent","$uicomponent.id")%>" class="DeleteContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.closeContainer")%>"><span></span></a>
<%}%>
</div>
Modified: portal/branches/branch-GTNPORTAL-1537/web/portal/src/main/webapp/groovy/portal/webui/portal/UIPortalComposer.gtmpl
===================================================================
--- portal/branches/branch-GTNPORTAL-1537/web/portal/src/main/webapp/groovy/portal/webui/portal/UIPortalComposer.gtmpl 2010-10-18 01:48:48 UTC (rev 4699)
+++ portal/branches/branch-GTNPORTAL-1537/web/portal/src/main/webapp/groovy/portal/webui/portal/UIPortalComposer.gtmpl 2010-10-18 03:12:45 UTC (rev 4700)
@@ -52,7 +52,7 @@
<tr>
<td>
- <div onclick="<%= uicomponent.event("ViewProperties") %>;eXo.portal.UIPortal.changeComposerSaveButton()" class="ActionButton SimpleStyle1">
+ <div onclick="<%= uicomponent.event("ViewProperties") %>;" class="ActionButton SimpleStyle1">
<div class="ButtonLeft">
<div class="ButtonRight">
<div class="ButtonMiddle">
Modified: portal/branches/branch-GTNPORTAL-1537/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java
===================================================================
--- portal/branches/branch-GTNPORTAL-1537/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java 2010-10-18 01:48:48 UTC (rev 4699)
+++ portal/branches/branch-GTNPORTAL-1537/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java 2010-10-18 03:12:45 UTC (rev 4700)
@@ -402,6 +402,7 @@
}
PortalRequestContext pcontext = (PortalRequestContext)event.getRequestContext();
+ pcontext.getJavascriptManager().addJavascript("eXo.portal.UIPortal.changeComposerSaveButton();");
pcontext.addUIComponentToUpdateByAjax(uiMaskWorkspace);
UIPortalApplication uiPortalApp = uiPortlet.getAncestorOfType(UIPortalApplication.class);
UIWorkingWorkspace uiWorkingWS = uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
Modified: portal/branches/branch-GTNPORTAL-1537/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UIContainerForm.java
===================================================================
--- portal/branches/branch-GTNPORTAL-1537/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UIContainerForm.java 2010-10-18 01:48:48 UTC (rev 4699)
+++ portal/branches/branch-GTNPORTAL-1537/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UIContainerForm.java 2010-10-18 03:12:45 UTC (rev 4700)
@@ -143,6 +143,7 @@
UIPortalApplication uiPortalApp = uiForm.getAncestorOfType(UIPortalApplication.class);
UIWorkingWorkspace uiWorkingWS = uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
+ pcontext.getJavascriptManager().addJavascript("eXo.portal.UIPortal.changeComposerSaveButton();");
pcontext.addUIComponentToUpdateByAjax(uiWorkingWS);
pcontext.setFullRender(true);
Util.showComponentLayoutMode(UIContainer.class);
Modified: portal/branches/branch-GTNPORTAL-1537/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java
===================================================================
--- portal/branches/branch-GTNPORTAL-1537/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java 2010-10-18 01:48:48 UTC (rev 4699)
+++ portal/branches/branch-GTNPORTAL-1537/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java 2010-10-18 03:12:45 UTC (rev 4700)
@@ -280,7 +280,7 @@
PortalRequestContext pcontext = Util.getPortalRequestContext();
UIMaskWorkspace uiMaskWS = uiPortalApp.getChildById(UIPortalApplication.UI_MASK_WS_ID);
uiMaskWS.setUIComponent(null);
- uiMaskWS.setShow(false);
+ uiMaskWS.setShow(false);
pcontext.addUIComponentToUpdateByAjax(uiMaskWS);
UIPage uiPage = uiPageForm.getUIPage();
@@ -318,7 +318,7 @@
pcontext.setFullRender(true);
UIWorkingWorkspace uiWorkingWS = uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
pcontext.addUIComponentToUpdateByAjax(uiWorkingWS);
-
+ pcontext.getJavascriptManager().addJavascript("eXo.portal.UIPortal.changeComposerSaveButton();");
return;
}
@@ -337,6 +337,7 @@
pcontext.setFullRender(true);
UIWorkingWorkspace uiWorkingWS = uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
pcontext.addUIComponentToUpdateByAjax(uiWorkingWS);
+ pcontext.getJavascriptManager().addJavascript("eXo.portal.UIPortal.changeComposerSaveButton();");
DataStorage dataService = uiPageForm.getApplicationComponent(DataStorage.class);
dataService.save(page);
return;
@@ -360,6 +361,7 @@
try{
PortalDataMapper.toUIPage(uiPage, page);
+ pcontext.getJavascriptManager().addJavascript("eXo.portal.UIPortal.changeComposerSaveButton();");
} catch(NoSuchDataException de){
uiPortalApp.addMessage(new ApplicationMessage("UIPageForm.msg.notExistOrDeleted", null, ApplicationMessage.ERROR));
UIPortalComposer uiPortalComposer = (UIPortalComposer)uiPortalApp.findComponentById("UIPageEditor");
Modified: portal/branches/branch-GTNPORTAL-1537/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java
===================================================================
--- portal/branches/branch-GTNPORTAL-1537/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java 2010-10-18 01:48:48 UTC (rev 4699)
+++ portal/branches/branch-GTNPORTAL-1537/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java 2010-10-18 03:12:45 UTC (rev 4700)
@@ -337,7 +337,12 @@
UIMaskWorkspace uiMaskWorkspace = uiForm.getParent();
uiMaskWorkspace.setUIComponent(null);
- event.getRequestContext().addUIComponentToUpdateByAjax(uiMaskWorkspace);
+ WebuiRequestContext rContext = event.getRequestContext();
+ if (!uiForm.getId().equals("CreatePortal"))
+ {
+ rContext.getJavascriptManager().addJavascript("eXo.portal.UIPortal.changeComposerSaveButton();");
+ }
+ rContext.addUIComponentToUpdateByAjax(uiMaskWorkspace);
}
}
14 years, 3 months
gatein SVN: r4699 - in components/wsrp/trunk: common/src/main/java/org/gatein/wsrp/registration and 6 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-10-17 21:48:48 -0400 (Sun, 17 Oct 2010)
New Revision: 4699
Added:
components/wsrp/trunk/producer/src/test/java/org/gatein/wsrp/producer/config/ProducerRegistrationRequirementsTestCase.java
Modified:
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ProducerBean.java
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/registration/PropertyDescription.java
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/registration/RegistrationPropertyDescription.java
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/config/ProducerConfigurationService.java
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/config/ProducerRegistrationRequirements.java
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/config/impl/AbstractProducerConfigurationService.java
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/config/impl/ProducerRegistrationRequirementsImpl.java
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/config/impl/xml/FileSystemXMLProducerConfigurationService.java
components/wsrp/trunk/producer/src/test/java/org/gatein/registration/DefaultRegistrationPolicyTestCase.java
components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/config/FileSystemXmlProducerConfigWithReload.java
Log:
- GTNWSRP-31: Removed side-effects from Producer configuration screen.
+ Introduced intermediary RegistrationConfiguration object in ProducerBean to store modifications to producer configuration until either saved (in which case it's replicated to the real configuration)
or cancelled (in which case, the modifications are discarded).
+ Added copy constructor on ProducerRegistrationRequirementsImpl and setRegistrationProperties(Map) method to support needs from ProducerBean.
+ addEmptyRegistrationProperty and removeRegistrationProperty methods now return the new/removed registration property.
+ Made sure that listeners are not triggered when not needed.
- Made PropertyDescription comparable.
- Added reloadConfiguration(boolean triggerListeners) method on ProducerConfigurationService to be able to decide whether or not listeners should be triggered (by default, they are not anymore).
- Minor improvements.
Modified: components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ProducerBean.java
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ProducerBean.java 2010-10-17 21:58:12 UTC (rev 4698)
+++ components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ProducerBean.java 2010-10-18 01:48:48 UTC (rev 4699)
@@ -28,15 +28,15 @@
import org.gatein.wsrp.producer.config.ProducerConfiguration;
import org.gatein.wsrp.producer.config.ProducerConfigurationService;
import org.gatein.wsrp.producer.config.ProducerRegistrationRequirements;
+import org.gatein.wsrp.producer.config.impl.ProducerRegistrationRequirementsImpl;
import org.gatein.wsrp.registration.RegistrationPropertyDescription;
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
import javax.faces.event.ValueChangeEvent;
import javax.faces.model.SelectItem;
-import java.util.ArrayList;
import java.util.Collections;
-import java.util.Comparator;
+import java.util.LinkedList;
import java.util.List;
import java.util.Map;
@@ -53,6 +53,7 @@
private static final String PROPERTY = "property";
private static final String PRODUCER = "producer";
private String selectedProp;
+ private RegistrationConfiguration registrationConfiguration;
public ProducerConfigurationService getConfigurationService()
{
@@ -74,11 +75,6 @@
return getRegRequirements().isRegistrationRequiredForFullDescription();
}
- private ProducerRegistrationRequirements getRegRequirements()
- {
- return getConfiguration().getRegistrationRequirements();
- }
-
public void setRegistrationRequiredForFullDescription(boolean requireRegForFullDescription)
{
getRegRequirements().setRegistrationRequiredForFullDescription(requireRegForFullDescription);
@@ -143,18 +139,7 @@
public List<RegistrationPropertyDescription> getRegistrationProperties()
{
- Map descriptions = getRegRequirements().getRegistrationProperties();
- Comparator<RegistrationPropertyDescription> descComparator = new Comparator<RegistrationPropertyDescription>()
- {
- public int compare(RegistrationPropertyDescription o1, RegistrationPropertyDescription o2)
- {
- return o1.getName().toString().compareTo(o2.getName().toString());
- }
- };
-
- List<RegistrationPropertyDescription> result = new ArrayList<RegistrationPropertyDescription>(descriptions.values());
- Collections.sort(result, descComparator);
- return result;
+ return getRegRequirements().getRegistrationProperties();
}
public List<SelectItem> getSupportedPropertyTypes()
@@ -171,10 +156,20 @@
{
try
{
+ // replicate local state to producer state
+ ProducerRegistrationRequirements registrationRequirements = getConfiguration().getRegistrationRequirements();
+ RegistrationConfiguration configuration = getRegRequirements();
+
+ registrationRequirements.setRegistrationRequiredForFullDescription(configuration.isRegistrationRequiredForFullDescription());
+ registrationRequirements.setRegistrationRequired(configuration.isRegistrationRequired());
+
if (!ProducerRegistrationRequirements.DEFAULT_POLICY_CLASS_NAME.equals(policyClassName))
{
- getRegRequirements().reloadPolicyFrom(policyClassName, validatorClassName);
+ registrationRequirements.reloadPolicyFrom(policyClassName, validatorClassName);
}
+
+ registrationRequirements.setRegistrationProperties(configuration.getRegistrationRequirements().getRegistrationProperties());
+
getConfigurationService().saveConfiguration();
beanContext.createInfoMessage("bean_producer_save_success");
}
@@ -191,6 +186,10 @@
try
{
getConfigurationService().reloadConfiguration();
+
+ // force a reload local state
+ registrationConfiguration = null;
+
beanContext.createInfoMessage("bean_producer_cancel_success");
}
catch (Exception e)
@@ -235,4 +234,86 @@
{
return false; // default implementation as not used
}
+
+ private RegistrationConfiguration getRegRequirements()
+ {
+ if (registrationConfiguration == null)
+ {
+ registrationConfiguration = new RegistrationConfiguration();
+ registrationConfiguration.initFrom(getConfiguration().getRegistrationRequirements());
+ }
+
+ return registrationConfiguration;
+ }
+
+ private static class RegistrationConfiguration
+ {
+ private List<RegistrationPropertyDescription> registrationProperties;
+ private ProducerRegistrationRequirements registrationRequirements;
+
+ public void initFrom(ProducerRegistrationRequirements registrationRequirements)
+ {
+ this.registrationRequirements = new ProducerRegistrationRequirementsImpl(registrationRequirements);
+
+ Map descriptions = registrationRequirements.getRegistrationProperties();
+ registrationProperties = new LinkedList<RegistrationPropertyDescription>(descriptions.values());
+ Collections.sort(registrationProperties);
+ }
+
+ public boolean isRegistrationRequiredForFullDescription()
+ {
+ return registrationRequirements.isRegistrationRequiredForFullDescription();
+ }
+
+ public void setRegistrationRequiredForFullDescription(boolean requireRegForFullDescription)
+ {
+ registrationRequirements.setRegistrationRequiredForFullDescription(requireRegForFullDescription);
+ }
+
+ public boolean isRegistrationRequired()
+ {
+ return registrationRequirements.isRegistrationRequired();
+ }
+
+ public void setRegistrationRequired(boolean requireRegistration)
+ {
+ registrationRequirements.setRegistrationRequired(requireRegistration);
+ }
+
+ public RegistrationPolicy getPolicy()
+ {
+ return registrationRequirements.getPolicy();
+ }
+
+ public List<RegistrationPropertyDescription> getRegistrationProperties()
+ {
+ return registrationProperties;
+ }
+
+ public void addEmptyRegistrationProperty(String propertyName)
+ {
+ RegistrationPropertyDescription prop = registrationRequirements.addEmptyRegistrationProperty(propertyName);
+
+ // Search for the non-existent item
+ int index = Collections.binarySearch(registrationProperties, prop);
+
+ // Add the non-existent item to the list
+ if (index < 0)
+ {
+ registrationProperties.add(-index - 1, prop);
+ }
+ }
+
+ public void removeRegistrationProperty(String propertyName)
+ {
+ RegistrationPropertyDescription prop = registrationRequirements.removeRegistrationProperty(propertyName);
+
+ registrationProperties.remove(prop);
+ }
+
+ public ProducerRegistrationRequirements getRegistrationRequirements()
+ {
+ return registrationRequirements;
+ }
+ }
}
Modified: components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/registration/PropertyDescription.java
===================================================================
--- components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/registration/PropertyDescription.java 2010-10-17 21:58:12 UTC (rev 4698)
+++ components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/registration/PropertyDescription.java 2010-10-18 01:48:48 UTC (rev 4699)
@@ -1,6 +1,6 @@
/*
* JBoss, a division of Red Hat
- * Copyright 2009, Red Hat Middleware, LLC, and individual
+ * 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.
@@ -30,7 +30,7 @@
* @version $Revision: 9177 $
* @since 2.6.3
*/
-public interface PropertyDescription
+public interface PropertyDescription extends Comparable<PropertyDescription>
{
QName getName();
Modified: components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/registration/RegistrationPropertyDescription.java
===================================================================
--- components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/registration/RegistrationPropertyDescription.java 2010-10-17 21:58:12 UTC (rev 4698)
+++ components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/registration/RegistrationPropertyDescription.java 2010-10-18 01:48:48 UTC (rev 4699)
@@ -147,6 +147,10 @@
", label=" + label;
}
+ public int compareTo(PropertyDescription o)
+ {
+ return getName().toString().compareTo(o.getName().toString());
+ }
public String getPersistentKey()
{
Modified: components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/config/ProducerConfigurationService.java
===================================================================
--- components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/config/ProducerConfigurationService.java 2010-10-17 21:58:12 UTC (rev 4698)
+++ components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/config/ProducerConfigurationService.java 2010-10-18 01:48:48 UTC (rev 4699)
@@ -1,6 +1,6 @@
/*
* JBoss, a division of Red Hat
- * Copyright 2009, Red Hat Middleware, LLC, and individual
+ * 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.
@@ -40,6 +40,8 @@
*/
void reloadConfiguration() throws Exception;
+ void reloadConfiguration(boolean triggerListeners) throws Exception;
+
/**
* Saves the producer configuration to persistent storage.
*
Modified: components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/config/ProducerRegistrationRequirements.java
===================================================================
--- components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/config/ProducerRegistrationRequirements.java 2010-10-17 21:58:12 UTC (rev 4698)
+++ components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/config/ProducerRegistrationRequirements.java 2010-10-18 01:48:48 UTC (rev 4699)
@@ -55,9 +55,9 @@
void addRegistrationProperty(RegistrationPropertyDescription propertyDescription);
- void removeRegistrationProperty(String propertyName);
+ RegistrationPropertyDescription removeRegistrationProperty(String propertyName);
- void removeRegistrationProperty(QName propertyName);
+ RegistrationPropertyDescription removeRegistrationProperty(QName propertyName);
void clearRegistrationProperties();
@@ -94,7 +94,7 @@
* @param name
* @since 2.6.3
*/
- void addEmptyRegistrationProperty(String name);
+ RegistrationPropertyDescription addEmptyRegistrationProperty(String name);
/**
* @param listener
@@ -116,4 +116,6 @@
Set<RegistrationPolicyChangeListener> getPolicyChangeListeners();
long getLastModified();
+
+ void setRegistrationProperties(Map<QName, RegistrationPropertyDescription> registrationProperties);
}
Modified: components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/config/impl/AbstractProducerConfigurationService.java
===================================================================
--- components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/config/impl/AbstractProducerConfigurationService.java 2010-10-17 21:58:12 UTC (rev 4698)
+++ components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/config/impl/AbstractProducerConfigurationService.java 2010-10-18 01:48:48 UTC (rev 4699)
@@ -48,6 +48,11 @@
public void reloadConfiguration() throws Exception
{
+ reloadConfiguration(false);
+ }
+
+ public void reloadConfiguration(boolean triggerListeners) throws Exception
+ {
// save listeners if we already have a configuration
List<ProducerConfigurationChangeListener> listeners = null;
Set<RegistrationPolicyChangeListener> policyListeners = null;
@@ -67,13 +72,16 @@
// reload
loadConfiguration();
- // restore listeners and trigger them
+ // restore listeners and trigger them if requested
if (listeners != null)
{
for (ProducerConfigurationChangeListener listener : listeners)
{
configuration.addChangeListener(listener);
- listener.usingStrictModeChangedTo(configuration.isUsingStrictMode());
+ if (triggerListeners)
+ {
+ listener.usingStrictModeChangedTo(configuration.isUsingStrictMode());
+ }
}
}
registrationRequirements = configuration.getRegistrationRequirements();
@@ -84,7 +92,10 @@
for (RegistrationPropertyChangeListener listener : propertyListeners)
{
registrationRequirements.addRegistrationPropertyChangeListener(listener);
- listener.propertiesHaveChanged(registrationRequirements.getRegistrationProperties());
+ if (triggerListeners)
+ {
+ listener.propertiesHaveChanged(registrationRequirements.getRegistrationProperties());
+ }
}
}
if (policyListeners != null)
@@ -92,7 +103,10 @@
for (RegistrationPolicyChangeListener listener : policyListeners)
{
registrationRequirements.addRegistrationPolicyChangeListener(listener);
- listener.policyUpdatedTo(registrationRequirements.getPolicy());
+ if (triggerListeners)
+ {
+ listener.policyUpdatedTo(registrationRequirements.getPolicy());
+ }
}
}
}
Modified: components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/config/impl/ProducerRegistrationRequirementsImpl.java
===================================================================
--- components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/config/impl/ProducerRegistrationRequirementsImpl.java 2010-10-17 21:58:12 UTC (rev 4698)
+++ components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/config/impl/ProducerRegistrationRequirementsImpl.java 2010-10-18 01:48:48 UTC (rev 4699)
@@ -78,6 +78,21 @@
registrationProperties = new HashMap<QName, RegistrationPropertyDescription>(7);
}
+ public ProducerRegistrationRequirementsImpl(ProducerRegistrationRequirements other)
+ {
+ this(false, other.isRegistrationRequired(), other.isRegistrationRequiredForFullDescription());
+ setPolicy(other.getPolicy());
+
+ Set<Map.Entry<QName, RegistrationPropertyDescription>> otherProps = other.getRegistrationProperties().entrySet();
+ registrationProperties = new HashMap<QName, RegistrationPropertyDescription>(otherProps.size());
+ for (Map.Entry<QName, RegistrationPropertyDescription> entry : otherProps)
+ {
+ registrationProperties.put(entry.getKey(), new RegistrationPropertyDescription(entry.getValue()));
+ }
+
+ modifyNow();
+ }
+
private void modifyNow()
{
lastModified = System.nanoTime();
@@ -88,6 +103,25 @@
return lastModified;
}
+ public void setRegistrationProperties(Map<QName, RegistrationPropertyDescription> regProps)
+ {
+ if (registrationProperties.equals(regProps))
+ {
+ return;
+ }
+ else
+ {
+ registrationProperties.clear();
+
+ for (RegistrationPropertyDescription propertyDescription : regProps.values())
+ {
+ addRegistrationProperty(new RegistrationPropertyDescription(propertyDescription));
+ }
+
+ notifyRegistrationPropertyChangeListeners();
+ }
+ }
+
public boolean isRegistrationRequired()
{
return requiresRegistration;
@@ -95,14 +129,14 @@
public void setRegistrationRequired(boolean requiresRegistration)
{
- // if we switch from requiring registration to no registration, erase registration properties
- if (this.requiresRegistration && !requiresRegistration)
+ if (this.requiresRegistration != requiresRegistration)
{
- clearRegistrationProperties();
- }
+ // if we switch from requiring registration to no registration, erase registration properties
+ if (this.requiresRegistration && !requiresRegistration)
+ {
+ clearRegistrationProperties();
+ }
- if (this.requiresRegistration != requiresRegistration)
- {
this.requiresRegistration = requiresRegistration;
modifyNow();
}
@@ -139,12 +173,14 @@
notifyRegistrationPropertyChangeListeners();
}
- public void addEmptyRegistrationProperty(String name)
+ public RegistrationPropertyDescription addEmptyRegistrationProperty(String name)
{
ParameterValidation.throwIllegalArgExceptionIfNull(name, "Property name");
RegistrationPropertyDescription reg = new RegistrationPropertyDescription(name, WSRPConstants.XSD_STRING);
addRegistrationProperty(reg);
+
+ return reg;
}
public boolean acceptValueFor(QName propertyName, Object value)
@@ -180,14 +216,17 @@
return new RegistrationPropertyDescription(registrationProperties.get(propertyName));
}
- public void removeRegistrationProperty(QName propertyName)
+ public RegistrationPropertyDescription removeRegistrationProperty(QName propertyName)
{
ParameterValidation.throwIllegalArgExceptionIfNull(propertyName, "Property name");
- if (registrationProperties.remove(propertyName) != null)
+ RegistrationPropertyDescription prop = registrationProperties.remove(propertyName);
+ if (prop != null)
{
modifyNow();
notifyRegistrationPropertyChangeListeners();
}
+
+ return prop;
}
public void clearRegistrationProperties()
@@ -197,9 +236,9 @@
notifyRegistrationPropertyChangeListeners();
}
- public void removeRegistrationProperty(String propertyName)
+ public RegistrationPropertyDescription removeRegistrationProperty(String propertyName)
{
- removeRegistrationProperty(QName.valueOf(propertyName));
+ return removeRegistrationProperty(QName.valueOf(propertyName));
}
/*
Modified: components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/config/impl/xml/FileSystemXMLProducerConfigurationService.java
===================================================================
--- components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/config/impl/xml/FileSystemXMLProducerConfigurationService.java 2010-10-17 21:58:12 UTC (rev 4698)
+++ components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/config/impl/xml/FileSystemXMLProducerConfigurationService.java 2010-10-18 01:48:48 UTC (rev 4699)
@@ -24,10 +24,8 @@
package org.gatein.wsrp.producer.config.impl.xml;
import org.gatein.common.net.URLTools;
-//import org.jboss.xb.binding.Marshaller;
import org.jboss.xb.binding.ObjectModelProvider;
import org.jboss.xb.binding.XercesXsMarshaller;
-import org.jboss.xb.binding.sunday.marshalling.MarshallerImpl;
import org.jboss.xb.binding.sunday.unmarshalling.DefaultSchemaResolver;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Modified: components/wsrp/trunk/producer/src/test/java/org/gatein/registration/DefaultRegistrationPolicyTestCase.java
===================================================================
--- components/wsrp/trunk/producer/src/test/java/org/gatein/registration/DefaultRegistrationPolicyTestCase.java 2010-10-17 21:58:12 UTC (rev 4698)
+++ components/wsrp/trunk/producer/src/test/java/org/gatein/registration/DefaultRegistrationPolicyTestCase.java 2010-10-18 01:48:48 UTC (rev 4699)
@@ -174,5 +174,10 @@
{
return TYPE;
}
+
+ public int compareTo(PropertyDescription o)
+ {
+ return name.toString().compareTo(o.getName().toString());
+ }
}
}
Added: components/wsrp/trunk/producer/src/test/java/org/gatein/wsrp/producer/config/ProducerRegistrationRequirementsTestCase.java
===================================================================
--- components/wsrp/trunk/producer/src/test/java/org/gatein/wsrp/producer/config/ProducerRegistrationRequirementsTestCase.java (rev 0)
+++ components/wsrp/trunk/producer/src/test/java/org/gatein/wsrp/producer/config/ProducerRegistrationRequirementsTestCase.java 2010-10-18 01:48:48 UTC (rev 4699)
@@ -0,0 +1,124 @@
+/*
+ * 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.producer.config;
+
+import junit.framework.TestCase;
+import org.gatein.registration.RegistrationPolicy;
+import org.gatein.registration.RegistrationPolicyChangeListener;
+import org.gatein.registration.RegistrationPropertyChangeListener;
+import org.gatein.wsrp.WSRPConstants;
+import org.gatein.wsrp.producer.config.impl.ProducerRegistrationRequirementsImpl;
+import org.gatein.wsrp.registration.PropertyDescription;
+import org.gatein.wsrp.registration.RegistrationPropertyDescription;
+
+import javax.xml.namespace.QName;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class ProducerRegistrationRequirementsTestCase extends TestCase
+{
+ public void testSetRegistrationProperties()
+ {
+ ProducerRegistrationRequirements requirements = new ProducerRegistrationRequirementsImpl();
+ requirements.addEmptyRegistrationProperty("foo");
+ requirements.addEmptyRegistrationProperty("bar");
+
+ final Map<QName, RegistrationPropertyDescription> expected = new HashMap<QName, RegistrationPropertyDescription>();
+ RegistrationPropertyDescription newFoo = new RegistrationPropertyDescription("newFoo", WSRPConstants.XSD_STRING);
+ expected.put(newFoo.getName(), newFoo);
+
+ requirements.addRegistrationPropertyChangeListener(new RegistrationPropertyChangeListener()
+ {
+ public void propertiesHaveChanged(Map<QName, ? extends PropertyDescription> newRegistrationProperties)
+ {
+ assertEquals(expected, newRegistrationProperties);
+ }
+ });
+
+ requirements.setRegistrationProperties(expected);
+ }
+
+ public void testSetUnchangedRegistrationProperties()
+ {
+ ProducerRegistrationRequirements requirements = new ProducerRegistrationRequirementsImpl();
+ requirements.addEmptyRegistrationProperty("foo");
+
+ final Map<QName, RegistrationPropertyDescription> expected = new HashMap<QName, RegistrationPropertyDescription>();
+ RegistrationPropertyDescription newFoo = new RegistrationPropertyDescription("foo", WSRPConstants.XSD_STRING);
+ expected.put(newFoo.getName(), newFoo);
+
+ requirements.addRegistrationPropertyChangeListener(new RegistrationPropertyChangeListener()
+ {
+ public void propertiesHaveChanged(Map<QName, ? extends PropertyDescription> newRegistrationProperties)
+ {
+ fail("Shouldn't have been called!");
+ }
+ });
+
+ requirements.setRegistrationProperties(expected);
+ }
+
+ public void testReloadSamePolicy()
+ {
+ ProducerRegistrationRequirements requirements = new ProducerRegistrationRequirementsImpl();
+
+ // load policy the first time
+ requirements.reloadPolicyFrom(ProducerRegistrationRequirements.DEFAULT_POLICY_CLASS_NAME, ProducerRegistrationRequirements.DEFAULT_VALIDATOR_CLASS_NAME);
+
+ // add listener that shouldn't been called since policy hasn't changed
+ requirements.addRegistrationPolicyChangeListener(new RegistrationPolicyChangeListener()
+ {
+ public void policyUpdatedTo(RegistrationPolicy policy)
+ {
+ fail("Shouldn't have been called!");
+ }
+ });
+
+ // try reloading policy
+ requirements.reloadPolicyFrom(ProducerRegistrationRequirements.DEFAULT_POLICY_CLASS_NAME, ProducerRegistrationRequirements.DEFAULT_VALIDATOR_CLASS_NAME);
+ }
+
+ public void testSetRegistrationRequired()
+ {
+ ProducerRegistrationRequirements requirements = new ProducerRegistrationRequirementsImpl();
+
+ requirements.setRegistrationRequired(true);
+ assertTrue(requirements.isRegistrationRequired());
+
+ requirements.addRegistrationPropertyChangeListener(new RegistrationPropertyChangeListener()
+ {
+ public void propertiesHaveChanged(Map<QName, ? extends PropertyDescription> newRegistrationProperties)
+ {
+ fail("Shouldn't have been called!");
+ }
+ });
+
+ requirements.setRegistrationRequired(true);
+ }
+
+}
Modified: components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/config/FileSystemXmlProducerConfigWithReload.java
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/config/FileSystemXmlProducerConfigWithReload.java 2010-10-17 21:58:12 UTC (rev 4698)
+++ components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/config/FileSystemXmlProducerConfigWithReload.java 2010-10-18 01:48:48 UTC (rev 4699)
@@ -1,35 +1,33 @@
-/******************************************************************************
- * 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. *
- ******************************************************************************/
+/*
+ * 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.config;
-import java.io.FileInputStream;
-import java.net.URL;
-import java.util.Enumeration;
-
import org.gatein.common.net.URLTools;
-import org.gatein.wsrp.producer.config.impl.xml.FileSystemXMLProducerConfigurationService;
import org.gatein.wsrp.producer.config.impl.xml.SimpleXMLProducerConfigurationService;
+import java.net.URL;
+import java.util.Enumeration;
+
/**
* @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
* @version $Revision$
@@ -40,12 +38,13 @@
// Hack to force the producer to reload when the configuration property is set.
// If unused then we will have issues with the producer not being loaded when we try
// and get an instance.
+
public void setConfigFile(String configLocation) throws Exception
{
// this.inputStream = new FileInputStream(configLocation);
// this.reloadConfiguration();
Enumeration<URL> resources = Thread.currentThread().getContextClassLoader().getResources(configLocation);
-
+
URL configURL = null;
while (resources.hasMoreElements())
{
@@ -60,10 +59,10 @@
{
throw new Exception("The config " + configURL + " does not exist");
}
-
+
this.inputStream = configURL.openStream();
this.reloadConfiguration();
}
-
+
}
14 years, 3 months
gatein SVN: r4698 - components/wsrp/trunk/common/src/test/java/org/gatein/wsrp/other.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-10-17 17:58:12 -0400 (Sun, 17 Oct 2010)
New Revision: 4698
Modified:
components/wsrp/trunk/common/src/test/java/org/gatein/wsrp/other/WSRPPortletURLTestCase.java
Log:
- GTNWSRP-103: Commented out test case since we now allow missing wsrp-requiresRewrite.
Modified: components/wsrp/trunk/common/src/test/java/org/gatein/wsrp/other/WSRPPortletURLTestCase.java
===================================================================
--- components/wsrp/trunk/common/src/test/java/org/gatein/wsrp/other/WSRPPortletURLTestCase.java 2010-10-16 16:38:46 UTC (rev 4697)
+++ components/wsrp/trunk/common/src/test/java/org/gatein/wsrp/other/WSRPPortletURLTestCase.java 2010-10-17 21:58:12 UTC (rev 4698)
@@ -353,10 +353,13 @@
{
String message = "Should have detected missing parameter: ";
+ /*
+ // We now allow requiresRewrite to be missing and assume false instead... See GTNWSRP-103.
String invalid = "wsrp_rewrite?wsrp-urlType=resource&wsrp-url=http%3A%2F%2Flocalhost%2F/wsrp_rewrite";
checkInvalidURL(invalid, message, WSRPRewritingConstants.RESOURCE_REQUIRES_REWRITE);
+ */
- invalid = "wsrp_rewrite?wsrp-urlType=resource&wsrp-requiresRewrite=true/wsrp_rewrite";
+ String invalid = "wsrp_rewrite?wsrp-urlType=resource&wsrp-requiresRewrite=true/wsrp_rewrite";
checkInvalidURL(invalid, message, WSRPRewritingConstants.RESOURCE_URL);
invalid = "wsrp_rewrite?wsrp-urlType=resource&wsrp-url=invalidURL&wsrp-requiresRewrite=true/wsrp_rewrite";
14 years, 3 months
gatein SVN: r4697 - components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/registry.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-10-16 12:38:46 -0400 (Sat, 16 Oct 2010)
New Revision: 4697
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/registry/AbstractConsumerRegistry.java
Log:
- GTNWSRP-94: refresh consumers which are marked as active but haven't been activated when the consumers list is requested.
Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/registry/AbstractConsumerRegistry.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/registry/AbstractConsumerRegistry.java 2010-10-15 23:35:34 UTC (rev 4696)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/registry/AbstractConsumerRegistry.java 2010-10-16 16:38:46 UTC (rev 4697)
@@ -431,7 +431,23 @@
protected Collection<WSRPConsumer> getConsumers()
{
- return consumers.values();
+ Collection<WSRPConsumer> consumerz = consumers.values();
+ for (WSRPConsumer consumer : consumerz)
+ {
+ if (consumer.getProducerInfo().isActive() && !consumer.isActive())
+ {
+ try
+ {
+ consumer.refresh(false);
+ }
+ catch (Exception e)
+ {
+ log.info("Couldn't activate consumer " + consumer.getProducerId());
+ consumer.getProducerInfo().setActiveAndSave(false);
+ }
+ }
+ }
+ return consumerz;
}
protected Map<String, String> getKeyMappings()
14 years, 3 months
gatein SVN: r4696 - components/wsrp/trunk/common/src/main/java/org/gatein/wsrp.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-10-15 19:35:34 -0400 (Fri, 15 Oct 2010)
New Revision: 4696
Modified:
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPResourceURL.java
Log:
- GTNWSRP-103: if we don't have a resource id and wsrp-requiresRewrite has not been specified, set it to false for better compatibility. Should be harmless to do so without a need for a compatibility mode.
Modified: components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPResourceURL.java
===================================================================
--- components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPResourceURL.java 2010-10-15 23:20:43 UTC (rev 4695)
+++ components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPResourceURL.java 2010-10-15 23:35:34 UTC (rev 4696)
@@ -146,8 +146,14 @@
resourceId = resourceIDParam;
}
+ // GTNWSRP-103: if we don't have a resource id and wsrp-requiresRewrite has not been specified, set it to false for better compatibility
+ if (resourceIDParam == null && requireRewrite == null)
+ {
+ requiresRewrite = false;
+ }
+
// we either need a resource Id or (requiredRewrite and url)
- if (resourceIDParam == null && (requireRewrite == null || url == null))
+ if (resourceIDParam == null && url == null)
{
throw new IllegalArgumentException("The parsed parameters are not valid for a resource url. A resource URL must contain either a "
+ WSRP2RewritingConstants.RESOURCE_ID + " or " + WSRPRewritingConstants.RESOURCE_URL + " and " + WSRPRewritingConstants.RESOURCE_REQUIRES_REWRITE + " parameter in " + originalURL);
14 years, 3 months