Author: taylor
Date: Sun Apr 19 20:17:34 2015
New Revision: 1674684
URL: http://svn.apache.org/r1674684
Log:
fixing Google Maps Portlet as it was broken. Yahoo GeoCode Service is no longer
available
Added:
portals/applications/gems/trunk/src/examples/
portals/applications/gems/trunk/src/examples/GoogleMaps.vm
Modified:
portals/applications/gems/trunk/NOTICE
portals/applications/gems/trunk/pom.xml
portals/applications/gems/trunk/src/main/java/org/apache/portals/gems/googlemaps/YahooGeocodeProxyServlet.java
Modified: portals/applications/gems/trunk/NOTICE
URL:
http://svn.apache.org/viewvc/portals/applications/gems/trunk/NOTICE?rev=1674684&r1=1674683&r2=1674684&view=diff
==============================================================================
--- portals/applications/gems/trunk/NOTICE (original)
+++ portals/applications/gems/trunk/NOTICE Sun Apr 19 20:17:34 2015
@@ -1,4 +1,3 @@
-
Apache Portals Applications Gems
Copyright 2008-2009 The Apache Software Foundation
Modified: portals/applications/gems/trunk/pom.xml
URL:
http://svn.apache.org/viewvc/portals/applications/gems/trunk/pom.xml?rev=1674684&r1=1674683&r2=1674684&view=diff
==============================================================================
--- portals/applications/gems/trunk/pom.xml (original)
+++ portals/applications/gems/trunk/pom.xml Sun Apr 19 20:17:34 2015
@@ -13,202 +13,204 @@
KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License. $Id$
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
+ <modelVersion>4.0.0</modelVersion>
- <!-- POM Identification -->
+ <!-- POM Identification -->
- <parent>
- <groupId>org.apache.portals</groupId>
- <artifactId>applications-pom</artifactId>
- <version>1.2</version>
- </parent>
-
- <groupId>org.apache.portals.applications</groupId>
- <artifactId>apa-gems</artifactId>
- <version>1.2-SNAPSHOT</version>
-
- <packaging>jar</packaging>
- <name>Apache Portals Applications Gems</name>
- <description>Reusable Portlets (Gems) for your Portlet
Applications.</description>
-
- <properties>
- <javax.servlet.version>3.0.1</javax.servlet.version>
- <jsp-api.version>2.2.1</jsp-api.version>
- <jstl.version>1.1.2</jstl.version>
- <portals.portlet2-api-spec.version>1.0</portals.portlet2-api-spec.version>
- <velocity.version>1.6.4</velocity.version>
-
<org.apache.portals.bridges.common.version>2.1-SNAPSHOT</org.apache.portals.bridges.common.version>
-
<org.apache.portals.bridges.velocity.version>2.1-SNAPSHOT</org.apache.portals.bridges.velocity.version>
- <commons-httpclient.version>3.0.1</commons-httpclient.version>
- <commons-lang.version>2.4</commons-lang.version>
- <slf4j.version>1.5.6</slf4j.version>
- <spring.version>3.2.9.RELEASE</spring.version>
- </properties>
-
- <!-- Dependencies -->
-
- <dependencies>
-
- <!-- Build Dependencies -->
- <dependency>
- <groupId>org.apache.portals</groupId>
- <artifactId>portlet-api_2.0_spec</artifactId>
- <version>${portals.portlet2-api-spec.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>javax.servlet-api</artifactId>
- <version>${javax.servlet.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet.jsp</groupId>
- <artifactId>javax.servlet.jsp-api</artifactId>
- <version>${jsp-api.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>jstl</artifactId>
- <version>${jstl.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.velocity</groupId>
- <artifactId>velocity</artifactId>
- <version>${velocity.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.portals.bridges</groupId>
- <artifactId>portals-bridges-common</artifactId>
- <version>${org.apache.portals.bridges.common.version}</version>
- <scope>provided</scope>
- <exclusions>
- <exclusion>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.portals.bridges</groupId>
- <artifactId>portals-bridges-velocity</artifactId>
- <version>${org.apache.portals.bridges.velocity.version}</version>
- <exclusions>
- <exclusion>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </exclusion>
- <exclusion>
- <groupId>velocity</groupId>
- <artifactId>velocity</artifactId>
- </exclusion>
- <exclusion>
- <groupId>velocity-tools</groupId>
- <artifactId>velocity-tools</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- <version>${commons-lang.version}</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>${slf4j.version}</version>
- </dependency>
- <dependency>
- <groupId>commons-httpclient</groupId>
- <artifactId>commons-httpclient</artifactId>
- <version>${commons-httpclient.version}</version>
- <exclusions>
- <exclusion>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </exclusion>
- <exclusion>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-beans</artifactId>
- <version>${spring.version}</version>
- <exclusions>
- <exclusion>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-webmvc-portlet</artifactId>
- <version>${spring.version}</version>
- <exclusions>
- <exclusion>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- </dependencies>
-
- <scm>
-
<connection>scm:svn:http://svn.apache.org/repos/asf/portals/applications/gems/trunk/</connection>
-
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/portals/applications/gems/trunk/</developerConnection>
-
<url>http://svn.apache.org/viewcvs.cgi/portals/applications/gems/trunk/</url>
- </scm>
-
- <build>
- <resources>
- <resource>
- <directory>${basedir}</directory>
- <targetPath>META-INF</targetPath>
- <includes>
- <include>MIT-LICENSE</include>
- </includes>
- </resource>
- <resource>
- <directory>${basedir}/src/main/resources</directory>
- <includes>
- <include>**/*.tld</include>
- <include>**/*.properties</include>
- <include>**/*.vm</include>
- </includes>
- </resource>
- </resources>
-
- </build>
-
- <profiles>
- <profile>
- <id>rat</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.rat</groupId>
- <artifactId>apache-rat-plugin</artifactId>
- <configuration>
- <excludes combine.children="append">
- <!-- These files are based on MIT license -->
- <exclude>MIT-LICENSE</exclude>
-
<exclude>src/main/java/org/apache/portals/gems/flash/SWFHeader.java</exclude>
-
<exclude>src/main/java/org/apache/portals/gems/flash/PackedBitObj.java</exclude>
- </excludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
+ <parent>
+ <groupId>org.apache.portals</groupId>
+ <artifactId>applications-pom</artifactId>
+ <version>1.3</version>
+ </parent>
+
+ <groupId>org.apache.portals.applications</groupId>
+ <artifactId>apa-gems</artifactId>
+ <version>1.2-SNAPSHOT</version>
+
+ <packaging>jar</packaging>
+ <name>Apache Portals Applications Gems</name>
+ <description>Reusable Portlets (Gems) for your Portlet
Applications.</description>
+
+ <properties>
+ <javax.servlet.jstl.version>1.1.2</javax.servlet.jstl.version>
+ <javax.servlet.version>3.0.1</javax.servlet.version>
+ <javax.servlet.jsp.version>2.2.1</javax.servlet.jsp.version>
+
<portals.portlet2-api-spec.version>1.0</portals.portlet2-api-spec.version>
+ <velocity.version>1.6.4</velocity.version>
+
<org.apache.portals.bridges.common.version>2.1</org.apache.portals.bridges.common.version>
+
<org.apache.portals.bridges.velocity.version>2.1-SNAPSHOT</org.apache.portals.bridges.velocity.version>
+ <commons-httpclient.version>3.0.1</commons-httpclient.version>
+ <commons-lang.version>2.6</commons-lang.version>
+ <slf4j.version>1.5.6</slf4j.version>
+ <spring.version>3.2.9.RELEASE</spring.version>
+ </properties>
+
+ <!-- Dependencies -->
+
+ <dependencies>
+
+ <!-- Build Dependencies -->
+ <dependency>
+ <groupId>org.apache.portals</groupId>
+ <artifactId>portlet-api_2.0_spec</artifactId>
+ <version>${portals.portlet2-api-spec.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>javax.servlet-api</artifactId>
+ <version>${javax.servlet.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>javax.servlet.jsp-api</artifactId>
+ <version>${javax.servlet.jsp.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ <version>${javax.servlet.jstl.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.velocity</groupId>
+ <artifactId>velocity</artifactId>
+ <version>${velocity.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.portals.bridges</groupId>
+ <artifactId>portals-bridges-common</artifactId>
+ <version>${org.apache.portals.bridges.common.version}</version>
+ <scope>provided</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.portals.bridges</groupId>
+ <artifactId>portals-bridges-velocity</artifactId>
+ <version>${org.apache.portals.bridges.velocity.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>velocity</groupId>
+ <artifactId>velocity</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>velocity-tools</groupId>
+ <artifactId>velocity-tools</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>${commons-lang.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>${slf4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ <version>${commons-httpclient.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ <version>${spring.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-webmvc-portlet</artifactId>
+ <version>${spring.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+
+ <scm>
+
<connection>scm:svn:http://svn.apache.org/repos/asf/portals/applications/gems/trunk/</connection>
+
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/portals/applications/gems/trunk/
+ </developerConnection>
+
<url>http://svn.apache.org/viewcvs.cgi/portals/applications/gems/trunk/</url>
+ </scm>
+
+ <build>
+ <resources>
+ <resource>
+ <directory>${basedir}</directory>
+ <targetPath>META-INF</targetPath>
+ <includes>
+ <include>MIT-LICENSE</include>
+ </includes>
+ </resource>
+ <resource>
+ <directory>${basedir}/src/main/resources</directory>
+ <includes>
+ <include>**/*.tld</include>
+ <include>**/*.properties</include>
+ <include>**/*.vm</include>
+ </includes>
+ </resource>
+ </resources>
+
+ </build>
+
+ <profiles>
+ <profile>
+ <id>rat</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.rat</groupId>
+ <artifactId>apache-rat-plugin</artifactId>
+ <configuration>
+ <excludes combine.children="append">
+ <!-- These files are based on MIT license -->
+ <exclude>MIT-LICENSE</exclude>
+
<exclude>src/main/java/org/apache/portals/gems/flash/SWFHeader.java</exclude>
+
<exclude>src/main/java/org/apache/portals/gems/flash/PackedBitObj.java</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
Added: portals/applications/gems/trunk/src/examples/GoogleMaps.vm
URL:
http://svn.apache.org/viewvc/portals/applications/gems/trunk/src/examples/GoogleMaps.vm?rev=1674684&view=auto
==============================================================================
--- portals/applications/gems/trunk/src/examples/GoogleMaps.vm (added)
+++ portals/applications/gems/trunk/src/examples/GoogleMaps.vm Sun Apr 19
20:17:34 2015
@@ -0,0 +1,48 @@
+#*
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*#
+<script language="JavaScript" type="text/javascript">
+var ${renderResponse.namespace}loc =
escape("$!renderRequest.getParameter('address')");
+if (${renderResponse.namespace}loc == null)
+{
+ ${renderResponse.namespace}loc =
escape("$renderRequest.getPreferences().getValue('Location','')");
+}
+else
+{
+ ${renderResponse.namespace}loc =
${renderResponse.namespace}loc.replace(/^\s*/, "").replace(/\s*$/, "");
+ if (${renderResponse.namespace}loc == "")
+ {
+ ${renderResponse.namespace}loc =
escape("$renderRequest.getPreferences().getValue('Location','')");
+ }
+}
+
+function ${renderResponse.namespace}mapsLoaded() {
+ var appid = escape("$renderRequest.getPreferences().getValue('APIKey','')");
+ var address = unescape(${renderResponse.namespace}loc);
+
+ var geocoder = new google.maps.Geocoder();
+ geocoder.geocode( { 'address': address}, function(results, status) {
+ if (status == google.maps.GeocoderStatus.OK) {
+ var map = new
google.maps.Map(document.getElementById("${renderResponse.namespace}map"),
{zoom: 13, center: results[0].geometry.location});
+ }
+ });
+}
+function ${renderResponse.namespace}mapit() {
+ google.load("maps", "3", {"callback" :
${renderResponse.namespace}mapsLoaded});
+}
+</script>
+
+<div id="${renderResponse.namespace}map" style="width: 100%; height:
$renderRequest.getPreferences().getValue('MapHeight','400px')"></div>
Modified:
portals/applications/gems/trunk/src/main/java/org/apache/portals/gems/googlemaps/YahooGeocodeProxyServlet.java
URL:
http://svn.apache.org/viewvc/portals/applications/gems/trunk/src/main/java/org/apache/portals/gems/googlemaps/YahooGeocodeProxyServlet.java?rev=1674684&r1=1674683&r2=1674684&view=diff
==============================================================================
---
portals/applications/gems/trunk/src/main/java/org/apache/portals/gems/googlemaps/YahooGeocodeProxyServlet.java
(original)
+++
portals/applications/gems/trunk/src/main/java/org/apache/portals/gems/googlemaps/YahooGeocodeProxyServlet.java
Sun Apr 19 20:17:34 2015
@@ -16,22 +16,20 @@
*/
package org.apache.portals.gems.googlemaps;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.net.URLEncoder;
-
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.params.HttpMethodParams;
-import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.httpclient.DefaultHttpMethodRetryHandler;
-import org.apache.commons.httpclient.HttpStatus;
+import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpException;
-
+import org.apache.commons.httpclient.HttpStatus;
+import org.apache.commons.httpclient.methods.GetMethod;
+import org.apache.commons.httpclient.params.HttpMethodParams;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.net.URLEncoder;
/**
* YahooGeocodeProxyServlet
@@ -41,6 +39,9 @@ import javax.servlet.http.HttpServletRes
* @version $Id: YahooGeocodeProxyServlet.java 000001 2006-04-25 00:57:00Z jdp
$
*/
+/**
+ * @Deprecated this service is no longer made available
+ */
public class YahooGeocodeProxyServlet extends HttpServlet
{
/**
@@ -88,4 +89,4 @@ public class YahooGeocodeProxyServlet ex
out.close();
}
}
-
+