Author: chris.laprun(a)jboss.com
Date: 2010-09-06 17:05:04 -0400 (Mon, 06 Sep 2010)
New Revision: 4056
Added:
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/exports/
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/exports/export.xhtml
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/exports/exportDetail.xhtml
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/exports/exports.xhtml
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/migration/
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/migration/ExportInfo.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/migration/MigrationService.java
Modified:
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerManagerBean.java
components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/classes/Resource.properties
components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/classes/Resource_fr.properties
components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/faces-config.xml
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/consumers.xhtml
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
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v2/PortletManagementTestCase.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/behaviors/BasicPortletManagementBehavior.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/MockWSRPConsumer.java
Log:
- GTNWSRP-61: Added primitive export capability to admin GUI. Still needs work, obviously!
:)
- Added MigrationService and ExportInfo to manage exported data over time.
Modified:
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java
===================================================================
---
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java 2010-09-06
20:59:23 UTC (rev 4055)
+++
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java 2010-09-06
21:05:04 UTC (rev 4056)
@@ -23,15 +23,23 @@
package org.gatein.wsrp.admin.ui;
+import org.gatein.common.util.ParameterValidation;
+import org.gatein.pc.api.Portlet;
+import org.gatein.pc.api.PortletInvokerException;
import org.gatein.wsrp.WSRPConsumer;
import org.gatein.wsrp.consumer.EndpointConfigurationInfo;
import org.gatein.wsrp.consumer.ProducerInfo;
import org.gatein.wsrp.consumer.RegistrationInfo;
import org.gatein.wsrp.consumer.RegistrationProperty;
+import org.gatein.wsrp.consumer.migration.ExportInfo;
import org.gatein.wsrp.consumer.registry.ConsumerRegistry;
+import javax.faces.model.DataModel;
+import javax.faces.model.ListDataModel;
import java.net.MalformedURLException;
import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collection;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
@@ -58,8 +66,13 @@
private static final String CANNOT_ERASE_REG =
"bean_consumer_cannot_erase_reg";
private static final String MALFORMED_URL = "bean_consumer_malformed_url";
private static final String UPDATE_SUCCESS =
"bean_consumer_update_success";
+ private static final String CANNOT_EXPORT = "bean_consumer_cannot_export";
private static final String CONSUMER_TYPE = "CONSUMER_TYPE";
+ private DataModel portletHandles;
+ private DataModel existingExports;
+ private ExportInfo currentExport;
+
public void setRegistry(ConsumerRegistry registry)
{
this.registry = registry;
@@ -479,4 +492,103 @@
{
return registry;
}
+
+ public DataModel getPortlets()
+ {
+ try
+ {
+ if (portletHandles == null)
+ {
+ Collection<Portlet> portlets =
consumer.getProducerInfo().getPortletMap().values();
+ List<SelectablePortletHandle> selectableHandles =
Collections.emptyList();
+ if (ParameterValidation.existsAndIsNotEmpty(portlets))
+ {
+ selectableHandles = new
ArrayList<SelectablePortletHandle>(portlets.size());
+ for (Portlet portlet : portlets)
+ {
+ selectableHandles.add(new
SelectablePortletHandle(portlet.getContext().getId()));
+ }
+ }
+ portletHandles = new ListDataModel(selectableHandles);
+ }
+
+ return portletHandles;
+ }
+ catch (PortletInvokerException e)
+ {
+ beanContext.createErrorMessageFrom(e);
+ return null;
+ }
+ }
+
+ public String export()
+ {
+ if (consumer != null)
+ {
+ List<SelectablePortletHandle> handles =
(List<SelectablePortletHandle>)portletHandles.getWrappedData();
+ List<String> selectedHandles = new
ArrayList<String>(handles.size());
+ for (SelectablePortletHandle selectablePortletHandle : handles)
+ {
+ if (selectablePortletHandle.isSelected())
+ {
+ selectedHandles.add(selectablePortletHandle.getHandle());
+ }
+ }
+
+ try
+ {
+ currentExport = consumer.exportPortlets(selectedHandles);
+ }
+ catch (Exception e)
+ {
+ beanContext.createErrorMessageFrom(e);
+ return null;
+ }
+ return ConsumerManagerBean.EXPORT_DETAIL;
+ }
+
+ beanContext.createErrorMessage(CANNOT_EXPORT);
+ return null;
+ }
+
+ public ExportInfo getCurrentExport()
+ {
+ return currentExport;
+ }
+
+ public DataModel getExistingExports()
+ {
+ if (existingExports == null)
+ {
+ existingExports = new
ListDataModel(consumer.getMigrationService().getAvailableExportInfos());
+ }
+
+ return existingExports;
+ }
+
+ public static class SelectablePortletHandle
+ {
+ private String handle;
+ private boolean selected;
+
+ public SelectablePortletHandle(String handle)
+ {
+ this.handle = handle;
+ }
+
+ public String getHandle()
+ {
+ return handle;
+ }
+
+ public boolean isSelected()
+ {
+ return selected;
+ }
+
+ public void setSelected(boolean selected)
+ {
+ this.selected = selected;
+ }
+ }
}
Modified:
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerManagerBean.java
===================================================================
---
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerManagerBean.java 2010-09-06
20:59:23 UTC (rev 4055)
+++
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerManagerBean.java 2010-09-06
21:05:04 UTC (rev 4056)
@@ -52,6 +52,8 @@
private static final String REFRESH_FAILURE =
"bean_consumermanager_refresh_failure";
private static final String REFRESH_EXCEPTION =
"bean_consumermanager_refresh_exception";
static final String CONFIGURE_CONSUMER = "configureConsumer";
+ static final String EXPORT = "export";
+ static final String EXPORT_DETAIL = "exportDetail";
static final String CONSUMERS = "consumers";
static final String EXPECTED_REG_INFO_KEY = "expectedRegistrationInfo";
@@ -177,7 +179,7 @@
{
try
{
- getRegistry().createConsumer(selectedId, null, null);
+ WSRPConsumer consumer = getRegistry().createConsumer(selectedId, null,
null);
setConsumerIdInSession(false);
return CONFIGURE_CONSUMER;
}
@@ -242,6 +244,36 @@
}
}
+ public String importPortlets()
+ {
+ if (refreshConsumerId() != null)
+ {
+ WSRPConsumer consumer = getSelectedConsumer();
+
+
+ return configureConsumer();
+ }
+ else
+ {
+ noSelectedConsumerError();
+ return null;
+ }
+ }
+
+ public String exportPortlets()
+ {
+ if (refreshConsumerId() != null)
+ {
+ setConsumerIdInSession(false);
+ return EXPORT;
+ }
+ else
+ {
+ noSelectedConsumerError();
+ return null;
+ }
+ }
+
private RefreshResult internalRefresh(WSRPConsumer consumer)
{
try
Modified:
components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/classes/Resource.properties
===================================================================
---
components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/classes/Resource.properties 2010-09-06
20:59:23 UTC (rev 4055)
+++
components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/classes/Resource.properties 2010-09-06
21:05:04 UTC (rev 4056)
@@ -75,7 +75,24 @@
consumers_table_action_deregister = Deregister
consumers_table_action_delete = Delete
consumers_table_reload = Reload consumers
+consumers_table_action_export = Export
+consumers_table_action_import = Import
+# Export
+portlets_table_column_include = Include in export?
+portlets_table_column_portlet_name = Portlet
+portlets_table_export = Export
+export_detail_export_time = Export time:
+export_detail_expiration_time = Expiration time:
+export_detail_portlets = Exported portlets:
+export_detail_failed = Failed portlets:
+export_detail_exported_portlet_name = Exported portlet handle
+export_detail_failed_portlet_error = Error code
+export_detail_failed_portlet_portlets = Failed portlets
+export_detail_failed_portlet_none = No failed portlets.
+export_detail_exports = Back to exports list
+export_detail_consumers = Back to consumers list
+
# Consumer editing screen
edit_consumer_producer = Producer id:
edit_consumer_cache = Cache expiration:
Modified:
components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/classes/Resource_fr.properties
===================================================================
---
components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/classes/Resource_fr.properties 2010-09-06
20:59:23 UTC (rev 4055)
+++
components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/classes/Resource_fr.properties 2010-09-06
21:05:04 UTC (rev 4056)
@@ -145,4 +145,19 @@
DUPLICATE_ERROR=Un {1} nomm\u00e9 ''{0}'' existe d\u00e9j\u00e0!
INVALID_NAME_ERROR=''{0}'' est un nom invalide pour un {1} : Ne peut pas
\u00eatre null, vide ou contenir '/', '.', '\\', '<',
'>', '(', ')', '=' ou '%5c'
edit_consumer_timeout=Timeout des op�rations WS:
-edit_consumer_timeout_milliseconds=(millisecondes avant timeout)
\ No newline at end of file
+edit_consumer_timeout_milliseconds=(millisecondes avant timeout)
+consumers_table_action_import=Importer
+consumers_table_action_export=Exporter
+portlets_table_column_include=Inclure dans l'export?
+portlets_table_column_portlet_name=Portlet
+portlets_table_export=Exporter
+export_detail_consumers=Retour � la liste des consommateurs
+export_detail_expiration_time=Date d'expiration:
+export_detail_export_time=Date d'export:
+export_detail_exported_portlet_name=Identifiant de la portlet export�e
+export_detail_exports=Retour � la liste des exports
+export_detail_failed=Portlets en erreur:
+export_detail_failed_portlet_error=Code d'erreur
+export_detail_failed_portlet_none=Aucune portlet en erreur.
+export_detail_failed_portlet_portlets=Portlets en erreur
+export_detail_portlets=Portlets export�es:
\ No newline at end of file
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/faces-config.xml 2010-09-06
20:59:23 UTC (rev 4055)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/faces-config.xml 2010-09-06
21:05:04 UTC (rev 4056)
@@ -152,8 +152,20 @@
<to-view-id>/jsf/consumers/confirmDeleteConsumer.xhtml</to-view-id>
</navigation-case>
<navigation-case>
- <from-outcome>management</from-outcome>
- <to-view-id>/jsf/management/management.xhtml</to-view-id>
+ <from-outcome>export</from-outcome>
+ <to-view-id>/jsf/consumers/exports/export.xhtml</to-view-id>
</navigation-case>
+ <navigation-case>
+ <from-outcome>export</from-outcome>
+ <to-view-id>/jsf/consumers/exports/export.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>exports</from-outcome>
+ <to-view-id>/jsf/consumers/exports/exports.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>exportDetail</from-outcome>
+ <to-view-id>/jsf/consumers/exports/exportDetail.xhtml</to-view-id>
+ </navigation-case>
</navigation-rule>
</faces-config>
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/consumers.xhtml
===================================================================
---
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/consumers.xhtml 2010-09-06
20:59:23 UTC (rev 4055)
+++
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/consumers.xhtml 2010-09-06
21:05:04 UTC (rev 4056)
@@ -24,9 +24,7 @@
<ui:decorate template="consumerTemplate.xhtml"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
-
xmlns:h="http://java.sun.com/jsf/html"
-
xmlns:c="http://java.sun.com/jstl/core"
-
xmlns:webui="http://jboss.org/gatein">
+
xmlns:h="http://java.sun.com/jsf/html">
<ui:param name="showAddConsumer" value="true"/>
<ui:define name="content">
@@ -91,6 +89,16 @@
<f:param name="id"
value="#{cons.producerId}"/>
#{i18n.consumers_table_action_delete}
</h:commandLink>
+ |
+ <h:commandLink action="#{consumersMgr.importPortlets}"
styleClass="actionImport" id="import">
+ <f:param name="id"
value="#{cons.producerId}"/>
+ #{i18n.consumers_table_action_import}
+ </h:commandLink>
+ |
+ <h:commandLink action="#{consumersMgr.exportPortlets}"
styleClass="actionExport" id="export">
+ <f:param name="id"
value="#{cons.producerId}"/>
+ #{i18n.consumers_table_action_export}
+ </h:commandLink>
</h:column>
</h:dataTable>
</h:form>
Added: components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/exports/export.xhtml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/exports/export.xhtml
(rev 0)
+++
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/exports/export.xhtml 2010-09-06
21:05:04 UTC (rev 4056)
@@ -0,0 +1,66 @@
+<!--
+ ~ 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.
+ -->
+
+<ui:decorate template="../consumerTemplate.xhtml"
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html">
+
+ <ui:define name="content">
+
+ <h:form id="portlets-form">
+ <h:dataTable id="portletsList"
value="#{consumer.portlets}" var="portlet"
+ rendered="#{! empty consumer.portlets}"
+ rowClasses="EvenRow,OddRow"
+ styleClass="UIGrid" width="100%">
+ <h:column>
+ <f:facet name="header">#{i18n.portlets_ta
+ bl
+ e_column_include}</f:facet>
+
+ <h:selectBooleanCheckbox value="#{portlet.selected}"/>
+ </h:column>
+
+ <h:column>
+ <f:facet
name="header">#{i18n.portlets_table_column_portlet_name}</f:facet>
+ #{p
+ ortlet.handle}
+ </h:column>
+ </h:dataTable>
+ <table class="ActionContainer">
+ <tr>
+ <td>
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <h:commandButton id="exportButton"
action="#{consumer.export}"
+
value="#{i18n.portlets_table_export}"/>
+ </div>
+ </div>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </h:form>
+ </ui:define>
+</ui:decorate>
\ No newline at end of file
Added:
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/exports/exportDetail.xhtml
===================================================================
---
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/exports/exportDetail.xhtml
(rev 0)
+++
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/exports/exportDetail.xhtml 2010-09-06
21:05:04 UTC (rev 4056)
@@ -0,0 +1,100 @@
+<!--
+ ~ 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.
+ -->
+
+<ui:decorate template="../consumerTemplate.xhtml"
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html">
+
+ <ui:define name="content">
+
+ <table width="100%" class="portlet-table-body">
+ <tr>
+ <th>#{i18n.export_detail_export_time}</th>
+ <td>#{consumer.currentExport.exportTime}</td>
+ </tr>
+ <tr>
+ <th>#{i18n.export_detail_expiration_time}</th>
+ <td>#{consumer.currentExport.expirationTime}</td>
+ </tr>
+ <tr>
+ <th>#{i18n.export_detail_portlets}</th>
+ <td>
+ <h:dataTable id="exported-portlets"
value="#{consumer.currentExport.exportedPortletHandles}" var="handle"
+ rowClasses="EvenRow,OddRow"
+ styleClass="UIGrid" width="100%">
+ <h:column>
+ <f:facet
name="header">#{i18n.export_detail_exported_portlet_name}</f:facet>
+ #{handle}
+ </h:column>
+ </h:dataTable>
+ </td>
+ </tr>
+ <tr>
+ <th>#{i18n.export_detail_failed}</th>
+ <td>
+ <h:dataTable id="failed-portlets"
+
value="#{consumer.currentExport.errorCodesToFailedPortletHandlesMapping.entries}"
+ rendered="#{! empty
consumer.currentExport.errorCodesToFailedPortletHandlesMapping.entries}"
+ var="entry" rowClasses="EvenRow,OddRow"
styleClass="UIGrid" width="100%">
+ <h:column>
+ <f:facet
name="header">#{i18n.export_detail_failed_portlet_error}</f:facet>
+ #{entry.key}
+ </h:column>
+ <h:column>
+ <f:facet
name="header">#{i18n.export_detail_failed_portlet_portlets}</f:facet>
+ #{entry.value}
+ </h:column>
+ </h:dataTable>
+ <h:outputText rendered="#{empty
consumer.currentExport.errorCodesToFailedPortletHandlesMapping.entries}"
+
value="#{i18n.export_detail_failed_portlet_none}"/>
+ </td>
+ </tr>
+ </table>
+
+ <h:form id="exportDetail-form">
+ <table class="ActionContainer">
+ <tr>
+ <td>
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <h:commandButton id="exports"
action="exports" value="#{i18n.export_detail_exports}"/>
+ </div>
+ </div>
+ </div>
+ </td>
+ <td>
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <h:commandButton id="consumers"
action="consumers" value="#{i18n.export_detail_consumers}"/>
+ </div>
+ </div>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </h:form>
+ </ui:define>
+</ui:decorate>
\ No newline at end of file
Added:
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/exports/exports.xhtml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/exports/exports.xhtml
(rev 0)
+++
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/exports/exports.xhtml 2010-09-06
21:05:04 UTC (rev 4056)
@@ -0,0 +1,60 @@
+<!--
+ ~ 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.
+ -->
+
+<ui:decorate template="../consumerTemplate.xhtml"
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html">
+
+ <ui:define name="content">
+
+ <h:form id="exports-form">
+ <h:dataTable id="exportsList"
value="#{consumer.existingExports}" var="export"
rowClasses="EvenRow,OddRow"
+ styleClass="UIGrid" width="100%">
+ <h:column>
+ <f:facet
name="header">#{i18n.export_table_column_time}</f:facet>
+ #{export.exportTime}
+ </h:column>
+
+ <h:column>
+ <f:facet
name="header">#{i18n.export_table_column_portlet_name}</f:facet>
+ #{portlet.handle}
+ </h:column>
+ </h:dataTable>
+ <table class="ActionContainer">
+ <tr>
+ <td>
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <h:commandButton id="exportButton"
action="#{consumer.export}"
+
value="#{i18n.export_table_export}"/>
+ </div>
+ </div>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </h:form>
+ </ui:define>
+</ui:decorate>
\ No newline at end of file
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-09-06
20:59:23 UTC (rev 4055)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/WSRPConsumer.java 2010-09-06
21:05:04 UTC (rev 4056)
@@ -30,8 +30,11 @@
import org.gatein.wsrp.consumer.ProducerInfo;
import org.gatein.wsrp.consumer.RefreshResult;
import org.gatein.wsrp.consumer.handlers.ProducerSessionInformation;
+import org.gatein.wsrp.consumer.migration.ExportInfo;
+import org.gatein.wsrp.consumer.migration.MigrationService;
import javax.servlet.http.HttpSession;
+import java.util.List;
/**
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
@@ -123,4 +126,8 @@
void start() throws Exception;
void stop() throws Exception;
+
+ ExportInfo exportPortlets(List<String> portletHandles) throws
PortletInvokerException;
+
+ MigrationService getMigrationService();
}
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-09-06
20:59:23 UTC (rev 4055)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/WSRPConsumerImpl.java 2010-09-06
21:05:04 UTC (rev 4056)
@@ -49,6 +49,8 @@
import org.gatein.wsrp.consumer.handlers.InvocationDispatcher;
import org.gatein.wsrp.consumer.handlers.ProducerSessionInformation;
import org.gatein.wsrp.consumer.handlers.SessionHandler;
+import org.gatein.wsrp.consumer.migration.ExportInfo;
+import org.gatein.wsrp.consumer.migration.MigrationService;
import org.gatein.wsrp.consumer.portlet.WSRPPortlet;
import org.gatein.wsrp.consumer.portlet.info.WSRPPortletInfo;
import org.gatein.wsrp.services.MarkupService;
@@ -56,6 +58,7 @@
import org.gatein.wsrp.services.RegistrationService;
import org.gatein.wsrp.services.ServiceDescriptionService;
import org.gatein.wsrp.servlet.UserAccess;
+import org.oasis.wsrp.v2.ExportedPortlet;
import org.oasis.wsrp.v2.Extension;
import org.oasis.wsrp.v2.FailedPortlets;
import org.oasis.wsrp.v2.InconsistentParameters;
@@ -67,6 +70,7 @@
import org.oasis.wsrp.v2.RegistrationContext;
import org.oasis.wsrp.v2.RegistrationData;
import org.oasis.wsrp.v2.ResetProperty;
+import org.oasis.wsrp.v2.ResourceList;
import org.oasis.wsrp.v2.RuntimeContext;
import org.oasis.wsrp.v2.SessionParams;
import org.slf4j.Logger;
@@ -74,6 +78,9 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
+import javax.xml.datatype.Duration;
+import javax.xml.datatype.XMLGregorianCalendar;
+import javax.xml.namespace.QName;
import javax.xml.ws.Holder;
import java.util.ArrayList;
import java.util.Collections;
@@ -83,6 +90,8 @@
import java.util.Locale;
import java.util.Map;
import java.util.Set;
+import java.util.SortedMap;
+import java.util.TreeMap;
/**
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
@@ -121,6 +130,7 @@
/** The set of supported user scopes */
private Set supportedUserScopes = WSRP_DEFAULT_USER_SCOPE; // todo: make it possible
to support different user scopes
private transient boolean started;
+ private MigrationService migrationService;
public WSRPConsumerImpl()
{
@@ -134,6 +144,8 @@
producerInfo = info;
sessionHandler = new SessionHandler(this);
dispatcher = new InvocationDispatcher(this);
+
+ migrationService = new MigrationService(); // todo: inject this
}
public ProducerInfo getProducerInfo()
@@ -744,4 +756,122 @@
{
return producerInfo.hashCode();
}
+
+ public ExportInfo exportPortlets(List<String> portletHandles) throws
PortletInvokerException
+ {
+ if (ParameterValidation.existsAndIsNotEmpty(portletHandles))
+ {
+
+ List<org.oasis.wsrp.v2.PortletContext> portletContexts = new
ArrayList<org.oasis.wsrp.v2.PortletContext>(portletHandles.size());
+ for (String handle : portletHandles)
+ {
+ portletContexts.add(WSRPTypeFactory.createPortletContext(handle));
+ }
+
+ try
+ {
+ Holder<byte[]> exportContextHolder = new Holder<byte[]>();
+ Holder<List<ExportedPortlet>> exportedPortletsHolder = new
Holder<List<ExportedPortlet>>();
+ Holder<List<FailedPortlets>> failedPortletsHolder = new
Holder<List<FailedPortlets>>();
+ Holder<Lifetime> lifetimeHolder = new Holder<Lifetime>();
+ getPortletManagementService().exportPortlets(getRegistrationContext(),
portletContexts, UserAccess.getUserContext(),
+ lifetimeHolder, true, exportContextHolder, exportedPortletsHolder,
failedPortletsHolder,
+ new Holder<ResourceList>(), new
Holder<List<Extension>>());
+
+ SortedMap<String, byte[]> handleToState = null;
+ List<ExportedPortlet> exportedPortlets = exportedPortletsHolder.value;
+ if (ParameterValidation.existsAndIsNotEmpty(exportedPortlets))
+ {
+ handleToState = new TreeMap<String, byte[]>();
+ for (ExportedPortlet exportedPortlet : exportedPortlets)
+ {
+ handleToState.put(exportedPortlet.getPortletHandle(),
exportedPortlet.getExportData());
+ }
+ }
+
+ SortedMap<QName, List<String>> errorCodeToHandle = null;
+ List<FailedPortlets> failedPortlets = failedPortletsHolder.value;
+ if (ParameterValidation.existsAndIsNotEmpty(failedPortlets))
+ {
+ errorCodeToHandle = new TreeMap<QName, List<String>>();
+ for (FailedPortlets failedPortletsForReason : failedPortlets)
+ {
+ errorCodeToHandle.put(failedPortletsForReason.getErrorCode(),
failedPortletsForReason.getPortletHandles());
+ }
+ }
+
+ // todo: deal with expiration time
+ Lifetime lifetime = lifetimeHolder.value;
+ if (lifetime != null)
+ {
+ XMLGregorianCalendar currentTime = lifetime.getCurrentTime();
+ Duration refreshDuration = lifetime.getRefreshDuration();
+ XMLGregorianCalendar terminationTime = lifetime.getTerminationTime();
+ }
+
+ ExportInfo exportInfo = new ExportInfo(System.currentTimeMillis(),
handleToState, errorCodeToHandle);
+ migrationService.add(exportInfo);
+ return exportInfo;
+ }
+ catch (OperationNotSupported operationNotSupported)
+ {
+ throw new UnsupportedOperationException(operationNotSupported);
+ }
+ catch (InconsistentParameters inconsistentParameters)
+ {
+ throw new IllegalArgumentException(inconsistentParameters);
+ }
+ /*
+ // GTNWSRP-62
+ catch (AccessDenied accessDenied)
+ {
+ accessDenied.printStackTrace(); //To change body of catch statement use File
| Settings | File Templates.
+ }
+ catch (ExportByValueNotSupported exportByValueNotSupported)
+ {
+ exportByValueNotSupported.printStackTrace(); //To change body of catch
statement use File | Settings | File Templates.
+ }
+ catch (InvalidHandle invalidHandle)
+ {
+ invalidHandle.printStackTrace(); //To change body of catch statement use
File | Settings | File Templates.
+ }
+ catch (InvalidRegistration invalidRegistration)
+ {
+ invalidRegistration.printStackTrace(); //To change body of catch statement
use File | Settings | File Templates.
+ }
+ catch (InvalidUserCategory invalidUserCategory)
+ {
+ invalidUserCategory.printStackTrace(); //To change body of catch statement
use File | Settings | File Templates.
+ }
+ catch (MissingParameters missingParameters)
+ {
+ missingParameters.printStackTrace(); //To change body of catch statement use
File | Settings | File Templates.
+ }
+ catch (ModifyRegistrationRequired modifyRegistrationRequired)
+ {
+ modifyRegistrationRequired.printStackTrace(); //To change body of catch
statement use File | Settings | File Templates.
+ }
+ catch (OperationFailed operationFailed)
+ {
+ operationFailed.printStackTrace(); //To change body of catch statement use
File | Settings | File Templates.
+ }
+ catch (ResourceSuspended resourceSuspended)
+ {
+ resourceSuspended.printStackTrace(); //To change body of catch statement use
File | Settings | File Templates.
+ }*/
+ catch (Exception e)
+ {
+ throw new PortletInvokerException(e);
+ }
+ }
+ else
+ {
+ throw new IllegalArgumentException("Must provide a non-null, non-empty list
of portlet handles.");
+ }
+ }
+
+ public MigrationService getMigrationService()
+ {
+ return migrationService;
+ }
}
Added:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/migration/ExportInfo.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/migration/ExportInfo.java
(rev 0)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/migration/ExportInfo.java 2010-09-06
21:05:04 UTC (rev 4056)
@@ -0,0 +1,122 @@
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of
+ * individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.gatein.wsrp.consumer.migration;
+
+import org.gatein.common.util.ParameterValidation;
+
+import javax.xml.namespace.QName;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.SortedMap;
+import java.util.TreeMap;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
+ * @version $Revision$
+ */
+public class ExportInfo
+{
+ private final long exportTime;
+ private long expirationTime;
+ private final SortedMap<String, byte[]> handleToExportedState;
+ private final SortedMap<QName, List<String>> errorCodeToHandles;
+ private final static SortedMap<String, byte[]> EMPTY_EXPORTED = new
TreeMap<String, byte[]>();
+ private final static SortedMap<QName, List<String>> EMPTY_FAILED = new
TreeMap<QName, List<String>>();
+
+ public ExportInfo(long exportTime, SortedMap<String, byte[]> handleToState,
SortedMap<QName, List<String>> errorCodeToHandles)
+ {
+ this.exportTime = exportTime;
+ if (ParameterValidation.existsAndIsNotEmpty(handleToState))
+ {
+ this.handleToExportedState = handleToState;
+ }
+ else
+ {
+ handleToExportedState = EMPTY_EXPORTED;
+ }
+
+ if (ParameterValidation.existsAndIsNotEmpty(errorCodeToHandles))
+ {
+ this.errorCodeToHandles = errorCodeToHandles;
+ }
+ else
+ {
+ this.errorCodeToHandles = EMPTY_FAILED;
+ }
+ }
+
+ public long getExportTime()
+ {
+ return exportTime;
+ }
+
+ public long getExpirationTime()
+ {
+ return expirationTime;
+ }
+
+ public List<String> getExportedPortletHandles()
+ {
+ return new ArrayList<String>(handleToExportedState.keySet());
+ }
+
+ public byte[] getPortletStateFor(String portletHandle)
+ {
+ return handleToExportedState.get(portletHandle);
+ }
+
+ public SortedMap<QName, List<String>>
getErrorCodesToFailedPortletHandlesMapping()
+ {
+ return Collections.unmodifiableSortedMap(errorCodeToHandles);
+ }
+
+ @Override
+ public boolean equals(Object o)
+ {
+ if (this == o)
+ {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass())
+ {
+ return false;
+ }
+
+ ExportInfo that = (ExportInfo)o;
+
+ if (exportTime != that.exportTime)
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return (int)(exportTime ^ (exportTime >>> 32));
+ }
+}
Added:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/migration/MigrationService.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/migration/MigrationService.java
(rev 0)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/migration/MigrationService.java 2010-09-06
21:05:04 UTC (rev 4056)
@@ -0,0 +1,71 @@
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of
+ * individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.gatein.wsrp.consumer.migration;
+
+import org.gatein.common.util.ParameterValidation;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.SortedMap;
+import java.util.TreeMap;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
+ * @version $Revision$
+ */
+public class MigrationService
+{
+ private SortedMap<Long, ExportInfo> exportInfos;
+
+ public List<ExportInfo> getAvailableExportInfos()
+ {
+ return new ArrayList<ExportInfo>(getExportInfos().values());
+ }
+
+ public ExportInfo getExportInfo(long exportTime)
+ {
+ return exportInfos.get(exportTime);
+ }
+
+ public void add(ExportInfo info)
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNull(info, "ExportInfo");
+
+ getExportInfos().put(info.getExportTime(), info);
+ }
+
+ public ExportInfo remove(ExportInfo info)
+ {
+ return info == null ? null : getExportInfos().remove(info.getExportTime());
+ }
+
+ private SortedMap<Long, ExportInfo> getExportInfos()
+ {
+ if (exportInfos == null)
+ {
+ exportInfos = new TreeMap<Long, ExportInfo>();
+ }
+ return exportInfos;
+ }
+}
Modified:
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v2/PortletManagementTestCase.java
===================================================================
---
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v2/PortletManagementTestCase.java 2010-09-06
20:59:23 UTC (rev 4055)
+++
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v2/PortletManagementTestCase.java 2010-09-06
21:05:04 UTC (rev 4056)
@@ -31,6 +31,7 @@
import org.gatein.pc.api.state.DestroyCloneFailure;
import org.gatein.pc.api.state.PropertyChange;
import org.gatein.pc.api.state.PropertyMap;
+import org.gatein.wsrp.consumer.migration.ExportInfo;
import org.gatein.wsrp.test.ExtendedAssert;
import org.gatein.wsrp.test.protocol.v2.BehaviorRegistry;
import org.gatein.wsrp.test.protocol.v2.behaviors.BasicMarkupBehavior;
@@ -38,6 +39,7 @@
import
org.gatein.wsrp.test.protocol.v2.behaviors.DestroyClonesPortletManagementBehavior;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
/**
@@ -180,4 +182,56 @@
//expected
}
}
+
+ public void testNullExportPortlets() throws PortletInvokerException
+ {
+ try
+ {
+ consumer.exportPortlets(null);
+ fail("Cannot export without a list of portlet handles!");
+ }
+ catch (IllegalArgumentException e)
+ {
+ // expected
+ }
+ }
+
+ public void testEmptyExportPortlets() throws PortletInvokerException
+ {
+ try
+ {
+ consumer.exportPortlets(Collections.<String>emptyList());
+ fail("Cannot export without a list of portlet handles!");
+ }
+ catch (IllegalArgumentException e)
+ {
+ // expected
+ }
+ }
+
+ public void testExportPortlets() throws PortletInvokerException
+ {
+ long now = System.currentTimeMillis();
+ ArrayList<String> portletContexts = new ArrayList<String>();
+ portletContexts.add(BasicMarkupBehavior.PORTLET_HANDLE);
+ ExportInfo ei = consumer.exportPortlets(portletContexts);
+ assertNotNull(ei);
+
+ long tenSeconds = 10 * 1000;
+ assertTrue((ei.getExportTime() - now) < tenSeconds);
+
+ assertEquals(0, ei.getExpirationTime());
+
+ List<String> exportedPortlets = ei.getExportedPortletHandles();
+ assertNotNull(exportedPortlets);
+ assertEquals(1, exportedPortlets.size());
+ assertTrue(exportedPortlets.contains(BasicMarkupBehavior.PORTLET_HANDLE));
+ assertNotNull(ei.getPortletStateFor(BasicMarkupBehavior.PORTLET_HANDLE));
+
+ assertTrue(ei.getErrorCodesToFailedPortletHandlesMapping().isEmpty());
+
+ List<ExportInfo> availableExportInfos =
consumer.getMigrationService().getAvailableExportInfos();
+ assertEquals(1, availableExportInfos.size());
+ assertEquals(ei, availableExportInfos.get(0));
+ }
}
Modified:
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/behaviors/BasicPortletManagementBehavior.java
===================================================================
---
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/behaviors/BasicPortletManagementBehavior.java 2010-09-06
20:59:23 UTC (rev 4055)
+++
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/behaviors/BasicPortletManagementBehavior.java 2010-09-06
21:05:04 UTC (rev 4056)
@@ -186,7 +186,26 @@
@Override
public void exportPortlets(@WebParam(name = "registrationContext",
targetNamespace = "urn:oasis:names:tc:wsrp:v2:types") RegistrationContext
registrationContext, @WebParam(name = "portletContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") List<PortletContext> portletContext,
@WebParam(name = "userContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") UserContext userContext, @WebParam(name =
"lifetime", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types", mode
= WebParam.Mode.INOUT) Holder<Lifetime> lifetime, @WebParam(name =
"exportByValueRequired", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") Boolean exportByValueRequired,
@WebParam(name = "exportContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types", mode = WebParam.Mode.OUT)
Holder<byte[]> exportContext, @WebParam(name = "exportedPortlet",
targetNamespace = "urn:oasis:names:tc:wsrp:v2:types", mode = WebParam.Mode.OUT)
Holder<List<ExportedPortlet>> exportedPortlet, @WebParam(name!
= "failedPortlets", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types", mode = WebParam.Mode.OUT)
Holder<List<FailedPortlets>> failedPortlets, @WebParam(name =
"resourceList", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types",
mode = WebParam.Mode.OUT) Holder<ResourceList> resourceList, @WebParam(name =
"extensions", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types",
mode = WebParam.Mode.OUT) Holder<List<Extension>> extensions) throws
AccessDenied, ExportByValueNotSupported, InconsistentParameters, InvalidHandle,
InvalidRegistration, InvalidUserCategory, MissingParameters, ModifyRegistrationRequired,
OperationFailed, OperationNotSupported, ResourceSuspended
{
- throw new NotYetImplemented();
+ List<String> failedPortletHandles = new ArrayList<String>();
+ for (PortletContext context : portletContext)
+ {
+ String portletHandle = context.getPortletHandle();
+ if (BasicMarkupBehavior.PORTLET_HANDLE.equals(portletHandle))
+ {
+ exportedPortlet.value = new ArrayList<ExportedPortlet>();
+
exportedPortlet.value.add(WSRPTypeFactory.createExportedPortlet(BasicMarkupBehavior.PORTLET_HANDLE,
new byte[]{1, 2, 3, 4}));
+ }
+ else
+ {
+ failedPortletHandles.add(portletHandle);
+ }
+ }
+
+ if (!failedPortletHandles.isEmpty())
+ {
+ failedPortlets.value = new ArrayList<FailedPortlets>();
+
failedPortlets.value.add(WSRPTypeFactory.createFailedPortlets(failedPortletHandles,
ErrorCodes.Codes.INVALIDHANDLE, "Unknown handles"));
+ }
}
@Override
Modified:
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/MockWSRPConsumer.java
===================================================================
---
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/MockWSRPConsumer.java 2010-09-06
20:59:23 UTC (rev 4055)
+++
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/MockWSRPConsumer.java 2010-09-06
21:05:04 UTC (rev 4056)
@@ -37,6 +37,8 @@
import org.gatein.wsrp.consumer.ProducerInfo;
import org.gatein.wsrp.consumer.RefreshResult;
import org.gatein.wsrp.consumer.handlers.ProducerSessionInformation;
+import org.gatein.wsrp.consumer.migration.ExportInfo;
+import org.gatein.wsrp.consumer.migration.MigrationService;
import javax.servlet.http.HttpSession;
import java.util.List;
@@ -161,6 +163,16 @@
{
}
+ public ExportInfo exportPortlets(List<String> portletHandles) throws
PortletInvokerException
+ {
+ throw new NotYetImplemented();
+ }
+
+ public MigrationService getMigrationService()
+ {
+ throw new NotYetImplemented();
+ }
+
public void destroy()
{
}