Author: chris.laprun(a)jboss.com
Date: 2008-01-29 19:05:26 -0500 (Tue, 29 Jan 2008)
New Revision: 9638
Added:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/TestPortletApplicationDeployer.java
Modified:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/PortletApplicationDeployer.java
modules/portlet/trunk/test/src/test/resources/portlet-test-war/WEB-INF/jboss-beans.xml
Log:
- Extracted driver from PortletApplicationDeployer to make it reusable outside of tests.
- Introduced TestPortletApplicationDeployer for tests.
- Updated porlet-test-war jboss-beans.xml to use correct URN for namespace and
TestPortletApplicationDeployer.
Modified:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/PortletApplicationDeployer.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/PortletApplicationDeployer.java 2008-01-29
23:20:28 UTC (rev 9637)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/PortletApplicationDeployer.java 2008-01-30
00:05:26 UTC (rev 9638)
@@ -103,19 +103,6 @@
private final Map<PortletApplication, PortletApplicationRegistrationContext>
registrationContextMap =
new HashMap<PortletApplication, PortletApplicationRegistrationContext>();
- /** . */
- private Object driver;
-
- public Object getDriver()
- {
- return driver;
- }
-
- public void setDriver(Object driver)
- {
- this.driver = driver;
- }
-
public PortletApplicationRegistry getRegistry()
{
return registry;
@@ -165,11 +152,8 @@
}
}
- private void add(WebApp webApp)
+ protected void add(WebApp webApp)
{
- // Set the driver for the web app
- webApp.getServletContext().setAttribute("TestDriverServer", driver);
-
//
PortletApplication10MetaData metaData = buildPortletApplicationMetaData(webApp);
if (metaData != null)
Added:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/TestPortletApplicationDeployer.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/TestPortletApplicationDeployer.java
(rev 0)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/TestPortletApplicationDeployer.java 2008-01-30
00:05:26 UTC (rev 9638)
@@ -0,0 +1,55 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.portlet.test;
+
+import org.jboss.portal.web.WebApp;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
+ * @version $Revision$
+ */
+public class TestPortletApplicationDeployer extends PortletApplicationDeployer
+{
+ /** . */
+ private Object driver;
+
+ public Object getDriver()
+ {
+ return driver;
+ }
+
+ public void setDriver(Object driver)
+ {
+ this.driver = driver;
+ }
+
+ @Override
+ protected void add(WebApp webApp)
+ {
+ // Set the driver for the web app
+ webApp.getServletContext().setAttribute("TestDriverServer", driver);
+
+ super.add(webApp);
+ }
+}
Property changes on:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/TestPortletApplicationDeployer.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Modified:
modules/portlet/trunk/test/src/test/resources/portlet-test-war/WEB-INF/jboss-beans.xml
===================================================================
---
modules/portlet/trunk/test/src/test/resources/portlet-test-war/WEB-INF/jboss-beans.xml 2008-01-29
23:20:28 UTC (rev 9637)
+++
modules/portlet/trunk/test/src/test/resources/portlet-test-war/WEB-INF/jboss-beans.xml 2008-01-30
00:05:26 UTC (rev 9638)
@@ -21,9 +21,7 @@
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
-<deployment
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd"
- xmlns="urn:jboss:bean-deployer">
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
<bean name="TestDriverServer"
class="org.jboss.unit.remote.driver.RemoteTestDriverServer"/>
@@ -40,7 +38,7 @@
<bean name="PortletApplicationRegistry"
class="org.jboss.portal.portlet.impl.container.PortletApplicationRegistryImpl"/>
- <bean name="PortletApplicationDeployer"
class="org.jboss.portal.portlet.test.PortletApplicationDeployer">
+ <bean name="PortletApplicationDeployer"
class="org.jboss.portal.portlet.test.TestPortletApplicationDeployer">
<property name="registry"><inject
bean="PortletApplicationRegistry"/></property>
<property name="servletContainer"><inject
bean="ServletContainer"/></property>
<property name="driver"><inject
bean="TestDriverServer"/></property>