Author: chris.laprun(a)jboss.com
Date: 2010-10-06 04:39:44 -0400 (Wed, 06 Oct 2010)
New Revision: 4520
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/WSRPConsumer.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/WSRPConsumerImpl.java
Log:
- Added isUsingWSRP2 method and make isSupportsExport use it (for now).
Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/WSRPConsumer.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/WSRPConsumer.java 2010-10-06
08:33:09 UTC (rev 4519)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/WSRPConsumer.java 2010-10-06
08:39:44 UTC (rev 4520)
@@ -135,4 +135,6 @@
boolean isSupportsExport();
ImportInfo importPortlets(ExportInfo exportInfo, List<String> portlets) throws
PortletInvokerException;
+
+ boolean isUsingWSRP2();
}
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-10-06
08:33:09 UTC (rev 4519)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/WSRPConsumerImpl.java 2010-10-06
08:39:44 UTC (rev 4520)
@@ -518,15 +518,7 @@
public boolean isSupportsExport()
{
- try
- {
- return getMarkupService().getVersion() > 1;
- }
- catch (PortletInvokerException e)
- {
- log.debug("Couldn't determine if Consumer supports export
operation", e);
- return false;
- }
+ return isUsingWSRP2(); // todo: fix-me, using WSRP 2 doesn't necessarily equals
supporting export...
}
// Registration
*****************************************************************************************************
@@ -995,6 +987,19 @@
}
}
+ public boolean isUsingWSRP2()
+ {
+ try
+ {
+ return getMarkupService().getVersion() > 1;
+ }
+ catch (PortletInvokerException e)
+ {
+ log.debug("Couldn't determine WSRP version supported by this
Consumer", e);
+ return false;
+ }
+ }
+
public MigrationService getMigrationService()
{
return migrationService;