From 048c65195423e7a1269337aa5518d58fa28eea28 Mon Sep 17 00:00:00 2001 From: Steffen Schaefer Date: Thu, 2 Aug 2018 14:28:52 +0200 Subject: [PATCH] Bug 4202: Imported ajaxloader as source to prevent infinit build loop in Eclipse --- .../.classpath | 1 - .../META-INF/MANIFEST.MF | 8 +- .../build.properties | 3 +- .../gwt-ajaxloader.jar | Bin 25151 -> 0 bytes java/com.google.gwt.ajaxloader/.classpath | 8 + java/com.google.gwt.ajaxloader/.gitignore | 1 + java/com.google.gwt.ajaxloader/.project | 28 ++ .../.settings/org.eclipse.jdt.core.prefs | 81 ++++++ .../.settings/org.eclipse.pde.core.prefs | 4 + .../META-INF/MANIFEST.MF | 12 + .../build.properties | 4 + java/com.google.gwt.ajaxloader/pom.xml | 33 +++ .../google/gwt/ajaxloader/AjaxLoader.gwt.xml | 20 ++ .../ajaxloader/client/AjaxKeyConstants.java | 32 +++ .../ajaxloader/client/AjaxKeyRepository.java | 100 +++++++ .../gwt/ajaxloader/client/AjaxLoader.java | 269 ++++++++++++++++++ .../gwt/ajaxloader/client/ArrayHelper.java | 170 +++++++++++ .../gwt/ajaxloader/client/ClientLocation.java | 74 +++++ .../ajaxloader/client/ExceptionHelper.java | 48 ++++ .../google/gwt/ajaxloader/client/JsDate.java | 112 ++++++++ .../gwt/ajaxloader/client/Properties.java | 259 +++++++++++++++++ 21 files changed, 1259 insertions(+), 8 deletions(-) delete mode 100644 java/com.github.branflake2267.gwt-maps-api/gwt-ajaxloader.jar create mode 100644 java/com.google.gwt.ajaxloader/.classpath create mode 100644 java/com.google.gwt.ajaxloader/.gitignore create mode 100644 java/com.google.gwt.ajaxloader/.project create mode 100644 java/com.google.gwt.ajaxloader/.settings/org.eclipse.jdt.core.prefs create mode 100644 java/com.google.gwt.ajaxloader/.settings/org.eclipse.pde.core.prefs create mode 100644 java/com.google.gwt.ajaxloader/META-INF/MANIFEST.MF create mode 100644 java/com.google.gwt.ajaxloader/build.properties create mode 100644 java/com.google.gwt.ajaxloader/pom.xml create mode 100644 java/com.google.gwt.ajaxloader/src/com/google/gwt/ajaxloader/AjaxLoader.gwt.xml create mode 100644 java/com.google.gwt.ajaxloader/src/com/google/gwt/ajaxloader/client/AjaxKeyConstants.java create mode 100644 java/com.google.gwt.ajaxloader/src/com/google/gwt/ajaxloader/client/AjaxKeyRepository.java create mode 100644 java/com.google.gwt.ajaxloader/src/com/google/gwt/ajaxloader/client/AjaxLoader.java create mode 100644 java/com.google.gwt.ajaxloader/src/com/google/gwt/ajaxloader/client/ArrayHelper.java create mode 100644 java/com.google.gwt.ajaxloader/src/com/google/gwt/ajaxloader/client/ClientLocation.java create mode 100644 java/com.google.gwt.ajaxloader/src/com/google/gwt/ajaxloader/client/ExceptionHelper.java create mode 100644 java/com.google.gwt.ajaxloader/src/com/google/gwt/ajaxloader/client/JsDate.java create mode 100644 java/com.google.gwt.ajaxloader/src/com/google/gwt/ajaxloader/client/Properties.java diff --git a/java/com.github.branflake2267.gwt-maps-api/.classpath b/java/com.github.branflake2267.gwt-maps-api/.classpath index a7434b5449e..2eaff8591bb 100644 --- a/java/com.github.branflake2267.gwt-maps-api/.classpath +++ b/java/com.github.branflake2267.gwt-maps-api/.classpath @@ -4,6 +4,5 @@ - diff --git a/java/com.github.branflake2267.gwt-maps-api/META-INF/MANIFEST.MF b/java/com.github.branflake2267.gwt-maps-api/META-INF/MANIFEST.MF index 4611ad3a5e0..460b5b28398 100644 --- a/java/com.github.branflake2267.gwt-maps-api/META-INF/MANIFEST.MF +++ b/java/com.github.branflake2267.gwt-maps-api/META-INF/MANIFEST.MF @@ -7,12 +7,10 @@ Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Bundle-ActivationPolicy: lazy Require-Bundle: com.google.gwt.user;bundle-version="2.8.2";resolution:=optional, com.google.gwt.dev;bundle-version="2.8.2";resolution:=optional, - com.google.gwt.servlet;bundle-version="2.8.2" + com.google.gwt.ajaxloader;bundle-version="1.1.0";visibility:=reexport Automatic-Module-Name: com.github.branflake2267.gwt-maps-api -Bundle-ClassPath: gwt-ajaxloader.jar, - . -Export-Package: com.google.gwt.ajaxloader.client, - com.google.gwt.maps.client, +Bundle-ClassPath: . +Export-Package: com.google.gwt.maps.client, com.google.gwt.maps.client.adsense, com.google.gwt.maps.client.base, com.google.gwt.maps.client.controls, diff --git a/java/com.github.branflake2267.gwt-maps-api/build.properties b/java/com.github.branflake2267.gwt-maps-api/build.properties index 6dd0aef273b..34d2e4d2dad 100644 --- a/java/com.github.branflake2267.gwt-maps-api/build.properties +++ b/java/com.github.branflake2267.gwt-maps-api/build.properties @@ -1,5 +1,4 @@ source.. = src/ output.. = bin/ bin.includes = META-INF/,\ - .,\ - gwt-ajaxloader.jar + . diff --git a/java/com.github.branflake2267.gwt-maps-api/gwt-ajaxloader.jar b/java/com.github.branflake2267.gwt-maps-api/gwt-ajaxloader.jar deleted file mode 100644 index 4e48575238a95f45fdb04b9a3b28828fbf069eb3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 25151 zcmbTe1#D!?mMm&!W`;I1Gc%XjZZox+nVFdx+RWHyyUonZ%*>4aeeS(~&dfZ$(VbUP zs;X2gbEmW;BV$LdRSGhoU@$;HKu|!QftmsV9u;$1U*Al=8roNr6H^hQlLCk{$O!?Y z#Kn|V=;g%kUa$tE7)+*`9E zl~84rl%2Av{ZHv0;G7cSXwg{%WbV+sSP~;|BWWUKlpG_`dG8V)SlwIQT7eY)H5niv zudm5`UH?B`&_G~+Pv&zJ=s$)2HShn3`}zR()r@Sd8U7yZzem9SE5g*)*3`=Qe+WeU zuYsnnPX9wN&i@%~U}4~9Woz)m*x^6=K>^|WmhdW!AZWb<0|A|WO_uh5>?ia!gzP_t zp#Qo&y_>bwfU=zJ8Y5iCle!(hwcs}jK4-1fUYYs{vmGG&U-=RP#rW_|g;KY8f8LY; zN~9|Wgp`c|!}o+gS3~Ia~0e zH~TP)Mq!9ku-`a-L&oPdq=}F?vTn0O#UEmSJjMfit(^qOum?2r6EBAb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bg+WeUn9mschGYP|S6 zt}v&fXKv3m-|B)qiES-i&zavbXINaT56c=M0$VHdi|(9?)h+wJLO@8@Cz z^pw~m5c|H!yxuB#K5Eb6sp))J_Bb4; zzuF_%$w<^spu|tWVknpTnisgP^ZYQB#9IL79we192~H^3vEXnl18il(ef<+9S+13k zv|k3eG|T`W5bu}Rsn2}8>61Kiyl%hUwXjhc{AzZ)sQ2yqyq2yrj6bP7b5z)(XC_g{h{)o$M-?X;`Xy!n<=Q-zEar z792PSPF7Hr-k`m9JV z7`RjMydcd5f9l;PwkF%&_)`sOs&^iaag0pdPC(Zlm5}Aqh3xGr8ETf$@TI|3S*QYb z*cx=6HK;w-N+<@{lzYVdrJ^Q@=a$rcS?`FleZ_As(-rmZh`jjPD*h$rd|12mIj`CI zDJKMVomBnUUfP64fMjJaIUcjw>3%rW^8$GWAV>@OSbHCNQXtR2WqQ?hlvPZGwA2j@ zw>1Q|`Zd)nhW|sQcV0tSctpEjqx^NRu9mvsXrG3_yvE=VuFcWTj~_c(hMYz6dZP3< zS@LKaV()tCfNon7(9j@d@XldVp8xME!AJ}Kbrgo7Uj8=blx8p*;cRK&pX14}HvWn` zjqp?G_ZKJ=pg{PRE!Jddn8oErF382G=lqNIV*gGK&1_*6myZN%A9!M~6S!yNygIB21iU&6s? zDWpu)7%9H?o>)Okd6FcJJd$0;qmf63&YWULsKA-64if7ah4O9eLH9dewp83_&YOvx{C+X3(V#XG)Iiw{|Coe zZeZ5F(G<|@zd>=j5{_v-W|b5T{ZaAvq0cfJvnYW^exv#u$mqxGUnPpurlW30n0bFR z!E3cYBRHc9fJug#wMCQpYyJ`0KW{~6WgpP+7xn)P{;a9M3?b3z#WzpIaOi+iPZJmU T4U2`vg#5up#)6zCsK5RX*J-R_ diff --git a/java/com.google.gwt.ajaxloader/.classpath b/java/com.google.gwt.ajaxloader/.classpath new file mode 100644 index 00000000000..2eaff8591bb --- /dev/null +++ b/java/com.google.gwt.ajaxloader/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/java/com.google.gwt.ajaxloader/.gitignore b/java/com.google.gwt.ajaxloader/.gitignore new file mode 100644 index 00000000000..092357e47d3 --- /dev/null +++ b/java/com.google.gwt.ajaxloader/.gitignore @@ -0,0 +1 @@ +bin diff --git a/java/com.google.gwt.ajaxloader/.project b/java/com.google.gwt.ajaxloader/.project new file mode 100644 index 00000000000..29bd272350b --- /dev/null +++ b/java/com.google.gwt.ajaxloader/.project @@ -0,0 +1,28 @@ + + + com.google.gwt.ajaxloader + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/java/com.google.gwt.ajaxloader/.settings/org.eclipse.jdt.core.prefs b/java/com.google.gwt.ajaxloader/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000000..92d7e9f4082 --- /dev/null +++ b/java/com.google.gwt.ajaxloader/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,81 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore +org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning +org.eclipse.jdt.core.compiler.problem.deadCode=warning +org.eclipse.jdt.core.compiler.problem.deprecation=warning +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore +org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning +org.eclipse.jdt.core.compiler.problem.forbiddenReference=error +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning +org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore +org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore +org.eclipse.jdt.core.compiler.problem.nullReference=warning +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore +org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore +org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=ignore +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.unusedImport=ignore +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=ignore +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/java/com.google.gwt.ajaxloader/.settings/org.eclipse.pde.core.prefs b/java/com.google.gwt.ajaxloader/.settings/org.eclipse.pde.core.prefs new file mode 100644 index 00000000000..3a92893b9b4 --- /dev/null +++ b/java/com.google.gwt.ajaxloader/.settings/org.eclipse.pde.core.prefs @@ -0,0 +1,4 @@ +#Tue Feb 28 12:33:59 CET 2012 +eclipse.preferences.version=1 +pluginProject.extensions=false +resolve.requirebundle=false diff --git a/java/com.google.gwt.ajaxloader/META-INF/MANIFEST.MF b/java/com.google.gwt.ajaxloader/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..42310e3be42 --- /dev/null +++ b/java/com.google.gwt.ajaxloader/META-INF/MANIFEST.MF @@ -0,0 +1,12 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Google Maps API +Bundle-SymbolicName: com.google.gwt.ajaxloader +Bundle-Version: 1.1.0.qualifier +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Bundle-ActivationPolicy: lazy +Require-Bundle: com.google.gwt.user;bundle-version="2.8.2";resolution:=optional, + com.google.gwt.dev;bundle-version="2.8.2";resolution:=optional +Automatic-Module-Name: com.google.gwt.ajaxloader +Bundle-ClassPath: . +Export-Package: com.google.gwt.ajaxloader.client diff --git a/java/com.google.gwt.ajaxloader/build.properties b/java/com.google.gwt.ajaxloader/build.properties new file mode 100644 index 00000000000..34d2e4d2dad --- /dev/null +++ b/java/com.google.gwt.ajaxloader/build.properties @@ -0,0 +1,4 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + . diff --git a/java/com.google.gwt.ajaxloader/pom.xml b/java/com.google.gwt.ajaxloader/pom.xml new file mode 100644 index 00000000000..0af30769e1a --- /dev/null +++ b/java/com.google.gwt.ajaxloader/pom.xml @@ -0,0 +1,33 @@ + + + 4.0.0 + + root + com.sap.sailing + 1.0.0-SNAPSHOT + + com.google.gwt.ajaxloader + com.google.gwt + 1.1.0-SHAPSHOT + eclipse-plugin + + + + + org.eclipse.tycho + tycho-source-plugin + ${tycho-version} + + + plugin-source + generate-sources + + plugin-source + + + + + + + diff --git a/java/com.google.gwt.ajaxloader/src/com/google/gwt/ajaxloader/AjaxLoader.gwt.xml b/java/com.google.gwt.ajaxloader/src/com/google/gwt/ajaxloader/AjaxLoader.gwt.xml new file mode 100644 index 00000000000..334f7934d10 --- /dev/null +++ b/java/com.google.gwt.ajaxloader/src/com/google/gwt/ajaxloader/AjaxLoader.gwt.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/java/com.google.gwt.ajaxloader/src/com/google/gwt/ajaxloader/client/AjaxKeyConstants.java b/java/com.google.gwt.ajaxloader/src/com/google/gwt/ajaxloader/client/AjaxKeyConstants.java new file mode 100644 index 00000000000..3426eabe7cf --- /dev/null +++ b/java/com.google.gwt.ajaxloader/src/com/google/gwt/ajaxloader/client/AjaxKeyConstants.java @@ -0,0 +1,32 @@ +/* + * Copyright 2009 Google Inc. + * + * Licensed 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. + */ +package com.google.gwt.ajaxloader.client; + +import com.google.gwt.i18n.client.Constants; + +import java.util.Map; + +/** + * For retrieving host:port/key pairs from a file. + */ +public interface AjaxKeyConstants extends Constants { + @DefaultStringMapValue({ + "localhost:8080", + "ABQIAAAAG8LzhtshQCjpSshU_uJjmxTwM0brOpm-All5BF6PoaKBxRWWERTZER2lJ4GnsG8nvhKLOQ20degaEQ", + "127.0.0.1:8080", + "ABQIAAAAG8LzhtshQCjpSshU_uJjmxTBfUk9TZrBRaIteybtnU2KziHEpRQvhPNTjo7DMczjrRD3yBPRJ_BSQQ"}) + Map ajaxKeys(); +} diff --git a/java/com.google.gwt.ajaxloader/src/com/google/gwt/ajaxloader/client/AjaxKeyRepository.java b/java/com.google.gwt.ajaxloader/src/com/google/gwt/ajaxloader/client/AjaxKeyRepository.java new file mode 100644 index 00000000000..d913672a338 --- /dev/null +++ b/java/com.google.gwt.ajaxloader/src/com/google/gwt/ajaxloader/client/AjaxKeyRepository.java @@ -0,0 +1,100 @@ +/* + * Copyright 2009 Google Inc. + * + * Licensed 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. + */ + +package com.google.gwt.ajaxloader.client; + +import com.google.gwt.core.client.GWT; +import com.google.gwt.user.client.Window.Location; + +/** + * Stores keys for different locations (hostname:port). The AjaxLoader class can + * lookup a key from this repository if not otherwise specified. + * + * This repository can be helpful for web sites that respond to requests for + * multiple domains (or by name and IP address), or to run your application on + * multiple servers (say development, test, and production) and store the set of + * valid keys compiled into the application. + * + * You can specify these keys in multiple ways: + * + * - You can create a + * com/google/gwt/ajaxloader/client/AjaxKeyConstants.properties file with the + * following format: + * + * localhost\:8080 = ABQIAAAAG8LzhtshQCjpSshU_uJjm\ + * xTwM0brOpm-All5BF6PoaKBxRWWERTZER2lJ4GnsG8nvhKLOQ20degaEQ + * + * 127.0.0.1\:8080 = ABQIAAAAG8LzhtshQCjpSshU_uJjm\ + * xTBfUk9TZrBRaIteybtnU2KziHEpRQvhPNTjo7DMczjrRD3yBPRJ_BSQQ + * + * example.com\:8080 = ABQIAAAAG8LzhU_uJjmhtshQCjpSs\ + * 3yBPRJ_BSQQxTBfUk9TZrBRaIteybtnU2KziHEpRQvhPNTjo7DMczjrRD + * + * ajaxKeys = localhost\:8080, 127.0.0.1\:8080 example.com\:8080 + * + * - You can specify an instance of AjaxKeyConstants to the + * {@link #setKeys(AjaxKeyConstants)} method. + * + * - You can load keys at runtime with the {@link #putKey(String, String)} + * method. + */ +public class AjaxKeyRepository { + + // Deferred bound instance of Constants class used to populate keys + private static AjaxKeyConstants keys = GWT.create(AjaxKeyConstants.class); + + /** + * Retrieve an Ajax API key given the current location. + */ + public static String getKey() { + return keys.ajaxKeys().get(Location.getHost()); + } + + /** + * Retrieve an Ajax API Key given the hostname:port value. + * + * @param location hostname:port string + */ + public static String getKey(String location) { + return keys.ajaxKeys().get(location); + } + + /** + * Associates a a hostname:port with an Ajax API key. + * + * @param location hostname:port value + * @param ajaxApiKey the key registered for the above hostname:port combo + */ + public static void putKey(String location, String ajaxApiKey) { + keys.ajaxKeys().put(location, ajaxApiKey); + } + + /** + * Override the default key properties with your own custom subclass. Note + * that calling this method will invalidate any keys set with putKey or any + * defaults compiled into the library. + * + * @param keys an extension of the AjaxKeyConstants interface to override the + * defaults. + */ + public static void setKeys(AjaxKeyConstants keys) { + AjaxKeyRepository.keys = keys; + } + + private AjaxKeyRepository() { + // do not instantiate this class + } +} diff --git a/java/com.google.gwt.ajaxloader/src/com/google/gwt/ajaxloader/client/AjaxLoader.java b/java/com.google.gwt.ajaxloader/src/com/google/gwt/ajaxloader/client/AjaxLoader.java new file mode 100644 index 00000000000..90966902da4 --- /dev/null +++ b/java/com.google.gwt.ajaxloader/src/com/google/gwt/ajaxloader/client/AjaxLoader.java @@ -0,0 +1,269 @@ +/* + * Copyright 2008 Google Inc. + * + * Licensed 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. + */ +package com.google.gwt.ajaxloader.client; + +import com.google.gwt.core.client.JavaScriptObject; +import com.google.gwt.core.client.JsArrayString; +import com.google.gwt.dom.client.Document; +import com.google.gwt.dom.client.ScriptElement; +import com.google.gwt.user.client.Window; + +import java.util.Vector; + +/** + * A wrapper for the google Ajax API loader. + * + * http://code.google.com/apis/ajax/documentation/ + */ +public class AjaxLoader { + /** + * An object to pass as the third parameter to load() call. + */ + public static class AjaxLoaderOptions extends JavaScriptObject { + public static AjaxLoaderOptions newInstance() { + return JavaScriptObject.createObject().cast(); + } + + protected AjaxLoaderOptions() { + // A protected constructor is required for JavaScriptObject overlays. + } + + public final native void setBaseDomain(String baseDomain) /*-{ + this.base_domain = baseDomain; + }-*/; + + public final native void setLanguage(String language) /*-{ + // TODO(zundel): try to incorporate w/ GWT locale? + this.language = language; + }-*/; + + // TODO(zundel): the docs are a little confusing on this one. + public final native void setNoCss(boolean value) /*-{ + this.nocss = value; + }-*/; + + public final native void setOtherParms(String otherParams) /*-{ + this.other_params = otherParams; + }-*/; + + public final native void setPackages(JsArrayString packages) /*-{ + this.packages = packages; + }-*/; + + public final void setPackages(String... packages) { + setPackages(ArrayHelper.toJsArrayString(packages)); + } + + private native void setCallback(Runnable onLoad) /*-{ + this.callback = function() { + @com.google.gwt.ajaxloader.client.ExceptionHelper::runProtected(Ljava/lang/Runnable;)(onLoad); + } + }-*/; + } + + // NativeCreateCallback already ran, or someone injected the API outside of + // this program. + static boolean alreadyInjected = false; + + // Set to true if the init(key) method has been called. + static boolean initialized = false; + + // True if the JavaScript __gwt_AjaxLoader_onLoad callback has already run. + // This function is registered on the window in nativeCreateCallback() + static boolean loaded = false; + + static Vector queuedApiLoads = new Vector(); + + public static ClientLocation getClientLocation() { + if (!injectJsapi(null, null)) { + return null; + } + return nativeGetClientLocation(); + } + + /** + * Initialize the API without specifying a key. + */ + public static void init() { + init(null); + } + + /** + * Initialize the API with a supplied key value. See + * http://code.google.com/apis/ajaxsearch/signup.html + * + * @param apiKey API key value. + */ + public static void init(String apiKey) { + init(apiKey, null); + } + + /** + * Initialize the API with a supplied key value and custom hostname. Most + * programmers should use {@link AjaxLoader#init(String)} instead, as it + * covers almost all cases of using AjaxLoader API. + * + * See http://code.google.com/apis/ajaxsearch/signup.html + * + * @param apiKey API key value. + * @param hostname Custom hostname (e.g. "www.google.com"). + */ + public static void init(String apiKey, String hostname) { + if (initialized == true) { + return; + } + + if (apiKey == null) { + // No key was specified. Use the location in the page to lookup a key from + // the Key repository + apiKey = AjaxKeyRepository.getKey(); + } + + boolean alreadyLoaded = injectJsapi(apiKey, hostname); + + // In IE, the above script can execute immediately if its already in the + // cache, so don't touch the loaded variable unless we bypassed loading the + // script completely + if (alreadyLoaded) { + loaded = true; + } + initialized = true; + } + + /** + * Launches an API load request. + * + * @param api The name of the API to load + * @param version The API version to load + * @param onLoad A callback that will be invoked when the API is finished + * loaded. Do not make any calls into the API being loaded until this + * call returns. + * @param settings An object containing additional settings. + */ + public static void loadApi(final String api, final String version, + Runnable onLoad, AjaxLoaderOptions settings) { + + // Initialize the API if it hasn't already been initialized. + init(); + + // Set the onLoad callback into the + assert (onLoad != null); + if (settings == null) { + settings = AjaxLoaderOptions.newInstance(); + } + settings.setCallback(onLoad); + final AjaxLoaderOptions copyOfSettings = settings; + + // Define a Runnable that will run the actual load. + Runnable apiLoad = new Runnable() { + + public void run() { + nativeLoadApi(api, version, copyOfSettings); + } + }; + + if (loaded) { + // jsapi is finished loading, start the individual API load now. + apiLoad.run(); + } else { + // Defer the load until jsapi is finished. + queuedApiLoads.add(apiLoad); + } + } + + private static String getProtocol() { + if (Window.Location.getProtocol().equals("https:")) { + return "https:"; + } + return "http:"; + } + + /** + * Adds a script element to the DOM that loads the Ajax API Loader main script + * "jsapi". + * + * @param apiKey Optional API key value (pass null to omit the key). See + * http://code.google.com/apis/ajaxsearch/signup.html + * @returns true if the API has already been loaded. Otherwise, + * returns false, meaning that the application should + * wait for a callback. + */ + private static boolean injectJsapi(String apiKey, String hostname) { + if (alreadyInjected) { + return true; + } + boolean alreadyLoaded = nativeCreateCallback(); + alreadyInjected = true; + if (alreadyLoaded) { + return true; + } + Document doc = Document.get(); + String key = (apiKey == null) ? "" : ("key=" + apiKey + "&"); + hostname = (hostname == null) ? "www.google.com" : hostname; + String src = getProtocol() + "//" + hostname + "/jsapi?" + key + + "callback=__gwt_AjaxLoader_onLoad"; + ScriptElement script = doc.createScriptElement(); + script.setSrc(src); + script.setType("text/javascript"); + doc.getBody().appendChild(script); + return false; + } + + /** + * Creates a function to be registered for a callback after jsapi loads. + */ + private static native boolean nativeCreateCallback() /*-{ + if ($wnd['google'] && $wnd.google['load']) { + // The API has already been loaded. + return true; + } + $wnd.__gwt_AjaxLoader_onLoad = function() { + @com.google.gwt.ajaxloader.client.AjaxLoader::onLoadCallback()(); + } + // The application must wait for a callback. + return false; + }-*/; + + private static final native ClientLocation nativeGetClientLocation() /*-{ + return $wnd.google.loader.ClientLocation; + }-*/; + + /** + * Wrapper for AjaxLoader google.load() native method. + */ + private static native void nativeLoadApi(String api, String version, + JavaScriptObject settings) /*-{ + $wnd.google.load(api, version, settings); + }-*/; + + /** + * Called back when the jsapi is finished loaded. It must kick of any API + * loads that have been queued while waiting on jsapi to finish loading. + */ + @SuppressWarnings("unused") + private static void onLoadCallback() { + loaded = true; + + for (Runnable r : queuedApiLoads) { + r.run(); + } + queuedApiLoads.clear(); + } + + private AjaxLoader() { + // This class only contains static methods and should not be instantiated. + } +} diff --git a/java/com.google.gwt.ajaxloader/src/com/google/gwt/ajaxloader/client/ArrayHelper.java b/java/com.google.gwt.ajaxloader/src/com/google/gwt/ajaxloader/client/ArrayHelper.java new file mode 100644 index 00000000000..c0d4cbf1a7f --- /dev/null +++ b/java/com.google.gwt.ajaxloader/src/com/google/gwt/ajaxloader/client/ArrayHelper.java @@ -0,0 +1,170 @@ +/* + * Copyright 2008 Google Inc. + * + * Licensed 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. + */ +package com.google.gwt.ajaxloader.client; + +import com.google.gwt.core.client.JavaScriptObject; +import com.google.gwt.core.client.JsArray; +import com.google.gwt.core.client.JsArrayBoolean; +import com.google.gwt.core.client.JsArrayInteger; +import com.google.gwt.core.client.JsArrayNumber; +import com.google.gwt.core.client.JsArrayString; + +/** + * Convenience methods for working with GWT JsArrays. + */ +public class ArrayHelper { + /** + * Converts a Java array of booleans to a JavaScript boolean array. + * + * @param bits array of booleans to convert. + * @deprecated this overload can be ambiguous with other methods using + * varargs. Use the toJsArrayBoolean() method instead. + */ + @Deprecated + public static JsArrayBoolean createJsArray(boolean... bits) { + return toJsArrayBoolean(bits); + } + + /** + * Converts a Java array of doubles to a JavaScript number array. + * + * @param numbers array of doubles to convert. + * @deprecated this overload is ambiguous with other methods using varrgs. Use + * toJsArrayNumber() instead. + */ + @Deprecated + public static JsArrayNumber createJsArray(double... numbers) { + return toJsArrayNumber(numbers); + } + + /** + * Converts Java integer array to JavaScript integer array. + * + * @param integers array of integers to convert. + * @deprecated This overload is ambiguous with other methods using varargs. + * Use toJsArrayInteger() instead. + */ + @Deprecated + public static JsArrayInteger createJsArray(int[] integers) { + return toJsArrayInteger(integers); + } + + /** + * Converts an array of Java strings to an array of JavaScript strings. + * + * @param strings array of strings to convert + * @deprecated renamed to toJsArrayString() to avoid using overloads w/ + * varargs + */ + @Deprecated + public static JsArrayString createJsArray(String... strings) { + return toJsArrayString(strings); + } + + // TODO(zundel): Add other methods to convert to Java Arrays + + /** + * Takes an array of Integers to be interpreted as bytes and returns a Java + * Array of the byte primitive type. + * + * @param bytes a JavaScript array to return. + */ + public static byte[] toJavaArrayBytes(JsArrayInteger bytes) { + int length = bytes.length(); + byte[] ret = new byte[length]; + for (int i = 0; i < length; i++) { + ret[i] = (byte) bytes.get(i); + } + return ret; + } + + public static JsArray toJsArray(J... objects) { + JsArray result = JsArray.createArray().cast(); + for (int i = 0; i < objects.length; i++) { + result.set(i, objects[i]); + } + nativePatchConstructorForSafari(result); + return result; + } + + /** + * Converts a Java array of booleans to a JavaScript boolean array. + * + * @param bits array of booleans to convert. + */ + public static JsArrayBoolean toJsArrayBoolean(boolean... bits) { + JsArrayBoolean result = JsArrayBoolean.createArray().cast(); + for (int i = 0; i < bits.length; i++) { + result.set(i, bits[i]); + } + nativePatchConstructorForSafari(result); + return result; + } + + /** + * Converts Java integer array to JavaScript integer array. + * + * @param integers array of integers to convert. + */ + public static JsArrayInteger toJsArrayInteger(int... integers) { + JsArrayInteger result = JsArrayInteger.createArray().cast(); + for (int i = 0; i < integers.length; i++) { + result.set(i, integers[i]); + } + nativePatchConstructorForSafari(result); + return result; + } + + /** + * Converts a Java array of doubles to a JavaScript number array. + * + * @param numbers array of doubles to convert. + */ + public static JsArrayNumber toJsArrayNumber(double... numbers) { + JsArrayNumber result = JsArrayNumber.createArray().cast(); + for (int i = 0; i < numbers.length; i++) { + result.set(i, numbers[i]); + } + nativePatchConstructorForSafari(result); + return result; + } + + /** + * Converts an array of Java strings to an array of JavaScript strings. + * + * @param strings array of strings to convert + */ + public static JsArrayString toJsArrayString(String... strings) { + JsArrayString result = JsArrayString.createArray().cast(); + for (int i = 0; i < strings.length; i++) { + result.set(i, strings[i]); + } + nativePatchConstructorForSafari(result); + return result; + } + + /** + * This is a fixup for the constructor used to address issue 219 - Safari bug + * in comparing Date & Array constructors. + * + * @param result + */ + private static native void nativePatchConstructorForSafari( + JavaScriptObject result) /*-{ + result.constructor = $wnd.Array; + }-*/; + +} diff --git a/java/com.google.gwt.ajaxloader/src/com/google/gwt/ajaxloader/client/ClientLocation.java b/java/com.google.gwt.ajaxloader/src/com/google/gwt/ajaxloader/client/ClientLocation.java new file mode 100644 index 00000000000..846a9e7b742 --- /dev/null +++ b/java/com.google.gwt.ajaxloader/src/com/google/gwt/ajaxloader/client/ClientLocation.java @@ -0,0 +1,74 @@ +/* + * Copyright 2009 Google Inc. + * + * Licensed 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. + */ +package com.google.gwt.ajaxloader.client; + +import com.google.gwt.core.client.JavaScriptObject; + +/** + * Wraps the ClientLocation object stored on google.loader described at + * http://code.google.com/apis/ajax/documentation/#ClientLocation + */ +public class ClientLocation extends JavaScriptObject { + + protected ClientLocation() { + } + + /** + * Supplies the name of the city associated with the client's IP address. + */ + public final native String getCity() /*-{ + return this.address.city; + }-*/; + + /** + * Supplies the name of the country associated with the client's IP address. + */ + public final native String getCountry() /*-{ + return this.address.country; + }-*/; + + /** + * Supplies the name of the ISO 3166-1 country code associated with the + * client's IP address. + */ + public final native String getCountryCode() /*-{ + return this.address.country_code; + }-*/; + + /** + * Supplies the low resolution latitude associated with the client's IP + * address. + */ + public final native double getLatitude() /*-{ + return this.latitude; + }-*/; + + /** + * Supplies the low resolution longitude associated with the client's IP + * address. + */ + public final native double getLongitude() /*-{ + return this.longitude; + }-*/; + + /** + * Supplies the country specific region name associated with the client's IP + * address. + */ + public final native String getRegion() /*-{ + return this.address.region; + }-*/; +} diff --git a/java/com.google.gwt.ajaxloader/src/com/google/gwt/ajaxloader/client/ExceptionHelper.java b/java/com.google.gwt.ajaxloader/src/com/google/gwt/ajaxloader/client/ExceptionHelper.java new file mode 100644 index 00000000000..4025f686894 --- /dev/null +++ b/java/com.google.gwt.ajaxloader/src/com/google/gwt/ajaxloader/client/ExceptionHelper.java @@ -0,0 +1,48 @@ +/* + * Copyright 2008 Google Inc. + * + * Licensed 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. + */ +package com.google.gwt.ajaxloader.client; + +import com.google.gwt.core.client.GWT; +import com.google.gwt.core.client.GWT.UncaughtExceptionHandler; + +/** + * Helps with the GWT uncaught exception handler. + */ +public abstract class ExceptionHelper { + /** + * If an uncaught exception handler has been registered, execute the Runnable + * in a try/catch block and handle exceptions with the uncaught exception + * handler. Otherwise, run the Runnable and do not catch exceptions. + * + * @param runnable The Runnable to execute. + */ + public static void runProtected(Runnable runnable) { + UncaughtExceptionHandler handler = GWT.getUncaughtExceptionHandler(); + if (handler != null) { + try { + runnable.run(); + } catch (Throwable e) { + handler.onUncaughtException(e); + } + } else { + runnable.run(); + } + } + + private ExceptionHelper() { + // do not instantiate + } +} diff --git a/java/com.google.gwt.ajaxloader/src/com/google/gwt/ajaxloader/client/JsDate.java b/java/com.google.gwt.ajaxloader/src/com/google/gwt/ajaxloader/client/JsDate.java new file mode 100644 index 00000000000..38102b38f6f --- /dev/null +++ b/java/com.google.gwt.ajaxloader/src/com/google/gwt/ajaxloader/client/JsDate.java @@ -0,0 +1,112 @@ +/* + * Copyright 2009 Google Inc. + * + * Licensed 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. + */ + +package com.google.gwt.ajaxloader.client; + +import com.google.gwt.core.client.JavaScriptObject; + +import java.util.Date; + +/** + * Wraps a JavaScript Date object. + */ +public class JsDate extends JavaScriptObject { + /** + * Create a JsDate with the current time. + * + * @return A JsDate with the current time. + */ + public static native JsDate create() /*-{ + var result = new $wnd.Date(); + // Safari bug: see issue 219 + result.constructor = $wnd.Date; + return result; + }-*/; + + /** + * Create a date given the time in milliseconds. + * + * @param time A time value in milliseconds. Uses the double type for + * efficiency. + * @return A JsDate with the given time. + */ + public static native JsDate create(double time) /*-{ + var result = new $wnd.Date(time); + // Safari bug: see issue 219 + result.constructor = $wnd.Date; + return result; + }-*/; + /** + * Tests if the JavaScriptObject can be cast to JsDate. Checks if the + * underlying JavaScript object has a method called getTime() that returns + * a number. + * + * @param js A JavaScriptObject that may or may not be wrapping a JavaScript + * Date object. + * @return false if the JavaScriptObject is null or if it cannot be cast + * to JsDate, otherwise true. + */ + public static native boolean isDate(JavaScriptObject js) /*-{ + var result = false; + if (js != null) { + if (typeof js.getTime == 'function') { + var time = js.getTime(); + if (typeof time == 'number') { + result = true; + } + } + } + return result; + }-*/; + + /** + * Converts a JsDate to a Java Date. If the JsDate is null, the function + * returns null. + * + * @param js A JsDate. + * @return A Java Date object, or null, if js is null. + */ + public static Date toJava(JsDate js) { + return js == null ? null : new Date(js.getTime()); + } + + /** + * Converts a Java Date to a JsDate. If the Date is null, the function + * returns null. + * + * @param java A Java Date. + * @return An analogous JsDate, or null if the original Java Date was null. + */ + public static JsDate toJs(Date java) { + return java == null ? null : create(java.getTime()); + } + + protected JsDate() { + } + + /** + * A wrapper for the JavaScript Date's getTime() method. + * + * @return The time in milliseconds corresponding to this JsDate. + */ + public final long getTime() { + return (long) doubleTime(); + } + + private native double doubleTime() /*-{ + return this.getTime(); + }-*/; +} diff --git a/java/com.google.gwt.ajaxloader/src/com/google/gwt/ajaxloader/client/Properties.java b/java/com.google.gwt.ajaxloader/src/com/google/gwt/ajaxloader/client/Properties.java new file mode 100644 index 00000000000..d3568f60bf3 --- /dev/null +++ b/java/com.google.gwt.ajaxloader/src/com/google/gwt/ajaxloader/client/Properties.java @@ -0,0 +1,259 @@ +/* + * Copyright 2009 Google Inc. + * + * Licensed 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. + */ +package com.google.gwt.ajaxloader.client; + +import com.google.gwt.core.client.JavaScriptException; +import com.google.gwt.core.client.JavaScriptObject; + +import java.util.Date; + +/** + * A collection of properties of arbitrary type, for interoperability with + * non-GWT JavaScript libraries. + */ +public class Properties extends JavaScriptObject { + /** + * An exception thrown by the get methods when the key is found but the + * value has an unexpected type. + */ + @SuppressWarnings("serial") + public static class TypeException extends Exception { + private TypeException(String key, String expected, String actual) { + super("Properties.get" + expected + "(" + key + + ") failed. Unexpected type : " + actual + "."); + } + + private TypeException() { + } + } + + /** + * Create an empty Properties object. + * @return An empty Properties object. + */ + public static Properties create() { + return JavaScriptObject.createObject().cast(); + } + + protected Properties() { + } + + /** + * Get a Boolean value mapped to the specified key. + * + * @param key The name of the Boolean property. + * @return A Boolean value, or null if the key is not found. + * @throws TypeException if the key is found but the object returned + * is not a Boolean. + */ + public final Boolean getBoolean(String key) throws TypeException { + if (containsKey(key)) { + String type = typeof(key); + if (type.equals("boolean")) { + return nativeGetBoolean(key); + } else { + throw new TypeException(key, "Boolean", type); + } + } else { + return null; + } + } + + /** + * Get a Date object mapped to the specified key. + * + * @param key The name of the Date property. + * @return A Date object, or null if the key is not found. + * @throws JavaScriptException if the key is found but the object returned + * is not a Date. + * @throws TypeException If the key is found but the value is not an object. + */ + public final Date getDate(String key) + throws JavaScriptException, TypeException { + return JsDate.toJava((JsDate) getObject(key)); + } + + /** + * Get a Double value mapped to the specified key. + * + * @param key The name of the Double property. + * @return A Double value, or null if the key is not found. + * @throws TypeException If the key is found but the value is not a + * number (integers are fine). + */ + public final Double getNumber(String key) throws TypeException { + if (containsKey(key)) { + String type = typeof(key); + if (type.equals("number")) { + return nativeGetNumber(key); + } else { + throw new TypeException(key, "Number", type); + } + } else { + return null; + } + } + + /** + * Get a JavaScriptObject mapped to the specified key. + * + * @param key The name of the JavaScriptObject property. + * @return A JavaScriptObject, or null if the key is not found. + * @throws TypeException If the key is found but the value is not a + * JavaScriptObject. + */ + public final JavaScriptObject getObject(String key) throws TypeException { + if (containsKey(key)) { + String type = typeof(key); + if (type.equals("object")) { + return nativeGetObject(key); + } else { + throw new TypeException(key, "Object", type); + } + } else { + return null; + } + } + + /** + * Get a String mapped to the specified key. + * + * @param key The name of the String property. + * @return A String, or null if the key is not found. + * @throws TypeException If the key is found but the value is not a + * String. + */ + public final String getString(String key) throws TypeException { + if (containsKey(key)) { + String type = typeof(key); + if (type.equals("string")) { + return nativeGetString(key); + } else { + throw new TypeException(key, "String", type); + } + } else { + return null; + } + } + + /** + * Remove the property at the specified key. + * + * @param key The name of the property to remove. + */ + public final native void remove(String key) /*-{ + delete this[key]; + }-*/; + + /** + * Set a property. + * + * @param key The name of the property. + * @param value The value of the property. + */ + public final void set(String key, Boolean value) { + if (value == null) { + remove(key); + } else { + setBoolean(key, value); + } + } + + /** + * Set a property. + * + * @param key The name of the property. + * @param value The value of the property. + */ + public final void set(String key, Date value) { + set(key, JsDate.toJs(value)); + } + + /** + * Set a property. + * + * @param key The name of the property. + * @param value The value of the property. + */ + public final void set(String key, Double value) { + if (value == null) { + remove(key); + } else { + setNumber(key, value); + } + } + + /** + * Set a property. + * + * @param key The name of the property. + * @param value The value of the property. + */ + public final native void set(String key, JavaScriptObject value) /*-{ + this[key] = value; + }-*/; + + /** + * Set a property. + * + * @param key The name of the property. + * @param value The value of the property. + */ + public final native void set(String key, String value) /*-{ + this[key] = value; + }-*/; + + /** + * Executes the JavaScript typeof operator against the property with the + * given key. Note that the typeof undefined is "undefined" and the typeof + * null is "object". + * + * @param key The name of the property to type check. + * @return The JavaScript type of the property, as defined by the JavaScipt + * typeof operator. + */ + public final native String typeof(String key) /*-{ + return typeof this[key]; + }-*/; + + private native boolean containsKey(String key) /*-{ + return this[key] != null; + }-*/; + + private native boolean nativeGetBoolean(String key) /*-{ + return this[key]; + }-*/; + + private native double nativeGetNumber(String key) /*-{ + return this[key]; + }-*/; + + private native JavaScriptObject nativeGetObject(String key) /*-{ + return this[key]; + }-*/; + + private native String nativeGetString(String key) /*-{ + return this[key]; + }-*/; + + private native void setBoolean(String key, boolean value) /*-{ + this[key] = value; + }-*/; + + private native void setNumber(String key, double value) /*-{ + this[key] = value; + }-*/; +}