Author: chris.laprun(a)jboss.com
Date: 2007-03-04 19:03:04 -0500 (Sun, 04 Mar 2007)
New Revision: 6532
Added:
trunk/wsrp/src/resources/tests/test-resource-portlet-war/
trunk/wsrp/src/resources/tests/test-resource-portlet-war/WEB-INF/
trunk/wsrp/src/resources/tests/test-resource-portlet-war/WEB-INF/jboss-portlet.xml
trunk/wsrp/src/resources/tests/test-resource-portlet-war/WEB-INF/portlet.xml
trunk/wsrp/src/resources/tests/test-resource-portlet-war/WEB-INF/web.xml
Modified:
trunk/core/src/main/org/jboss/portal/test/core/deployment/JBossApplicationMetaDataFactoryTestCase.java
trunk/core/src/resources/test/deployment/jboss-portlet.xml
Log:
- Added tests for isRemotable.
Modified:
trunk/core/src/main/org/jboss/portal/test/core/deployment/JBossApplicationMetaDataFactoryTestCase.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/test/core/deployment/JBossApplicationMetaDataFactoryTestCase.java 2007-03-04
21:55:27 UTC (rev 6531)
+++
trunk/core/src/main/org/jboss/portal/test/core/deployment/JBossApplicationMetaDataFactoryTestCase.java 2007-03-05
00:03:04 UTC (rev 6532)
@@ -30,8 +30,8 @@
import org.jboss.portal.core.metadata.portlet.JBossApplicationMetaData;
import org.jboss.portal.core.metadata.portlet.JBossPortletMetaData;
import org.jboss.portal.core.metadata.portlet.LinkElementMetaData;
+import org.jboss.portal.core.metadata.portlet.NamedMetaElementMetaData;
import org.jboss.portal.core.metadata.portlet.ScriptElementMetaData;
-import org.jboss.portal.core.metadata.portlet.NamedMetaElementMetaData;
import org.jboss.xb.binding.Unmarshaller;
import org.jboss.xb.binding.UnmarshallerFactory;
@@ -65,13 +65,14 @@
//
assertNotNull(app.getPortlets());
- assertEquals(1, app.getPortlets().size());
+ assertEquals(2, app.getPortlets().size());
//
- JBossPortletMetaData portlet1 =
(JBossPortletMetaData)app.getPortlets().get("Portlet1");
- assertNotNull(portlet1);
- assertEquals("Portlet1", portlet1.getName());
- HeaderContentMetaData headerContent = portlet1.getHeaderContent();
+ JBossPortletMetaData portlet =
(JBossPortletMetaData)app.getPortlets().get("Portlet1");
+ assertNotNull(portlet);
+ assertEquals("Portlet1", portlet.getName());
+ assertEquals(Boolean.TRUE, portlet.getRemotable());
+ HeaderContentMetaData headerContent = portlet.getHeaderContent();
assertNotNull(headerContent);
List elements = headerContent.getElements();
@@ -91,5 +92,10 @@
NamedMetaElementMetaData meta = (NamedMetaElementMetaData)elements.get(2);
assertEquals("description", meta.getNameAttribute());
assertEquals("test content", meta.getContentAttribute());
+
+ portlet = (JBossPortletMetaData)app.getPortlets().get("Portlet2");
+ assertNotNull(portlet);
+ assertEquals("Portlet2", portlet.getName());
+ assertNull(portlet.getRemotable());
}
}
Modified: trunk/core/src/resources/test/deployment/jboss-portlet.xml
===================================================================
--- trunk/core/src/resources/test/deployment/jboss-portlet.xml 2007-03-04 21:55:27 UTC
(rev 6531)
+++ trunk/core/src/resources/test/deployment/jboss-portlet.xml 2007-03-05 00:03:04 UTC
(rev 6532)
@@ -20,14 +20,18 @@
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
-
+<!DOCTYPE portlet-app PUBLIC "-//JBoss Portal//DTD JBoss Portlet 2.6//EN"
"http://www.jboss.org/portal/dtd/jboss-portlet_2_6.dtd">
<portlet-app>
<portlet>
<portlet-name>Portlet1</portlet-name>
+ <remotable>true</remotable>
<header-content>
<link rel="stylesheet" type="text/css"
href="test.css" title="stylesheet title"
media="screen"/>
<script type="text/javascript" src="test.js"/>
<meta name="description" content="test content"/>
</header-content>
</portlet>
+ <portlet>
+ <portlet-name>Portlet2</portlet-name>
+ </portlet>
</portlet-app>
\ No newline at end of file
Added: trunk/wsrp/src/resources/tests/test-resource-portlet-war/WEB-INF/jboss-portlet.xml
===================================================================
--- trunk/wsrp/src/resources/tests/test-resource-portlet-war/WEB-INF/jboss-portlet.xml
(rev 0)
+++
trunk/wsrp/src/resources/tests/test-resource-portlet-war/WEB-INF/jboss-portlet.xml 2007-03-05
00:03:04 UTC (rev 6532)
@@ -0,0 +1,30 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+<!DOCTYPE portlet-app PUBLIC "-//JBoss Portal//DTD JBoss Portlet 2.6//EN"
"http://www.jboss.org/portal/dtd/jboss-portlet_2_6.dtd">
+
+<portlet-app>
+ <portlet>
+ <portlet-name>Resource Test Portlet</portlet-name>
+ <remotable>true</remotable>
+ </portlet>
+</portlet-app>
\ No newline at end of file
Added: trunk/wsrp/src/resources/tests/test-resource-portlet-war/WEB-INF/portlet.xml
===================================================================
--- trunk/wsrp/src/resources/tests/test-resource-portlet-war/WEB-INF/portlet.xml
(rev 0)
+++
trunk/wsrp/src/resources/tests/test-resource-portlet-war/WEB-INF/portlet.xml 2007-03-05
00:03:04 UTC (rev 6532)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, 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_1_0.xsd"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1...
version="1.0">
+ <portlet>
+ <portlet-name>Resource Test Portlet</portlet-name>
+
<portlet-class>org.jboss.portal.test.wsrp.portlet.ResourcePortlet</portlet-class>
+
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>view</portlet-mode>
+ </supports>
+
+ <portlet-info>
+ <title>Resource Test</title>
+ </portlet-info>
+ </portlet>
+
+</portlet-app>
\ No newline at end of file
Added: trunk/wsrp/src/resources/tests/test-resource-portlet-war/WEB-INF/web.xml
===================================================================
--- trunk/wsrp/src/resources/tests/test-resource-portlet-war/WEB-INF/web.xml
(rev 0)
+++ trunk/wsrp/src/resources/tests/test-resource-portlet-war/WEB-INF/web.xml 2007-03-05
00:03:04 UTC (rev 6532)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, 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