Author: julien(a)jboss.com
Date: 2008-03-02 14:37:21 -0500 (Sun, 02 Mar 2008)
New Revision: 10165
Added:
modules/portlet/trunk/samples/
modules/portlet/trunk/samples/src/
modules/portlet/trunk/samples/src/assemble/
modules/portlet/trunk/samples/src/assemble/samples-google-portlet.xml
modules/portlet/trunk/samples/src/assemble/samples-remotecontroller-portlet.xml
modules/portlet/trunk/samples/src/assemble/samples-shoppingcart-portlet.xml
modules/portlet/trunk/samples/src/main/
modules/portlet/trunk/samples/src/main/artifacts/
modules/portlet/trunk/samples/src/main/artifacts/basic-portlet-war/
modules/portlet/trunk/samples/src/main/artifacts/google-portlet-war/
modules/portlet/trunk/samples/src/main/artifacts/remotecontroller-portlet-war/
modules/portlet/trunk/samples/src/main/artifacts/shoppingcart-portlet-war/
modules/portlet/trunk/samples/src/main/artifacts/shoppingcart-portlet-war/WEB-INF/
modules/portlet/trunk/samples/src/main/artifacts/shoppingcart-portlet-war/WEB-INF/portlet.xml
modules/portlet/trunk/samples/src/main/java/
modules/portlet/trunk/samples/src/main/java/org/
modules/portlet/trunk/samples/src/main/java/org/jboss/
modules/portlet/trunk/samples/src/main/java/org/jboss/portal/
modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/
modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/
modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/google/
modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/google/GoogleWeatherClippingPortlet.java
Removed:
modules/portlet/trunk/portal/src/assembly/samples-google-map-portlet.xml
modules/portlet/trunk/portal/src/assembly/samples-google-weather-portlet.xml
modules/portlet/trunk/portal/src/assembly/samples-remotecontrol-portlet.xml
modules/portlet/trunk/portal/src/assembly/samples.xml
modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/samples/basic/
modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/samples/event/
modules/portlet/trunk/portal/src/main/resources/samples/google-map-portlet-war/WEB-INF/
modules/portlet/trunk/portal/src/main/resources/samples/google-weather-portlet-war/WEB-INF/
Modified:
modules/portlet/trunk/build/distrib/distrib.xml
modules/portlet/trunk/pom.xml
modules/portlet/trunk/portal/pom.xml
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/demo/demo.jsp
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/demo/demo1.jsp
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/demo/demo2.jsp
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/demo/demo3.jsp
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/demo/wikipedia.jsp
Log:
- split portlet samples into a separate package
- a bit of cleaning of samples
Modified: modules/portlet/trunk/build/distrib/distrib.xml
===================================================================
--- modules/portlet/trunk/build/distrib/distrib.xml 2008-03-02 17:52:11 UTC (rev 10164)
+++ modules/portlet/trunk/build/distrib/distrib.xml 2008-03-02 19:37:21 UTC (rev 10165)
@@ -132,11 +132,17 @@
<copy todir="${bin.dir}/lib" flatten="true">
<fileset dir="${source.dir}" includes="**/target/*.jar"
excludes="**/*sources.jar"/>
</copy>
- <copy
file="${source.dir}/portal/target/portlet-portal-${maven.version}-samples-basic.war"
tofile="${bin.dir}/samples/samples-basic.war"/>
+ <copy
file="${source.dir}/samples/target/portlet-samples-${maven.version}-samples-basic-portlet.war"
tofile="${bin.dir}/samples/samples-basic-portlet.war"/>
+ <copy
file="${source.dir}/samples/target/portlet-samples-${maven.version}-samples-google-portlet.war"
tofile="${bin.dir}/samples/samples-google-portlet.war"/>
+ <copy
file="${source.dir}/samples/target/portlet-samples-${maven.version}-samples-remotecontroller-portlet.war"
tofile="${bin.dir}/samples/samples-remotecontroller-portlet.war"/>
+ <copy
file="${source.dir}/samples/target/portlet-samples-${maven.version}-samples-shoppingcart-portlet.war"
tofile="${bin.dir}/samples/samples-shoppingcart-portlet.war"/>
</target>
<target name="__package-bundled-binary" unless="bin-alone">
- <copy
file="${source.dir}/portal/target/portlet-portal-${maven.version}-samples-basic.war"
tofile="${deploy.dir}/samples-basic.war"/>
+ <copy
file="${source.dir}/samples/target/portlet-samples-${maven.version}-samples-basic-portlet.war"
tofile="${deploy.dir}/samples-basic-portlet.war"/>
+ <copy
file="${source.dir}/samples/target/portlet-samples-${maven.version}-samples-google-portlet.war"
tofile="${deploy.dir}/samples-google-portlet.war"/>
+ <copy
file="${source.dir}/samples/target/portlet-samples-${maven.version}-samples-remotecontroller-portlet.war"
tofile="${deploy.dir}/samples-remotecontroller-portlet.war"/>
+ <copy
file="${source.dir}/samples/target/portlet-samples-${maven.version}-samples-shoppingcart-portlet.war"
tofile="${deploy.dir}/samples-shoppingcart-portlet.war"/>
</target>
<target name="__package-distrib">
Modified: modules/portlet/trunk/pom.xml
===================================================================
--- modules/portlet/trunk/pom.xml 2008-03-02 17:52:11 UTC (rev 10164)
+++ modules/portlet/trunk/pom.xml 2008-03-02 19:37:21 UTC (rev 10165)
@@ -45,6 +45,7 @@
<module>mc</module>
<module>test</module>
<module>portal</module>
+ <module>samples</module>
</modules>
</project>
Modified: modules/portlet/trunk/portal/pom.xml
===================================================================
--- modules/portlet/trunk/portal/pom.xml 2008-03-02 17:52:11 UTC (rev 10164)
+++ modules/portlet/trunk/portal/pom.xml 2008-03-02 19:37:21 UTC (rev 10165)
@@ -194,44 +194,10 @@
<descriptors>
<descriptor>src/assembly/simple-portal-jboss42.xml</descriptor>
<descriptor>src/assembly/simple-portal-tomcat60.xml</descriptor>
- <descriptor>src/assembly/samples-basic.xml</descriptor>
-
<descriptor>src/assembly/samples-cart-event-portlet.xml</descriptor>
-
<descriptor>src/assembly/samples-google-map-portlet.xml</descriptor>
-
<descriptor>src/assembly/samples-google-weather-portlet.xml</descriptor>
-
<descriptor>src/assembly/samples-remotecontrol-portlet.xml</descriptor>
</descriptors>
</configuration>
</plugin>
- <plugin>
-
- <groupId>org.jvnet.maven-antrun-extended-plugin</groupId>
- <artifactId>maven-antrun-extended-plugin</artifactId>
- <version>1.13</version>
-
- <executions>
- <execution>
- <id>blah</id>
- <phase>blah</phase>
-
- <configuration>
- <tasks>
- <echo message="blah"/>
- <echo message="blah"/>
- <echo message="blah"/>
- <echo message="blah"/>
- </tasks>
- </configuration>
-
- <goals>
- <goal>run</goal>
- </goals>
-
- </execution>
- </executions>
-
- </plugin>
-
</plugins>
</build>
Deleted: modules/portlet/trunk/portal/src/assembly/samples-google-map-portlet.xml
===================================================================
--- modules/portlet/trunk/portal/src/assembly/samples-google-map-portlet.xml 2008-03-02
17:52:11 UTC (rev 10164)
+++ modules/portlet/trunk/portal/src/assembly/samples-google-map-portlet.xml 2008-03-02
19:37:21 UTC (rev 10165)
@@ -1,22 +0,0 @@
-<assembly>
- <id>samples-google-map-portlet</id>
- <formats>
- <format>war</format>
- </formats>
- <includeBaseDirectory>false</includeBaseDirectory>
-
- <fileSets>
- <fileSet>
-
<directory>src/main/resources/samples/google-map-portlet-war</directory>
- <outputDirectory></outputDirectory>
- </fileSet>
- <fileSet>
- <directory>target/classes</directory>
- <outputDirectory>WEB-INF/classes</outputDirectory>
- <includes>
-
<include>org/jboss/portal/portlet/portal/samples/GoogleClippingPortlet.class</include>
- </includes>
- </fileSet>
- </fileSets>
-
-</assembly>
\ No newline at end of file
Deleted: modules/portlet/trunk/portal/src/assembly/samples-google-weather-portlet.xml
===================================================================
---
modules/portlet/trunk/portal/src/assembly/samples-google-weather-portlet.xml 2008-03-02
17:52:11 UTC (rev 10164)
+++
modules/portlet/trunk/portal/src/assembly/samples-google-weather-portlet.xml 2008-03-02
19:37:21 UTC (rev 10165)
@@ -1,23 +0,0 @@
-<assembly>
- <id>samples-google-weather-portlet</id>
- <formats>
- <format>war</format>
- </formats>
- <includeBaseDirectory>false</includeBaseDirectory>
-
- <fileSets>
- <fileSet>
-
<directory>src/main/resources/samples/google-weather-portlet-war</directory>
- <outputDirectory></outputDirectory>
- </fileSet>
- <fileSet>
- <directory>target/classes</directory>
- <outputDirectory>WEB-INF/classes</outputDirectory>
- <includes>
-
<include>org/jboss/portal/portlet/portal/samples/GoogleClippingPortlet.class</include>
-
<include>org/jboss/portal/portlet/portal/samples/GoogleWeatherClippingPortlet.class</include>
- </includes>
- </fileSet>
- </fileSets>
-
-</assembly>
\ No newline at end of file
Deleted: modules/portlet/trunk/portal/src/assembly/samples-remotecontrol-portlet.xml
===================================================================
--- modules/portlet/trunk/portal/src/assembly/samples-remotecontrol-portlet.xml 2008-03-02
17:52:11 UTC (rev 10164)
+++ modules/portlet/trunk/portal/src/assembly/samples-remotecontrol-portlet.xml 2008-03-02
19:37:21 UTC (rev 10165)
@@ -1,22 +0,0 @@
-<assembly>
- <id>samples-google-weather-portlet</id>
- <formats>
- <format>war</format>
- </formats>
- <includeBaseDirectory>false</includeBaseDirectory>
-
- <fileSets>
- <fileSet>
-
<directory>src/main/resources/samples/remotecontrol-portlet-war</directory>
- <outputDirectory></outputDirectory>
- </fileSet>
- <fileSet>
- <directory>target/classes</directory>
- <outputDirectory>WEB-INF/classes</outputDirectory>
- <includes>
-
<include>org/jboss/portal/portlet/portal/samples/RemoteControlResourcePortlet.class</include>
- </includes>
- </fileSet>
- </fileSets>
-
-</assembly>
\ No newline at end of file
Deleted: modules/portlet/trunk/portal/src/assembly/samples.xml
===================================================================
--- modules/portlet/trunk/portal/src/assembly/samples.xml 2008-03-02 17:52:11 UTC (rev
10164)
+++ modules/portlet/trunk/portal/src/assembly/samples.xml 2008-03-02 19:37:21 UTC (rev
10165)
@@ -1,73 +0,0 @@
-<assembly>
- <id>samples</id>
- <formats>
- <format>dir</format>
- </formats>
- <baseDirectory>samples</baseDirectory>
-
- <fileSets>
-
- <fileSet>
-
<directory>src/main/resources/samples/google-map-portlet-war</directory>
- <outputDirectory>samples-google-map-portlet.war</outputDirectory>
- </fileSet>
- <fileSet>
- <directory>target/classes</directory>
-
<outputDirectory>samples-google-map-portlet.war/WEB-INF/classes</outputDirectory>
- <includes>
-
<include>org/jboss/portal/portlet/portal/samples/GoogleClippingPortlet.class</include>
- </includes>
- </fileSet>
-
- <fileSet>
-
<directory>src/main/resources/samples/google-weather-portlet-war</directory>
-
<outputDirectory>samples-google-weather-portlet.war</outputDirectory>
- </fileSet>
- <fileSet>
- <directory>target/classes</directory>
-
<outputDirectory>samples-google-weather-portlet.war/WEB-INF/classes</outputDirectory>
- <includes>
-
<include>org/jboss/portal/portlet/portal/samples/GoogleClippingPortlet.class</include>
-
<include>org/jboss/portal/portlet/portal/samples/GoogleWeatherClippingPortlet.class</include>
- </includes>
- </fileSet>
-
- <fileSet>
-
<directory>src/main/resources/samples/remotecontrol-portlet-war</directory>
-
<outputDirectory>samples-remotecontrol-portlet.war</outputDirectory>
- </fileSet>
- <fileSet>
- <directory>target/classes</directory>
-
<outputDirectory>samples-remotecontrol-portlet.war/WEB-INF/classes</outputDirectory>
- <includes>
-
<include>org/jboss/portal/portlet/portal/samples/RemoteControlResourcePortlet.class</include>
- </includes>
- </fileSet>
-
- <fileSet>
-
<directory>src/main/resources/samples/cart-event-portlet-war</directory>
- <outputDirectory>samples-cart-event-portlet.war</outputDirectory>
- </fileSet>
- <fileSet>
- <directory>target/classes</directory>
-
<outputDirectory>samples-cart-event-portlet.war/WEB-INF/classes</outputDirectory>
- <includes>
-
<include>org/jboss/portal/portlet/portal/samples/event/*.class</include>
- </includes>
- </fileSet>
-
- <fileSet>
- <directory>src/main/resources/samples/basic-war</directory>
- <outputDirectory>samples-basic.war</outputDirectory>
- </fileSet>
- <fileSet>
- <directory>target/classes</directory>
-
<outputDirectory>samples-basic.war/WEB-INF/classes</outputDirectory>
- <includes>
-
<include>org/jboss/portal/portlet/portal/samples/basic/**</include>
- </includes>
- </fileSet>
-
- </fileSets>
-
-</assembly>
\ No newline at end of file
Modified: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/demo/demo.jsp
===================================================================
---
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/demo/demo.jsp 2008-03-02
17:52:11 UTC (rev 10164)
+++
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/demo/demo.jsp 2008-03-02
19:37:21 UTC (rev 10165)
@@ -10,15 +10,15 @@
<portal:pageparam namespaceURI="urn:jboss:portal:simple:google"
localName="zipcode" value="80201"/>
<jbp:layout1>
<jsp:attribute name="leftcol">
- <jbp:portlet name="RemoteControl"
applicationName="samples-remotecontrol-portlet"/>
+ <jbp:portlet name="RemoteControl"
applicationName="samples-remotecontroller-portlet"/>
<jbp:portlet name="Foo" applicationName="bar"/>
- <jbp:portlet name="ExceptionPortlet"
applicationName="samples-basic"/>
- <jbp:portlet name="Cart"
applicationName="samples-cart-event-portlet"/>
+ <jbp:portlet name="ExceptionPortlet"
applicationName="samples-basic-portlet"/>
+ <jbp:portlet name="Cart"
applicationName="samples-shoppingcart-portlet"/>
</jsp:attribute>
<jsp:attribute name="rightcol">
- <jbp:portlet name="GoogleMap"
applicationName="samples-google-map-portlet"/>
- <jbp:portlet name="GoogleWeather"
applicationName="samples-google-weather-portlet"/>
- <jbp:portlet name="Catalog"
applicationName="samples-cart-event-portlet"/>
+ <jbp:portlet name="GoogleMap"
applicationName="samples-google-portlet"/>
+ <jbp:portlet name="GoogleWeather"
applicationName="samples-google-portlet"/>
+ <jbp:portlet name="Catalog"
applicationName="samples-shoppincart-portlet"/>
</jsp:attribute>
</jbp:layout1>
</portal:page>
Modified:
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/demo/demo1.jsp
===================================================================
---
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/demo/demo1.jsp 2008-03-02
17:52:11 UTC (rev 10164)
+++
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/demo/demo1.jsp 2008-03-02
19:37:21 UTC (rev 10165)
@@ -10,10 +10,10 @@
<portal:pageparam namespaceURI="urn:jboss:portal:simple:google"
localName="zipcode" value="80201"/>
<jbp:layout1>
<jsp:attribute name="leftcol">
- <jbp:portlet name="Cart"
applicationName="samples-cart-event-portlet" id="cart-portlet"/>
+ <jbp:portlet name="Cart"
applicationName="samples-shoppingcart-portlet" id="cart-portlet"/>
</jsp:attribute>
<jsp:attribute name="rightcol">
- <jbp:portlet name="Catalog"
applicationName="samples-cart-event-portlet"/>
+ <jbp:portlet name="Catalog"
applicationName="samples-shoppingcart-portlet"/>
</jsp:attribute>
</jbp:layout1>
</portal:page>
Modified:
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/demo/demo2.jsp
===================================================================
---
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/demo/demo2.jsp 2008-03-02
17:52:11 UTC (rev 10164)
+++
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/demo/demo2.jsp 2008-03-02
19:37:21 UTC (rev 10165)
@@ -10,13 +10,13 @@
<portal:pageparam namespaceURI="urn:jboss:portal:simple:google"
localName="zipcode" value="80201"/>
<jbp:layout1>
<jsp:attribute name="leftcol">
- <jbp:portlet name="RemoteControl"
applicationName="samples-remotecontrol-portlet"/>
+ <jbp:portlet name="RemoteControl"
applicationName="samples-remotecontroller-portlet"/>
</jsp:attribute>
<jsp:attribute name="rightcol">
- <jbp:portlet name="GoogleMap"
applicationName="samples-google-map-portlet"/>
- <jbp:portlet name="GoogleWeather"
applicationName="samples-google-weather-portlet"/>
+ <jbp:portlet name="GoogleMap"
applicationName="samples-google-portlet"/>
+ <jbp:portlet name="GoogleWeather"
applicationName="samples-google-portlet"/>
</jsp:attribute>
</jbp:layout1>
Modified:
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/demo/demo3.jsp
===================================================================
---
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/demo/demo3.jsp 2008-03-02
17:52:11 UTC (rev 10164)
+++
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/demo/demo3.jsp 2008-03-02
19:37:21 UTC (rev 10165)
@@ -15,9 +15,9 @@
</jsp:attribute>
<jsp:attribute name="rightcol">
- <jbp:portlet name="ExceptionPortlet"
applicationName="samples-basic"/>
- <jbp:portlet name="HeaderPortlet"
applicationName="samples-basic" id="header-portlet"/>
- <jbp:portlet name="FailDuringInitPortlet"
applicationName="samples-basic" id="header-portlet"/>
+ <jbp:portlet name="ExceptionPortlet"
applicationName="samples-basic-portlet"/>
+ <jbp:portlet name="HeaderPortlet"
applicationName="samples-basic-portlet" id="header-portlet"/>
+ <jbp:portlet name="FailDuringInitPortlet"
applicationName="samples-basic-portlet" id="header-portlet"/>
</jsp:attribute>
Modified:
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/demo/wikipedia.jsp
===================================================================
---
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/demo/wikipedia.jsp 2008-03-02
17:52:11 UTC (rev 10164)
+++
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/demo/wikipedia.jsp 2008-03-02
19:37:21 UTC (rev 10165)
@@ -10,7 +10,7 @@
<portal:pageparam namespaceURI="urn:jboss:portal:simple:google"
localName="zipcode" value="32080"/>
<div class="wiki-content full-width">
<div class="third-width float-right">
- <jbp:portlet name="GoogleMap"
applicationName="samples-google-map-portlet"/>
+ <jbp:portlet name="GoogleMap"
applicationName="samples-google-portlet"/>
</div>
<h2 class="title">St. Augustine, Florida</h2>
Added: modules/portlet/trunk/samples/src/assemble/samples-google-portlet.xml
===================================================================
--- modules/portlet/trunk/samples/src/assemble/samples-google-portlet.xml
(rev 0)
+++ modules/portlet/trunk/samples/src/assemble/samples-google-portlet.xml 2008-03-02
19:37:21 UTC (rev 10165)
@@ -0,0 +1,22 @@
+<assembly>
+ <id>samples-google-portlet</id>
+ <formats>
+ <format>war</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+
+ <fileSets>
+ <fileSet>
+ <directory>src/main/artifacts/google-portlet-war</directory>
+ <outputDirectory></outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>target/classes</directory>
+ <outputDirectory>WEB-INF/classes</outputDirectory>
+ <includes>
+ <include>org/jboss/portal/portlet/samples/google/**</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+
+</assembly>
\ No newline at end of file
Added: modules/portlet/trunk/samples/src/assemble/samples-remotecontroller-portlet.xml
===================================================================
--- modules/portlet/trunk/samples/src/assemble/samples-remotecontroller-portlet.xml
(rev 0)
+++
modules/portlet/trunk/samples/src/assemble/samples-remotecontroller-portlet.xml 2008-03-02
19:37:21 UTC (rev 10165)
@@ -0,0 +1,22 @@
+<assembly>
+ <id>samples-remotecontroller-portlet</id>
+ <formats>
+ <format>war</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+
+ <fileSets>
+ <fileSet>
+
<directory>src/main/artifacts/remotecontroller-portlet-war</directory>
+ <outputDirectory></outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>target/classes</directory>
+ <outputDirectory>WEB-INF/classes</outputDirectory>
+ <includes>
+
<include>org/jboss/portal/portlet/samples/remotecontroller/**</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+
+</assembly>
\ No newline at end of file
Added: modules/portlet/trunk/samples/src/assemble/samples-shoppingcart-portlet.xml
===================================================================
--- modules/portlet/trunk/samples/src/assemble/samples-shoppingcart-portlet.xml
(rev 0)
+++ modules/portlet/trunk/samples/src/assemble/samples-shoppingcart-portlet.xml 2008-03-02
19:37:21 UTC (rev 10165)
@@ -0,0 +1,22 @@
+<assembly>
+ <id>samples-shoppingcart-portlet</id>
+ <formats>
+ <format>war</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+
+ <fileSets>
+ <fileSet>
+ <directory>src/main/artifacts/shoppingcart-portlet-war</directory>
+ <outputDirectory></outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>target/classes</directory>
+ <outputDirectory>WEB-INF/classes</outputDirectory>
+ <includes>
+
<include>org/jboss/portal/portlet/samples/shoppingcart/**</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+
+</assembly>
\ No newline at end of file
Added:
modules/portlet/trunk/samples/src/main/artifacts/shoppingcart-portlet-war/WEB-INF/portlet.xml
===================================================================
---
modules/portlet/trunk/samples/src/main/artifacts/shoppingcart-portlet-war/WEB-INF/portlet.xml
(rev 0)
+++
modules/portlet/trunk/samples/src/main/artifacts/shoppingcart-portlet-war/WEB-INF/portlet.xml 2008-03-02
19:37:21 UTC (rev 10165)
@@ -0,0 +1,70 @@
+<?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>
+ <description>Catalog Portlet</description>
+ <portlet-name>Catalog</portlet-name>
+ <display-name>Catalog Portlet</display-name>
+
<portlet-class>org.jboss.portal.portlet.samples.shoppingcart.CatalogPortlet</portlet-class>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Catalog Portlet</title>
+ <keywords>sample,event,catalog</keywords>
+ </portlet-info>
+ <supported-publishing-event>
+ <qname
xmlns:jbp='urn:jboss:portal:samples:event'>jbp:CartEvent</qname>
+ </supported-publishing-event>
+ </portlet>
+
+ <portlet>
+ <description>Cart Portlet</description>
+ <portlet-name>Cart</portlet-name>
+ <display-name>Cart Portlet</display-name>
+
<portlet-class>org.jboss.portal.portlet.samples.shoppingcart.CartPortlet</portlet-class>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Cart Portlet</title>
+ <keywords>sample,event,cart</keywords>
+ </portlet-info>
+ <supported-processing-event>
+ <qname
xmlns:jbp='urn:jboss:portal:samples:event'>jbp:CartEvent</qname>
+ </supported-processing-event>
+ </portlet>
+
+ <event-definition>
+ <qname
xmlns:jbp='urn:jboss:portal:samples:event'>jbp:CartEvent</qname>
+
<value-type>org.jboss.portal.portlet.samples.shoppingcart.CartEvent</value-type>
+ </event-definition>
+</portlet-app>
+
Added:
modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/google/GoogleWeatherClippingPortlet.java
===================================================================
---
modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/google/GoogleWeatherClippingPortlet.java
(rev 0)
+++
modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/google/GoogleWeatherClippingPortlet.java 2008-03-02
19:37:21 UTC (rev 10165)
@@ -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.samples.google;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
+ * @version $Revision: 9912 $
+ */
+public class GoogleWeatherClippingPortlet extends GoogleClippingPortlet
+{
+ private final static String WEATHER_URL =
"http://www.google.com/search?q=weather+";
+ private static final String A_END = "</a>";
+
+ protected String getQueryString(String zip)
+ {
+ return WEATHER_URL + zip;
+ }
+
+ protected String postProcessHTML(String html)
+ {
+ int begIndex;
+ int endIndex;
+
+ // remove add to iGoogle link
+ begIndex = html.indexOf(A);
+ if (begIndex != -1)
+ {
+ endIndex = html.indexOf(A_END, begIndex);
+ html = html.substring(0, begIndex) + html.substring(endIndex + A_END.length());
+ }
+
+ return super.postProcessHTML(html);
+ }
+}