Author: mwringe
Date: 2010-08-13 13:02:50 -0400 (Fri, 13 Aug 2010)
New Revision: 3828
Added:
components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-portletstate-portlet-war/WEB-INF/
components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-portletstate-portlet-war/WEB-INF/portlet.xml
components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-portletstate-portlet-war/WEB-INF/web.xml
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/WSRPConsumerImpl.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/MockWSRPConsumer.java
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/PortletManagementHandler.java
components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v2/PortletManagementTestCase.java
Log:
GTNWSRP-55: Updated for import/export changes added to the PC portlet invoker.
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-08-13
14:41:57 UTC (rev 3827)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/WSRPConsumerImpl.java 2010-08-13
17:02:50 UTC (rev 3828)
@@ -391,13 +391,13 @@
}
}
- public PortletContext exportPortletContext(PortletStateType stateType, PortletContext
originalPortletContext)
+ public PortletContext exportPortlet(PortletStateType stateType, PortletContext
originalPortletContext)
throws PortletInvokerException
{
throw new NotYetImplemented();
}
- public PortletContext importPortletContext(PortletStateType stateType, PortletContext
originalPortletContext)
+ public PortletContext importPortlet(PortletStateType stateType, PortletContext
originalPortletContext)
throws PortletInvokerException
{
throw new NotYetImplemented();
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-08-13
14:41:57 UTC (rev 3827)
+++
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/MockWSRPConsumer.java 2010-08-13
17:02:50 UTC (rev 3828)
@@ -170,13 +170,13 @@
{
}
- public PortletContext exportPortletContext(PortletStateType stateType, PortletContext
originalPortletContext)
+ public PortletContext exportPortlet(PortletStateType stateType, PortletContext
originalPortletContext)
throws PortletInvokerException
{
throw new NotYetImplemented();
}
- public PortletContext importPortletContext(PortletStateType stateType, PortletContext
originalPortletContext)
+ public PortletContext importPortlet(PortletStateType stateType, PortletContext
originalPortletContext)
throws PortletInvokerException
{
throw new NotYetImplemented();
Modified:
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/PortletManagementHandler.java
===================================================================
---
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/PortletManagementHandler.java 2010-08-13
14:41:57 UTC (rev 3827)
+++
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/PortletManagementHandler.java 2010-08-13
17:02:50 UTC (rev 3828)
@@ -530,7 +530,7 @@
producer.getPortletInvoker().getPortlet(portalPC);
- org.gatein.pc.api.PortletContext exportedPortalPC =
producer.getPortletInvoker().exportPortletContext(PortletStateType.OPAQUE, portalPC);
+ org.gatein.pc.api.PortletContext exportedPortalPC =
producer.getPortletInvoker().exportPortlet(PortletStateType.OPAQUE, portalPC);
PortletContext exportedPortalContext =
WSRPUtils.convertToWSRPPortletContext(exportedPortalPC);
portletHandle = exportedPortalContext.getPortletHandle();
@@ -654,7 +654,7 @@
PortletContext pc = WSRPTypeFactory.createPortletContext(portletHandle,
portletState);
org.gatein.pc.api.PortletContext pcPortletContext =
WSRPUtils.convertToPortalPortletContext(pc);
- org.gatein.pc.api.PortletContext cpc =
producer.getPortletInvoker().importPortletContext(PortletStateType.OPAQUE,
pcPortletContext);
+ org.gatein.pc.api.PortletContext cpc =
producer.getPortletInvoker().importPortlet(PortletStateType.OPAQUE, pcPortletContext);
PortletContext wpc = WSRPUtils.convertToWSRPPortletContext(cpc);
ImportedPortlet importedPortlet =
WSRPTypeFactory.createImportedPortlet(importPortlet.getImportID(), wpc);
Modified:
components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v2/PortletManagementTestCase.java
===================================================================
---
components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v2/PortletManagementTestCase.java 2010-08-13
14:41:57 UTC (rev 3827)
+++
components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v2/PortletManagementTestCase.java 2010-08-13
17:02:50 UTC (rev 3828)
@@ -816,7 +816,6 @@
PortletContext portletContextFromExport = portletContextsFromExport.get(0);
assertEquals(originalHandle, portletContextFromExport.getPortletHandle());
- assertNull(portletContextFromExport.getPortletState());
}
finally
{
Added:
components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-portletstate-portlet-war/WEB-INF/portlet.xml
===================================================================
---
components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-portletstate-portlet-war/WEB-INF/portlet.xml
(rev 0)
+++
components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-portletstate-portlet-war/WEB-INF/portlet.xml 2010-08-13
17:02:50 UTC (rev 3828)
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2008, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+<portlet-app
xmlns='http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocation='http://java.sun.com/xml/ns/portlet/portlet-app_2_...
http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd' version='2.0'>
+ <portlet>
+ <portlet-name>Implicit Cloning Test Portlet</portlet-name>
+ <portlet-class>org.gatein.wsrp.portlet.StatePortlet</portlet-class>
+
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>view</portlet-mode>
+ </supports>
+
+ <supported-locale>en</supported-locale>
+
+ <portlet-info>
+ <title>title</title>
+ </portlet-info>
+
+ <portlet-preferences>
+ <preference>
+ <name>name</name>
+ <value>initial</value>
+ </preference>
+ </portlet-preferences>
+ </portlet>
+
+ <container-runtime-option>
+ <name>org.gatein.pc.remotable</name>
+ <value>true</value>
+ </container-runtime-option>
+</portlet-app>
Added:
components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-portletstate-portlet-war/WEB-INF/web.xml
===================================================================
---
components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-portletstate-portlet-war/WEB-INF/web.xml
(rev 0)
+++
components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-portletstate-portlet-war/WEB-INF/web.xml 2010-08-13
17:02:50 UTC (rev 3828)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2007, 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<web-app version="2.4"
+
xmlns="http://java.sun.com/xml/ns/j2ee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+</web-app>
\ No newline at end of file