From 238e40fedb240591d164cee86efd860068773b6a Mon Sep 17 00:00:00 2001 From: Nick Miceli Date: Mon, 26 Aug 2013 10:30:35 -0400 Subject: [PATCH 01/12] create 1.17 branch in preparation for release From 0da247b31f3f8322352b6c591a735af1e07d466f Mon Sep 17 00:00:00 2001 From: Nick Miceli Date: Tue, 27 Aug 2013 09:32:25 -0400 Subject: [PATCH 02/12] api 1.17: Add explicit project-info-reports plugin, version 2.7 https://codereview.appspot.com/13146045/ --- pom.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pom.xml b/pom.xml index 786a6807..007ce383 100644 --- a/pom.xml +++ b/pom.xml @@ -389,6 +389,11 @@ animal-sniffer-maven-plugin 1.9 + + org.apache.maven.plugins + maven-project-info-reports-plugin + 2.7 + org.eclipse.m2e From 22123f279b19715c844ba5ef90b4b705ae3dd884 Mon Sep 17 00:00:00 2001 From: Nick Miceli Date: Tue, 3 Sep 2013 12:04:14 -0400 Subject: [PATCH 03/12] api 1.17 Issue 836: Should clear URI query params when moving large URIs to POST https://codereview.appspot.com/13437043/ --- .../java/com/google/api/client/googleapis/MethodOverride.java | 4 +++- .../com/google/api/client/googleapis/MethodOverrideTest.java | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/MethodOverride.java b/google-api-client/src/main/java/com/google/api/client/googleapis/MethodOverride.java index da090f12..c1309393 100644 --- a/google-api-client/src/main/java/com/google/api/client/googleapis/MethodOverride.java +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/MethodOverride.java @@ -96,7 +96,9 @@ public void intercept(HttpRequest request) throws IOException { request.getHeaders().set(HEADER, requestMethod); if (requestMethod.equals(HttpMethods.GET)) { // take the URI query part and put it into the HTTP body - request.setContent(new UrlEncodedContent(request.getUrl())); + request.setContent(new UrlEncodedContent(request.getUrl().clone())); + // remove query parameters from URI + request.getUrl().clear(); } else if (request.getContent() == null) { // Google servers will fail to process a POST unless the Content-Length header is specified request.setContent(new EmptyContent()); diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/MethodOverrideTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/MethodOverrideTest.java index a5f47388..38cc54c1 100644 --- a/google-api-client/src/test/java/com/google/api/client/googleapis/MethodOverrideTest.java +++ b/google-api-client/src/test/java/com/google/api/client/googleapis/MethodOverrideTest.java @@ -95,6 +95,7 @@ public void testInterceptMaxLength() throws IOException { new MethodOverride().intercept(request); assertEquals(HttpMethods.POST, request.getRequestMethod()); assertEquals(HttpMethods.GET, request.getHeaders().get(MethodOverride.HEADER)); + assertEquals(HttpTesting.SIMPLE_GENERIC_URL, request.getUrl()); char[] arr2 = new char[arr.length + 2]; Arrays.fill(arr2, 'x'); arr2[0] = 'a'; From a06dd3cf6e80564f2c25bc53c853e0bd13707ee4 Mon Sep 17 00:00:00 2001 From: Eyal Peled Date: Tue, 3 Sep 2013 19:46:34 -0400 Subject: [PATCH 04/12] Issue 827: getEmailVerified now reads 'email_verified' field https://codereview.appspot.com/13431043/ --- findbugs-exclude.xml | 5 + .../googleapis/auth/oauth2/GoogleIdToken.java | 37 +++++-- .../auth/oauth2/GoogleIdTokenTest.java | 97 +++++++++++++++++++ 3 files changed, 133 insertions(+), 6 deletions(-) create mode 100644 google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleIdTokenTest.java diff --git a/findbugs-exclude.xml b/findbugs-exclude.xml index 6b7906e7..1a54fcc8 100644 --- a/findbugs-exclude.xml +++ b/findbugs-exclude.xml @@ -2,6 +2,7 @@ + @@ -60,4 +61,8 @@ + + + + diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleIdToken.java b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleIdToken.java index a33661e9..09619b7d 100644 --- a/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleIdToken.java +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleIdToken.java @@ -98,9 +98,14 @@ public static class Payload extends IdToken.Payload { @Key("email") private String email; - /** {@code true} if the email is verified. */ - @Key("verified_email") - private boolean emailVerified; + /** + * {@code true} if the email is verified. + * TODO(mwan): change the type of the field to Boolean and the handling in + * {@link #getEmailVerified()} accordingly after Google OpenID Connect endpoint fixes the + * type of the field in ID Token. + */ + @Key("email_verified") + private Object emailVerified; public Payload() { } @@ -198,9 +203,23 @@ public Payload setEmail(String email) { *

* * @since 1.10 + * + *

+ * Upgrade warning: in prior version 1.16 this method accessed {@code "verified_email"} + * and returns a boolean, but starting with verison 1.17, it now accesses + * {@code "email_verified"} and returns a Boolean. Previously, if this value was not + * specified, this method would return {@code false}, but now it returns {@code null}. + *

*/ - public boolean getEmailVerified() { - return emailVerified; + public Boolean getEmailVerified() { + if (emailVerified == null) { + return null; + } + if (emailVerified instanceof Boolean) { + return (Boolean) emailVerified; + } + + return Boolean.valueOf((String) emailVerified); } /** @@ -211,8 +230,14 @@ public boolean getEmailVerified() { *

* * @since 1.10 + * + *

+ * Upgrade warning: in prior version 1.16 this method accessed {@code "verified_email"} and + * required a boolean parameter, but starting with verison 1.17, it now accesses + * {@code "email_verified"} and requires a Boolean parameter. + *

*/ - public Payload setEmailVerified(boolean emailVerified) { + public Payload setEmailVerified(Boolean emailVerified) { this.emailVerified = emailVerified; return this; } diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleIdTokenTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleIdTokenTest.java new file mode 100644 index 00000000..aaf0b0cb --- /dev/null +++ b/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleIdTokenTest.java @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2013 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.api.client.googleapis.auth.oauth2; + +import com.google.api.client.googleapis.auth.oauth2.GoogleIdToken.Payload; + +import junit.framework.TestCase; + +/** Tests for {@link GoogleIdToken}.*/ + +public class GoogleIdTokenTest extends TestCase { + private static final String USER_ID = "1234567890"; + private static final String ANOTHER_USER_ID = "2345678901"; + private static final String CLIENT_ID = "myClientId"; + private static final String ANOTHER_CLIENT_ID = "anotherClientId"; + private static final String EMAIL_VERIFIED_KEY = "email_verified"; + + private static Payload newPayload(String userId, String clientId) { + Payload payload = new Payload(); + payload.setIssuer("accounts.google.com"); + payload.setAudience(clientId); + payload.setAuthorizedParty(clientId); + payload.setSubject(userId); + payload.setExpirationTimeSeconds(100L); + payload.setIssuedAtTimeSeconds(0L); + return payload; + } + + public void testDeprecatedMethods() { + Payload payload = newPayload(USER_ID, CLIENT_ID); + assertEquals(USER_ID, payload.getUserId()); + assertEquals(CLIENT_ID, payload.getIssuee()); + + payload.setUserId(ANOTHER_USER_ID); + payload.setIssuee(ANOTHER_CLIENT_ID); + assertEquals(ANOTHER_USER_ID, payload.getUserId()); + assertEquals(ANOTHER_CLIENT_ID, payload.getIssuee()); + assertEquals(ANOTHER_USER_ID, payload.getSubject()); + assertEquals(ANOTHER_CLIENT_ID, payload.getAuthorizedParty()); + } + + public void testEmailVerified() { + Payload payload = newPayload(USER_ID, CLIENT_ID); + assertNull(payload.getEmailVerified()); + + payload.setEmailVerified(true); + assertTrue(payload.getEmailVerified()); + + payload.setEmailVerified(false); + assertFalse(payload.getEmailVerified()); + + payload.setEmailVerified(null); + assertNull(payload.getEmailVerified()); + + payload.set(EMAIL_VERIFIED_KEY, "true"); + assertTrue(payload.getEmailVerified()); + + payload.set(EMAIL_VERIFIED_KEY, true); + assertTrue(payload.getEmailVerified()); + + payload.set(EMAIL_VERIFIED_KEY, "false"); + assertFalse(payload.getEmailVerified()); + + payload.set(EMAIL_VERIFIED_KEY, false); + assertFalse(payload.getEmailVerified()); + + payload.set(EMAIL_VERIFIED_KEY, "RandomString"); + assertFalse(payload.getEmailVerified()); + + payload.set(EMAIL_VERIFIED_KEY, ""); + assertFalse(payload.getEmailVerified()); + + payload.set(EMAIL_VERIFIED_KEY, null); + assertNull(payload.getEmailVerified()); + + // Wrong type. + payload.set(EMAIL_VERIFIED_KEY, new Integer(5)); + try { + payload.getEmailVerified(); + fail(); + } catch (ClassCastException e) { + // Expected. + } + } +} From 0e59eae365f86b327d529a2c3a00ae58cb08819b Mon Sep 17 00:00:00 2001 From: Eyal Peled Date: Wed, 4 Sep 2013 09:43:33 -0400 Subject: [PATCH 05/12] Fix clirr bug https://codereview.appspot.com/13525043/ --- clirr-ignored-differences.xml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/clirr-ignored-differences.xml b/clirr-ignored-differences.xml index a01d160d..1400411c 100644 --- a/clirr-ignored-differences.xml +++ b/clirr-ignored-differences.xml @@ -22,6 +22,25 @@ com/google/api/client/googleapis/media/MediaHttpUploader com.google.api.client.googleapis.media.MediaHttpUploader setBackOffPolicyEnabled(boolean) + + + + + 7006 + com/google/api/client/googleapis/auth/oauth2/GoogleIdToken$Payload + boolean getEmailVerified() + java.lang.Boolean + 8001 From cf1a3e462a442da18a8101f343471f471c38e999 Mon Sep 17 00:00:00 2001 From: Nick Miceli Date: Thu, 5 Sep 2013 09:09:12 -0400 Subject: [PATCH 06/12] api 1.17: Prepare for release https://codereview.appspot.com/13535043/ --- google-api-client-android/pom.xml | 2 +- google-api-client-appengine/pom.xml | 2 +- ...oogle-api-client-1.17.0-rc.jar.properties} | 0 ...i-client-android-1.17.0-rc.jar.properties} | 0 ...-api-client-gson-1.17.0-rc.jar.properties} | 0 ...-client-jackson2-1.17.0-rc.jar.properties} | 0 ...-client-protobuf-1.17.0-rc.jar.properties} | 0 ...e-api-client-xml-1.17.0-rc.jar.properties} | 0 ...ogle-http-client-1.17.0-rc.jar.properties} | 0 ...p-client-android-1.17.0-rc.jar.properties} | 0 ...http-client-gson-1.17.0-rc.jar.properties} | 0 ...p-client-jackson-1.17.0-rc.jar.properties} | 0 ...-client-jackson2-1.17.0-rc.jar.properties} | 0 ...-client-protobuf-1.17.0-rc.jar.properties} | 0 ...-http-client-xml-1.17.0-rc.jar.properties} | 0 ...gle-oauth-client-1.17.0-rc.jar.properties} | 0 ...oogle-api-client-android-dependencies.html | 598 ++++++++++++- ...gle-api-client-appengine-dependencies.html | 803 +++++++++++++++++- .../google-api-client-dependencies.html | 557 +++++++++++- .../google-api-client-gson-dependencies.html | 424 ++++++++- ...ogle-api-client-jackson2-dependencies.html | 424 ++++++++- .../google-api-client-java6-dependencies.html | 442 +++++++++- ...ogle-api-client-protobuf-dependencies.html | 473 ++++++++++- ...oogle-api-client-servlet-dependencies.html | 555 +++++++++++- .../google-api-client-xml-dependencies.html | 600 +++++++++++-- ...ogle-http-client-android-dependencies.html | 483 ++++++++++- ...le-http-client-appengine-dependencies.html | 515 ++++++++++- .../google-http-client-dependencies.html | 518 ++++++++++- .../google-http-client-gson-dependencies.html | 440 +++++++++- ...ogle-http-client-jackson-dependencies.html | 440 +++++++++- ...gle-http-client-jackson2-dependencies.html | 440 +++++++++- .../google-http-client-jdo-dependencies.html | 608 ++++++++++++- ...gle-http-client-protobuf-dependencies.html | 385 ++++++++- .../google-http-client-xml-dependencies.html | 541 ++++++++++-- ...e-oauth-client-appengine-dependencies.html | 699 ++++++++++++++- .../google-oauth-client-dependencies.html | 471 +++++++++- ...oogle-oauth-client-java6-dependencies.html | 500 ++++++++++- ...oogle-oauth-client-java7-dependencies.html | 96 --- ...oogle-oauth-client-jetty-dependencies.html | 530 +++++++++++- ...gle-oauth-client-servlet-dependencies.html | 686 ++++++++++++++- google-api-client-assembly/pom.xml | 2 +- google-api-client-gson/pom.xml | 2 +- google-api-client-jackson2/pom.xml | 2 +- google-api-client-java6/pom.xml | 2 +- google-api-client-protobuf/pom.xml | 2 +- google-api-client-servlet/pom.xml | 2 +- google-api-client-xml/pom.xml | 2 +- google-api-client/pom.xml | 2 +- .../api/client/googleapis/GoogleUtils.java | 2 +- pom.xml | 6 +- 50 files changed, 11780 insertions(+), 476 deletions(-) rename google-api-client-assembly/android-properties/{google-api-client-1.17.0-rc-SNAPSHOT.jar.properties => google-api-client-1.17.0-rc.jar.properties} (100%) rename google-api-client-assembly/android-properties/{google-api-client-android-1.17.0-rc-SNAPSHOT.jar.properties => google-api-client-android-1.17.0-rc.jar.properties} (100%) rename google-api-client-assembly/android-properties/{google-api-client-gson-1.17.0-rc-SNAPSHOT.jar.properties => google-api-client-gson-1.17.0-rc.jar.properties} (100%) rename google-api-client-assembly/android-properties/{google-api-client-jackson2-1.17.0-rc-SNAPSHOT.jar.properties => google-api-client-jackson2-1.17.0-rc.jar.properties} (100%) rename google-api-client-assembly/android-properties/{google-api-client-protobuf-1.17.0-rc-SNAPSHOT.jar.properties => google-api-client-protobuf-1.17.0-rc.jar.properties} (100%) rename google-api-client-assembly/android-properties/{google-api-client-xml-1.17.0-rc-SNAPSHOT.jar.properties => google-api-client-xml-1.17.0-rc.jar.properties} (100%) rename google-api-client-assembly/android-properties/{google-http-client-1.17.0-rc-SNAPSHOT.jar.properties => google-http-client-1.17.0-rc.jar.properties} (100%) rename google-api-client-assembly/android-properties/{google-http-client-android-1.17.0-rc-SNAPSHOT.jar.properties => google-http-client-android-1.17.0-rc.jar.properties} (100%) rename google-api-client-assembly/android-properties/{google-http-client-gson-1.17.0-rc-SNAPSHOT.jar.properties => google-http-client-gson-1.17.0-rc.jar.properties} (100%) rename google-api-client-assembly/android-properties/{google-http-client-jackson-1.17.0-rc-SNAPSHOT.jar.properties => google-http-client-jackson-1.17.0-rc.jar.properties} (100%) rename google-api-client-assembly/android-properties/{google-http-client-jackson2-1.17.0-rc-SNAPSHOT.jar.properties => google-http-client-jackson2-1.17.0-rc.jar.properties} (100%) rename google-api-client-assembly/android-properties/{google-http-client-protobuf-1.17.0-rc-SNAPSHOT.jar.properties => google-http-client-protobuf-1.17.0-rc.jar.properties} (100%) rename google-api-client-assembly/android-properties/{google-http-client-xml-1.17.0-rc-SNAPSHOT.jar.properties => google-http-client-xml-1.17.0-rc.jar.properties} (100%) rename google-api-client-assembly/android-properties/{google-oauth-client-1.17.0-rc-SNAPSHOT.jar.properties => google-oauth-client-1.17.0-rc.jar.properties} (100%) delete mode 100644 google-api-client-assembly/dependencies/google-oauth-client-java7-dependencies.html diff --git a/google-api-client-android/pom.xml b/google-api-client-android/pom.xml index 0f45ec68..f812866c 100644 --- a/google-api-client-android/pom.xml +++ b/google-api-client-android/pom.xml @@ -4,7 +4,7 @@ com.google.api-client google-api-client-parent - 1.17.0-rc-SNAPSHOT + 1.17.0-rc ../pom.xml google-api-client-android diff --git a/google-api-client-appengine/pom.xml b/google-api-client-appengine/pom.xml index eb9569ea..19b95ae6 100644 --- a/google-api-client-appengine/pom.xml +++ b/google-api-client-appengine/pom.xml @@ -4,7 +4,7 @@ com.google.api-client google-api-client-parent - 1.17.0-rc-SNAPSHOT + 1.17.0-rc ../pom.xml google-api-client-appengine diff --git a/google-api-client-assembly/android-properties/google-api-client-1.17.0-rc-SNAPSHOT.jar.properties b/google-api-client-assembly/android-properties/google-api-client-1.17.0-rc.jar.properties similarity index 100% rename from google-api-client-assembly/android-properties/google-api-client-1.17.0-rc-SNAPSHOT.jar.properties rename to google-api-client-assembly/android-properties/google-api-client-1.17.0-rc.jar.properties diff --git a/google-api-client-assembly/android-properties/google-api-client-android-1.17.0-rc-SNAPSHOT.jar.properties b/google-api-client-assembly/android-properties/google-api-client-android-1.17.0-rc.jar.properties similarity index 100% rename from google-api-client-assembly/android-properties/google-api-client-android-1.17.0-rc-SNAPSHOT.jar.properties rename to google-api-client-assembly/android-properties/google-api-client-android-1.17.0-rc.jar.properties diff --git a/google-api-client-assembly/android-properties/google-api-client-gson-1.17.0-rc-SNAPSHOT.jar.properties b/google-api-client-assembly/android-properties/google-api-client-gson-1.17.0-rc.jar.properties similarity index 100% rename from google-api-client-assembly/android-properties/google-api-client-gson-1.17.0-rc-SNAPSHOT.jar.properties rename to google-api-client-assembly/android-properties/google-api-client-gson-1.17.0-rc.jar.properties diff --git a/google-api-client-assembly/android-properties/google-api-client-jackson2-1.17.0-rc-SNAPSHOT.jar.properties b/google-api-client-assembly/android-properties/google-api-client-jackson2-1.17.0-rc.jar.properties similarity index 100% rename from google-api-client-assembly/android-properties/google-api-client-jackson2-1.17.0-rc-SNAPSHOT.jar.properties rename to google-api-client-assembly/android-properties/google-api-client-jackson2-1.17.0-rc.jar.properties diff --git a/google-api-client-assembly/android-properties/google-api-client-protobuf-1.17.0-rc-SNAPSHOT.jar.properties b/google-api-client-assembly/android-properties/google-api-client-protobuf-1.17.0-rc.jar.properties similarity index 100% rename from google-api-client-assembly/android-properties/google-api-client-protobuf-1.17.0-rc-SNAPSHOT.jar.properties rename to google-api-client-assembly/android-properties/google-api-client-protobuf-1.17.0-rc.jar.properties diff --git a/google-api-client-assembly/android-properties/google-api-client-xml-1.17.0-rc-SNAPSHOT.jar.properties b/google-api-client-assembly/android-properties/google-api-client-xml-1.17.0-rc.jar.properties similarity index 100% rename from google-api-client-assembly/android-properties/google-api-client-xml-1.17.0-rc-SNAPSHOT.jar.properties rename to google-api-client-assembly/android-properties/google-api-client-xml-1.17.0-rc.jar.properties diff --git a/google-api-client-assembly/android-properties/google-http-client-1.17.0-rc-SNAPSHOT.jar.properties b/google-api-client-assembly/android-properties/google-http-client-1.17.0-rc.jar.properties similarity index 100% rename from google-api-client-assembly/android-properties/google-http-client-1.17.0-rc-SNAPSHOT.jar.properties rename to google-api-client-assembly/android-properties/google-http-client-1.17.0-rc.jar.properties diff --git a/google-api-client-assembly/android-properties/google-http-client-android-1.17.0-rc-SNAPSHOT.jar.properties b/google-api-client-assembly/android-properties/google-http-client-android-1.17.0-rc.jar.properties similarity index 100% rename from google-api-client-assembly/android-properties/google-http-client-android-1.17.0-rc-SNAPSHOT.jar.properties rename to google-api-client-assembly/android-properties/google-http-client-android-1.17.0-rc.jar.properties diff --git a/google-api-client-assembly/android-properties/google-http-client-gson-1.17.0-rc-SNAPSHOT.jar.properties b/google-api-client-assembly/android-properties/google-http-client-gson-1.17.0-rc.jar.properties similarity index 100% rename from google-api-client-assembly/android-properties/google-http-client-gson-1.17.0-rc-SNAPSHOT.jar.properties rename to google-api-client-assembly/android-properties/google-http-client-gson-1.17.0-rc.jar.properties diff --git a/google-api-client-assembly/android-properties/google-http-client-jackson-1.17.0-rc-SNAPSHOT.jar.properties b/google-api-client-assembly/android-properties/google-http-client-jackson-1.17.0-rc.jar.properties similarity index 100% rename from google-api-client-assembly/android-properties/google-http-client-jackson-1.17.0-rc-SNAPSHOT.jar.properties rename to google-api-client-assembly/android-properties/google-http-client-jackson-1.17.0-rc.jar.properties diff --git a/google-api-client-assembly/android-properties/google-http-client-jackson2-1.17.0-rc-SNAPSHOT.jar.properties b/google-api-client-assembly/android-properties/google-http-client-jackson2-1.17.0-rc.jar.properties similarity index 100% rename from google-api-client-assembly/android-properties/google-http-client-jackson2-1.17.0-rc-SNAPSHOT.jar.properties rename to google-api-client-assembly/android-properties/google-http-client-jackson2-1.17.0-rc.jar.properties diff --git a/google-api-client-assembly/android-properties/google-http-client-protobuf-1.17.0-rc-SNAPSHOT.jar.properties b/google-api-client-assembly/android-properties/google-http-client-protobuf-1.17.0-rc.jar.properties similarity index 100% rename from google-api-client-assembly/android-properties/google-http-client-protobuf-1.17.0-rc-SNAPSHOT.jar.properties rename to google-api-client-assembly/android-properties/google-http-client-protobuf-1.17.0-rc.jar.properties diff --git a/google-api-client-assembly/android-properties/google-http-client-xml-1.17.0-rc-SNAPSHOT.jar.properties b/google-api-client-assembly/android-properties/google-http-client-xml-1.17.0-rc.jar.properties similarity index 100% rename from google-api-client-assembly/android-properties/google-http-client-xml-1.17.0-rc-SNAPSHOT.jar.properties rename to google-api-client-assembly/android-properties/google-http-client-xml-1.17.0-rc.jar.properties diff --git a/google-api-client-assembly/android-properties/google-oauth-client-1.17.0-rc-SNAPSHOT.jar.properties b/google-api-client-assembly/android-properties/google-oauth-client-1.17.0-rc.jar.properties similarity index 100% rename from google-api-client-assembly/android-properties/google-oauth-client-1.17.0-rc-SNAPSHOT.jar.properties rename to google-api-client-assembly/android-properties/google-oauth-client-1.17.0-rc.jar.properties diff --git a/google-api-client-assembly/dependencies/google-api-client-android-dependencies.html b/google-api-client-assembly/dependencies/google-api-client-android-dependencies.html index 4f509e74..812665ab 100644 --- a/google-api-client-assembly/dependencies/google-api-client-android-dependencies.html +++ b/google-api-client-assembly/dependencies/google-api-client-android-dependencies.html @@ -1,5 +1,5 @@ - + @@ -10,7 +10,7 @@ @import url("./css/site.css"); - + @@ -24,8 +24,8 @@
- Last Published: 2013-07-03 -  | Version: 1.17.0-rc-SNAPSHOT + Last Published: 2013-09-04 +  | Version: 1.17.0-rc
@@ -47,7 +47,144 @@
-

Project Dependencies

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.android.google-play-servicesgoogle-play-services1jar-
com.google.api-clientgoogle-api-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client-android1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0

provided

The following is a list of provided dependencies for this project. These dependencies are required to compile the application, but should be provided by default when using the library:

GroupIdArtifactIdVersionTypeLicense
com.google.androidandroid4.1.1.4jarApache 2.0

Project Transitive Dependencies

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.oauth-clientgoogle-oauth-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
commons-codeccommons-codec1.3jar/LICENSE.txt
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
xpp3xpp31.1.4cjarIndiana University Extreme! Lab Software License, vesion 1.1.1-Public Domain-Apache Software License, version 1.1

provided

The following is a list of provided dependencies for this project. These dependencies are required to compile the application, but should be provided by default when using the library:

GroupIdArtifactIdVersionTypeLicense
org.jsonjson20080701jarprovided without support or warranty
org.khronosopengl-apigl1.1-android-2.1_r1jarApache 2.0
xercesxmlParserAPIs2.6.2jar-

Project Dependency Graph

-

Dependency Tree

  • com.google.api-client:google-api-client-android:jar:1.17.0-rc-SNAPSHOT Information
    • com.google.android:android:jar:4.1.1.4 (provided) Information
      • commons-logging:commons-logging:jar:1.1.1 (compile) Information
      • org.apache.httpcomponents:httpclient:jar:4.0.1 (compile) Information
        • org.apache.httpcomponents:httpcore:jar:4.0.1 (compile) Information
        • commons-codec:commons-codec:jar:1.3 (compile) Information
      • +
      • com.google.api-client:google-api-client:jar:1.17.0-rc (compile) Information +
      • +
      • com.google.http-client:google-http-client-android:jar:1.17.0-rc (compile) Information +
      • +
      • com.google.android.google-play-services:google-play-services:jar:1 (provided) Information
+
+

Licenses

+

Apache Software License, version 1.1: MXP1: Xml Pull Parser 3rd Edition (XPP3)

+

Public Domain: MXP1: Xml Pull Parser 3rd Edition (XPP3)

+

Unknown: google-play-services, xmlParserAPIs

+

Apache License: HttpClient, HttpCore

+

provided without support or warranty: JSON (JavaScript Object Notation)

+

Apache 2.0: Google Android Java ME Library (Khronos), Google Android Library

+

The Apache Software License, Version 2.0: Android Platform Extensions to the Google APIs Client Library for Java., Android Platform Extensions to the Google HTTP Client Library for Java., Codec, Commons Logging, FindBugs-jsr305, Google APIs Client Library for Java, Google HTTP Client Library for Java, Google OAuth Client Library for Java

+

Indiana University Extreme! Lab Software License, vesion 1.1.1: MXP1: Xml Pull Parser 3rd Edition (XPP3)

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
android-4.1.1.4.jar12.35 MB7,2641,698711.5debug
google-play-services-1.jar225.92 kB246245101.5release
google-api-client-1.17.0-rc.jar160.21 kB11084171.5debug
jsr305-1.3.9.jar32.24 kB723531.5debug
google-http-client-1.17.0-rc.jar263.77 kB241208191.5debug
google-http-client-android-1.17.0-rc.jar11.77 kB211131.5debug
google-oauth-client-1.17.0-rc.jar59.62 kB574731.5debug
commons-codec-1.3.jar45.63 kB422551.2debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
json-20080701.jar36.99 kB261711.3debug
opengl-api-gl1.1-android-2.1_r1.jar18.06 kB251321.5debug
xmlParserAPIs-2.6.2.jar121.80 kB238207171.1release
xpp3-1.1.4c.jar117.25 kB7856131.1debug
TotalSizeEntriesClassesPackagesJDK RevDebug
1513.92 MB8,9093,0621981.513
compile: 9compile: 1.06 MBcompile: 1,032compile: 826compile: 84-compile: 9
provided: 6provided: 12.86 MBprovided: 7,877provided: 2,236provided: 114-provided: 4
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotscentral
com.google.android:android:jar:4.1.1.4--Found at http://repo.maven.apache.org/maven2
com.google.android.google-play-services:google-play-services:jar:1---
com.google.api-client:google-api-client:jar:1.17.0-rc---
com.google.code.findbugs:jsr305:jar:1.3.9--Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.0-rc---
com.google.http-client:google-http-client-android:jar:1.17.0-rc---
com.google.oauth-client:google-oauth-client:jar:1.17.0-rc---
commons-codec:commons-codec:jar:1.3--Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.json:json:jar:20080701--Found at http://repo.maven.apache.org/maven2
org.khronos:opengl-api:jar:gl1.1-android-2.1_r1--Found at http://repo.maven.apache.org/maven2
xerces:xmlParserAPIs:jar:2.6.2--Found at http://repo.maven.apache.org/maven2
xpp3:xpp3:jar:1.1.4c--Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotscentral
15 (compile: 9, provided: 6)0010
diff --git a/google-api-client-assembly/dependencies/google-api-client-appengine-dependencies.html b/google-api-client-assembly/dependencies/google-api-client-appengine-dependencies.html index 8ccc70f0..5a7fb7ac 100644 --- a/google-api-client-assembly/dependencies/google-api-client-appengine-dependencies.html +++ b/google-api-client-assembly/dependencies/google-api-client-appengine-dependencies.html @@ -1,5 +1,5 @@ - + @@ -10,7 +10,7 @@ @import url("./css/site.css"); - + @@ -24,8 +24,8 @@
- Last Published: 2013-07-03 -  | Version: 1.17.0-rc-SNAPSHOT + Last Published: 2013-09-04 +  | Version: 1.17.0-rc
@@ -47,7 +47,186 @@
-

Project Dependencies

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.api-clientgoogle-api-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.api-clientgoogle-api-client-servlet1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client-appengine1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.oauth-clientgoogle-oauth-client-appengine1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0

test

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

GroupIdArtifactIdVersionTypeLicense
com.google.appengineappengine-api-labs1.7.7jarGoogle App Engine Terms of Service
com.google.appengineappengine-api-stubs1.7.7jarGoogle App Engine Terms of Service
com.google.appengineappengine-testing1.7.7jarGoogle App Engine Terms of Service
com.google.guavaguava-jdk513.0jarThe Apache Software License, Version 2.0
junitjunit4.8.2jarCommon Public License Version 1.0

provided

The following is a list of provided dependencies for this project. These dependencies are required to compile the application, but should be provided by default when using the library:

GroupIdArtifactIdVersionTypeLicense
com.google.appengineappengine-api-1.0-sdk1.7.7jarGoogle App Engine Terms of Service

Project Transitive Dependencies

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client-jdo1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.oauth-clientgoogle-oauth-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.oauth-clientgoogle-oauth-client-servlet1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
commons-codeccommons-codec1.3jar/LICENSE.txt
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
javax.jdojdo2-api2.3-ebjarApache 2
javax.servletservlet-api2.5jar-
javax.transactiontransaction-api1.1jar-
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
xpp3xpp31.1.4cjarIndiana University Extreme! Lab Software License, vesion 1.1.1-Public Domain-Apache Software License, version 1.1

Project Dependency Graph

-

Dependency Tree

+
+

Licenses

+

Google App Engine Terms of Service: appengine-api-1.0-sdk, appengine-api-labs, appengine-api-stubs, appengine-testing

+

Apache 2: JDO2 API

+

Unknown: servlet-api, transaction-api

+

Apache License: HttpClient, HttpCore

+

Common Public License Version 1.0: JUnit

+

The Apache Software License, Version 2.0: Codec, Commons Logging, FindBugs-jsr305, Google APIs Client Library for Java, Google App Engine extensions to the Google API Client Library for Java., Google App Engine extensions to the Google HTTP Client Library for Java., Google App Engine extensions to the Google OAuth Client Library for Java., Google HTTP Client Library for Java, Google OAuth Client Library for Java, Guava: Google Core Libraries for Java, JDO extensions to the Google HTTP Client Library for Java., Servlet and JDO extensions to the Google API Client Library for Java., Servlet and JDO extensions to the Google OAuth Client Library for Java.

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
google-api-client-1.17.0-rc.jar160.21 kB11084171.5debug
google-api-client-servlet-1.17.0-rc.jar6.56 kB14411.5debug
appengine-api-1.0-sdk-1.7.7.jar30.66 MB6,5666,044861.6debug
appengine-api-labs-1.7.7.jar10.94 MB1,4481,374101.6debug
appengine-api-stubs-1.7.7.jar12.16 MB3,0982,7851671.6debug
appengine-testing-1.7.7.jar10.32 MB2,2932,265261.6debug
jsr305-1.3.9.jar32.24 kB723531.5debug
guava-jdk5-13.0.jar1.71 MB1,3961,372131.5debug
google-http-client-1.17.0-rc.jar263.77 kB241208191.5debug
google-http-client-appengine-1.17.0-rc.jar15.96 kB221221.5debug
google-http-client-jdo-1.17.0-rc.jar11.45 kB14611.5debug
google-oauth-client-1.17.0-rc.jar59.62 kB574731.5debug
google-oauth-client-appengine-1.17.0-rc.jar7.76 kB17721.5debug
google-oauth-client-servlet-1.17.0-rc.jar21.59 kB241141.5debug
commons-codec-1.3.jar45.63 kB422551.2debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
jdo2-api-2.3-eb.jar188.18 kB22618271.5debug
servlet-api-2.5.jar102.65 kB684221.5debug
transaction-api-1.1.jar14.72 kB241821.3debug
junit-4.8.2.jar231.78 kB267230301.5debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
TotalSizeEntriesClassesPackagesJDK RevDebug
2267.42 MB16,48815,1674341.622
compile: 16compile: 1.41 MBcompile: 1,420compile: 1,097compile: 102-compile: 16
test: 5test: 35.35 MBtest: 8,502test: 8,026test: 246-test: 5
provided: 1provided: 30.66 MBprovided: 6,566provided: 6,044provided: 86-provided: 1
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotscentral
com.google.api-client:google-api-client:jar:1.17.0-rc---
com.google.api-client:google-api-client-servlet:jar:1.17.0-rc---
com.google.appengine:appengine-api-1.0-sdk:jar:1.7.7--Found at http://repo.maven.apache.org/maven2
com.google.appengine:appengine-api-labs:jar:1.7.7--Found at http://repo.maven.apache.org/maven2
com.google.appengine:appengine-api-stubs:jar:1.7.7--Found at http://repo.maven.apache.org/maven2
com.google.appengine:appengine-testing:jar:1.7.7--Found at http://repo.maven.apache.org/maven2
com.google.code.findbugs:jsr305:jar:1.3.9--Found at http://repo.maven.apache.org/maven2
com.google.guava:guava-jdk5:jar:13.0--Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.0-rc---
com.google.http-client:google-http-client-appengine:jar:1.17.0-rc---
com.google.http-client:google-http-client-jdo:jar:1.17.0-rc---
com.google.oauth-client:google-oauth-client:jar:1.17.0-rc---
com.google.oauth-client:google-oauth-client-appengine:jar:1.17.0-rc---
com.google.oauth-client:google-oauth-client-servlet:jar:1.17.0-rc---
commons-codec:commons-codec:jar:1.3--Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1--Found at http://repo.maven.apache.org/maven2
javax.jdo:jdo2-api:jar:2.3-eb--Found at http://repo.maven.apache.org/maven2
javax.servlet:servlet-api:jar:2.5--Found at http://repo.maven.apache.org/maven2
javax.transaction:transaction-api:jar:1.1--Found at http://repo.maven.apache.org/maven2
junit:junit:jar:4.8.2--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotscentral
22 (compile: 16, test: 5, provided: 1)0014
diff --git a/google-api-client-assembly/dependencies/google-api-client-dependencies.html b/google-api-client-assembly/dependencies/google-api-client-dependencies.html index 18a346a7..d896ad0b 100644 --- a/google-api-client-assembly/dependencies/google-api-client-dependencies.html +++ b/google-api-client-assembly/dependencies/google-api-client-dependencies.html @@ -1,5 +1,5 @@ - + @@ -10,7 +10,7 @@ @import url("./css/site.css"); - + @@ -24,8 +24,8 @@
- Last Published: 2013-07-03 -  | Version: 1.17.0-rc-SNAPSHOT + Last Published: 2013-09-04 +  | Version: 1.17.0-rc
@@ -47,7 +47,142 @@
-

Project Dependencies

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.oauth-clientgoogle-oauth-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0

test

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

GroupIdArtifactIdVersionTypeLicense
com.google.guavaguava-jdk513.0jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client-gson1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client-jackson1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
junitjunit4.8.2jarCommon Public License Version 1.0

provided

The following is a list of provided dependencies for this project. These dependencies are required to compile the application, but should be provided by default when using the library:

GroupIdArtifactIdVersionTypeLicense
commons-codeccommons-codec1.6jarThe Apache Software License, Version 2.0

Project Transitive Dependencies

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
xpp3xpp31.1.4cjarIndiana University Extreme! Lab Software License, vesion 1.1.1-Public Domain-Apache Software License, version 1.1

test

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

GroupIdArtifactIdVersionTypeLicense
com.google.code.gsongson2.1jarThe Apache Software License, Version 2.0
org.codehaus.jacksonjackson-core-asl1.9.11jarThe Apache Software License, Version 2.0

Project Dependency Graph

-

Dependency Tree

+
+

Licenses

+

Apache License: HttpClient, HttpCore

+

Common Public License Version 1.0: JUnit

+

The Apache Software License, Version 2.0: Commons Codec, Commons Logging, FindBugs-jsr305, GSON extensions to the Google HTTP Client Library for Java., Google APIs Client Library for Java, Google HTTP Client Library for Java, Google OAuth Client Library for Java, Gson, Guava: Google Core Libraries for Java, Jackson, Jackson extensions to the Google HTTP Client Library for Java.

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
jsr305-1.3.9.jar32.24 kB723531.5debug
gson-2.1.jar175.89 kB15814861.5debug
guava-jdk5-13.0.jar1.71 MB1,3961,372131.5debug
google-http-client-1.17.0-rc.jar263.77 kB241208191.5debug
google-http-client-gson-1.17.0-rc.jar8.35 kB14611.5debug
google-http-client-jackson-1.17.0-rc.jar5.90 kB12411.5debug
google-oauth-client-1.17.0-rc.jar59.62 kB574731.5debug
commons-codec-1.6.jar227.32 kB2187661.5debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
junit-4.8.2.jar231.78 kB267230301.5debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
jackson-core-asl-1.9.11.jar226.69 kB13712181.5debug
TotalSizeEntriesClassesPackagesJDK RevDebug
133.41 MB3,0612,6631241.513
compile: 6compile: 867.94 kBcompile: 859compile: 706compile: 59-compile: 6
test: 6test: 2.34 MBtest: 1,984test: 1,881test: 59-test: 6
provided: 1provided: 227.32 kBprovided: 218provided: 76provided: 6-provided: 1
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotscentral
com.google.code.findbugs:jsr305:jar:1.3.9--Found at http://repo.maven.apache.org/maven2
com.google.code.gson:gson:jar:2.1--Found at http://repo.maven.apache.org/maven2
com.google.guava:guava-jdk5:jar:13.0--Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.0-rc---
com.google.http-client:google-http-client-gson:jar:1.17.0-rc---
com.google.http-client:google-http-client-jackson:jar:1.17.0-rc---
com.google.oauth-client:google-oauth-client:jar:1.17.0-rc---
commons-codec:commons-codec:jar:1.6--Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1--Found at http://repo.maven.apache.org/maven2
junit:junit:jar:4.8.2--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.codehaus.jackson:jackson-core-asl:jar:1.9.11--Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotscentral
13 (compile: 6, test: 6, provided: 1)009
diff --git a/google-api-client-assembly/dependencies/google-api-client-gson-dependencies.html b/google-api-client-assembly/dependencies/google-api-client-gson-dependencies.html index e5d0f832..0c1f6970 100644 --- a/google-api-client-assembly/dependencies/google-api-client-gson-dependencies.html +++ b/google-api-client-assembly/dependencies/google-api-client-gson-dependencies.html @@ -1,5 +1,5 @@ - + @@ -10,7 +10,7 @@ @import url("./css/site.css"); - + @@ -24,8 +24,8 @@
- Last Published: 2013-07-03 -  | Version: 1.17.0-rc-SNAPSHOT + Last Published: 2013-09-04 +  | Version: 1.17.0-rc
@@ -47,7 +47,94 @@
-

Project Dependencies

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.api-clientgoogle-api-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client-gson1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0

Project Transitive Dependencies

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
com.google.code.gsongson2.1jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.oauth-clientgoogle-oauth-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
commons-codeccommons-codec1.3jar/LICENSE.txt
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
xpp3xpp31.1.4cjarIndiana University Extreme! Lab Software License, vesion 1.1.1-Public Domain-Apache Software License, version 1.1

Project Dependency Graph

-

Dependency Tree

+
+

Licenses

+

Apache License: HttpClient, HttpCore

+

The Apache Software License, Version 2.0: Codec, Commons Logging, FindBugs-jsr305, GSON extensions to the Google APIs Client Library for Java, GSON extensions to the Google HTTP Client Library for Java., Google APIs Client Library for Java, Google HTTP Client Library for Java, Google OAuth Client Library for Java, Gson

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
google-api-client-1.17.0-rc.jar160.21 kB11084171.5debug
jsr305-1.3.9.jar32.24 kB723531.5debug
gson-2.1.jar175.89 kB15814861.5debug
google-http-client-1.17.0-rc.jar263.77 kB241208191.5debug
google-http-client-gson-1.17.0-rc.jar8.35 kB14611.5debug
google-oauth-client-1.17.0-rc.jar59.62 kB574731.5debug
commons-codec-1.3.jar45.63 kB422551.2debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
TotalSizeEntriesClassesPackagesJDK RevDebug
101.23 MB1,183969881.510
compile: 10compile: 1.23 MBcompile: 1,183compile: 969compile: 88-compile: 10
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotscentral
com.google.api-client:google-api-client:jar:1.17.0-rc---
com.google.code.findbugs:jsr305:jar:1.3.9--Found at http://repo.maven.apache.org/maven2
com.google.code.gson:gson:jar:2.1--Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.0-rc---
com.google.http-client:google-http-client-gson:jar:1.17.0-rc---
com.google.oauth-client:google-oauth-client:jar:1.17.0-rc---
commons-codec:commons-codec:jar:1.3--Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotscentral
10 (compile: 10)006
diff --git a/google-api-client-assembly/dependencies/google-api-client-jackson2-dependencies.html b/google-api-client-assembly/dependencies/google-api-client-jackson2-dependencies.html index 27406db1..ca1d2be6 100644 --- a/google-api-client-assembly/dependencies/google-api-client-jackson2-dependencies.html +++ b/google-api-client-assembly/dependencies/google-api-client-jackson2-dependencies.html @@ -1,5 +1,5 @@ - + @@ -10,7 +10,7 @@ @import url("./css/site.css"); - + @@ -24,8 +24,8 @@
- Last Published: 2013-07-03 -  | Version: 1.17.0-rc-SNAPSHOT + Last Published: 2013-09-04 +  | Version: 1.17.0-rc
@@ -47,7 +47,94 @@
-

Project Dependencies

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.api-clientgoogle-api-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client-jackson21.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0

Project Transitive Dependencies

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.fasterxml.jackson.corejackson-core2.1.3jarThe Apache Software License, Version 2.0
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.oauth-clientgoogle-oauth-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
commons-codeccommons-codec1.3jar/LICENSE.txt
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
xpp3xpp31.1.4cjarIndiana University Extreme! Lab Software License, vesion 1.1.1-Public Domain-Apache Software License, version 1.1

Project Dependency Graph

-

Dependency Tree

+
+

Licenses

+

Apache License: HttpClient, HttpCore

+

The Apache Software License, Version 2.0: Codec, Commons Logging, FindBugs-jsr305, Google APIs Client Library for Java, Google HTTP Client Library for Java, Google OAuth Client Library for Java, Jackson 2 extensions to the Google APIs Client Library for Java, Jackson 2 extensions to the Google HTTP Client Library for Java., Jackson-core

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
jackson-core-2.1.3.jar201.95 kB1108981.5debug
google-api-client-1.17.0-rc.jar160.21 kB11084171.5debug
jsr305-1.3.9.jar32.24 kB723531.5debug
google-http-client-1.17.0-rc.jar263.77 kB241208191.5debug
google-http-client-jackson2-1.17.0-rc.jar6.64 kB13511.5debug
google-oauth-client-1.17.0-rc.jar59.62 kB574731.5debug
commons-codec-1.3.jar45.63 kB422551.2debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
TotalSizeEntriesClassesPackagesJDK RevDebug
101.25 MB1,134909901.510
compile: 10compile: 1.25 MBcompile: 1,134compile: 909compile: 90-compile: 10
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotscentral
com.fasterxml.jackson.core:jackson-core:jar:2.1.3--Found at http://repo.maven.apache.org/maven2
com.google.api-client:google-api-client:jar:1.17.0-rc---
com.google.code.findbugs:jsr305:jar:1.3.9--Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.0-rc---
com.google.http-client:google-http-client-jackson2:jar:1.17.0-rc---
com.google.oauth-client:google-oauth-client:jar:1.17.0-rc---
commons-codec:commons-codec:jar:1.3--Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotscentral
10 (compile: 10)006
diff --git a/google-api-client-assembly/dependencies/google-api-client-java6-dependencies.html b/google-api-client-assembly/dependencies/google-api-client-java6-dependencies.html index 3a416981..48cf9e72 100644 --- a/google-api-client-assembly/dependencies/google-api-client-java6-dependencies.html +++ b/google-api-client-assembly/dependencies/google-api-client-java6-dependencies.html @@ -1,5 +1,5 @@ - + @@ -10,7 +10,7 @@ @import url("./css/site.css"); - + @@ -24,8 +24,8 @@
- Last Published: 2013-07-03 -  | Version: 1.17.0-rc-SNAPSHOT + Last Published: 2013-09-04 +  | Version: 1.17.0-rc
@@ -47,7 +47,104 @@
-

Project Dependencies

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.api-clientgoogle-api-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.oauth-clientgoogle-oauth-client-java61.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0

test

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

GroupIdArtifactIdVersionTypeLicense
junitjunit4.8.2jarCommon Public License Version 1.0

Project Transitive Dependencies

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.oauth-clientgoogle-oauth-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
commons-codeccommons-codec1.3jar/LICENSE.txt
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
xpp3xpp31.1.4cjarIndiana University Extreme! Lab Software License, vesion 1.1.1-Public Domain-Apache Software License, version 1.1

Project Dependency Graph

-

Dependency Tree

+
+

Licenses

+

Apache License: HttpClient, HttpCore

+

Common Public License Version 1.0: JUnit

+

The Apache Software License, Version 2.0: Codec, Commons Logging, FindBugs-jsr305, Google APIs Client Library for Java, Google HTTP Client Library for Java, Google OAuth Client Library for Java, Java 6 (and higher) Extensions to the Google API Client Library for Java., Java 6 (and higher) extensions to the Google OAuth Client Library for Java.

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
google-api-client-1.17.0-rc.jar160.21 kB11084171.5debug
jsr305-1.3.9.jar32.24 kB723531.5debug
google-http-client-1.17.0-rc.jar263.77 kB241208191.5debug
google-oauth-client-1.17.0-rc.jar59.62 kB574731.5debug
google-oauth-client-java6-1.17.0-rc.jar10.58 kB16611.5debug
commons-codec-1.3.jar45.63 kB422551.2debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
junit-4.8.2.jar231.78 kB267230301.5debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
TotalSizeEntriesClassesPackagesJDK RevDebug
101.29 MB1,2941,0511121.510
compile: 9compile: 1.06 MBcompile: 1,027compile: 821compile: 82-compile: 9
test: 1test: 231.78 kBtest: 267test: 230test: 30-test: 1
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotscentral
com.google.api-client:google-api-client:jar:1.17.0-rc---
com.google.code.findbugs:jsr305:jar:1.3.9--Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.0-rc---
com.google.oauth-client:google-oauth-client:jar:1.17.0-rc---
com.google.oauth-client:google-oauth-client-java6:jar:1.17.0-rc---
commons-codec:commons-codec:jar:1.3--Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1--Found at http://repo.maven.apache.org/maven2
junit:junit:jar:4.8.2--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotscentral
10 (compile: 9, test: 1)006
diff --git a/google-api-client-assembly/dependencies/google-api-client-protobuf-dependencies.html b/google-api-client-assembly/dependencies/google-api-client-protobuf-dependencies.html index 2ec7c491..9ef9e881 100644 --- a/google-api-client-assembly/dependencies/google-api-client-protobuf-dependencies.html +++ b/google-api-client-assembly/dependencies/google-api-client-protobuf-dependencies.html @@ -1,5 +1,5 @@ - + @@ -10,7 +10,7 @@ @import url("./css/site.css"); - + @@ -24,8 +24,8 @@
- Last Published: 2013-07-03 -  | Version: 1.17.0-rc-SNAPSHOT + Last Published: 2013-09-04 +  | Version: 1.17.0-rc
@@ -47,7 +47,110 @@
-

Project Dependencies

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.api-clientgoogle-api-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client-protobuf1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0

test

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

GroupIdArtifactIdVersionTypeLicense
junitjunit4.8.2jarCommon Public License Version 1.0

Project Transitive Dependencies

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.oauth-clientgoogle-oauth-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.protobufprotobuf-java2.4.1jarNew BSD license
commons-codeccommons-codec1.3jar/LICENSE.txt
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
xpp3xpp31.1.4cjarIndiana University Extreme! Lab Software License, vesion 1.1.1-Public Domain-Apache Software License, version 1.1

Project Dependency Graph

-

Dependency Tree

+
+

Licenses

+

Apache License: HttpClient, HttpCore

+

New BSD license: Protocol Buffer Java API

+

Common Public License Version 1.0: JUnit

+

The Apache Software License, Version 2.0: Codec, Commons Logging, FindBugs-jsr305, Google APIs Client Library for Java, Google HTTP Client Library for Java, Google OAuth Client Library for Java, Protocol Buffer extensions to the Google APIs Client Library for Java, Protocol Buffer extensions to the Google HTTP Client Library for Java.

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
google-api-client-1.17.0-rc.jar160.21 kB11084171.5debug
jsr305-1.3.9.jar32.24 kB723531.5debug
google-http-client-1.17.0-rc.jar263.77 kB241208191.5debug
google-http-client-protobuf-1.17.0-rc.jar5.08 kB14521.5debug
google-oauth-client-1.17.0-rc.jar59.62 kB574731.5debug
protobuf-java-2.4.1.jar439.73 kB21420411.5debug
commons-codec-1.3.jar45.63 kB422551.2debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
junit-4.8.2.jar231.78 kB267230301.5debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
TotalSizeEntriesClassesPackagesJDK RevDebug
111.71 MB1,5061,2541141.511
compile: 10compile: 1.48 MBcompile: 1,239compile: 1,024compile: 84-compile: 10
test: 1test: 231.78 kBtest: 267test: 230test: 30-test: 1
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotscentral
com.google.api-client:google-api-client:jar:1.17.0-rc---
com.google.code.findbugs:jsr305:jar:1.3.9--Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.0-rc---
com.google.http-client:google-http-client-protobuf:jar:1.17.0-rc---
com.google.oauth-client:google-oauth-client:jar:1.17.0-rc---
com.google.protobuf:protobuf-java:jar:2.4.1--Found at http://repo.maven.apache.org/maven2
commons-codec:commons-codec:jar:1.3--Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1--Found at http://repo.maven.apache.org/maven2
junit:junit:jar:4.8.2--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotscentral
11 (compile: 10, test: 1)007
diff --git a/google-api-client-assembly/dependencies/google-api-client-servlet-dependencies.html b/google-api-client-assembly/dependencies/google-api-client-servlet-dependencies.html index c4c8c7a7..37e4e4a0 100644 --- a/google-api-client-assembly/dependencies/google-api-client-servlet-dependencies.html +++ b/google-api-client-assembly/dependencies/google-api-client-servlet-dependencies.html @@ -1,5 +1,5 @@ - + @@ -10,7 +10,7 @@ @import url("./css/site.css"); - + @@ -24,8 +24,8 @@
- Last Published: 2013-07-03 -  | Version: 1.17.0-rc-SNAPSHOT + Last Published: 2013-09-04 +  | Version: 1.17.0-rc
@@ -47,7 +47,128 @@
-

Project Dependencies

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.api-clientgoogle-api-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.oauth-clientgoogle-oauth-client-servlet1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
javax.jdojdo2-api2.3-ebjarApache 2
javax.servletservlet-api2.5jar-

test

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

GroupIdArtifactIdVersionTypeLicense
junitjunit4.8.2jarCommon Public License Version 1.0

Project Transitive Dependencies

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client-jdo1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.oauth-clientgoogle-oauth-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
commons-codeccommons-codec1.3jar/LICENSE.txt
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
javax.transactiontransaction-api1.1jar-
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
xpp3xpp31.1.4cjarIndiana University Extreme! Lab Software License, vesion 1.1.1-Public Domain-Apache Software License, version 1.1

Project Dependency Graph

-

Dependency Tree

  • com.google.api-client:google-api-client-servlet:jar:1.17.0-rc-SNAPSHOT Information
    • com.google.oauth-client:google-oauth-client-servlet:jar:1.17.0-rc-SNAPSHOT (compile) Information
      • com.google.oauth-client:google-oauth-client:jar:1.17.0-rc-SNAPSHOT (compile) Information
        • com.google.http-client:google-http-client:jar:1.17.0-rc-SNAPSHOT (compile) Information
          • org.apache.httpcomponents:httpclient:jar:4.0.1 (compile) Information
            • org.apache.httpcomponents:httpcore:jar:4.0.1 (compile) Information
            • commons-logging:commons-logging:jar:1.1.1 (compile) Information
            • commons-codec:commons-codec:jar:1.3 (compile) Information
        • +
        • com.google.code.findbugs:jsr305:jar:1.3.9 (compile) Information
      • +
      • com.google.http-client:google-http-client-jdo:jar:1.17.0-rc (compile) Information
    • +
    • com.google.api-client:google-api-client:jar:1.17.0-rc (compile) Information
    • +
    • junit:junit:jar:4.8.2 (test) Information
    • +
    • javax.servlet:servlet-api:jar:2.5 (compile) Information
    • +
    • javax.jdo:jdo2-api:jar:2.3-eb (compile) Information +
        +
      • javax.transaction:transaction-api:jar:1.1 (compile) Information
+
+

Licenses

+

Apache 2: JDO2 API

+

Unknown: servlet-api, transaction-api

+

Apache License: HttpClient, HttpCore

+

Common Public License Version 1.0: JUnit

+

The Apache Software License, Version 2.0: Codec, Commons Logging, FindBugs-jsr305, Google APIs Client Library for Java, Google HTTP Client Library for Java, Google OAuth Client Library for Java, JDO extensions to the Google HTTP Client Library for Java., Servlet and JDO extensions to the Google API Client Library for Java., Servlet and JDO extensions to the Google OAuth Client Library for Java.

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
google-api-client-1.17.0-rc.jar160.21 kB11084171.5debug
jsr305-1.3.9.jar32.24 kB723531.5debug
google-http-client-1.17.0-rc.jar263.77 kB241208191.5debug
google-http-client-jdo-1.17.0-rc.jar11.45 kB14611.5debug
google-oauth-client-1.17.0-rc.jar59.62 kB574731.5debug
google-oauth-client-servlet-1.17.0-rc.jar21.59 kB241141.5debug
commons-codec-1.3.jar45.63 kB422551.2debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
jdo2-api-2.3-eb.jar188.18 kB22618271.5debug
servlet-api-2.5.jar102.65 kB684221.5debug
transaction-api-1.1.jar14.72 kB241821.3debug
junit-4.8.2.jar231.78 kB267230301.5debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
TotalSizeEntriesClassesPackagesJDK RevDebug
141.61 MB1,6341,3041271.514
compile: 13compile: 1.38 MBcompile: 1,367compile: 1,074compile: 97-compile: 13
test: 1test: 231.78 kBtest: 267test: 230test: 30-test: 1
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotscentral
com.google.api-client:google-api-client:jar:1.17.0-rc---
com.google.code.findbugs:jsr305:jar:1.3.9--Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.0-rc---
com.google.http-client:google-http-client-jdo:jar:1.17.0-rc---
com.google.oauth-client:google-oauth-client:jar:1.17.0-rc---
com.google.oauth-client:google-oauth-client-servlet:jar:1.17.0-rc---
commons-codec:commons-codec:jar:1.3--Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1--Found at http://repo.maven.apache.org/maven2
javax.jdo:jdo2-api:jar:2.3-eb--Found at http://repo.maven.apache.org/maven2
javax.servlet:servlet-api:jar:2.5--Found at http://repo.maven.apache.org/maven2
javax.transaction:transaction-api:jar:1.1--Found at http://repo.maven.apache.org/maven2
junit:junit:jar:4.8.2--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotscentral
14 (compile: 13, test: 1)009
diff --git a/google-api-client-assembly/dependencies/google-api-client-xml-dependencies.html b/google-api-client-assembly/dependencies/google-api-client-xml-dependencies.html index e3a68b7a..821a3ddb 100644 --- a/google-api-client-assembly/dependencies/google-api-client-xml-dependencies.html +++ b/google-api-client-assembly/dependencies/google-api-client-xml-dependencies.html @@ -1,53 +1,156 @@ - - - - - - Project Dependencies - - - - - - - - - -
- -
-
-
-

Project Dependencies

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.api-clientgoogle-api-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client-xml1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0

test

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

GroupIdArtifactIdVersionTypeLicense
junitjunit4.8.2jarCommon Public License Version 1.0

Project Transitive Dependencies

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.oauth-clientgoogle-oauth-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
commons-codeccommons-codec1.3jar/LICENSE.txt
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
xpp3xpp31.1.4cjarIndiana University Extreme! Lab Software License, vesion 1.1.1-Public Domain-Apache Software License, version 1.1

Project Dependency Graph

-

Dependency Tree

+
+

Licenses

+

Apache Software License, version 1.1: MXP1: Xml Pull Parser 3rd Edition (XPP3)

+

Public Domain: MXP1: Xml Pull Parser 3rd Edition (XPP3)

+

Apache License: HttpClient, HttpCore

+

Common Public License Version 1.0: JUnit

+

The Apache Software License, Version 2.0: Codec, Commons Logging, FindBugs-jsr305, Google APIs Client Library for Java, Google HTTP Client Library for Java, Google OAuth Client Library for Java, XML extensions to the Google APIs Client Library for Java, XML extensions to the Google HTTP Client Library for Java.

+

Indiana University Extreme! Lab Software License, vesion 1.1.1: MXP1: Xml Pull Parser 3rd Edition (XPP3)

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
google-api-client-1.17.0-rc.jar160.21 kB11084171.5debug
jsr305-1.3.9.jar32.24 kB723531.5debug
google-http-client-1.17.0-rc.jar263.77 kB241208191.5debug
google-http-client-xml-1.17.0-rc.jar27.28 kB281741.5debug
google-oauth-client-1.17.0-rc.jar59.62 kB574731.5debug
commons-codec-1.3.jar45.63 kB422551.2debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
junit-4.8.2.jar231.78 kB267230301.5debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
xpp3-1.1.4c.jar117.25 kB7856131.1debug
TotalSizeEntriesClassesPackagesJDK RevDebug
111.42 MB1,3841,1181281.511
compile: 10compile: 1.19 MBcompile: 1,117compile: 888compile: 98-compile: 10
test: 1test: 231.78 kBtest: 267test: 230test: 30-test: 1
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotscentral
com.google.api-client:google-api-client:jar:1.17.0-rc---
com.google.code.findbugs:jsr305:jar:1.3.9--Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.0-rc---
com.google.http-client:google-http-client-xml:jar:1.17.0-rc---
com.google.oauth-client:google-oauth-client:jar:1.17.0-rc---
commons-codec:commons-codec:jar:1.3--Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1--Found at http://repo.maven.apache.org/maven2
junit:junit:jar:4.8.2--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
xpp3:xpp3:jar:1.1.4c--Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotscentral
11 (compile: 10, test: 1)007
+
+
+
+
+
+ + + diff --git a/google-api-client-assembly/dependencies/google-http-client-android-dependencies.html b/google-api-client-assembly/dependencies/google-http-client-android-dependencies.html index 3fba1f66..4f7febd6 100644 --- a/google-api-client-assembly/dependencies/google-http-client-android-dependencies.html +++ b/google-api-client-assembly/dependencies/google-http-client-android-dependencies.html @@ -1,5 +1,5 @@ - + @@ -10,7 +10,7 @@ @import url("./css/site.css"); - + @@ -24,8 +24,8 @@
- Last Published: 2013-07-03 -  | Version: 1.17.0-rc-SNAPSHOT + Last Published: 2013-09-04 +  | Version: 1.17.0-rc
@@ -47,7 +47,120 @@
-

Project Dependencies

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.http-clientgoogle-http-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0

provided

The following is a list of provided dependencies for this project. These dependencies are required to compile the application, but should be provided by default when using the library:

GroupIdArtifactIdVersionTypeLicense
com.google.androidandroid4.1.1.4jarApache 2.0

Project Transitive Dependencies

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
commons-codeccommons-codec1.6jarThe Apache Software License, Version 2.0
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
xpp3xpp31.1.4cjarIndiana University Extreme! Lab Software License, vesion 1.1.1-Public Domain-Apache Software License, version 1.1

provided

The following is a list of provided dependencies for this project. These dependencies are required to compile the application, but should be provided by default when using the library:

GroupIdArtifactIdVersionTypeLicense
org.jsonjson20080701jarprovided without support or warranty
org.khronosopengl-apigl1.1-android-2.1_r1jarApache 2.0
xercesxmlParserAPIs2.6.2jar-

Project Dependency Graph

-

Dependency Tree

  • com.google.http-client:google-http-client-android:jar:1.17.0-rc-SNAPSHOT Information
    • com.google.android:android:jar:4.1.1.4 (provided) Information
      • commons-logging:commons-logging:jar:1.1.1 (compile) Information
      • org.apache.httpcomponents:httpclient:jar:4.0.1 (compile) Information
        • org.apache.httpcomponents:httpcore:jar:4.0.1 (compile) Information
        • commons-codec:commons-codec:jar:1.6 (compile) Information
      • +
      • com.google.http-client:google-http-client:jar:1.17.0-rc (compile) Information +
+
+

Licenses

+

Apache Software License, version 1.1: MXP1: Xml Pull Parser 3rd Edition (XPP3)

+

Public Domain: MXP1: Xml Pull Parser 3rd Edition (XPP3)

+

Unknown: xmlParserAPIs

+

Apache License: HttpClient, HttpCore

+

provided without support or warranty: JSON (JavaScript Object Notation)

+

Apache 2.0: Google Android Java ME Library (Khronos), Google Android Library

+

The Apache Software License, Version 2.0: Android Platform Extensions to the Google HTTP Client Library for Java., Commons Codec, Commons Logging, FindBugs-jsr305, Google HTTP Client Library for Java

+

Indiana University Extreme! Lab Software License, vesion 1.1.1: MXP1: Xml Pull Parser 3rd Edition (XPP3)

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
android-4.1.1.4.jar12.35 MB7,2641,698711.5debug
jsr305-1.3.9.jar32.24 kB723531.5debug
google-http-client-1.17.0-rc.jar263.77 kB241208191.5debug
commons-codec-1.6.jar227.32 kB2187661.5debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
json-20080701.jar36.99 kB261711.3debug
opengl-api-gl1.1-android-2.1_r1.jar18.06 kB251321.5debug
xmlParserAPIs-2.6.2.jar121.80 kB238207171.1release
xpp3-1.1.4c.jar117.25 kB7856131.1debug
TotalSizeEntriesClassesPackagesJDK RevDebug
1113.65 MB8,6512,7261661.510
compile: 6compile: 1.01 MBcompile: 1,020compile: 735compile: 62-compile: 6
provided: 5provided: 12.64 MBprovided: 7,631provided: 1,991provided: 104-provided: 4
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotscentral
com.google.android:android:jar:4.1.1.4--Found at http://repo.maven.apache.org/maven2
com.google.code.findbugs:jsr305:jar:1.3.9--Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.0-rc---
commons-codec:commons-codec:jar:1.6--Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.json:json:jar:20080701--Found at http://repo.maven.apache.org/maven2
org.khronos:opengl-api:jar:gl1.1-android-2.1_r1--Found at http://repo.maven.apache.org/maven2
xerces:xmlParserAPIs:jar:2.6.2--Found at http://repo.maven.apache.org/maven2
xpp3:xpp3:jar:1.1.4c--Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotscentral
11 (compile: 6, provided: 5)0010
diff --git a/google-api-client-assembly/dependencies/google-http-client-appengine-dependencies.html b/google-api-client-assembly/dependencies/google-http-client-appengine-dependencies.html index 02fa7d53..58913aa3 100644 --- a/google-api-client-assembly/dependencies/google-http-client-appengine-dependencies.html +++ b/google-api-client-assembly/dependencies/google-http-client-appengine-dependencies.html @@ -1,5 +1,5 @@ - + @@ -10,7 +10,7 @@ @import url("./css/site.css"); - + @@ -24,8 +24,8 @@
- Last Published: 2013-07-03 -  | Version: 1.17.0-rc-SNAPSHOT + Last Published: 2013-09-04 +  | Version: 1.17.0-rc
@@ -47,7 +47,126 @@
-

Project Dependencies

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.http-clientgoogle-http-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0

test

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

GroupIdArtifactIdVersionTypeLicense
com.google.appengineappengine-api-stubs1.7.7jarGoogle App Engine Terms of Service
com.google.appengineappengine-testing1.7.7jarGoogle App Engine Terms of Service
com.google.guavaguava-jdk513.0jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client-test1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
junitjunit4.8.2jarCommon Public License Version 1.0

provided

The following is a list of provided dependencies for this project. These dependencies are required to compile the application, but should be provided by default when using the library:

GroupIdArtifactIdVersionTypeLicense
com.google.appengineappengine-api-1.0-sdk1.7.7jarGoogle App Engine Terms of Service

Project Transitive Dependencies

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
commons-codeccommons-codec1.6jarThe Apache Software License, Version 2.0
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
xpp3xpp31.1.4cjarIndiana University Extreme! Lab Software License, vesion 1.1.1-Public Domain-Apache Software License, version 1.1

Project Dependency Graph

-

Dependency Tree

+
+

Licenses

+

Google App Engine Terms of Service: appengine-api-1.0-sdk, appengine-api-stubs, appengine-testing

+

Apache License: HttpClient, HttpCore

+

Common Public License Version 1.0: JUnit

+

The Apache Software License, Version 2.0: Commons Codec, Commons Logging, FindBugs-jsr305, Google App Engine extensions to the Google HTTP Client Library for Java., Google HTTP Client Library for Java, Guava: Google Core Libraries for Java, Shared classes used for testing of artifacts in the Google HTTP Client Library for Java.

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
appengine-api-1.0-sdk-1.7.7.jar30.66 MB6,5666,044861.6debug
appengine-api-stubs-1.7.7.jar12.16 MB3,0982,7851671.6debug
appengine-testing-1.7.7.jar10.32 MB2,2932,265261.6debug
jsr305-1.3.9.jar32.24 kB723531.5debug
guava-jdk5-13.0.jar1.71 MB1,3961,372131.5debug
google-http-client-1.17.0-rc.jar263.77 kB241208191.5debug
google-http-client-test-1.17.0-rc.jar51.24 kB594921.5debug
commons-codec-1.6.jar227.32 kB2187661.5debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
junit-4.8.2.jar231.78 kB267230301.5debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
TotalSizeEntriesClassesPackagesJDK RevDebug
1256.13 MB14,69913,4803861.612
compile: 6compile: 1.01 MBcompile: 1,020compile: 735compile: 62-compile: 6
test: 5test: 24.46 MBtest: 7,113test: 6,701test: 238-test: 5
provided: 1provided: 30.66 MBprovided: 6,566provided: 6,044provided: 86-provided: 1
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotscentral
com.google.appengine:appengine-api-1.0-sdk:jar:1.7.7--Found at http://repo.maven.apache.org/maven2
com.google.appengine:appengine-api-stubs:jar:1.7.7--Found at http://repo.maven.apache.org/maven2
com.google.appengine:appengine-testing:jar:1.7.7--Found at http://repo.maven.apache.org/maven2
com.google.code.findbugs:jsr305:jar:1.3.9--Found at http://repo.maven.apache.org/maven2
com.google.guava:guava-jdk5:jar:13.0--Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.0-rc---
com.google.http-client:google-http-client-test:jar:1.17.0-rc---
commons-codec:commons-codec:jar:1.6--Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1--Found at http://repo.maven.apache.org/maven2
junit:junit:jar:4.8.2--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotscentral
12 (compile: 6, test: 5, provided: 1)0010
diff --git a/google-api-client-assembly/dependencies/google-http-client-dependencies.html b/google-api-client-assembly/dependencies/google-http-client-dependencies.html index 520f6a0a..0432cc6e 100644 --- a/google-api-client-assembly/dependencies/google-http-client-dependencies.html +++ b/google-api-client-assembly/dependencies/google-http-client-dependencies.html @@ -1,5 +1,5 @@ - + @@ -10,7 +10,7 @@ @import url("./css/site.css"); - + @@ -24,8 +24,8 @@
- Last Published: 2013-07-03 -  | Version: 1.17.0-rc-SNAPSHOT + Last Published: 2013-09-04 +  | Version: 1.17.0-rc
@@ -47,7 +47,136 @@
-

Project Dependencies

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
xpp3xpp31.1.4cjarIndiana University Extreme! Lab Software License, vesion 1.1.1-Public Domain-Apache Software License, version 1.1

test

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

GroupIdArtifactIdVersionTypeLicense
junitjunit4.8.2jarCommon Public License Version 1.0
org.mockitomockito-all1.9.0jarThe MIT License

provided

The following is a list of provided dependencies for this project. These dependencies are required to compile the application, but should be provided by default when using the library:

GroupIdArtifactIdVersionTypeLicense
com.google.androidandroid1.5_r4jarApache 2.0
com.google.guavaguava-jdk513.0jarThe Apache Software License, Version 2.0
commons-codeccommons-codec1.6jarThe Apache Software License, Version 2.0

Project Transitive Dependencies

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
org.apache.httpcomponentshttpcore4.0.1jarApache License

provided

The following is a list of provided dependencies for this project. These dependencies are required to compile the application, but should be provided by default when using the library:

GroupIdArtifactIdVersionTypeLicense
org.khronosopengl-apigl1.1-android-2.1_r1jarApache 2.0
xercesxmlParserAPIs2.6.2jar-

Project Dependency Graph

-

Dependency Tree

  • com.google.http-client:google-http-client:jar:1.17.0-rc-SNAPSHOT Information
    • com.google.android:android:jar:1.5_r4 (provided) Information
      • commons-logging:commons-logging:jar:1.1.1 (compile) Information
      • org.khronos:opengl-api:jar:gl1.1-android-2.1_r1 (provided) Information
      • xerces:xmlParserAPIs:jar:2.6.2 (provided) Information
    • com.google.code.findbugs:jsr305:jar:1.3.9 (compile) Information
    • com.google.guava:guava-jdk5:jar:13.0 (provided) Information
+
+

Licenses

+

Apache Software License, version 1.1: MXP1: Xml Pull Parser 3rd Edition (XPP3)

+

Public Domain: MXP1: Xml Pull Parser 3rd Edition (XPP3)

+

Unknown: xmlParserAPIs

+

Apache License: HttpClient, HttpCore

+

Common Public License Version 1.0: JUnit

+

Apache 2.0: Google Android Java ME Library (Khronos), Google Android Library

+

The Apache Software License, Version 2.0: Commons Codec, Commons Logging, FindBugs-jsr305, Google HTTP Client Library for Java, Guava: Google Core Libraries for Java

+

The MIT License: Mockito

+

Indiana University Extreme! Lab Software License, vesion 1.1.1: MXP1: Xml Pull Parser 3rd Edition (XPP3)

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
android-1.5_r4.jar2.04 MB1,894965411.5debug
jsr305-1.3.9.jar32.24 kB723531.5debug
guava-jdk5-13.0.jar1.71 MB1,3961,372131.5debug
commons-codec-1.6.jar227.32 kB2187661.5debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
junit-4.8.2.jar231.78 kB267230301.5debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
opengl-api-gl1.1-android-2.1_r1.jar18.06 kB251321.5debug
mockito-all-1.9.0.jar1.43 MB1,279654661.5debug
xmlParserAPIs-2.6.2.jar121.80 kB238207171.1release
xpp3-1.1.4c.jar117.25 kB7856131.1debug
TotalSizeEntriesClassesPackagesJDK RevDebug
126.40 MB5,9564,0242251.511
compile: 4compile: 544.56 kBcompile: 561compile: 451compile: 37-compile: 4
test: 2test: 1.65 MBtest: 1,546test: 884test: 96-test: 2
provided: 6provided: 4.22 MBprovided: 3,849provided: 2,689provided: 92-provided: 5
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshotBlacklisted
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes-
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-YesYes
centralhttp://repo.maven.apache.org/maven2Yes--
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotscentral
com.google.android:android:jar:1.5_r4-Found at http://repo.maven.apache.org/maven2
com.google.code.findbugs:jsr305:jar:1.3.9-Found at http://repo.maven.apache.org/maven2
com.google.guava:guava-jdk5:jar:13.0-Found at http://repo.maven.apache.org/maven2
commons-codec:commons-codec:jar:1.6-Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1-Found at http://repo.maven.apache.org/maven2
junit:junit:jar:4.8.2-Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1-Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1-Found at http://repo.maven.apache.org/maven2
org.khronos:opengl-api:jar:gl1.1-android-2.1_r1-Found at http://repo.maven.apache.org/maven2
org.mockito:mockito-all:jar:1.9.0-Found at http://repo.maven.apache.org/maven2
xerces:xmlParserAPIs:jar:2.6.2-Found at http://repo.maven.apache.org/maven2
xpp3:xpp3:jar:1.1.4c-Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotscentral
12 (compile: 4, test: 2, provided: 6)012
diff --git a/google-api-client-assembly/dependencies/google-http-client-gson-dependencies.html b/google-api-client-assembly/dependencies/google-http-client-gson-dependencies.html index 8dacbead..5f0e6aeb 100644 --- a/google-api-client-assembly/dependencies/google-http-client-gson-dependencies.html +++ b/google-api-client-assembly/dependencies/google-http-client-gson-dependencies.html @@ -1,5 +1,5 @@ - + @@ -10,7 +10,7 @@ @import url("./css/site.css"); - + @@ -24,8 +24,8 @@
- Last Published: 2013-07-03 -  | Version: 1.17.0-rc-SNAPSHOT + Last Published: 2013-09-04 +  | Version: 1.17.0-rc
@@ -47,7 +47,104 @@
-

Project Dependencies

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.code.gsongson2.1jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0

test

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

GroupIdArtifactIdVersionTypeLicense
com.google.guavaguava-jdk513.0jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client-test1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
junitjunit4.8.2jarCommon Public License Version 1.0

Project Transitive Dependencies

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
commons-codeccommons-codec1.6jarThe Apache Software License, Version 2.0
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
xpp3xpp31.1.4cjarIndiana University Extreme! Lab Software License, vesion 1.1.1-Public Domain-Apache Software License, version 1.1

Project Dependency Graph

-

Dependency Tree

+
+

Licenses

+

Apache License: HttpClient, HttpCore

+

Common Public License Version 1.0: JUnit

+

The Apache Software License, Version 2.0: Commons Codec, Commons Logging, FindBugs-jsr305, GSON extensions to the Google HTTP Client Library for Java., Google HTTP Client Library for Java, Gson, Guava: Google Core Libraries for Java, Shared classes used for testing of artifacts in the Google HTTP Client Library for Java.

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
jsr305-1.3.9.jar32.24 kB723531.5debug
gson-2.1.jar175.89 kB15814861.5debug
guava-jdk5-13.0.jar1.71 MB1,3961,372131.5debug
google-http-client-1.17.0-rc.jar263.77 kB241208191.5debug
google-http-client-test-1.17.0-rc.jar51.24 kB594921.5debug
commons-codec-1.6.jar227.32 kB2187661.5debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
junit-4.8.2.jar231.78 kB267230301.5debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
TotalSizeEntriesClassesPackagesJDK RevDebug
103.17 MB2,9002,5341131.510
compile: 7compile: 1.18 MBcompile: 1,178compile: 883compile: 68-compile: 7
test: 3test: 1.98 MBtest: 1,722test: 1,651test: 45-test: 3
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotscentral
com.google.code.findbugs:jsr305:jar:1.3.9--Found at http://repo.maven.apache.org/maven2
com.google.code.gson:gson:jar:2.1--Found at http://repo.maven.apache.org/maven2
com.google.guava:guava-jdk5:jar:13.0--Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.0-rc---
com.google.http-client:google-http-client-test:jar:1.17.0-rc---
commons-codec:commons-codec:jar:1.6--Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1--Found at http://repo.maven.apache.org/maven2
junit:junit:jar:4.8.2--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotscentral
10 (compile: 7, test: 3)008
diff --git a/google-api-client-assembly/dependencies/google-http-client-jackson-dependencies.html b/google-api-client-assembly/dependencies/google-http-client-jackson-dependencies.html index 7c9f1c9a..bbca4ca8 100644 --- a/google-api-client-assembly/dependencies/google-http-client-jackson-dependencies.html +++ b/google-api-client-assembly/dependencies/google-http-client-jackson-dependencies.html @@ -1,5 +1,5 @@ - + @@ -10,7 +10,7 @@ @import url("./css/site.css"); - + @@ -24,8 +24,8 @@
- Last Published: 2013-07-03 -  | Version: 1.17.0-rc-SNAPSHOT + Last Published: 2013-09-04 +  | Version: 1.17.0-rc
@@ -47,7 +47,104 @@
-

Project Dependencies

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.http-clientgoogle-http-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
org.codehaus.jacksonjackson-core-asl1.9.11jarThe Apache Software License, Version 2.0

test

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

GroupIdArtifactIdVersionTypeLicense
com.google.guavaguava-jdk513.0jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client-test1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
junitjunit4.8.2jarCommon Public License Version 1.0

Project Transitive Dependencies

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
commons-codeccommons-codec1.6jarThe Apache Software License, Version 2.0
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
xpp3xpp31.1.4cjarIndiana University Extreme! Lab Software License, vesion 1.1.1-Public Domain-Apache Software License, version 1.1

Project Dependency Graph

-

Dependency Tree

+
+

Licenses

+

Apache License: HttpClient, HttpCore

+

Common Public License Version 1.0: JUnit

+

The Apache Software License, Version 2.0: Commons Codec, Commons Logging, FindBugs-jsr305, Google HTTP Client Library for Java, Guava: Google Core Libraries for Java, Jackson, Jackson extensions to the Google HTTP Client Library for Java., Shared classes used for testing of artifacts in the Google HTTP Client Library for Java.

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
jsr305-1.3.9.jar32.24 kB723531.5debug
guava-jdk5-13.0.jar1.71 MB1,3961,372131.5debug
google-http-client-1.17.0-rc.jar263.77 kB241208191.5debug
google-http-client-test-1.17.0-rc.jar51.24 kB594921.5debug
commons-codec-1.6.jar227.32 kB2187661.5debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
junit-4.8.2.jar231.78 kB267230301.5debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
jackson-core-asl-1.9.11.jar226.69 kB13712181.5debug
TotalSizeEntriesClassesPackagesJDK RevDebug
103.22 MB2,8792,5071151.510
compile: 7compile: 1.23 MBcompile: 1,157compile: 856compile: 70-compile: 7
test: 3test: 1.98 MBtest: 1,722test: 1,651test: 45-test: 3
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotscentral
com.google.code.findbugs:jsr305:jar:1.3.9--Found at http://repo.maven.apache.org/maven2
com.google.guava:guava-jdk5:jar:13.0--Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.0-rc---
com.google.http-client:google-http-client-test:jar:1.17.0-rc---
commons-codec:commons-codec:jar:1.6--Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1--Found at http://repo.maven.apache.org/maven2
junit:junit:jar:4.8.2--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.codehaus.jackson:jackson-core-asl:jar:1.9.11--Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotscentral
10 (compile: 7, test: 3)008
diff --git a/google-api-client-assembly/dependencies/google-http-client-jackson2-dependencies.html b/google-api-client-assembly/dependencies/google-http-client-jackson2-dependencies.html index 05975d0a..b1bc156d 100644 --- a/google-api-client-assembly/dependencies/google-http-client-jackson2-dependencies.html +++ b/google-api-client-assembly/dependencies/google-http-client-jackson2-dependencies.html @@ -1,5 +1,5 @@ - + @@ -10,7 +10,7 @@ @import url("./css/site.css"); - + @@ -24,8 +24,8 @@
- Last Published: 2013-07-03 -  | Version: 1.17.0-rc-SNAPSHOT + Last Published: 2013-09-04 +  | Version: 1.17.0-rc
@@ -47,7 +47,104 @@
-

Project Dependencies

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.fasterxml.jackson.corejackson-core2.1.3jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0

test

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

GroupIdArtifactIdVersionTypeLicense
com.google.guavaguava-jdk513.0jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client-test1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
junitjunit4.8.2jarCommon Public License Version 1.0

Project Transitive Dependencies

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
commons-codeccommons-codec1.6jarThe Apache Software License, Version 2.0
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
xpp3xpp31.1.4cjarIndiana University Extreme! Lab Software License, vesion 1.1.1-Public Domain-Apache Software License, version 1.1

Project Dependency Graph

-

Dependency Tree

+
+

Licenses

+

Apache License: HttpClient, HttpCore

+

Common Public License Version 1.0: JUnit

+

The Apache Software License, Version 2.0: Commons Codec, Commons Logging, FindBugs-jsr305, Google HTTP Client Library for Java, Guava: Google Core Libraries for Java, Jackson 2 extensions to the Google HTTP Client Library for Java., Jackson-core, Shared classes used for testing of artifacts in the Google HTTP Client Library for Java.

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
jackson-core-2.1.3.jar201.95 kB1108981.5debug
jsr305-1.3.9.jar32.24 kB723531.5debug
guava-jdk5-13.0.jar1.71 MB1,3961,372131.5debug
google-http-client-1.17.0-rc.jar263.77 kB241208191.5debug
google-http-client-test-1.17.0-rc.jar51.24 kB594921.5debug
commons-codec-1.6.jar227.32 kB2187661.5debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
junit-4.8.2.jar231.78 kB267230301.5debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
TotalSizeEntriesClassesPackagesJDK RevDebug
103.19 MB2,8522,4751151.510
compile: 7compile: 1.21 MBcompile: 1,130compile: 824compile: 70-compile: 7
test: 3test: 1.98 MBtest: 1,722test: 1,651test: 45-test: 3
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotscentral
com.fasterxml.jackson.core:jackson-core:jar:2.1.3--Found at http://repo.maven.apache.org/maven2
com.google.code.findbugs:jsr305:jar:1.3.9--Found at http://repo.maven.apache.org/maven2
com.google.guava:guava-jdk5:jar:13.0--Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.0-rc---
com.google.http-client:google-http-client-test:jar:1.17.0-rc---
commons-codec:commons-codec:jar:1.6--Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1--Found at http://repo.maven.apache.org/maven2
junit:junit:jar:4.8.2--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotscentral
10 (compile: 7, test: 3)008
diff --git a/google-api-client-assembly/dependencies/google-http-client-jdo-dependencies.html b/google-api-client-assembly/dependencies/google-http-client-jdo-dependencies.html index a377ad30..b1cf5b7b 100644 --- a/google-api-client-assembly/dependencies/google-http-client-jdo-dependencies.html +++ b/google-api-client-assembly/dependencies/google-http-client-jdo-dependencies.html @@ -1,5 +1,5 @@ - + @@ -10,7 +10,7 @@ @import url("./css/site.css"); - + @@ -24,8 +24,8 @@
- Last Published: 2013-07-03 -  | Version: 1.17.0-rc-SNAPSHOT + Last Published: 2013-09-04 +  | Version: 1.17.0-rc
@@ -47,7 +47,134 @@
-

Project Dependencies

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.http-clientgoogle-http-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
javax.jdojdo2-api2.3-ebjarApache 2

test

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

GroupIdArtifactIdVersionTypeLicense
com.google.guavaguava-jdk513.0jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client-test1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
junitjunit4.8.2jarCommon Public License Version 1.0
mysqlmysql-connector-java5.1.18jarThe GNU General Public License, Version 2
org.datanucleusdatanucleus-api-jdo3.2.1jarThe Apache Software License, Version 2.0
org.datanucleusdatanucleus-core3.2.2jarThe Apache Software License, Version 2.0
org.datanucleusdatanucleus-rdbms3.2.1jarThe Apache Software License, Version 2.0

Project Transitive Dependencies

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
commons-codeccommons-codec1.6jarThe Apache Software License, Version 2.0
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
javax.transactiontransaction-api1.1jar-
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
xpp3xpp31.1.4cjarIndiana University Extreme! Lab Software License, vesion 1.1.1-Public Domain-Apache Software License, version 1.1

Project Dependency Graph

-

Dependency Tree

+
+

Licenses

+

Apache 2: JDO2 API

+

Unknown: transaction-api

+

Apache License: HttpClient, HttpCore

+

Common Public License Version 1.0: JUnit

+

The Apache Software License, Version 2.0: Commons Codec, Commons Logging, DataNucleus Core, DataNucleus JDO API plugin, DataNucleus RDBMS, FindBugs-jsr305, Google HTTP Client Library for Java, Guava: Google Core Libraries for Java, JDO extensions to the Google HTTP Client Library for Java., Shared classes used for testing of artifacts in the Google HTTP Client Library for Java.

+

The GNU General Public License, Version 2: MySQL java connector

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
jsr305-1.3.9.jar32.24 kB723531.5debug
guava-jdk5-13.0.jar1.71 MB1,3961,372131.5debug
google-http-client-1.17.0-rc.jar263.77 kB241208191.5debug
google-http-client-test-1.17.0-rc.jar51.24 kB594921.5debug
commons-codec-1.6.jar227.32 kB2187661.5debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
jdo2-api-2.3-eb.jar188.18 kB22618271.5debug
transaction-api-1.1.jar14.72 kB241821.3debug
junit-4.8.2.jar231.78 kB267230301.5debug
mysql-connector-java-5.1.18.jar771.37 kB279245121.6debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
datanucleus-api-jdo-3.2.1.jar329.11 kB18012661.5debug
datanucleus-core-3.2.2.jar1.72 MB943841501.5debug
datanucleus-rdbms-3.2.1.jar1.69 MB768715291.6debug
TotalSizeEntriesClassesPackagesJDK RevDebug
157.68 MB5,1624,5132131.615
compile: 8compile: 1.21 MBcompile: 1,270compile: 935compile: 71-compile: 8
test: 7test: 6.47 MBtest: 3,892test: 3,578test: 142-test: 7
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
DN_M2_Repohttp://www.datanucleus.org/downloads/maven2/Yes-
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotsDN_M2_Repocentral
com.google.code.findbugs:jsr305:jar:1.3.9---Found at http://repo.maven.apache.org/maven2
com.google.guava:guava-jdk5:jar:13.0---Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.0-rc----
com.google.http-client:google-http-client-test:jar:1.17.0-rc----
commons-codec:commons-codec:jar:1.6---Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1---Found at http://repo.maven.apache.org/maven2
javax.jdo:jdo2-api:jar:2.3-eb--Found at http://www.datanucleus.org/downloads/maven2/Found at http://repo.maven.apache.org/maven2
javax.transaction:transaction-api:jar:1.1---Found at http://repo.maven.apache.org/maven2
junit:junit:jar:4.8.2---Found at http://repo.maven.apache.org/maven2
mysql:mysql-connector-java:jar:5.1.18---Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1---Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1---Found at http://repo.maven.apache.org/maven2
org.datanucleus:datanucleus-api-jdo:jar:3.2.1--Found at http://www.datanucleus.org/downloads/maven2/Found at http://repo.maven.apache.org/maven2
org.datanucleus:datanucleus-core:jar:3.2.2--Found at http://www.datanucleus.org/downloads/maven2/Found at http://repo.maven.apache.org/maven2
org.datanucleus:datanucleus-rdbms:jar:3.2.1--Found at http://www.datanucleus.org/downloads/maven2/Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotsDN_M2_Repocentral
15 (compile: 8, test: 7)00413
diff --git a/google-api-client-assembly/dependencies/google-http-client-protobuf-dependencies.html b/google-api-client-assembly/dependencies/google-http-client-protobuf-dependencies.html index 5994168b..cf1beee8 100644 --- a/google-api-client-assembly/dependencies/google-http-client-protobuf-dependencies.html +++ b/google-api-client-assembly/dependencies/google-http-client-protobuf-dependencies.html @@ -1,5 +1,5 @@ - + @@ -10,7 +10,7 @@ @import url("./css/site.css"); - + @@ -24,8 +24,8 @@
- Last Published: 2013-07-03 -  | Version: 1.17.0-rc-SNAPSHOT + Last Published: 2013-09-04 +  | Version: 1.17.0-rc
@@ -47,7 +47,92 @@
-

Project Dependencies

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.http-clientgoogle-http-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.protobufprotobuf-java2.4.1jarNew BSD license

test

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

GroupIdArtifactIdVersionTypeLicense
junitjunit4.8.2jarCommon Public License Version 1.0

Project Transitive Dependencies

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
commons-codeccommons-codec1.6jarThe Apache Software License, Version 2.0
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
xpp3xpp31.1.4cjarIndiana University Extreme! Lab Software License, vesion 1.1.1-Public Domain-Apache Software License, version 1.1

Project Dependency Graph

-

Dependency Tree

+
+

Licenses

+

Apache License: HttpClient, HttpCore

+

New BSD license: Protocol Buffer Java API

+

Common Public License Version 1.0: JUnit

+

The Apache Software License, Version 2.0: Commons Codec, Commons Logging, FindBugs-jsr305, Google HTTP Client Library for Java, Protocol Buffer extensions to the Google HTTP Client Library for Java.

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
jsr305-1.3.9.jar32.24 kB723531.5debug
google-http-client-1.17.0-rc.jar263.77 kB241208191.5debug
protobuf-java-2.4.1.jar439.73 kB21420411.5debug
commons-codec-1.6.jar227.32 kB2187661.5debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
junit-4.8.2.jar231.78 kB267230301.5debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
TotalSizeEntriesClassesPackagesJDK RevDebug
81.67 MB1,5011,169931.58
compile: 7compile: 1.44 MBcompile: 1,234compile: 939compile: 63-compile: 7
test: 1test: 231.78 kBtest: 267test: 230test: 30-test: 1
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotscentral
com.google.code.findbugs:jsr305:jar:1.3.9--Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.0-rc---
com.google.protobuf:protobuf-java:jar:2.4.1--Found at http://repo.maven.apache.org/maven2
commons-codec:commons-codec:jar:1.6--Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1--Found at http://repo.maven.apache.org/maven2
junit:junit:jar:4.8.2--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotscentral
8 (compile: 7, test: 1)007
diff --git a/google-api-client-assembly/dependencies/google-http-client-xml-dependencies.html b/google-api-client-assembly/dependencies/google-http-client-xml-dependencies.html index 64b0b031..b799e8f3 100644 --- a/google-api-client-assembly/dependencies/google-http-client-xml-dependencies.html +++ b/google-api-client-assembly/dependencies/google-http-client-xml-dependencies.html @@ -1,53 +1,144 @@ - - - - - - Project Dependencies - - - - - - - - - -
- -
-
-
-

Project Dependencies

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.http-clientgoogle-http-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
xpp3xpp31.1.4cjarIndiana University Extreme! Lab Software License, vesion 1.1.1-Public Domain-Apache Software License, version 1.1

test

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

GroupIdArtifactIdVersionTypeLicense
com.google.guavaguava-jdk513.0jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client-test1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
junitjunit4.8.2jarCommon Public License Version 1.0

Project Transitive Dependencies

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
commons-codeccommons-codec1.6jarThe Apache Software License, Version 2.0
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License

Project Dependency Graph

-

Dependency Tree

+
+

Licenses

+

Apache Software License, version 1.1: MXP1: Xml Pull Parser 3rd Edition (XPP3)

+

Public Domain: MXP1: Xml Pull Parser 3rd Edition (XPP3)

+

Apache License: HttpClient, HttpCore

+

Common Public License Version 1.0: JUnit

+

The Apache Software License, Version 2.0: Commons Codec, Commons Logging, FindBugs-jsr305, Google HTTP Client Library for Java, Guava: Google Core Libraries for Java, XML extensions to the Google HTTP Client Library for Java.

+

Indiana University Extreme! Lab Software License, vesion 1.1.1: MXP1: Xml Pull Parser 3rd Edition (XPP3)

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
jsr305-1.3.9.jar32.24 kB723531.5debug
guava-jdk5-13.0.jar1.71 MB1,3961,372131.5debug
google-http-client-1.17.0-rc.jar263.77 kB241208191.5debug
commons-codec-1.6.jar227.32 kB2187661.5debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
junit-4.8.2.jar231.78 kB267230301.5debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
xpp3-1.1.4c.jar117.25 kB7856131.1debug
TotalSizeEntriesClassesPackagesJDK RevDebug
93.06 MB2,7612,3931181.59
compile: 7compile: 1.13 MBcompile: 1,098compile: 791compile: 75-compile: 7
test: 2test: 1.93 MBtest: 1,663test: 1,602test: 43-test: 2
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotscentral
com.google.code.findbugs:jsr305:jar:1.3.9--Found at http://repo.maven.apache.org/maven2
com.google.guava:guava-jdk5:jar:13.0--Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.0-rc---
commons-codec:commons-codec:jar:1.6--Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1--Found at http://repo.maven.apache.org/maven2
junit:junit:jar:4.8.2--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
xpp3:xpp3:jar:1.1.4c--Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotscentral
9 (compile: 7, test: 2)008
+
+
+
+
+
+ + + diff --git a/google-api-client-assembly/dependencies/google-oauth-client-appengine-dependencies.html b/google-api-client-assembly/dependencies/google-oauth-client-appengine-dependencies.html index eeb3db88..8489b3df 100644 --- a/google-api-client-assembly/dependencies/google-oauth-client-appengine-dependencies.html +++ b/google-api-client-assembly/dependencies/google-oauth-client-appengine-dependencies.html @@ -1,5 +1,5 @@ - + @@ -10,7 +10,7 @@ @import url("./css/site.css"); - + @@ -24,8 +24,8 @@
- Last Published: 2013-07-03 -  | Version: 1.17.0-rc-SNAPSHOT + Last Published: 2013-09-04 +  | Version: 1.17.0-rc
@@ -47,7 +47,172 @@
-

Project Dependencies

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.http-clientgoogle-http-client-appengine1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.oauth-clientgoogle-oauth-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.oauth-clientgoogle-oauth-client-servlet1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
javax.servletservlet-api2.5jar-

test

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

GroupIdArtifactIdVersionTypeLicense
com.google.appengineappengine-api-stubs1.7.7jarGoogle App Engine Terms of Service
com.google.appengineappengine-testing1.7.7jarGoogle App Engine Terms of Service
com.google.guavaguava-jdk513.0jarThe Apache Software License, Version 2.0
junitjunit4.8.2jarCommon Public License Version 1.0

provided

The following is a list of provided dependencies for this project. These dependencies are required to compile the application, but should be provided by default when using the library:

GroupIdArtifactIdVersionTypeLicense
com.google.appengineappengine-api-1.0-sdk1.7.7jarGoogle App Engine Terms of Service

Project Transitive Dependencies

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client-jdo1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
javax.jdojdo2-api2.3-ebjarApache 2
javax.transactiontransaction-api1.1jar-
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
xpp3xpp31.1.4cjarIndiana University Extreme! Lab Software License, vesion 1.1.1-Public Domain-Apache Software License, version 1.1

provided

The following is a list of provided dependencies for this project. These dependencies are required to compile the application, but should be provided by default when using the library:

GroupIdArtifactIdVersionTypeLicense
commons-codeccommons-codec1.6jarThe Apache Software License, Version 2.0

Project Dependency Graph

-

Dependency Tree

  • com.google.oauth-client:google-oauth-client-appengine:jar:1.17.0-rc-SNAPSHOT Information
    • com.google.http-client:google-http-client-appengine:jar:1.17.0-rc-SNAPSHOT (compile) Information
      • com.google.http-client:google-http-client:jar:1.17.0-rc-SNAPSHOT (compile) Information
        • org.apache.httpcomponents:httpclient:jar:4.0.1 (compile) Information
          • org.apache.httpcomponents:httpcore:jar:4.0.1 (compile) Information
          • commons-logging:commons-logging:jar:1.1.1 (compile) Information
          • commons-codec:commons-codec:jar:1.6 (provided) Information
          • +
          • com.google.appengine:appengine-testing:jar:1.7.7 (test) Information
          • +
          • com.google.appengine:appengine-api-stubs:jar:1.7.7 (test) Information
+
+

Licenses

+

Google App Engine Terms of Service: appengine-api-1.0-sdk, appengine-api-stubs, appengine-testing

+

Apache 2: JDO2 API

+

Unknown: servlet-api, transaction-api

+

Apache License: HttpClient, HttpCore

+

Common Public License Version 1.0: JUnit

+

The Apache Software License, Version 2.0: Commons Codec, Commons Logging, FindBugs-jsr305, Google App Engine extensions to the Google HTTP Client Library for Java., Google App Engine extensions to the Google OAuth Client Library for Java., Google HTTP Client Library for Java, Google OAuth Client Library for Java, Guava: Google Core Libraries for Java, JDO extensions to the Google HTTP Client Library for Java., Servlet and JDO extensions to the Google OAuth Client Library for Java.

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
appengine-api-1.0-sdk-1.7.7.jar30.66 MB6,5666,044861.6debug
appengine-api-stubs-1.7.7.jar12.16 MB3,0982,7851671.6debug
appengine-testing-1.7.7.jar10.32 MB2,2932,265261.6debug
jsr305-1.3.9.jar32.24 kB723531.5debug
guava-jdk5-13.0.jar1.71 MB1,3961,372131.5debug
google-http-client-1.17.0-rc.jar263.77 kB241208191.5debug
google-http-client-appengine-1.17.0-rc.jar15.96 kB221221.5debug
google-http-client-jdo-1.17.0-rc.jar11.45 kB14611.5debug
google-oauth-client-1.17.0-rc.jar59.62 kB574731.5debug
google-oauth-client-servlet-1.17.0-rc.jar21.59 kB241141.5debug
commons-codec-1.6.jar227.32 kB2187661.5debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
jdo2-api-2.3-eb.jar188.18 kB22618271.5debug
servlet-api-2.5.jar102.65 kB684221.5debug
transaction-api-1.1.jar14.72 kB241821.3debug
junit-4.8.2.jar231.78 kB267230301.5debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
TotalSizeEntriesClassesPackagesJDK RevDebug
1856.49 MB15,07513,7494051.618
compile: 12compile: 1.19 MBcompile: 1,237compile: 977compile: 77-compile: 12
test: 4test: 24.41 MBtest: 7,054test: 6,652test: 236-test: 4
provided: 2provided: 30.88 MBprovided: 6,784provided: 6,120provided: 92-provided: 2
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotscentral
com.google.appengine:appengine-api-1.0-sdk:jar:1.7.7--Found at http://repo.maven.apache.org/maven2
com.google.appengine:appengine-api-stubs:jar:1.7.7--Found at http://repo.maven.apache.org/maven2
com.google.appengine:appengine-testing:jar:1.7.7--Found at http://repo.maven.apache.org/maven2
com.google.code.findbugs:jsr305:jar:1.3.9--Found at http://repo.maven.apache.org/maven2
com.google.guava:guava-jdk5:jar:13.0--Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.0-rc---
com.google.http-client:google-http-client-appengine:jar:1.17.0-rc---
com.google.http-client:google-http-client-jdo:jar:1.17.0-rc---
com.google.oauth-client:google-oauth-client:jar:1.17.0-rc---
com.google.oauth-client:google-oauth-client-servlet:jar:1.17.0-rc---
commons-codec:commons-codec:jar:1.6--Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1--Found at http://repo.maven.apache.org/maven2
javax.jdo:jdo2-api:jar:2.3-eb--Found at http://repo.maven.apache.org/maven2
javax.servlet:servlet-api:jar:2.5--Found at http://repo.maven.apache.org/maven2
javax.transaction:transaction-api:jar:1.1--Found at http://repo.maven.apache.org/maven2
junit:junit:jar:4.8.2--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotscentral
18 (compile: 12, test: 4, provided: 2)0013
diff --git a/google-api-client-assembly/dependencies/google-oauth-client-dependencies.html b/google-api-client-assembly/dependencies/google-oauth-client-dependencies.html index 4adde8b6..8173e33f 100644 --- a/google-api-client-assembly/dependencies/google-oauth-client-dependencies.html +++ b/google-api-client-assembly/dependencies/google-oauth-client-dependencies.html @@ -1,5 +1,5 @@ - + @@ -10,7 +10,7 @@ @import url("./css/site.css"); - + @@ -24,8 +24,8 @@
- Last Published: 2013-07-03 -  | Version: 1.17.0-rc-SNAPSHOT + Last Published: 2013-09-04 +  | Version: 1.17.0-rc
@@ -47,7 +47,124 @@
-

Project Dependencies

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0

test

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

GroupIdArtifactIdVersionTypeLicense
com.google.guavaguava-jdk513.0jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client-jackson1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
junitjunit4.8.2jarCommon Public License Version 1.0

Project Transitive Dependencies

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
xpp3xpp31.1.4cjarIndiana University Extreme! Lab Software License, vesion 1.1.1-Public Domain-Apache Software License, version 1.1

test

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

GroupIdArtifactIdVersionTypeLicense
org.codehaus.jacksonjackson-core-asl1.9.11jarThe Apache Software License, Version 2.0

provided

The following is a list of provided dependencies for this project. These dependencies are required to compile the application, but should be provided by default when using the library:

GroupIdArtifactIdVersionTypeLicense
commons-codeccommons-codec1.6jarThe Apache Software License, Version 2.0

Project Dependency Graph

-

Dependency Tree

+
+

Licenses

+

Apache License: HttpClient, HttpCore

+

Common Public License Version 1.0: JUnit

+

The Apache Software License, Version 2.0: Commons Codec, Commons Logging, FindBugs-jsr305, Google HTTP Client Library for Java, Google OAuth Client Library for Java, Guava: Google Core Libraries for Java, Jackson, Jackson extensions to the Google HTTP Client Library for Java.

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
jsr305-1.3.9.jar32.24 kB723531.5debug
guava-jdk5-13.0.jar1.71 MB1,3961,372131.5debug
google-http-client-1.17.0-rc.jar263.77 kB241208191.5debug
google-http-client-jackson-1.17.0-rc.jar5.90 kB12411.5debug
commons-codec-1.6.jar227.32 kB2187661.5debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
junit-4.8.2.jar231.78 kB267230301.5debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
jackson-core-asl-1.9.11.jar226.69 kB13712181.5debug
TotalSizeEntriesClassesPackagesJDK RevDebug
103.17 MB2,8322,4621141.510
compile: 5compile: 808.33 kBcompile: 802compile: 659compile: 56-compile: 5
test: 4test: 2.16 MBtest: 1,812test: 1,727test: 52-test: 4
provided: 1provided: 227.32 kBprovided: 218provided: 76provided: 6-provided: 1
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotscentral
com.google.code.findbugs:jsr305:jar:1.3.9--Found at http://repo.maven.apache.org/maven2
com.google.guava:guava-jdk5:jar:13.0--Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.0-rc---
com.google.http-client:google-http-client-jackson:jar:1.17.0-rc---
commons-codec:commons-codec:jar:1.6--Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1--Found at http://repo.maven.apache.org/maven2
junit:junit:jar:4.8.2--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.codehaus.jackson:jackson-core-asl:jar:1.9.11--Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotscentral
10 (compile: 5, test: 4, provided: 1)008
diff --git a/google-api-client-assembly/dependencies/google-oauth-client-java6-dependencies.html b/google-api-client-assembly/dependencies/google-oauth-client-java6-dependencies.html index 0f70d494..91fb9514 100644 --- a/google-api-client-assembly/dependencies/google-oauth-client-java6-dependencies.html +++ b/google-api-client-assembly/dependencies/google-oauth-client-java6-dependencies.html @@ -1,5 +1,5 @@ - + @@ -10,7 +10,7 @@ @import url("./css/site.css"); - + @@ -24,8 +24,8 @@
- Last Published: 2013-07-03 -  | Version: 1.17.0-rc-SNAPSHOT + Last Published: 2013-09-04 +  | Version: 1.17.0-rc
@@ -47,7 +47,130 @@
-

Project Dependencies

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.oauth-clientgoogle-oauth-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0

test

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

GroupIdArtifactIdVersionTypeLicense
com.google.guavaguava-jdk513.0jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client-jackson1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
junitjunit4.8.2jarCommon Public License Version 1.0

Project Transitive Dependencies

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
xpp3xpp31.1.4cjarIndiana University Extreme! Lab Software License, vesion 1.1.1-Public Domain-Apache Software License, version 1.1

test

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

GroupIdArtifactIdVersionTypeLicense
org.codehaus.jacksonjackson-core-asl1.9.11jarThe Apache Software License, Version 2.0

provided

The following is a list of provided dependencies for this project. These dependencies are required to compile the application, but should be provided by default when using the library:

GroupIdArtifactIdVersionTypeLicense
commons-codeccommons-codec1.6jarThe Apache Software License, Version 2.0

Project Dependency Graph

-

Dependency Tree

+
+

Licenses

+

Apache License: HttpClient, HttpCore

+

Common Public License Version 1.0: JUnit

+

The Apache Software License, Version 2.0: Commons Codec, Commons Logging, FindBugs-jsr305, Google HTTP Client Library for Java, Google OAuth Client Library for Java, Guava: Google Core Libraries for Java, Jackson, Jackson extensions to the Google HTTP Client Library for Java., Java 6 (and higher) extensions to the Google OAuth Client Library for Java.

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
jsr305-1.3.9.jar32.24 kB723531.5debug
guava-jdk5-13.0.jar1.71 MB1,3961,372131.5debug
google-http-client-1.17.0-rc.jar263.77 kB241208191.5debug
google-http-client-jackson-1.17.0-rc.jar5.90 kB12411.5debug
google-oauth-client-1.17.0-rc.jar59.62 kB574731.5debug
commons-codec-1.6.jar227.32 kB2187661.5debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
junit-4.8.2.jar231.78 kB267230301.5debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
jackson-core-asl-1.9.11.jar226.69 kB13712181.5debug
TotalSizeEntriesClassesPackagesJDK RevDebug
113.23 MB2,8892,5091171.511
compile: 6compile: 867.94 kBcompile: 859compile: 706compile: 59-compile: 6
test: 4test: 2.16 MBtest: 1,812test: 1,727test: 52-test: 4
provided: 1provided: 227.32 kBprovided: 218provided: 76provided: 6-provided: 1
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotscentral
com.google.code.findbugs:jsr305:jar:1.3.9--Found at http://repo.maven.apache.org/maven2
com.google.guava:guava-jdk5:jar:13.0--Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.0-rc---
com.google.http-client:google-http-client-jackson:jar:1.17.0-rc---
com.google.oauth-client:google-oauth-client:jar:1.17.0-rc---
commons-codec:commons-codec:jar:1.6--Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1--Found at http://repo.maven.apache.org/maven2
junit:junit:jar:4.8.2--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.codehaus.jackson:jackson-core-asl:jar:1.9.11--Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotscentral
11 (compile: 6, test: 4, provided: 1)008
diff --git a/google-api-client-assembly/dependencies/google-oauth-client-java7-dependencies.html b/google-api-client-assembly/dependencies/google-oauth-client-java7-dependencies.html deleted file mode 100644 index 54988c30..00000000 --- a/google-api-client-assembly/dependencies/google-oauth-client-java7-dependencies.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - Project Dependencies - - - - - - - - - -
- -
-
-
-

Project Dependencies

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.oauth-clientgoogle-oauth-client-java61.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0

test

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

GroupIdArtifactIdVersionTypeLicense
com.google.guavaguava-jdk513.0jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client-jackson1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
junitjunit4.8.2jarCommon Public License Version 1.0

Project Transitive Dependencies

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.oauth-clientgoogle-oauth-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
xpp3xpp31.1.4cjarIndiana University Extreme! Lab Software License, vesion 1.1.1-Public Domain-Apache Software License, version 1.1

test

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

GroupIdArtifactIdVersionTypeLicense
org.codehaus.jacksonjackson-core-asl1.9.11jarThe Apache Software License, Version 2.0

provided

The following is a list of provided dependencies for this project. These dependencies are required to compile the application, but should be provided by default when using the library:

GroupIdArtifactIdVersionTypeLicense
commons-codeccommons-codec1.6jarThe Apache Software License, Version 2.0

Project Dependency Graph

-

Dependency Tree

Licenses

Apache Software License, version 1.1: MXP1: Xml Pull Parser 3rd Edition (XPP3)

Public Domain: MXP1: Xml Pull Parser 3rd Edition (XPP3)

Apache License: HttpClient, HttpCore

Common Public License Version 1.0: JUnit

The Apache Software License, Version 2.0: Commons Codec, Commons Logging, FindBugs-jsr305, Google HTTP Client Library for Java, Google OAuth Client Library for Java, Guava: Google Core Libraries for Java, Jackson, Jackson extensions to the Google HTTP Client Library for Java., Java 6 (and higher) extensions to the Google OAuth Client Library for Java., [Deprecated] Java 7 (and higher) Extensions to the Google OAuth Client Library for Java.

Indiana University Extreme! Lab Software License, vesion 1.1.1: MXP1: Xml Pull Parser 3rd Edition (XPP3)

Dependency File Details

FilenameSizeEntriesClassesPackagesJDK RevDebug
jsr305-1.3.9.jar32.24 kB723531.5debug
guava-jdk5-13.0.jar1.71 MB1,3961,372131.5debug
google-http-client-1.17.0-rc-SNAPSHOT.jar288.32 kB258221231.5debug
google-http-client-jackson-1.17.0-rc-SNAPSHOT.jar5.90 kB12411.5debug
google-oauth-client-1.17.0-rc-SNAPSHOT.jar61.53 kB594931.5debug
google-oauth-client-java6-1.17.0-rc-SNAPSHOT.jar10.59 kB16611.5debug
commons-codec-1.6.jar227.32 kB2187661.5debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
junit-4.8.2.jar231.78 kB267230301.5debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
jackson-core-asl-1.9.11.jar226.69 kB13712181.5debug
xpp3-1.1.4c.jar117.25 kB7856131.1debug
TotalSizeEntriesClassesPackagesJDK RevDebug
133.38 MB3,0022,5861351.513
compile: 8compile: 1,022.25 kBcompile: 972compile: 783compile: 77-compile: 8
test: 4test: 2.16 MBtest: 1,812test: 1,727test: 52-test: 4
provided: 1provided: 227.32 kBprovided: 218provided: 76provided: 6-provided: 1

Dependency Repository Locations

Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
centralhttp://repo.maven.apache.org/maven2Yes-

Repository locations for each of the Dependencies.

Artifactapache.snapshotssonatype-nexus-snapshotscentral
com.google.code.findbugs:jsr305:jar:1.3.9--Found at http://repo.maven.apache.org/maven2
com.google.guava:guava-jdk5:jar:13.0--Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.0-rc-SNAPSHOT---
com.google.http-client:google-http-client-jackson:jar:1.17.0-rc-SNAPSHOT---
com.google.oauth-client:google-oauth-client:jar:1.17.0-rc-SNAPSHOT---
com.google.oauth-client:google-oauth-client-java6:jar:1.17.0-rc-SNAPSHOT---
commons-codec:commons-codec:jar:1.6--Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1--Found at http://repo.maven.apache.org/maven2
junit:junit:jar:4.8.2--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.codehaus.jackson:jackson-core-asl:jar:1.9.11--Found at http://repo.maven.apache.org/maven2
xpp3:xpp3:jar:1.1.4c--Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotscentral
13 (compile: 8, test: 4, provided: 1)009
-
-
-
-
-
- - - diff --git a/google-api-client-assembly/dependencies/google-oauth-client-jetty-dependencies.html b/google-api-client-assembly/dependencies/google-oauth-client-jetty-dependencies.html index 03fd31cd..7a839bc1 100644 --- a/google-api-client-assembly/dependencies/google-oauth-client-jetty-dependencies.html +++ b/google-api-client-assembly/dependencies/google-oauth-client-jetty-dependencies.html @@ -1,5 +1,5 @@ - + @@ -10,7 +10,7 @@ @import url("./css/site.css"); - + @@ -24,8 +24,8 @@
- Last Published: 2013-07-03 -  | Version: 1.17.0-rc-SNAPSHOT + Last Published: 2013-09-04 +  | Version: 1.17.0-rc
@@ -47,7 +47,110 @@
-

Project Dependencies

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.oauth-clientgoogle-oauth-client-java61.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
org.mortbay.jettyjetty6.1.26jarApache Software License - Version 2.0-Eclipse Public License - Version 1.0

Project Transitive Dependencies

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.oauth-clientgoogle-oauth-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
org.mortbay.jettyjetty-util6.1.26jarApache Software License - Version 2.0-Eclipse Public License - Version 1.0
org.mortbay.jettyservlet-api2.5-20081211jarApache License Version 2.0
xpp3xpp31.1.4cjarIndiana University Extreme! Lab Software License, vesion 1.1.1-Public Domain-Apache Software License, version 1.1

provided

The following is a list of provided dependencies for this project. These dependencies are required to compile the application, but should be provided by default when using the library:

GroupIdArtifactIdVersionTypeLicense
commons-codeccommons-codec1.6jarThe Apache Software License, Version 2.0

Project Dependency Graph

-

Dependency Tree

+
+

Licenses

+

Eclipse Public License - Version 1.0: Jetty Server, Jetty Utilities

+

Apache License: HttpClient, HttpCore

+

Apache Software License - Version 2.0: Jetty Server, Jetty Utilities

+

The Apache Software License, Version 2.0: Commons Codec, Commons Logging, FindBugs-jsr305, Google HTTP Client Library for Java, Google OAuth Client Library for Java, Java 6 (and higher) extensions to the Google OAuth Client Library for Java., Jetty extensions to the Google OAuth Client Library for Java.

+

Apache License Version 2.0: Servlet Specification API

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
jsr305-1.3.9.jar32.24 kB723531.5debug
google-http-client-1.17.0-rc.jar263.77 kB241208191.5debug
google-oauth-client-1.17.0-rc.jar59.62 kB574731.5debug
google-oauth-client-java6-1.17.0-rc.jar10.58 kB16611.5debug
commons-codec-1.6.jar227.32 kB2187661.5debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
jetty-6.1.26.jar527.26 kB267237141.4debug
jetty-util-6.1.26.jar172.98 kB12010561.4debug
servlet-api-2.5-20081211.jar130.99 kB794221.4debug
TotalSizeEntriesClassesPackagesJDK RevDebug
111.89 MB1,5591,172881.511
compile: 10compile: 1.67 MBcompile: 1,341compile: 1,096compile: 82-compile: 10
provided: 1provided: 227.32 kBprovided: 218provided: 76provided: 6-provided: 1
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
codehaus.orghttp://snapshots.repository.codehaus.org-Yes
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
java.nethttp://download.java.net/maven/2Yes-
m1.java.nethttp://download.java.net/maven/1Yes-
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactcodehaus.orgapache.snapshotssonatype-nexus-snapshotsjava.netm1.java.netcentral
com.google.code.findbugs:jsr305:jar:1.3.9-----Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.0-rc------
com.google.oauth-client:google-oauth-client:jar:1.17.0-rc------
com.google.oauth-client:google-oauth-client-java6:jar:1.17.0-rc------
commons-codec:commons-codec:jar:1.6-----Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1-----Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1-----Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1-----Found at http://repo.maven.apache.org/maven2
org.mortbay.jetty:jetty:jar:6.1.26-----Found at http://repo.maven.apache.org/maven2
org.mortbay.jetty:jetty-util:jar:6.1.26-----Found at http://repo.maven.apache.org/maven2
org.mortbay.jetty:servlet-api:jar:2.5-20081211-----Found at http://repo.maven.apache.org/maven2
Totalcodehaus.orgapache.snapshotssonatype-nexus-snapshotsjava.netm1.java.netcentral
11 (compile: 10, provided: 1)000008
diff --git a/google-api-client-assembly/dependencies/google-oauth-client-servlet-dependencies.html b/google-api-client-assembly/dependencies/google-oauth-client-servlet-dependencies.html index 903668ee..d31a7d45 100644 --- a/google-api-client-assembly/dependencies/google-oauth-client-servlet-dependencies.html +++ b/google-api-client-assembly/dependencies/google-oauth-client-servlet-dependencies.html @@ -1,5 +1,5 @@ - + @@ -10,7 +10,7 @@ @import url("./css/site.css"); - + @@ -24,8 +24,8 @@
- Last Published: 2013-07-03 -  | Version: 1.17.0-rc-SNAPSHOT + Last Published: 2013-09-04 +  | Version: 1.17.0-rc
@@ -47,7 +47,156 @@
-

Project Dependencies

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.http-clientgoogle-http-client-jdo1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.oauth-clientgoogle-oauth-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
javax.jdojdo2-api2.3-ebjarApache 2
javax.servletservlet-api2.5jar-

test

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

GroupIdArtifactIdVersionTypeLicense
com.google.guavaguava-jdk513.0jarThe Apache Software License, Version 2.0
junitjunit4.8.2jarCommon Public License Version 1.0
mysqlmysql-connector-java5.1.18jarThe GNU General Public License, Version 2
org.datanucleusdatanucleus-api-jdo3.2.1jarThe Apache Software License, Version 2.0
org.datanucleusdatanucleus-core3.2.2jarThe Apache Software License, Version 2.0
org.datanucleusdatanucleus-rdbms3.2.1jarThe Apache Software License, Version 2.0

Project Transitive Dependencies

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

compile

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client1.17.0-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
javax.transactiontransaction-api1.1jar-
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
xpp3xpp31.1.4cjarIndiana University Extreme! Lab Software License, vesion 1.1.1-Public Domain-Apache Software License, version 1.1

provided

The following is a list of provided dependencies for this project. These dependencies are required to compile the application, but should be provided by default when using the library:

GroupIdArtifactIdVersionTypeLicense
commons-codeccommons-codec1.6jarThe Apache Software License, Version 2.0

Project Dependency Graph

-

Dependency Tree

  • com.google.oauth-client:google-oauth-client-servlet:jar:1.17.0-rc-SNAPSHOT Information
    • com.google.oauth-client:google-oauth-client:jar:1.17.0-rc-SNAPSHOT (compile) Information
      • com.google.http-client:google-http-client:jar:1.17.0-rc-SNAPSHOT (compile) Information
        • org.apache.httpcomponents:httpclient:jar:4.0.1 (compile) Information
          • org.apache.httpcomponents:httpcore:jar:4.0.1 (compile) Information
          • commons-logging:commons-logging:jar:1.1.1 (compile) Information
          • commons-codec:commons-codec:jar:1.6 (provided) Information
          • +
          • org.datanucleus:datanucleus-core:jar:3.2.2 (test) Information
          • +
          • org.datanucleus:datanucleus-api-jdo:jar:3.2.1 (test) Information
          • +
          • org.datanucleus:datanucleus-rdbms:jar:3.2.1 (test) Information
          • +
          • mysql:mysql-connector-java:jar:5.1.18 (test) Information
+
+

Licenses

+

Apache 2: JDO2 API

+

Unknown: servlet-api, transaction-api

+

Apache License: HttpClient, HttpCore

+

Common Public License Version 1.0: JUnit

+

The Apache Software License, Version 2.0: Commons Codec, Commons Logging, DataNucleus Core, DataNucleus JDO API plugin, DataNucleus RDBMS, FindBugs-jsr305, Google HTTP Client Library for Java, Google OAuth Client Library for Java, Guava: Google Core Libraries for Java, JDO extensions to the Google HTTP Client Library for Java., Servlet and JDO extensions to the Google OAuth Client Library for Java.

+

The GNU General Public License, Version 2: MySQL java connector

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
jsr305-1.3.9.jar32.24 kB723531.5debug
guava-jdk5-13.0.jar1.71 MB1,3961,372131.5debug
google-http-client-1.17.0-rc.jar263.77 kB241208191.5debug
google-http-client-jdo-1.17.0-rc.jar11.45 kB14611.5debug
google-oauth-client-1.17.0-rc.jar59.62 kB574731.5debug
commons-codec-1.6.jar227.32 kB2187661.5debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
jdo2-api-2.3-eb.jar188.18 kB22618271.5debug
servlet-api-2.5.jar102.65 kB684221.5debug
transaction-api-1.1.jar14.72 kB241821.3debug
junit-4.8.2.jar231.78 kB267230301.5debug
mysql-connector-java-5.1.18.jar771.37 kB279245121.6debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
datanucleus-api-jdo-3.2.1.jar329.11 kB18012661.5debug
datanucleus-core-3.2.2.jar1.72 MB943841501.5debug
datanucleus-rdbms-3.2.1.jar1.69 MB768715291.6debug
TotalSizeEntriesClassesPackagesJDK RevDebug
177.79 MB5,2424,5592171.617
compile: 10compile: 1.16 MBcompile: 1,191compile: 954compile: 71-compile: 10
test: 6test: 6.42 MBtest: 3,833test: 3,529test: 140-test: 6
provided: 1provided: 227.32 kBprovided: 218provided: 76provided: 6-provided: 1
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
DN_M2_Repohttp://www.datanucleus.org/downloads/maven2/Yes-
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotsDN_M2_Repocentral
com.google.code.findbugs:jsr305:jar:1.3.9---Found at http://repo.maven.apache.org/maven2
com.google.guava:guava-jdk5:jar:13.0---Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.0-rc----
com.google.http-client:google-http-client-jdo:jar:1.17.0-rc----
com.google.oauth-client:google-oauth-client:jar:1.17.0-rc----
commons-codec:commons-codec:jar:1.6---Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1---Found at http://repo.maven.apache.org/maven2
javax.jdo:jdo2-api:jar:2.3-eb--Found at http://www.datanucleus.org/downloads/maven2/Found at http://repo.maven.apache.org/maven2
javax.servlet:servlet-api:jar:2.5---Found at http://repo.maven.apache.org/maven2
javax.transaction:transaction-api:jar:1.1---Found at http://repo.maven.apache.org/maven2
junit:junit:jar:4.8.2---Found at http://repo.maven.apache.org/maven2
mysql:mysql-connector-java:jar:5.1.18---Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1---Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1---Found at http://repo.maven.apache.org/maven2
org.datanucleus:datanucleus-api-jdo:jar:3.2.1--Found at http://www.datanucleus.org/downloads/maven2/Found at http://repo.maven.apache.org/maven2
org.datanucleus:datanucleus-core:jar:3.2.2--Found at http://www.datanucleus.org/downloads/maven2/Found at http://repo.maven.apache.org/maven2
org.datanucleus:datanucleus-rdbms:jar:3.2.1--Found at http://www.datanucleus.org/downloads/maven2/Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotsDN_M2_Repocentral
17 (compile: 10, test: 6, provided: 1)00414
diff --git a/google-api-client-assembly/pom.xml b/google-api-client-assembly/pom.xml index 102e7577..78807b6a 100644 --- a/google-api-client-assembly/pom.xml +++ b/google-api-client-assembly/pom.xml @@ -4,7 +4,7 @@ com.google.api-client google-api-client-parent - 1.17.0-rc-SNAPSHOT + 1.17.0-rc ../pom.xml com.google.api-client diff --git a/google-api-client-gson/pom.xml b/google-api-client-gson/pom.xml index 36eb0b80..6f5648fb 100644 --- a/google-api-client-gson/pom.xml +++ b/google-api-client-gson/pom.xml @@ -4,7 +4,7 @@ com.google.api-client google-api-client-parent - 1.17.0-rc-SNAPSHOT + 1.17.0-rc ../pom.xml google-api-client-gson diff --git a/google-api-client-jackson2/pom.xml b/google-api-client-jackson2/pom.xml index ebccb4d9..c6ad8983 100644 --- a/google-api-client-jackson2/pom.xml +++ b/google-api-client-jackson2/pom.xml @@ -4,7 +4,7 @@ com.google.api-client google-api-client-parent - 1.17.0-rc-SNAPSHOT + 1.17.0-rc ../pom.xml google-api-client-jackson2 diff --git a/google-api-client-java6/pom.xml b/google-api-client-java6/pom.xml index 220601dd..98fdb6f4 100644 --- a/google-api-client-java6/pom.xml +++ b/google-api-client-java6/pom.xml @@ -4,7 +4,7 @@ com.google.api-client google-api-client-parent - 1.17.0-rc-SNAPSHOT + 1.17.0-rc ../pom.xml google-api-client-java6 diff --git a/google-api-client-protobuf/pom.xml b/google-api-client-protobuf/pom.xml index 8e7f57a7..a962ecef 100644 --- a/google-api-client-protobuf/pom.xml +++ b/google-api-client-protobuf/pom.xml @@ -4,7 +4,7 @@ com.google.api-client google-api-client-parent - 1.17.0-rc-SNAPSHOT + 1.17.0-rc ../pom.xml google-api-client-protobuf diff --git a/google-api-client-servlet/pom.xml b/google-api-client-servlet/pom.xml index 083efd60..d00d0a70 100644 --- a/google-api-client-servlet/pom.xml +++ b/google-api-client-servlet/pom.xml @@ -4,7 +4,7 @@ com.google.api-client google-api-client-parent - 1.17.0-rc-SNAPSHOT + 1.17.0-rc ../pom.xml google-api-client-servlet diff --git a/google-api-client-xml/pom.xml b/google-api-client-xml/pom.xml index 2d45b9b3..f958a55a 100644 --- a/google-api-client-xml/pom.xml +++ b/google-api-client-xml/pom.xml @@ -4,7 +4,7 @@ com.google.api-client google-api-client-parent - 1.17.0-rc-SNAPSHOT + 1.17.0-rc ../pom.xml google-api-client-xml diff --git a/google-api-client/pom.xml b/google-api-client/pom.xml index 022a592e..5596c18c 100644 --- a/google-api-client/pom.xml +++ b/google-api-client/pom.xml @@ -4,7 +4,7 @@ com.google.api-client google-api-client-parent - 1.17.0-rc-SNAPSHOT + 1.17.0-rc ../pom.xml google-api-client diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/GoogleUtils.java b/google-api-client/src/main/java/com/google/api/client/googleapis/GoogleUtils.java index de0d99a7..ee1fb00e 100644 --- a/google-api-client/src/main/java/com/google/api/client/googleapis/GoogleUtils.java +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/GoogleUtils.java @@ -54,7 +54,7 @@ public final class GoogleUtils { /** Current release version. */ // NOTE: toString() so compiler thinks it isn't a constant, so it won't inline it public static final String VERSION = (MAJOR_VERSION + "." + MINOR_VERSION + "." + BUGFIX_VERSION - + "-rc-SNAPSHOT").toString(); + + "-rc").toString(); /** Cached value for {@link #getCertificateTrustStore()}. */ static KeyStore certTrustStore; diff --git a/pom.xml b/pom.xml index 007ce383..bcf99f31 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ com.google.api-client google-api-client-parent - 1.17.0-rc-SNAPSHOT + 1.17.0-rc pom Parent for the Google API Client Library for Java @@ -569,8 +569,8 @@ UTF-8 - 1.17.0-rc-SNAPSHOT - 1.17.0-rc-SNAPSHOT + 1.17.0-rc + 1.17.0-rc 1.3.9 2.1 1.9.11 From 73b08010642dfcc077049d7986bfec14301b0215 Mon Sep 17 00:00:00 2001 From: Nick Miceli Date: Thu, 5 Sep 2013 11:10:35 -0400 Subject: [PATCH 07/12] Add plugin configuration to maven-release-plugin --- pom.xml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pom.xml b/pom.xml index bcf99f31..9f15417f 100644 --- a/pom.xml +++ b/pom.xml @@ -286,6 +286,19 @@ maven-antrun-plugin 1.6 + + + org.apache.maven.plugins + maven-release-plugin + 2.1 + + forked-path + true + -Psonatype-oss-release ${arguments} + + maven-assembly-plugin 2.2 From aed31438683fc09875e9360b5e2bfef5549a1b36 Mon Sep 17 00:00:00 2001 From: Nick Miceli Date: Thu, 5 Sep 2013 11:16:29 -0400 Subject: [PATCH 08/12] Added tag 1.17.0-rc for changeset a0bc5096cc89 From 92613acf1ab82bfcaa8228934364a1ecc473a98e Mon Sep 17 00:00:00 2001 From: Nick Miceli Date: Thu, 5 Sep 2013 13:48:25 -0400 Subject: [PATCH 09/12] api 1.17: Start next bugfix version https://codereview.appspot.com/13563044/ --- google-api-client-android/pom.xml | 2 +- google-api-client-appengine/pom.xml | 2 +- ...-client-1.17.1-rc-SNAPSHOT.jar.properties} | 0 ...android-1.17.1-rc-SNAPSHOT.jar.properties} | 0 ...nt-gson-1.17.1-rc-SNAPSHOT.jar.properties} | 0 ...ackson2-1.17.1-rc-SNAPSHOT.jar.properties} | 0 ...rotobuf-1.17.1-rc-SNAPSHOT.jar.properties} | 0 ...ent-xml-1.17.1-rc-SNAPSHOT.jar.properties} | 0 ...-client-1.17.1-rc-SNAPSHOT.jar.properties} | 0 ...android-1.17.1-rc-SNAPSHOT.jar.properties} | 0 ...nt-gson-1.17.1-rc-SNAPSHOT.jar.properties} | 0 ...jackson-1.17.1-rc-SNAPSHOT.jar.properties} | 0 ...ackson2-1.17.1-rc-SNAPSHOT.jar.properties} | 0 ...rotobuf-1.17.1-rc-SNAPSHOT.jar.properties} | 0 ...ent-xml-1.17.1-rc-SNAPSHOT.jar.properties} | 0 ...-client-1.17.1-rc-SNAPSHOT.jar.properties} | 0 ...oogle-api-client-android-dependencies.html | 50 +++++------ ...gle-api-client-appengine-dependencies.html | 90 +++++++++---------- .../google-api-client-dependencies.html | 50 +++++------ .../google-api-client-gson-dependencies.html | 50 +++++------ ...ogle-api-client-jackson2-dependencies.html | 50 +++++------ .../google-api-client-java6-dependencies.html | 50 +++++------ ...ogle-api-client-protobuf-dependencies.html | 50 +++++------ ...oogle-api-client-servlet-dependencies.html | 60 ++++++------- .../google-api-client-xml-dependencies.html | 50 +++++------ ...ogle-http-client-android-dependencies.html | 20 ++--- ...le-http-client-appengine-dependencies.html | 28 +++--- .../google-http-client-dependencies.html | 33 ++++--- .../google-http-client-gson-dependencies.html | 28 +++--- ...ogle-http-client-jackson-dependencies.html | 28 +++--- ...gle-http-client-jackson2-dependencies.html | 28 +++--- .../google-http-client-jdo-dependencies.html | 28 +++--- ...gle-http-client-protobuf-dependencies.html | 20 ++--- .../google-http-client-xml-dependencies.html | 20 ++--- ...e-oauth-client-appengine-dependencies.html | 60 ++++++------- .../google-oauth-client-dependencies.html | 30 +++---- ...oogle-oauth-client-java6-dependencies.html | 40 ++++----- ...oogle-oauth-client-jetty-dependencies.html | 40 ++++----- ...gle-oauth-client-servlet-dependencies.html | 40 ++++----- google-api-client-assembly/pom.xml | 2 +- google-api-client-gson/pom.xml | 2 +- google-api-client-jackson2/pom.xml | 2 +- google-api-client-java6/pom.xml | 2 +- google-api-client-protobuf/pom.xml | 2 +- google-api-client-servlet/pom.xml | 2 +- google-api-client-xml/pom.xml | 2 +- google-api-client/pom.xml | 2 +- .../api/client/googleapis/GoogleUtils.java | 2 +- pom.xml | 6 +- 49 files changed, 491 insertions(+), 480 deletions(-) rename google-api-client-assembly/android-properties/{google-api-client-1.17.0-rc.jar.properties => google-api-client-1.17.1-rc-SNAPSHOT.jar.properties} (100%) rename google-api-client-assembly/android-properties/{google-api-client-android-1.17.0-rc.jar.properties => google-api-client-android-1.17.1-rc-SNAPSHOT.jar.properties} (100%) rename google-api-client-assembly/android-properties/{google-api-client-gson-1.17.0-rc.jar.properties => google-api-client-gson-1.17.1-rc-SNAPSHOT.jar.properties} (100%) rename google-api-client-assembly/android-properties/{google-api-client-jackson2-1.17.0-rc.jar.properties => google-api-client-jackson2-1.17.1-rc-SNAPSHOT.jar.properties} (100%) rename google-api-client-assembly/android-properties/{google-api-client-protobuf-1.17.0-rc.jar.properties => google-api-client-protobuf-1.17.1-rc-SNAPSHOT.jar.properties} (100%) rename google-api-client-assembly/android-properties/{google-api-client-xml-1.17.0-rc.jar.properties => google-api-client-xml-1.17.1-rc-SNAPSHOT.jar.properties} (100%) rename google-api-client-assembly/android-properties/{google-http-client-1.17.0-rc.jar.properties => google-http-client-1.17.1-rc-SNAPSHOT.jar.properties} (100%) rename google-api-client-assembly/android-properties/{google-http-client-android-1.17.0-rc.jar.properties => google-http-client-android-1.17.1-rc-SNAPSHOT.jar.properties} (100%) rename google-api-client-assembly/android-properties/{google-http-client-gson-1.17.0-rc.jar.properties => google-http-client-gson-1.17.1-rc-SNAPSHOT.jar.properties} (100%) rename google-api-client-assembly/android-properties/{google-http-client-jackson-1.17.0-rc.jar.properties => google-http-client-jackson-1.17.1-rc-SNAPSHOT.jar.properties} (100%) rename google-api-client-assembly/android-properties/{google-http-client-jackson2-1.17.0-rc.jar.properties => google-http-client-jackson2-1.17.1-rc-SNAPSHOT.jar.properties} (100%) rename google-api-client-assembly/android-properties/{google-http-client-protobuf-1.17.0-rc.jar.properties => google-http-client-protobuf-1.17.1-rc-SNAPSHOT.jar.properties} (100%) rename google-api-client-assembly/android-properties/{google-http-client-xml-1.17.0-rc.jar.properties => google-http-client-xml-1.17.1-rc-SNAPSHOT.jar.properties} (100%) rename google-api-client-assembly/android-properties/{google-oauth-client-1.17.0-rc.jar.properties => google-oauth-client-1.17.1-rc-SNAPSHOT.jar.properties} (100%) diff --git a/google-api-client-android/pom.xml b/google-api-client-android/pom.xml index f812866c..04df89d1 100644 --- a/google-api-client-android/pom.xml +++ b/google-api-client-android/pom.xml @@ -4,7 +4,7 @@ com.google.api-client google-api-client-parent - 1.17.0-rc + 1.17.1-rc-SNAPSHOT ../pom.xml google-api-client-android diff --git a/google-api-client-appengine/pom.xml b/google-api-client-appengine/pom.xml index 19b95ae6..91dca8cf 100644 --- a/google-api-client-appengine/pom.xml +++ b/google-api-client-appengine/pom.xml @@ -4,7 +4,7 @@ com.google.api-client google-api-client-parent - 1.17.0-rc + 1.17.1-rc-SNAPSHOT ../pom.xml google-api-client-appengine diff --git a/google-api-client-assembly/android-properties/google-api-client-1.17.0-rc.jar.properties b/google-api-client-assembly/android-properties/google-api-client-1.17.1-rc-SNAPSHOT.jar.properties similarity index 100% rename from google-api-client-assembly/android-properties/google-api-client-1.17.0-rc.jar.properties rename to google-api-client-assembly/android-properties/google-api-client-1.17.1-rc-SNAPSHOT.jar.properties diff --git a/google-api-client-assembly/android-properties/google-api-client-android-1.17.0-rc.jar.properties b/google-api-client-assembly/android-properties/google-api-client-android-1.17.1-rc-SNAPSHOT.jar.properties similarity index 100% rename from google-api-client-assembly/android-properties/google-api-client-android-1.17.0-rc.jar.properties rename to google-api-client-assembly/android-properties/google-api-client-android-1.17.1-rc-SNAPSHOT.jar.properties diff --git a/google-api-client-assembly/android-properties/google-api-client-gson-1.17.0-rc.jar.properties b/google-api-client-assembly/android-properties/google-api-client-gson-1.17.1-rc-SNAPSHOT.jar.properties similarity index 100% rename from google-api-client-assembly/android-properties/google-api-client-gson-1.17.0-rc.jar.properties rename to google-api-client-assembly/android-properties/google-api-client-gson-1.17.1-rc-SNAPSHOT.jar.properties diff --git a/google-api-client-assembly/android-properties/google-api-client-jackson2-1.17.0-rc.jar.properties b/google-api-client-assembly/android-properties/google-api-client-jackson2-1.17.1-rc-SNAPSHOT.jar.properties similarity index 100% rename from google-api-client-assembly/android-properties/google-api-client-jackson2-1.17.0-rc.jar.properties rename to google-api-client-assembly/android-properties/google-api-client-jackson2-1.17.1-rc-SNAPSHOT.jar.properties diff --git a/google-api-client-assembly/android-properties/google-api-client-protobuf-1.17.0-rc.jar.properties b/google-api-client-assembly/android-properties/google-api-client-protobuf-1.17.1-rc-SNAPSHOT.jar.properties similarity index 100% rename from google-api-client-assembly/android-properties/google-api-client-protobuf-1.17.0-rc.jar.properties rename to google-api-client-assembly/android-properties/google-api-client-protobuf-1.17.1-rc-SNAPSHOT.jar.properties diff --git a/google-api-client-assembly/android-properties/google-api-client-xml-1.17.0-rc.jar.properties b/google-api-client-assembly/android-properties/google-api-client-xml-1.17.1-rc-SNAPSHOT.jar.properties similarity index 100% rename from google-api-client-assembly/android-properties/google-api-client-xml-1.17.0-rc.jar.properties rename to google-api-client-assembly/android-properties/google-api-client-xml-1.17.1-rc-SNAPSHOT.jar.properties diff --git a/google-api-client-assembly/android-properties/google-http-client-1.17.0-rc.jar.properties b/google-api-client-assembly/android-properties/google-http-client-1.17.1-rc-SNAPSHOT.jar.properties similarity index 100% rename from google-api-client-assembly/android-properties/google-http-client-1.17.0-rc.jar.properties rename to google-api-client-assembly/android-properties/google-http-client-1.17.1-rc-SNAPSHOT.jar.properties diff --git a/google-api-client-assembly/android-properties/google-http-client-android-1.17.0-rc.jar.properties b/google-api-client-assembly/android-properties/google-http-client-android-1.17.1-rc-SNAPSHOT.jar.properties similarity index 100% rename from google-api-client-assembly/android-properties/google-http-client-android-1.17.0-rc.jar.properties rename to google-api-client-assembly/android-properties/google-http-client-android-1.17.1-rc-SNAPSHOT.jar.properties diff --git a/google-api-client-assembly/android-properties/google-http-client-gson-1.17.0-rc.jar.properties b/google-api-client-assembly/android-properties/google-http-client-gson-1.17.1-rc-SNAPSHOT.jar.properties similarity index 100% rename from google-api-client-assembly/android-properties/google-http-client-gson-1.17.0-rc.jar.properties rename to google-api-client-assembly/android-properties/google-http-client-gson-1.17.1-rc-SNAPSHOT.jar.properties diff --git a/google-api-client-assembly/android-properties/google-http-client-jackson-1.17.0-rc.jar.properties b/google-api-client-assembly/android-properties/google-http-client-jackson-1.17.1-rc-SNAPSHOT.jar.properties similarity index 100% rename from google-api-client-assembly/android-properties/google-http-client-jackson-1.17.0-rc.jar.properties rename to google-api-client-assembly/android-properties/google-http-client-jackson-1.17.1-rc-SNAPSHOT.jar.properties diff --git a/google-api-client-assembly/android-properties/google-http-client-jackson2-1.17.0-rc.jar.properties b/google-api-client-assembly/android-properties/google-http-client-jackson2-1.17.1-rc-SNAPSHOT.jar.properties similarity index 100% rename from google-api-client-assembly/android-properties/google-http-client-jackson2-1.17.0-rc.jar.properties rename to google-api-client-assembly/android-properties/google-http-client-jackson2-1.17.1-rc-SNAPSHOT.jar.properties diff --git a/google-api-client-assembly/android-properties/google-http-client-protobuf-1.17.0-rc.jar.properties b/google-api-client-assembly/android-properties/google-http-client-protobuf-1.17.1-rc-SNAPSHOT.jar.properties similarity index 100% rename from google-api-client-assembly/android-properties/google-http-client-protobuf-1.17.0-rc.jar.properties rename to google-api-client-assembly/android-properties/google-http-client-protobuf-1.17.1-rc-SNAPSHOT.jar.properties diff --git a/google-api-client-assembly/android-properties/google-http-client-xml-1.17.0-rc.jar.properties b/google-api-client-assembly/android-properties/google-http-client-xml-1.17.1-rc-SNAPSHOT.jar.properties similarity index 100% rename from google-api-client-assembly/android-properties/google-http-client-xml-1.17.0-rc.jar.properties rename to google-api-client-assembly/android-properties/google-http-client-xml-1.17.1-rc-SNAPSHOT.jar.properties diff --git a/google-api-client-assembly/android-properties/google-oauth-client-1.17.0-rc.jar.properties b/google-api-client-assembly/android-properties/google-oauth-client-1.17.1-rc-SNAPSHOT.jar.properties similarity index 100% rename from google-api-client-assembly/android-properties/google-oauth-client-1.17.0-rc.jar.properties rename to google-api-client-assembly/android-properties/google-oauth-client-1.17.1-rc-SNAPSHOT.jar.properties diff --git a/google-api-client-assembly/dependencies/google-api-client-android-dependencies.html b/google-api-client-assembly/dependencies/google-api-client-android-dependencies.html index 812665ab..128b3a74 100644 --- a/google-api-client-assembly/dependencies/google-api-client-android-dependencies.html +++ b/google-api-client-assembly/dependencies/google-api-client-android-dependencies.html @@ -1,5 +1,5 @@ - + @@ -10,7 +10,7 @@ @import url("./css/site.css"); - + @@ -24,8 +24,8 @@
- Last Published: 2013-09-04 -  | Version: 1.17.0-rc + Last Published: 2013-09-05 +  | Version: 1.17.1-rc-SNAPSHOT
@@ -63,13 +63,13 @@

compile

com.google.api-client google-api-client -1.17.0-rc +1.17.1-rc-SNAPSHOT jar The Apache Software License, Version 2.0 com.google.http-client google-http-client-android -1.17.0-rc +1.17.1-rc-SNAPSHOT jar The Apache Software License, Version 2.0
@@ -116,13 +116,13 @@

compile

com.google.http-client google-http-client -1.17.0-rc +1.17.1-rc-SNAPSHOT jar The Apache Software License, Version 2.0 com.google.oauth-client google-oauth-client -1.17.0-rc +1.17.1-rc-SNAPSHOT jar The Apache Software License, Version 2.0 @@ -205,7 +205,7 @@

Project Dependency Graph

+ +
+

Dependency Tree

+
+
+

Licenses

+

Apache Software License, version 1.1: MXP1: Xml Pull Parser 3rd Edition (XPP3)

+

Public Domain: MXP1: Xml Pull Parser 3rd Edition (XPP3)

+

Unknown: google-play-services, xmlParserAPIs

+

Apache License: HttpClient, HttpCore

+

provided without support or warranty: JSON (JavaScript Object Notation)

+

Apache 2.0: Google Android Java ME Library (Khronos), Google Android Library

+

The Apache Software License, Version 2.0: Android Platform Extensions to the Google APIs Client Library for Java., Android Platform Extensions to the Google HTTP Client Library for Java., Codec, Commons Logging, FindBugs-jsr305, Google APIs Client Library for Java, Google HTTP Client Library for Java, Google OAuth Client Library for Java

+

Indiana University Extreme! Lab Software License, vesion 1.1.1: MXP1: Xml Pull Parser 3rd Edition (XPP3)

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
android-4.1.1.4.jar12.35 MB7,2641,698711.5debug
google-play-services-1.jar225.92 kB246245101.5release
google-api-client-1.17.1-rc-SNAPSHOT.jar160.22 kB11084171.5debug
jsr305-1.3.9.jar32.24 kB723531.5debug
google-http-client-1.17.1-rc-SNAPSHOT.jar263.79 kB241208191.5debug
google-http-client-android-1.17.1-rc-SNAPSHOT.jar11.78 kB211131.5debug
google-oauth-client-1.17.1-rc-SNAPSHOT.jar59.63 kB574731.5debug
commons-codec-1.3.jar45.63 kB422551.2debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
json-20080701.jar36.99 kB261711.3debug
opengl-api-gl1.1-android-2.1_r1.jar18.06 kB251321.5debug
xmlParserAPIs-2.6.2.jar121.80 kB238207171.1release
xpp3-1.1.4c.jar117.25 kB7856131.1debug
TotalSizeEntriesClassesPackagesJDK RevDebug
1513.92 MB8,9093,0621981.513
compile: 9compile: 1.06 MBcompile: 1,032compile: 826compile: 84-compile: 9
provided: 6provided: 12.86 MBprovided: 7,877provided: 2,236provided: 114-provided: 4
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotscentral
com.google.android:android:jar:4.1.1.4--Found at http://repo.maven.apache.org/maven2
com.google.android.google-play-services:google-play-services:jar:1---
com.google.api-client:google-api-client:jar:1.17.1-rc-SNAPSHOT---
com.google.code.findbugs:jsr305:jar:1.3.9--Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.1-rc-SNAPSHOT---
com.google.http-client:google-http-client-android:jar:1.17.1-rc-SNAPSHOT---
com.google.oauth-client:google-oauth-client:jar:1.17.1-rc-SNAPSHOT---
commons-codec:commons-codec:jar:1.3--Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.json:json:jar:20080701--Found at http://repo.maven.apache.org/maven2
org.khronos:opengl-api:jar:gl1.1-android-2.1_r1--Found at http://repo.maven.apache.org/maven2
xerces:xmlParserAPIs:jar:2.6.2--Found at http://repo.maven.apache.org/maven2
xpp3:xpp3:jar:1.1.4c--Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotscentral
15 (compile: 9, provided: 6)0010
+
+
+
+
+
+ + + diff --git a/google-api-client-assembly/dependencies/google-api-client-appengine-dependencies.html b/google-api-client-assembly/dependencies/google-api-client-appengine-dependencies.html new file mode 100644 index 00000000..512ed039 --- /dev/null +++ b/google-api-client-assembly/dependencies/google-api-client-appengine-dependencies.html @@ -0,0 +1,877 @@ + + + + + + Project Dependencies + + + + + + + + + +
+ +
+
+
+ +
+

Project Dependencies

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.api-clientgoogle-api-client1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.api-clientgoogle-api-client-servlet1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client-appengine1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.oauth-clientgoogle-oauth-client-appengine1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
+
+

test

+

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.appengineappengine-api-labs1.7.7jarGoogle App Engine Terms of Service
com.google.appengineappengine-api-stubs1.7.7jarGoogle App Engine Terms of Service
com.google.appengineappengine-testing1.7.7jarGoogle App Engine Terms of Service
com.google.guavaguava-jdk513.0jarThe Apache Software License, Version 2.0
junitjunit4.8.2jarCommon Public License Version 1.0
+
+

provided

+

The following is a list of provided dependencies for this project. These dependencies are required to compile the application, but should be provided by default when using the library:

+ + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.appengineappengine-api-1.0-sdk1.7.7jarGoogle App Engine Terms of Service
+
+

Project Transitive Dependencies

+

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client-jdo1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.oauth-clientgoogle-oauth-client1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.oauth-clientgoogle-oauth-client-servlet1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
commons-codeccommons-codec1.3jar/LICENSE.txt
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
javax.jdojdo2-api2.3-ebjarApache 2
javax.servletservlet-api2.5jar-
javax.transactiontransaction-api1.1jar-
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
+
+

Project Dependency Graph

+ +
+

Dependency Tree

+
+
+

Licenses

+

Google App Engine Terms of Service: appengine-api-1.0-sdk, appengine-api-labs, appengine-api-stubs, appengine-testing

+

Apache 2: JDO2 API

+

Unknown: servlet-api, transaction-api

+

Apache License: HttpClient, HttpCore

+

Common Public License Version 1.0: JUnit

+

The Apache Software License, Version 2.0: Codec, Commons Logging, FindBugs-jsr305, Google APIs Client Library for Java, Google App Engine extensions to the Google API Client Library for Java., Google App Engine extensions to the Google HTTP Client Library for Java., Google App Engine extensions to the Google OAuth Client Library for Java., Google HTTP Client Library for Java, Google OAuth Client Library for Java, Guava: Google Core Libraries for Java, JDO extensions to the Google HTTP Client Library for Java., Servlet and JDO extensions to the Google API Client Library for Java., Servlet and JDO extensions to the Google OAuth Client Library for Java.

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
google-api-client-1.17.1-rc-SNAPSHOT.jar160.22 kB11084171.5debug
google-api-client-servlet-1.17.1-rc-SNAPSHOT.jar6.57 kB14411.5debug
appengine-api-1.0-sdk-1.7.7.jar30.66 MB6,5666,044861.6debug
appengine-api-labs-1.7.7.jar10.94 MB1,4481,374101.6debug
appengine-api-stubs-1.7.7.jar12.16 MB3,0982,7851671.6debug
appengine-testing-1.7.7.jar10.32 MB2,2932,265261.6debug
jsr305-1.3.9.jar32.24 kB723531.5debug
guava-jdk5-13.0.jar1.71 MB1,3961,372131.5debug
google-http-client-1.17.1-rc-SNAPSHOT.jar263.79 kB241208191.5debug
google-http-client-appengine-1.17.1-rc-SNAPSHOT.jar15.97 kB221221.5debug
google-http-client-jdo-1.17.1-rc-SNAPSHOT.jar11.46 kB14611.5debug
google-oauth-client-1.17.1-rc-SNAPSHOT.jar59.63 kB574731.5debug
google-oauth-client-appengine-1.17.1-rc-SNAPSHOT.jar7.77 kB17721.5debug
google-oauth-client-servlet-1.17.1-rc-SNAPSHOT.jar21.60 kB241141.5debug
commons-codec-1.3.jar45.63 kB422551.2debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
jdo2-api-2.3-eb.jar188.18 kB22618271.5debug
servlet-api-2.5.jar102.65 kB684221.5debug
transaction-api-1.1.jar14.72 kB241821.3debug
junit-4.8.2.jar231.78 kB267230301.5debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
TotalSizeEntriesClassesPackagesJDK RevDebug
2267.42 MB16,48815,1674341.622
compile: 16compile: 1.41 MBcompile: 1,420compile: 1,097compile: 102-compile: 16
test: 5test: 35.35 MBtest: 8,502test: 8,026test: 246-test: 5
provided: 1provided: 30.66 MBprovided: 6,566provided: 6,044provided: 86-provided: 1
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotscentral
com.google.api-client:google-api-client:jar:1.17.1-rc-SNAPSHOT---
com.google.api-client:google-api-client-servlet:jar:1.17.1-rc-SNAPSHOT---
com.google.appengine:appengine-api-1.0-sdk:jar:1.7.7--Found at http://repo.maven.apache.org/maven2
com.google.appengine:appengine-api-labs:jar:1.7.7--Found at http://repo.maven.apache.org/maven2
com.google.appengine:appengine-api-stubs:jar:1.7.7--Found at http://repo.maven.apache.org/maven2
com.google.appengine:appengine-testing:jar:1.7.7--Found at http://repo.maven.apache.org/maven2
com.google.code.findbugs:jsr305:jar:1.3.9--Found at http://repo.maven.apache.org/maven2
com.google.guava:guava-jdk5:jar:13.0--Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.1-rc-SNAPSHOT---
com.google.http-client:google-http-client-appengine:jar:1.17.1-rc-SNAPSHOT---
com.google.http-client:google-http-client-jdo:jar:1.17.1-rc-SNAPSHOT---
com.google.oauth-client:google-oauth-client:jar:1.17.1-rc-SNAPSHOT---
com.google.oauth-client:google-oauth-client-appengine:jar:1.17.1-rc-SNAPSHOT---
com.google.oauth-client:google-oauth-client-servlet:jar:1.17.1-rc-SNAPSHOT---
commons-codec:commons-codec:jar:1.3--Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1--Found at http://repo.maven.apache.org/maven2
javax.jdo:jdo2-api:jar:2.3-eb--Found at http://repo.maven.apache.org/maven2
javax.servlet:servlet-api:jar:2.5--Found at http://repo.maven.apache.org/maven2
javax.transaction:transaction-api:jar:1.1--Found at http://repo.maven.apache.org/maven2
junit:junit:jar:4.8.2--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotscentral
22 (compile: 16, test: 5, provided: 1)0014
+
+
+
+
+
+ + + diff --git a/google-api-client-assembly/dependencies/google-api-client-dependencies.html b/google-api-client-assembly/dependencies/google-api-client-dependencies.html new file mode 100644 index 00000000..e21b24ab --- /dev/null +++ b/google-api-client-assembly/dependencies/google-api-client-dependencies.html @@ -0,0 +1,631 @@ + + + + + + Project Dependencies + + + + + + + + + +
+ +
+
+
+ +
+

Project Dependencies

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.oauth-clientgoogle-oauth-client1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
+
+

test

+

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.guavaguava-jdk513.0jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client-gson1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client-jackson1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
junitjunit4.8.2jarCommon Public License Version 1.0
+
+

provided

+

The following is a list of provided dependencies for this project. These dependencies are required to compile the application, but should be provided by default when using the library:

+ + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
commons-codeccommons-codec1.6jarThe Apache Software License, Version 2.0
+
+

Project Transitive Dependencies

+

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
+
+

test

+

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

+ + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.code.gsongson2.1jarThe Apache Software License, Version 2.0
org.codehaus.jacksonjackson-core-asl1.9.11jarThe Apache Software License, Version 2.0
+
+

Project Dependency Graph

+ +
+

Dependency Tree

+
+
+

Licenses

+

Apache License: HttpClient, HttpCore

+

Common Public License Version 1.0: JUnit

+

The Apache Software License, Version 2.0: Commons Codec, Commons Logging, FindBugs-jsr305, GSON extensions to the Google HTTP Client Library for Java., Google APIs Client Library for Java, Google HTTP Client Library for Java, Google OAuth Client Library for Java, Gson, Guava: Google Core Libraries for Java, Jackson, Jackson extensions to the Google HTTP Client Library for Java.

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
jsr305-1.3.9.jar32.24 kB723531.5debug
gson-2.1.jar175.89 kB15814861.5debug
guava-jdk5-13.0.jar1.71 MB1,3961,372131.5debug
google-http-client-1.17.1-rc-SNAPSHOT.jar263.79 kB241208191.5debug
google-http-client-gson-1.17.1-rc-SNAPSHOT.jar8.36 kB14611.5debug
google-http-client-jackson-1.17.1-rc-SNAPSHOT.jar5.90 kB12411.5debug
google-oauth-client-1.17.1-rc-SNAPSHOT.jar59.63 kB574731.5debug
commons-codec-1.6.jar227.32 kB2187661.5debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
junit-4.8.2.jar231.78 kB267230301.5debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
jackson-core-asl-1.9.11.jar226.69 kB13712181.5debug
TotalSizeEntriesClassesPackagesJDK RevDebug
133.41 MB3,0612,6631241.513
compile: 6compile: 867.98 kBcompile: 859compile: 706compile: 59-compile: 6
test: 6test: 2.34 MBtest: 1,984test: 1,881test: 59-test: 6
provided: 1provided: 227.32 kBprovided: 218provided: 76provided: 6-provided: 1
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotscentral
com.google.code.findbugs:jsr305:jar:1.3.9--Found at http://repo.maven.apache.org/maven2
com.google.code.gson:gson:jar:2.1--Found at http://repo.maven.apache.org/maven2
com.google.guava:guava-jdk5:jar:13.0--Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.1-rc-SNAPSHOT---
com.google.http-client:google-http-client-gson:jar:1.17.1-rc-SNAPSHOT---
com.google.http-client:google-http-client-jackson:jar:1.17.1-rc-SNAPSHOT---
com.google.oauth-client:google-oauth-client:jar:1.17.1-rc-SNAPSHOT---
commons-codec:commons-codec:jar:1.6--Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1--Found at http://repo.maven.apache.org/maven2
junit:junit:jar:4.8.2--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.codehaus.jackson:jackson-core-asl:jar:1.9.11--Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotscentral
13 (compile: 6, test: 6, provided: 1)009
+
+
+
+
+
+ + + diff --git a/google-api-client-assembly/dependencies/google-api-client-gson-dependencies.html b/google-api-client-assembly/dependencies/google-api-client-gson-dependencies.html new file mode 100644 index 00000000..89872fd3 --- /dev/null +++ b/google-api-client-assembly/dependencies/google-api-client-gson-dependencies.html @@ -0,0 +1,495 @@ + + + + + + Project Dependencies + + + + + + + + + +
+ +
+
+
+ +
+

Project Dependencies

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.api-clientgoogle-api-client1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client-gson1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
+
+

Project Transitive Dependencies

+

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
com.google.code.gsongson2.1jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.oauth-clientgoogle-oauth-client1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
commons-codeccommons-codec1.3jar/LICENSE.txt
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
+
+

Project Dependency Graph

+ +
+

Dependency Tree

+
+
+

Licenses

+

Apache License: HttpClient, HttpCore

+

The Apache Software License, Version 2.0: Codec, Commons Logging, FindBugs-jsr305, GSON extensions to the Google APIs Client Library for Java, GSON extensions to the Google HTTP Client Library for Java., Google APIs Client Library for Java, Google HTTP Client Library for Java, Google OAuth Client Library for Java, Gson

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
google-api-client-1.17.1-rc-SNAPSHOT.jar160.22 kB11084171.5debug
jsr305-1.3.9.jar32.24 kB723531.5debug
gson-2.1.jar175.89 kB15814861.5debug
google-http-client-1.17.1-rc-SNAPSHOT.jar263.79 kB241208191.5debug
google-http-client-gson-1.17.1-rc-SNAPSHOT.jar8.36 kB14611.5debug
google-oauth-client-1.17.1-rc-SNAPSHOT.jar59.63 kB574731.5debug
commons-codec-1.3.jar45.63 kB422551.2debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
TotalSizeEntriesClassesPackagesJDK RevDebug
101.23 MB1,183969881.510
compile: 10compile: 1.23 MBcompile: 1,183compile: 969compile: 88-compile: 10
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotscentral
com.google.api-client:google-api-client:jar:1.17.1-rc-SNAPSHOT---
com.google.code.findbugs:jsr305:jar:1.3.9--Found at http://repo.maven.apache.org/maven2
com.google.code.gson:gson:jar:2.1--Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.1-rc-SNAPSHOT---
com.google.http-client:google-http-client-gson:jar:1.17.1-rc-SNAPSHOT---
com.google.oauth-client:google-oauth-client:jar:1.17.1-rc-SNAPSHOT---
commons-codec:commons-codec:jar:1.3--Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotscentral
10 (compile: 10)006
+
+
+
+
+
+ + + diff --git a/google-api-client-assembly/dependencies/google-api-client-jackson2-dependencies.html b/google-api-client-assembly/dependencies/google-api-client-jackson2-dependencies.html new file mode 100644 index 00000000..5a66683e --- /dev/null +++ b/google-api-client-assembly/dependencies/google-api-client-jackson2-dependencies.html @@ -0,0 +1,495 @@ + + + + + + Project Dependencies + + + + + + + + + +
+ +
+
+
+ +
+

Project Dependencies

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.api-clientgoogle-api-client1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client-jackson21.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
+
+

Project Transitive Dependencies

+

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.fasterxml.jackson.corejackson-core2.1.3jarThe Apache Software License, Version 2.0
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.oauth-clientgoogle-oauth-client1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
commons-codeccommons-codec1.3jar/LICENSE.txt
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
+
+

Project Dependency Graph

+ +
+

Dependency Tree

+
+
+

Licenses

+

Apache License: HttpClient, HttpCore

+

The Apache Software License, Version 2.0: Codec, Commons Logging, FindBugs-jsr305, Google APIs Client Library for Java, Google HTTP Client Library for Java, Google OAuth Client Library for Java, Jackson 2 extensions to the Google APIs Client Library for Java, Jackson 2 extensions to the Google HTTP Client Library for Java., Jackson-core

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
jackson-core-2.1.3.jar201.95 kB1108981.5debug
google-api-client-1.17.1-rc-SNAPSHOT.jar160.22 kB11084171.5debug
jsr305-1.3.9.jar32.24 kB723531.5debug
google-http-client-1.17.1-rc-SNAPSHOT.jar263.79 kB241208191.5debug
google-http-client-jackson2-1.17.1-rc-SNAPSHOT.jar6.65 kB13511.5debug
google-oauth-client-1.17.1-rc-SNAPSHOT.jar59.63 kB574731.5debug
commons-codec-1.3.jar45.63 kB422551.2debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
TotalSizeEntriesClassesPackagesJDK RevDebug
101.25 MB1,134909901.510
compile: 10compile: 1.25 MBcompile: 1,134compile: 909compile: 90-compile: 10
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotscentral
com.fasterxml.jackson.core:jackson-core:jar:2.1.3--Found at http://repo.maven.apache.org/maven2
com.google.api-client:google-api-client:jar:1.17.1-rc-SNAPSHOT---
com.google.code.findbugs:jsr305:jar:1.3.9--Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.1-rc-SNAPSHOT---
com.google.http-client:google-http-client-jackson2:jar:1.17.1-rc-SNAPSHOT---
com.google.oauth-client:google-oauth-client:jar:1.17.1-rc-SNAPSHOT---
commons-codec:commons-codec:jar:1.3--Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotscentral
10 (compile: 10)006
+
+
+
+
+
+ + + diff --git a/google-api-client-assembly/dependencies/google-api-client-java6-dependencies.html b/google-api-client-assembly/dependencies/google-api-client-java6-dependencies.html new file mode 100644 index 00000000..f301ab01 --- /dev/null +++ b/google-api-client-assembly/dependencies/google-api-client-java6-dependencies.html @@ -0,0 +1,513 @@ + + + + + + Project Dependencies + + + + + + + + + +
+ +
+
+
+ +
+

Project Dependencies

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.api-clientgoogle-api-client1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.oauth-clientgoogle-oauth-client-java61.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
+
+

test

+

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

+ + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
junitjunit4.8.2jarCommon Public License Version 1.0
+
+

Project Transitive Dependencies

+

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.oauth-clientgoogle-oauth-client1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
commons-codeccommons-codec1.3jar/LICENSE.txt
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
+
+

Project Dependency Graph

+ +
+

Dependency Tree

+
+
+

Licenses

+

Apache License: HttpClient, HttpCore

+

Common Public License Version 1.0: JUnit

+

The Apache Software License, Version 2.0: Codec, Commons Logging, FindBugs-jsr305, Google APIs Client Library for Java, Google HTTP Client Library for Java, Google OAuth Client Library for Java, Java 6 (and higher) Extensions to the Google API Client Library for Java., Java 6 (and higher) extensions to the Google OAuth Client Library for Java.

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
google-api-client-1.17.1-rc-SNAPSHOT.jar160.22 kB11084171.5debug
jsr305-1.3.9.jar32.24 kB723531.5debug
google-http-client-1.17.1-rc-SNAPSHOT.jar263.79 kB241208191.5debug
google-oauth-client-1.17.1-rc-SNAPSHOT.jar59.63 kB574731.5debug
google-oauth-client-java6-1.17.1-rc-SNAPSHOT.jar10.59 kB16611.5debug
commons-codec-1.3.jar45.63 kB422551.2debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
junit-4.8.2.jar231.78 kB267230301.5debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
TotalSizeEntriesClassesPackagesJDK RevDebug
101.29 MB1,2941,0511121.510
compile: 9compile: 1.06 MBcompile: 1,027compile: 821compile: 82-compile: 9
test: 1test: 231.78 kBtest: 267test: 230test: 30-test: 1
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotscentral
com.google.api-client:google-api-client:jar:1.17.1-rc-SNAPSHOT---
com.google.code.findbugs:jsr305:jar:1.3.9--Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.1-rc-SNAPSHOT---
com.google.oauth-client:google-oauth-client:jar:1.17.1-rc-SNAPSHOT---
com.google.oauth-client:google-oauth-client-java6:jar:1.17.1-rc-SNAPSHOT---
commons-codec:commons-codec:jar:1.3--Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1--Found at http://repo.maven.apache.org/maven2
junit:junit:jar:4.8.2--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotscentral
10 (compile: 9, test: 1)006
+
+
+
+
+
+ + + diff --git a/google-api-client-assembly/dependencies/google-api-client-protobuf-dependencies.html b/google-api-client-assembly/dependencies/google-api-client-protobuf-dependencies.html new file mode 100644 index 00000000..618a51a8 --- /dev/null +++ b/google-api-client-assembly/dependencies/google-api-client-protobuf-dependencies.html @@ -0,0 +1,543 @@ + + + + + + Project Dependencies + + + + + + + + + +
+ +
+
+
+ +
+

Project Dependencies

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.api-clientgoogle-api-client1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client-protobuf1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
+
+

test

+

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

+ + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
junitjunit4.8.2jarCommon Public License Version 1.0
+
+

Project Transitive Dependencies

+

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.oauth-clientgoogle-oauth-client1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.protobufprotobuf-java2.4.1jarNew BSD license
commons-codeccommons-codec1.3jar/LICENSE.txt
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
+
+

Project Dependency Graph

+ +
+

Dependency Tree

+
+
+

Licenses

+

Apache License: HttpClient, HttpCore

+

New BSD license: Protocol Buffer Java API

+

Common Public License Version 1.0: JUnit

+

The Apache Software License, Version 2.0: Codec, Commons Logging, FindBugs-jsr305, Google APIs Client Library for Java, Google HTTP Client Library for Java, Google OAuth Client Library for Java, Protocol Buffer extensions to the Google APIs Client Library for Java, Protocol Buffer extensions to the Google HTTP Client Library for Java.

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
google-api-client-1.17.1-rc-SNAPSHOT.jar160.22 kB11084171.5debug
jsr305-1.3.9.jar32.24 kB723531.5debug
google-http-client-1.17.1-rc-SNAPSHOT.jar263.79 kB241208191.5debug
google-http-client-protobuf-1.17.1-rc-SNAPSHOT.jar5.09 kB14521.5debug
google-oauth-client-1.17.1-rc-SNAPSHOT.jar59.63 kB574731.5debug
protobuf-java-2.4.1.jar439.73 kB21420411.5debug
commons-codec-1.3.jar45.63 kB422551.2debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
junit-4.8.2.jar231.78 kB267230301.5debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
TotalSizeEntriesClassesPackagesJDK RevDebug
111.71 MB1,5061,2541141.511
compile: 10compile: 1.48 MBcompile: 1,239compile: 1,024compile: 84-compile: 10
test: 1test: 231.78 kBtest: 267test: 230test: 30-test: 1
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotscentral
com.google.api-client:google-api-client:jar:1.17.1-rc-SNAPSHOT---
com.google.code.findbugs:jsr305:jar:1.3.9--Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.1-rc-SNAPSHOT---
com.google.http-client:google-http-client-protobuf:jar:1.17.1-rc-SNAPSHOT---
com.google.oauth-client:google-oauth-client:jar:1.17.1-rc-SNAPSHOT---
com.google.protobuf:protobuf-java:jar:2.4.1--Found at http://repo.maven.apache.org/maven2
commons-codec:commons-codec:jar:1.3--Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1--Found at http://repo.maven.apache.org/maven2
junit:junit:jar:4.8.2--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotscentral
11 (compile: 10, test: 1)007
+
+
+
+
+
+ + + diff --git a/google-api-client-assembly/dependencies/google-api-client-servlet-dependencies.html b/google-api-client-assembly/dependencies/google-api-client-servlet-dependencies.html new file mode 100644 index 00000000..2279e4fd --- /dev/null +++ b/google-api-client-assembly/dependencies/google-api-client-servlet-dependencies.html @@ -0,0 +1,626 @@ + + + + + + Project Dependencies + + + + + + + + + +
+ +
+
+
+ +
+

Project Dependencies

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.api-clientgoogle-api-client1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.oauth-clientgoogle-oauth-client-servlet1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
javax.jdojdo2-api2.3-ebjarApache 2
javax.servletservlet-api2.5jar-
+
+

test

+

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

+ + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
junitjunit4.8.2jarCommon Public License Version 1.0
+
+

Project Transitive Dependencies

+

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client-jdo1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.oauth-clientgoogle-oauth-client1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
commons-codeccommons-codec1.3jar/LICENSE.txt
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
javax.transactiontransaction-api1.1jar-
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
+
+

Project Dependency Graph

+ +
+

Dependency Tree

+
+
+

Licenses

+

Apache 2: JDO2 API

+

Unknown: servlet-api, transaction-api

+

Apache License: HttpClient, HttpCore

+

Common Public License Version 1.0: JUnit

+

The Apache Software License, Version 2.0: Codec, Commons Logging, FindBugs-jsr305, Google APIs Client Library for Java, Google HTTP Client Library for Java, Google OAuth Client Library for Java, JDO extensions to the Google HTTP Client Library for Java., Servlet and JDO extensions to the Google API Client Library for Java., Servlet and JDO extensions to the Google OAuth Client Library for Java.

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
google-api-client-1.17.1-rc-SNAPSHOT.jar160.22 kB11084171.5debug
jsr305-1.3.9.jar32.24 kB723531.5debug
google-http-client-1.17.1-rc-SNAPSHOT.jar263.79 kB241208191.5debug
google-http-client-jdo-1.17.1-rc-SNAPSHOT.jar11.46 kB14611.5debug
google-oauth-client-1.17.1-rc-SNAPSHOT.jar59.63 kB574731.5debug
google-oauth-client-servlet-1.17.1-rc-SNAPSHOT.jar21.60 kB241141.5debug
commons-codec-1.3.jar45.63 kB422551.2debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
jdo2-api-2.3-eb.jar188.18 kB22618271.5debug
servlet-api-2.5.jar102.65 kB684221.5debug
transaction-api-1.1.jar14.72 kB241821.3debug
junit-4.8.2.jar231.78 kB267230301.5debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
TotalSizeEntriesClassesPackagesJDK RevDebug
141.61 MB1,6341,3041271.514
compile: 13compile: 1.38 MBcompile: 1,367compile: 1,074compile: 97-compile: 13
test: 1test: 231.78 kBtest: 267test: 230test: 30-test: 1
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotscentral
com.google.api-client:google-api-client:jar:1.17.1-rc-SNAPSHOT---
com.google.code.findbugs:jsr305:jar:1.3.9--Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.1-rc-SNAPSHOT---
com.google.http-client:google-http-client-jdo:jar:1.17.1-rc-SNAPSHOT---
com.google.oauth-client:google-oauth-client:jar:1.17.1-rc-SNAPSHOT---
com.google.oauth-client:google-oauth-client-servlet:jar:1.17.1-rc-SNAPSHOT---
commons-codec:commons-codec:jar:1.3--Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1--Found at http://repo.maven.apache.org/maven2
javax.jdo:jdo2-api:jar:2.3-eb--Found at http://repo.maven.apache.org/maven2
javax.servlet:servlet-api:jar:2.5--Found at http://repo.maven.apache.org/maven2
javax.transaction:transaction-api:jar:1.1--Found at http://repo.maven.apache.org/maven2
junit:junit:jar:4.8.2--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotscentral
14 (compile: 13, test: 1)009
+
+
+
+
+
+ + + diff --git a/google-api-client-assembly/dependencies/google-api-client-xml-dependencies.html b/google-api-client-assembly/dependencies/google-api-client-xml-dependencies.html new file mode 100644 index 00000000..d4fd2cf4 --- /dev/null +++ b/google-api-client-assembly/dependencies/google-api-client-xml-dependencies.html @@ -0,0 +1,545 @@ + + + + + + Project Dependencies + + + + + + + + + +
+ +
+
+
+ +
+

Project Dependencies

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.api-clientgoogle-api-client1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client-xml1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
+
+

test

+

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

+ + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
junitjunit4.8.2jarCommon Public License Version 1.0
+
+

Project Transitive Dependencies

+

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.oauth-clientgoogle-oauth-client1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
commons-codeccommons-codec1.3jar/LICENSE.txt
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
xpp3xpp31.1.4cjarIndiana University Extreme! Lab Software License, vesion 1.1.1-Public Domain-Apache Software License, version 1.1
+
+

Project Dependency Graph

+ +
+

Dependency Tree

+
+
+

Licenses

+

Apache Software License, version 1.1: MXP1: Xml Pull Parser 3rd Edition (XPP3)

+

Public Domain: MXP1: Xml Pull Parser 3rd Edition (XPP3)

+

Apache License: HttpClient, HttpCore

+

Common Public License Version 1.0: JUnit

+

The Apache Software License, Version 2.0: Codec, Commons Logging, FindBugs-jsr305, Google APIs Client Library for Java, Google HTTP Client Library for Java, Google OAuth Client Library for Java, XML extensions to the Google APIs Client Library for Java, XML extensions to the Google HTTP Client Library for Java.

+

Indiana University Extreme! Lab Software License, vesion 1.1.1: MXP1: Xml Pull Parser 3rd Edition (XPP3)

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
google-api-client-1.17.1-rc-SNAPSHOT.jar160.22 kB11084171.5debug
jsr305-1.3.9.jar32.24 kB723531.5debug
google-http-client-1.17.1-rc-SNAPSHOT.jar263.79 kB241208191.5debug
google-http-client-xml-1.17.1-rc-SNAPSHOT.jar27.29 kB281741.5debug
google-oauth-client-1.17.1-rc-SNAPSHOT.jar59.63 kB574731.5debug
commons-codec-1.3.jar45.63 kB422551.2debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
junit-4.8.2.jar231.78 kB267230301.5debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
xpp3-1.1.4c.jar117.25 kB7856131.1debug
TotalSizeEntriesClassesPackagesJDK RevDebug
111.42 MB1,3841,1181281.511
compile: 10compile: 1.19 MBcompile: 1,117compile: 888compile: 98-compile: 10
test: 1test: 231.78 kBtest: 267test: 230test: 30-test: 1
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotscentral
com.google.api-client:google-api-client:jar:1.17.1-rc-SNAPSHOT---
com.google.code.findbugs:jsr305:jar:1.3.9--Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.1-rc-SNAPSHOT---
com.google.http-client:google-http-client-xml:jar:1.17.1-rc-SNAPSHOT---
com.google.oauth-client:google-oauth-client:jar:1.17.1-rc-SNAPSHOT---
commons-codec:commons-codec:jar:1.3--Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1--Found at http://repo.maven.apache.org/maven2
junit:junit:jar:4.8.2--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
xpp3:xpp3:jar:1.1.4c--Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotscentral
11 (compile: 10, test: 1)007
+
+
+
+
+
+ + + diff --git a/google-api-client-assembly/dependencies/google-http-client-android-dependencies.html b/google-api-client-assembly/dependencies/google-http-client-android-dependencies.html new file mode 100644 index 00000000..d19141c6 --- /dev/null +++ b/google-api-client-assembly/dependencies/google-http-client-android-dependencies.html @@ -0,0 +1,559 @@ + + + + + + Project Dependencies + + + + + + + + + +
+ +
+
+
+ +
+

Project Dependencies

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.http-clientgoogle-http-client1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
+
+

provided

+

The following is a list of provided dependencies for this project. These dependencies are required to compile the application, but should be provided by default when using the library:

+ + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.androidandroid4.1.1.4jarApache 2.0
+
+

Project Transitive Dependencies

+

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
commons-codeccommons-codec1.6jarThe Apache Software License, Version 2.0
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
+
+

provided

+

The following is a list of provided dependencies for this project. These dependencies are required to compile the application, but should be provided by default when using the library:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
org.jsonjson20080701jarprovided without support or warranty
org.khronosopengl-apigl1.1-android-2.1_r1jarApache 2.0
xercesxmlParserAPIs2.6.2jar-
xpp3xpp31.1.4cjarIndiana University Extreme! Lab Software License, vesion 1.1.1-Public Domain-Apache Software License, version 1.1
+
+

Project Dependency Graph

+ +
+

Dependency Tree

+
+
+

Licenses

+

Apache Software License, version 1.1: MXP1: Xml Pull Parser 3rd Edition (XPP3)

+

Public Domain: MXP1: Xml Pull Parser 3rd Edition (XPP3)

+

Unknown: xmlParserAPIs

+

Apache License: HttpClient, HttpCore

+

provided without support or warranty: JSON (JavaScript Object Notation)

+

Apache 2.0: Google Android Java ME Library (Khronos), Google Android Library

+

The Apache Software License, Version 2.0: Android Platform Extensions to the Google HTTP Client Library for Java., Commons Codec, Commons Logging, FindBugs-jsr305, Google HTTP Client Library for Java

+

Indiana University Extreme! Lab Software License, vesion 1.1.1: MXP1: Xml Pull Parser 3rd Edition (XPP3)

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
android-4.1.1.4.jar12.35 MB7,2641,698711.5debug
jsr305-1.3.9.jar32.24 kB723531.5debug
google-http-client-1.17.1-rc-SNAPSHOT.jar263.79 kB241208191.5debug
commons-codec-1.6.jar227.32 kB2187661.5debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
json-20080701.jar36.99 kB261711.3debug
opengl-api-gl1.1-android-2.1_r1.jar18.06 kB251321.5debug
xmlParserAPIs-2.6.2.jar121.80 kB238207171.1release
xpp3-1.1.4c.jar117.25 kB7856131.1debug
TotalSizeEntriesClassesPackagesJDK RevDebug
1113.65 MB8,6512,7261661.510
compile: 6compile: 1.01 MBcompile: 1,020compile: 735compile: 62-compile: 6
provided: 5provided: 12.64 MBprovided: 7,631provided: 1,991provided: 104-provided: 4
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotscentral
com.google.android:android:jar:4.1.1.4--Found at http://repo.maven.apache.org/maven2
com.google.code.findbugs:jsr305:jar:1.3.9--Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.1-rc-SNAPSHOT---
commons-codec:commons-codec:jar:1.6--Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.json:json:jar:20080701--Found at http://repo.maven.apache.org/maven2
org.khronos:opengl-api:jar:gl1.1-android-2.1_r1--Found at http://repo.maven.apache.org/maven2
xerces:xmlParserAPIs:jar:2.6.2--Found at http://repo.maven.apache.org/maven2
xpp3:xpp3:jar:1.1.4c--Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotscentral
11 (compile: 6, provided: 5)0010
+
+
+
+
+
+ + + diff --git a/google-api-client-assembly/dependencies/google-http-client-appengine-dependencies.html b/google-api-client-assembly/dependencies/google-http-client-appengine-dependencies.html new file mode 100644 index 00000000..2ca84112 --- /dev/null +++ b/google-api-client-assembly/dependencies/google-http-client-appengine-dependencies.html @@ -0,0 +1,590 @@ + + + + + + Project Dependencies + + + + + + + + + +
+ +
+
+
+ +
+

Project Dependencies

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.http-clientgoogle-http-client1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
+
+

test

+

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.appengineappengine-api-stubs1.7.7jarGoogle App Engine Terms of Service
com.google.appengineappengine-testing1.7.7jarGoogle App Engine Terms of Service
com.google.guavaguava-jdk513.0jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client-test1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
junitjunit4.8.2jarCommon Public License Version 1.0
+
+

provided

+

The following is a list of provided dependencies for this project. These dependencies are required to compile the application, but should be provided by default when using the library:

+ + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.appengineappengine-api-1.0-sdk1.7.7jarGoogle App Engine Terms of Service
+
+

Project Transitive Dependencies

+

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
commons-codeccommons-codec1.6jarThe Apache Software License, Version 2.0
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
+
+

Project Dependency Graph

+ +
+

Dependency Tree

+
+
+

Licenses

+

Google App Engine Terms of Service: appengine-api-1.0-sdk, appengine-api-stubs, appengine-testing

+

Apache License: HttpClient, HttpCore

+

Common Public License Version 1.0: JUnit

+

The Apache Software License, Version 2.0: Commons Codec, Commons Logging, FindBugs-jsr305, Google App Engine extensions to the Google HTTP Client Library for Java., Google HTTP Client Library for Java, Guava: Google Core Libraries for Java, Shared classes used for testing of artifacts in the Google HTTP Client Library for Java.

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
appengine-api-1.0-sdk-1.7.7.jar30.66 MB6,5666,044861.6debug
appengine-api-stubs-1.7.7.jar12.16 MB3,0982,7851671.6debug
appengine-testing-1.7.7.jar10.32 MB2,2932,265261.6debug
jsr305-1.3.9.jar32.24 kB723531.5debug
guava-jdk5-13.0.jar1.71 MB1,3961,372131.5debug
google-http-client-1.17.1-rc-SNAPSHOT.jar263.79 kB241208191.5debug
google-http-client-test-1.17.1-rc-SNAPSHOT.jar51.24 kB594921.5debug
commons-codec-1.6.jar227.32 kB2187661.5debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
junit-4.8.2.jar231.78 kB267230301.5debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
TotalSizeEntriesClassesPackagesJDK RevDebug
1256.13 MB14,69913,4803861.612
compile: 6compile: 1.01 MBcompile: 1,020compile: 735compile: 62-compile: 6
test: 5test: 24.46 MBtest: 7,113test: 6,701test: 238-test: 5
provided: 1provided: 30.66 MBprovided: 6,566provided: 6,044provided: 86-provided: 1
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotscentral
com.google.appengine:appengine-api-1.0-sdk:jar:1.7.7--Found at http://repo.maven.apache.org/maven2
com.google.appengine:appengine-api-stubs:jar:1.7.7--Found at http://repo.maven.apache.org/maven2
com.google.appengine:appengine-testing:jar:1.7.7--Found at http://repo.maven.apache.org/maven2
com.google.code.findbugs:jsr305:jar:1.3.9--Found at http://repo.maven.apache.org/maven2
com.google.guava:guava-jdk5:jar:13.0--Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.1-rc-SNAPSHOT---
com.google.http-client:google-http-client-test:jar:1.17.1-rc-SNAPSHOT---
commons-codec:commons-codec:jar:1.6--Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1--Found at http://repo.maven.apache.org/maven2
junit:junit:jar:4.8.2--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotscentral
12 (compile: 6, test: 5, provided: 1)0010
+
+
+
+
+
+ + + diff --git a/google-api-client-assembly/dependencies/google-http-client-dependencies.html b/google-api-client-assembly/dependencies/google-http-client-dependencies.html new file mode 100644 index 00000000..53c67d44 --- /dev/null +++ b/google-api-client-assembly/dependencies/google-http-client-dependencies.html @@ -0,0 +1,604 @@ + + + + + + Project Dependencies + + + + + + + + + +
+ +
+
+
+ +
+

Project Dependencies

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
+
+

test

+

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

+ + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
junitjunit4.8.2jarCommon Public License Version 1.0
org.mockitomockito-all1.9.0jarThe MIT License
+
+

provided

+

The following is a list of provided dependencies for this project. These dependencies are required to compile the application, but should be provided by default when using the library:

+ + + + + + + + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.androidandroid1.5_r4jarApache 2.0
com.google.guavaguava-jdk513.0jarThe Apache Software License, Version 2.0
commons-codeccommons-codec1.6jarThe Apache Software License, Version 2.0
+
+

Project Transitive Dependencies

+

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
org.apache.httpcomponentshttpcore4.0.1jarApache License
+
+

provided

+

The following is a list of provided dependencies for this project. These dependencies are required to compile the application, but should be provided by default when using the library:

+ + + + + + + + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
org.khronosopengl-apigl1.1-android-2.1_r1jarApache 2.0
xercesxmlParserAPIs2.6.2jar-
xpp3xpp31.1.4cjarIndiana University Extreme! Lab Software License, vesion 1.1.1-Public Domain-Apache Software License, version 1.1
+
+

Project Dependency Graph

+ +
+

Dependency Tree

+
+
+

Licenses

+

Apache Software License, version 1.1: MXP1: Xml Pull Parser 3rd Edition (XPP3)

+

Public Domain: MXP1: Xml Pull Parser 3rd Edition (XPP3)

+

Unknown: xmlParserAPIs

+

Apache License: HttpClient, HttpCore

+

Common Public License Version 1.0: JUnit

+

Apache 2.0: Google Android Java ME Library (Khronos), Google Android Library

+

The Apache Software License, Version 2.0: Commons Codec, Commons Logging, FindBugs-jsr305, Google HTTP Client Library for Java, Guava: Google Core Libraries for Java

+

The MIT License: Mockito

+

Indiana University Extreme! Lab Software License, vesion 1.1.1: MXP1: Xml Pull Parser 3rd Edition (XPP3)

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
android-1.5_r4.jar2.04 MB1,894965411.5debug
jsr305-1.3.9.jar32.24 kB723531.5debug
guava-jdk5-13.0.jar1.71 MB1,3961,372131.5debug
commons-codec-1.6.jar227.32 kB2187661.5debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
junit-4.8.2.jar231.78 kB267230301.5debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
opengl-api-gl1.1-android-2.1_r1.jar18.06 kB251321.5debug
mockito-all-1.9.0.jar1.43 MB1,279654661.5debug
xmlParserAPIs-2.6.2.jar121.80 kB238207171.1release
xpp3-1.1.4c.jar117.25 kB7856131.1debug
TotalSizeEntriesClassesPackagesJDK RevDebug
126.40 MB5,9564,0242251.511
compile: 4compile: 544.56 kBcompile: 561compile: 451compile: 37-compile: 4
test: 2test: 1.65 MBtest: 1,546test: 884test: 96-test: 2
provided: 6provided: 4.22 MBprovided: 3,849provided: 2,689provided: 92-provided: 5
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotscentral
com.google.android:android:jar:1.5_r4--Found at http://repo.maven.apache.org/maven2
com.google.code.findbugs:jsr305:jar:1.3.9--Found at http://repo.maven.apache.org/maven2
com.google.guava:guava-jdk5:jar:13.0--Found at http://repo.maven.apache.org/maven2
commons-codec:commons-codec:jar:1.6--Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1--Found at http://repo.maven.apache.org/maven2
junit:junit:jar:4.8.2--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.khronos:opengl-api:jar:gl1.1-android-2.1_r1--Found at http://repo.maven.apache.org/maven2
org.mockito:mockito-all:jar:1.9.0--Found at http://repo.maven.apache.org/maven2
xerces:xmlParserAPIs:jar:2.6.2--Found at http://repo.maven.apache.org/maven2
xpp3:xpp3:jar:1.1.4c--Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotscentral
12 (compile: 4, test: 2, provided: 6)0012
+
+
+
+
+
+ + + diff --git a/google-api-client-assembly/dependencies/google-http-client-gson-dependencies.html b/google-api-client-assembly/dependencies/google-http-client-gson-dependencies.html new file mode 100644 index 00000000..1c8aa08f --- /dev/null +++ b/google-api-client-assembly/dependencies/google-http-client-gson-dependencies.html @@ -0,0 +1,515 @@ + + + + + + Project Dependencies + + + + + + + + + +
+ +
+
+
+ +
+

Project Dependencies

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.code.gsongson2.1jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
+
+

test

+

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

+ + + + + + + + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.guavaguava-jdk513.0jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client-test1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
junitjunit4.8.2jarCommon Public License Version 1.0
+
+

Project Transitive Dependencies

+

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
commons-codeccommons-codec1.6jarThe Apache Software License, Version 2.0
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
+
+

Project Dependency Graph

+ +
+

Dependency Tree

+
+
+

Licenses

+

Apache License: HttpClient, HttpCore

+

Common Public License Version 1.0: JUnit

+

The Apache Software License, Version 2.0: Commons Codec, Commons Logging, FindBugs-jsr305, GSON extensions to the Google HTTP Client Library for Java., Google HTTP Client Library for Java, Gson, Guava: Google Core Libraries for Java, Shared classes used for testing of artifacts in the Google HTTP Client Library for Java.

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
jsr305-1.3.9.jar32.24 kB723531.5debug
gson-2.1.jar175.89 kB15814861.5debug
guava-jdk5-13.0.jar1.71 MB1,3961,372131.5debug
google-http-client-1.17.1-rc-SNAPSHOT.jar263.79 kB241208191.5debug
google-http-client-test-1.17.1-rc-SNAPSHOT.jar51.24 kB594921.5debug
commons-codec-1.6.jar227.32 kB2187661.5debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
junit-4.8.2.jar231.78 kB267230301.5debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
TotalSizeEntriesClassesPackagesJDK RevDebug
103.17 MB2,9002,5341131.510
compile: 7compile: 1.18 MBcompile: 1,178compile: 883compile: 68-compile: 7
test: 3test: 1.98 MBtest: 1,722test: 1,651test: 45-test: 3
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotscentral
com.google.code.findbugs:jsr305:jar:1.3.9--Found at http://repo.maven.apache.org/maven2
com.google.code.gson:gson:jar:2.1--Found at http://repo.maven.apache.org/maven2
com.google.guava:guava-jdk5:jar:13.0--Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.1-rc-SNAPSHOT---
com.google.http-client:google-http-client-test:jar:1.17.1-rc-SNAPSHOT---
commons-codec:commons-codec:jar:1.6--Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1--Found at http://repo.maven.apache.org/maven2
junit:junit:jar:4.8.2--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotscentral
10 (compile: 7, test: 3)008
+
+
+
+
+
+ + + diff --git a/google-api-client-assembly/dependencies/google-http-client-jackson-dependencies.html b/google-api-client-assembly/dependencies/google-http-client-jackson-dependencies.html new file mode 100644 index 00000000..15b7e36d --- /dev/null +++ b/google-api-client-assembly/dependencies/google-http-client-jackson-dependencies.html @@ -0,0 +1,515 @@ + + + + + + Project Dependencies + + + + + + + + + +
+ +
+
+
+ +
+

Project Dependencies

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.http-clientgoogle-http-client1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
org.codehaus.jacksonjackson-core-asl1.9.11jarThe Apache Software License, Version 2.0
+
+

test

+

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

+ + + + + + + + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.guavaguava-jdk513.0jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client-test1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
junitjunit4.8.2jarCommon Public License Version 1.0
+
+

Project Transitive Dependencies

+

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
commons-codeccommons-codec1.6jarThe Apache Software License, Version 2.0
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
+
+

Project Dependency Graph

+ +
+

Dependency Tree

+
+
+

Licenses

+

Apache License: HttpClient, HttpCore

+

Common Public License Version 1.0: JUnit

+

The Apache Software License, Version 2.0: Commons Codec, Commons Logging, FindBugs-jsr305, Google HTTP Client Library for Java, Guava: Google Core Libraries for Java, Jackson, Jackson extensions to the Google HTTP Client Library for Java., Shared classes used for testing of artifacts in the Google HTTP Client Library for Java.

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
jsr305-1.3.9.jar32.24 kB723531.5debug
guava-jdk5-13.0.jar1.71 MB1,3961,372131.5debug
google-http-client-1.17.1-rc-SNAPSHOT.jar263.79 kB241208191.5debug
google-http-client-test-1.17.1-rc-SNAPSHOT.jar51.24 kB594921.5debug
commons-codec-1.6.jar227.32 kB2187661.5debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
junit-4.8.2.jar231.78 kB267230301.5debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
jackson-core-asl-1.9.11.jar226.69 kB13712181.5debug
TotalSizeEntriesClassesPackagesJDK RevDebug
103.22 MB2,8792,5071151.510
compile: 7compile: 1.23 MBcompile: 1,157compile: 856compile: 70-compile: 7
test: 3test: 1.98 MBtest: 1,722test: 1,651test: 45-test: 3
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotscentral
com.google.code.findbugs:jsr305:jar:1.3.9--Found at http://repo.maven.apache.org/maven2
com.google.guava:guava-jdk5:jar:13.0--Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.1-rc-SNAPSHOT---
com.google.http-client:google-http-client-test:jar:1.17.1-rc-SNAPSHOT---
commons-codec:commons-codec:jar:1.6--Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1--Found at http://repo.maven.apache.org/maven2
junit:junit:jar:4.8.2--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.codehaus.jackson:jackson-core-asl:jar:1.9.11--Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotscentral
10 (compile: 7, test: 3)008
+
+
+
+
+
+ + + diff --git a/google-api-client-assembly/dependencies/google-http-client-jackson2-dependencies.html b/google-api-client-assembly/dependencies/google-http-client-jackson2-dependencies.html new file mode 100644 index 00000000..af6de679 --- /dev/null +++ b/google-api-client-assembly/dependencies/google-http-client-jackson2-dependencies.html @@ -0,0 +1,515 @@ + + + + + + Project Dependencies + + + + + + + + + +
+ +
+
+
+ +
+

Project Dependencies

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.fasterxml.jackson.corejackson-core2.1.3jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
+
+

test

+

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

+ + + + + + + + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.guavaguava-jdk513.0jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client-test1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
junitjunit4.8.2jarCommon Public License Version 1.0
+
+

Project Transitive Dependencies

+

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
commons-codeccommons-codec1.6jarThe Apache Software License, Version 2.0
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
+
+

Project Dependency Graph

+ +
+

Dependency Tree

+
+
+

Licenses

+

Apache License: HttpClient, HttpCore

+

Common Public License Version 1.0: JUnit

+

The Apache Software License, Version 2.0: Commons Codec, Commons Logging, FindBugs-jsr305, Google HTTP Client Library for Java, Guava: Google Core Libraries for Java, Jackson 2 extensions to the Google HTTP Client Library for Java., Jackson-core, Shared classes used for testing of artifacts in the Google HTTP Client Library for Java.

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
jackson-core-2.1.3.jar201.95 kB1108981.5debug
jsr305-1.3.9.jar32.24 kB723531.5debug
guava-jdk5-13.0.jar1.71 MB1,3961,372131.5debug
google-http-client-1.17.1-rc-SNAPSHOT.jar263.79 kB241208191.5debug
google-http-client-test-1.17.1-rc-SNAPSHOT.jar51.24 kB594921.5debug
commons-codec-1.6.jar227.32 kB2187661.5debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
junit-4.8.2.jar231.78 kB267230301.5debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
TotalSizeEntriesClassesPackagesJDK RevDebug
103.19 MB2,8522,4751151.510
compile: 7compile: 1.21 MBcompile: 1,130compile: 824compile: 70-compile: 7
test: 3test: 1.98 MBtest: 1,722test: 1,651test: 45-test: 3
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotscentral
com.fasterxml.jackson.core:jackson-core:jar:2.1.3--Found at http://repo.maven.apache.org/maven2
com.google.code.findbugs:jsr305:jar:1.3.9--Found at http://repo.maven.apache.org/maven2
com.google.guava:guava-jdk5:jar:13.0--Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.1-rc-SNAPSHOT---
com.google.http-client:google-http-client-test:jar:1.17.1-rc-SNAPSHOT---
commons-codec:commons-codec:jar:1.6--Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1--Found at http://repo.maven.apache.org/maven2
junit:junit:jar:4.8.2--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotscentral
10 (compile: 7, test: 3)008
+
+
+
+
+
+ + + diff --git a/google-api-client-assembly/dependencies/google-http-client-jdo-dependencies.html b/google-api-client-assembly/dependencies/google-http-client-jdo-dependencies.html new file mode 100644 index 00000000..eb097742 --- /dev/null +++ b/google-api-client-assembly/dependencies/google-http-client-jdo-dependencies.html @@ -0,0 +1,682 @@ + + + + + + Project Dependencies + + + + + + + + + +
+ +
+
+
+ +
+

Project Dependencies

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.http-clientgoogle-http-client1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
javax.jdojdo2-api2.3-ebjarApache 2
+
+

test

+

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.guavaguava-jdk513.0jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client-test1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
junitjunit4.8.2jarCommon Public License Version 1.0
mysqlmysql-connector-java5.1.18jarThe GNU General Public License, Version 2
org.datanucleusdatanucleus-api-jdo3.2.1jarThe Apache Software License, Version 2.0
org.datanucleusdatanucleus-core3.2.2jarThe Apache Software License, Version 2.0
org.datanucleusdatanucleus-rdbms3.2.1jarThe Apache Software License, Version 2.0
+
+

Project Transitive Dependencies

+

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
commons-codeccommons-codec1.6jarThe Apache Software License, Version 2.0
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
javax.transactiontransaction-api1.1jar-
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
+
+

Project Dependency Graph

+ +
+

Dependency Tree

+
+
+

Licenses

+

Apache 2: JDO2 API

+

Unknown: transaction-api

+

Apache License: HttpClient, HttpCore

+

Common Public License Version 1.0: JUnit

+

The Apache Software License, Version 2.0: Commons Codec, Commons Logging, DataNucleus Core, DataNucleus JDO API plugin, DataNucleus RDBMS, FindBugs-jsr305, Google HTTP Client Library for Java, Guava: Google Core Libraries for Java, JDO extensions to the Google HTTP Client Library for Java., Shared classes used for testing of artifacts in the Google HTTP Client Library for Java.

+

The GNU General Public License, Version 2: MySQL java connector

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
jsr305-1.3.9.jar32.24 kB723531.5debug
guava-jdk5-13.0.jar1.71 MB1,3961,372131.5debug
google-http-client-1.17.1-rc-SNAPSHOT.jar263.79 kB241208191.5debug
google-http-client-test-1.17.1-rc-SNAPSHOT.jar51.24 kB594921.5debug
commons-codec-1.6.jar227.32 kB2187661.5debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
jdo2-api-2.3-eb.jar188.18 kB22618271.5debug
transaction-api-1.1.jar14.72 kB241821.3debug
junit-4.8.2.jar231.78 kB267230301.5debug
mysql-connector-java-5.1.18.jar771.37 kB279245121.6debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
datanucleus-api-jdo-3.2.1.jar329.11 kB18012661.5debug
datanucleus-core-3.2.2.jar1.72 MB943841501.5debug
datanucleus-rdbms-3.2.1.jar1.69 MB768715291.6debug
TotalSizeEntriesClassesPackagesJDK RevDebug
157.68 MB5,1624,5132131.615
compile: 8compile: 1.21 MBcompile: 1,270compile: 935compile: 71-compile: 8
test: 7test: 6.47 MBtest: 3,892test: 3,578test: 142-test: 7
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
DN_M2_Repohttp://www.datanucleus.org/downloads/maven2/Yes-
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotsDN_M2_Repocentral
com.google.code.findbugs:jsr305:jar:1.3.9---Found at http://repo.maven.apache.org/maven2
com.google.guava:guava-jdk5:jar:13.0---Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.1-rc-SNAPSHOT----
com.google.http-client:google-http-client-test:jar:1.17.1-rc-SNAPSHOT----
commons-codec:commons-codec:jar:1.6---Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1---Found at http://repo.maven.apache.org/maven2
javax.jdo:jdo2-api:jar:2.3-eb--Found at http://www.datanucleus.org/downloads/maven2/Found at http://repo.maven.apache.org/maven2
javax.transaction:transaction-api:jar:1.1---Found at http://repo.maven.apache.org/maven2
junit:junit:jar:4.8.2---Found at http://repo.maven.apache.org/maven2
mysql:mysql-connector-java:jar:5.1.18---Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1---Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1---Found at http://repo.maven.apache.org/maven2
org.datanucleus:datanucleus-api-jdo:jar:3.2.1--Found at http://www.datanucleus.org/downloads/maven2/Found at http://repo.maven.apache.org/maven2
org.datanucleus:datanucleus-core:jar:3.2.2--Found at http://www.datanucleus.org/downloads/maven2/Found at http://repo.maven.apache.org/maven2
org.datanucleus:datanucleus-rdbms:jar:3.2.1--Found at http://www.datanucleus.org/downloads/maven2/Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotsDN_M2_Repocentral
15 (compile: 8, test: 7)00413
+
+
+
+
+
+ + + diff --git a/google-api-client-assembly/dependencies/google-http-client-protobuf-dependencies.html b/google-api-client-assembly/dependencies/google-http-client-protobuf-dependencies.html new file mode 100644 index 00000000..5074ddd3 --- /dev/null +++ b/google-api-client-assembly/dependencies/google-http-client-protobuf-dependencies.html @@ -0,0 +1,456 @@ + + + + + + Project Dependencies + + + + + + + + + +
+ +
+
+
+ +
+

Project Dependencies

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.http-clientgoogle-http-client1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.protobufprotobuf-java2.4.1jarNew BSD license
+
+

test

+

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

+ + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
junitjunit4.8.2jarCommon Public License Version 1.0
+
+

Project Transitive Dependencies

+

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
commons-codeccommons-codec1.6jarThe Apache Software License, Version 2.0
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
+
+

Project Dependency Graph

+ +
+

Dependency Tree

+
+
+

Licenses

+

Apache License: HttpClient, HttpCore

+

New BSD license: Protocol Buffer Java API

+

Common Public License Version 1.0: JUnit

+

The Apache Software License, Version 2.0: Commons Codec, Commons Logging, FindBugs-jsr305, Google HTTP Client Library for Java, Protocol Buffer extensions to the Google HTTP Client Library for Java.

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
jsr305-1.3.9.jar32.24 kB723531.5debug
google-http-client-1.17.1-rc-SNAPSHOT.jar263.79 kB241208191.5debug
protobuf-java-2.4.1.jar439.73 kB21420411.5debug
commons-codec-1.6.jar227.32 kB2187661.5debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
junit-4.8.2.jar231.78 kB267230301.5debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
TotalSizeEntriesClassesPackagesJDK RevDebug
81.67 MB1,5011,169931.58
compile: 7compile: 1.44 MBcompile: 1,234compile: 939compile: 63-compile: 7
test: 1test: 231.78 kBtest: 267test: 230test: 30-test: 1
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotscentral
com.google.code.findbugs:jsr305:jar:1.3.9--Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.1-rc-SNAPSHOT---
com.google.protobuf:protobuf-java:jar:2.4.1--Found at http://repo.maven.apache.org/maven2
commons-codec:commons-codec:jar:1.6--Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1--Found at http://repo.maven.apache.org/maven2
junit:junit:jar:4.8.2--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotscentral
8 (compile: 7, test: 1)007
+
+
+
+
+
+ + + diff --git a/google-api-client-assembly/dependencies/google-http-client-xml-dependencies.html b/google-api-client-assembly/dependencies/google-http-client-xml-dependencies.html new file mode 100644 index 00000000..6e9b9b16 --- /dev/null +++ b/google-api-client-assembly/dependencies/google-http-client-xml-dependencies.html @@ -0,0 +1,490 @@ + + + + + + Project Dependencies + + + + + + + + + +
+ +
+
+
+ +
+

Project Dependencies

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.http-clientgoogle-http-client1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
xpp3xpp31.1.4cjarIndiana University Extreme! Lab Software License, vesion 1.1.1-Public Domain-Apache Software License, version 1.1
+
+

test

+

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

+ + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.guavaguava-jdk513.0jarThe Apache Software License, Version 2.0
junitjunit4.8.2jarCommon Public License Version 1.0
+
+

Project Transitive Dependencies

+

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
commons-codeccommons-codec1.6jarThe Apache Software License, Version 2.0
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
+
+

Project Dependency Graph

+ +
+

Dependency Tree

+
+
+

Licenses

+

Apache Software License, version 1.1: MXP1: Xml Pull Parser 3rd Edition (XPP3)

+

Public Domain: MXP1: Xml Pull Parser 3rd Edition (XPP3)

+

Apache License: HttpClient, HttpCore

+

Common Public License Version 1.0: JUnit

+

The Apache Software License, Version 2.0: Commons Codec, Commons Logging, FindBugs-jsr305, Google HTTP Client Library for Java, Guava: Google Core Libraries for Java, XML extensions to the Google HTTP Client Library for Java.

+

Indiana University Extreme! Lab Software License, vesion 1.1.1: MXP1: Xml Pull Parser 3rd Edition (XPP3)

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
jsr305-1.3.9.jar32.24 kB723531.5debug
guava-jdk5-13.0.jar1.71 MB1,3961,372131.5debug
google-http-client-1.17.1-rc-SNAPSHOT.jar263.79 kB241208191.5debug
commons-codec-1.6.jar227.32 kB2187661.5debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
junit-4.8.2.jar231.78 kB267230301.5debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
xpp3-1.1.4c.jar117.25 kB7856131.1debug
TotalSizeEntriesClassesPackagesJDK RevDebug
93.06 MB2,7612,3931181.59
compile: 7compile: 1.13 MBcompile: 1,098compile: 791compile: 75-compile: 7
test: 2test: 1.93 MBtest: 1,663test: 1,602test: 43-test: 2
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotscentral
com.google.code.findbugs:jsr305:jar:1.3.9--Found at http://repo.maven.apache.org/maven2
com.google.guava:guava-jdk5:jar:13.0--Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.1-rc-SNAPSHOT---
commons-codec:commons-codec:jar:1.6--Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1--Found at http://repo.maven.apache.org/maven2
junit:junit:jar:4.8.2--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
xpp3:xpp3:jar:1.1.4c--Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotscentral
9 (compile: 7, test: 2)008
+
+
+
+
+
+ + + diff --git a/google-api-client-assembly/dependencies/google-oauth-client-appengine-dependencies.html b/google-api-client-assembly/dependencies/google-oauth-client-appengine-dependencies.html new file mode 100644 index 00000000..aac015f9 --- /dev/null +++ b/google-api-client-assembly/dependencies/google-oauth-client-appengine-dependencies.html @@ -0,0 +1,773 @@ + + + + + + Project Dependencies + + + + + + + + + +
+ +
+
+
+ +
+

Project Dependencies

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.http-clientgoogle-http-client-appengine1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.oauth-clientgoogle-oauth-client1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.oauth-clientgoogle-oauth-client-servlet1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
javax.servletservlet-api2.5jar-
+
+

test

+

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.appengineappengine-api-stubs1.7.7jarGoogle App Engine Terms of Service
com.google.appengineappengine-testing1.7.7jarGoogle App Engine Terms of Service
com.google.guavaguava-jdk513.0jarThe Apache Software License, Version 2.0
junitjunit4.8.2jarCommon Public License Version 1.0
+
+

provided

+

The following is a list of provided dependencies for this project. These dependencies are required to compile the application, but should be provided by default when using the library:

+ + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.appengineappengine-api-1.0-sdk1.7.7jarGoogle App Engine Terms of Service
+
+

Project Transitive Dependencies

+

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client-jdo1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
javax.jdojdo2-api2.3-ebjarApache 2
javax.transactiontransaction-api1.1jar-
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
+
+

provided

+

The following is a list of provided dependencies for this project. These dependencies are required to compile the application, but should be provided by default when using the library:

+ + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
commons-codeccommons-codec1.6jarThe Apache Software License, Version 2.0
+
+

Project Dependency Graph

+ +
+

Dependency Tree

+
+
+

Licenses

+

Google App Engine Terms of Service: appengine-api-1.0-sdk, appengine-api-stubs, appengine-testing

+

Apache 2: JDO2 API

+

Unknown: servlet-api, transaction-api

+

Apache License: HttpClient, HttpCore

+

Common Public License Version 1.0: JUnit

+

The Apache Software License, Version 2.0: Commons Codec, Commons Logging, FindBugs-jsr305, Google App Engine extensions to the Google HTTP Client Library for Java., Google App Engine extensions to the Google OAuth Client Library for Java., Google HTTP Client Library for Java, Google OAuth Client Library for Java, Guava: Google Core Libraries for Java, JDO extensions to the Google HTTP Client Library for Java., Servlet and JDO extensions to the Google OAuth Client Library for Java.

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
appengine-api-1.0-sdk-1.7.7.jar30.66 MB6,5666,044861.6debug
appengine-api-stubs-1.7.7.jar12.16 MB3,0982,7851671.6debug
appengine-testing-1.7.7.jar10.32 MB2,2932,265261.6debug
jsr305-1.3.9.jar32.24 kB723531.5debug
guava-jdk5-13.0.jar1.71 MB1,3961,372131.5debug
google-http-client-1.17.1-rc-SNAPSHOT.jar263.79 kB241208191.5debug
google-http-client-appengine-1.17.1-rc-SNAPSHOT.jar15.97 kB221221.5debug
google-http-client-jdo-1.17.1-rc-SNAPSHOT.jar11.46 kB14611.5debug
google-oauth-client-1.17.1-rc-SNAPSHOT.jar59.63 kB574731.5debug
google-oauth-client-servlet-1.17.1-rc-SNAPSHOT.jar21.60 kB241141.5debug
commons-codec-1.6.jar227.32 kB2187661.5debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
jdo2-api-2.3-eb.jar188.18 kB22618271.5debug
servlet-api-2.5.jar102.65 kB684221.5debug
transaction-api-1.1.jar14.72 kB241821.3debug
junit-4.8.2.jar231.78 kB267230301.5debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
TotalSizeEntriesClassesPackagesJDK RevDebug
1856.49 MB15,07513,7494051.618
compile: 12compile: 1.19 MBcompile: 1,237compile: 977compile: 77-compile: 12
test: 4test: 24.41 MBtest: 7,054test: 6,652test: 236-test: 4
provided: 2provided: 30.88 MBprovided: 6,784provided: 6,120provided: 92-provided: 2
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotscentral
com.google.appengine:appengine-api-1.0-sdk:jar:1.7.7--Found at http://repo.maven.apache.org/maven2
com.google.appengine:appengine-api-stubs:jar:1.7.7--Found at http://repo.maven.apache.org/maven2
com.google.appengine:appengine-testing:jar:1.7.7--Found at http://repo.maven.apache.org/maven2
com.google.code.findbugs:jsr305:jar:1.3.9--Found at http://repo.maven.apache.org/maven2
com.google.guava:guava-jdk5:jar:13.0--Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.1-rc-SNAPSHOT---
com.google.http-client:google-http-client-appengine:jar:1.17.1-rc-SNAPSHOT---
com.google.http-client:google-http-client-jdo:jar:1.17.1-rc-SNAPSHOT---
com.google.oauth-client:google-oauth-client:jar:1.17.1-rc-SNAPSHOT---
com.google.oauth-client:google-oauth-client-servlet:jar:1.17.1-rc-SNAPSHOT---
commons-codec:commons-codec:jar:1.6--Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1--Found at http://repo.maven.apache.org/maven2
javax.jdo:jdo2-api:jar:2.3-eb--Found at http://repo.maven.apache.org/maven2
javax.servlet:servlet-api:jar:2.5--Found at http://repo.maven.apache.org/maven2
javax.transaction:transaction-api:jar:1.1--Found at http://repo.maven.apache.org/maven2
junit:junit:jar:4.8.2--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotscentral
18 (compile: 12, test: 4, provided: 2)0013
+
+
+
+
+
+ + + diff --git a/google-api-client-assembly/dependencies/google-oauth-client-dependencies.html b/google-api-client-assembly/dependencies/google-oauth-client-dependencies.html new file mode 100644 index 00000000..459fa2a9 --- /dev/null +++ b/google-api-client-assembly/dependencies/google-oauth-client-dependencies.html @@ -0,0 +1,545 @@ + + + + + + Project Dependencies + + + + + + + + + +
+ +
+
+
+ +
+

Project Dependencies

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
+
+

test

+

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

+ + + + + + + + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.guavaguava-jdk513.0jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client-jackson1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
junitjunit4.8.2jarCommon Public License Version 1.0
+
+

Project Transitive Dependencies

+

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
+
+

test

+

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

+ + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
org.codehaus.jacksonjackson-core-asl1.9.11jarThe Apache Software License, Version 2.0
+
+

provided

+

The following is a list of provided dependencies for this project. These dependencies are required to compile the application, but should be provided by default when using the library:

+ + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
commons-codeccommons-codec1.6jarThe Apache Software License, Version 2.0
+
+

Project Dependency Graph

+ +
+

Dependency Tree

+
+
+

Licenses

+

Apache License: HttpClient, HttpCore

+

Common Public License Version 1.0: JUnit

+

The Apache Software License, Version 2.0: Commons Codec, Commons Logging, FindBugs-jsr305, Google HTTP Client Library for Java, Google OAuth Client Library for Java, Guava: Google Core Libraries for Java, Jackson, Jackson extensions to the Google HTTP Client Library for Java.

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
jsr305-1.3.9.jar32.24 kB723531.5debug
guava-jdk5-13.0.jar1.71 MB1,3961,372131.5debug
google-http-client-1.17.1-rc-SNAPSHOT.jar263.79 kB241208191.5debug
google-http-client-jackson-1.17.1-rc-SNAPSHOT.jar5.90 kB12411.5debug
commons-codec-1.6.jar227.32 kB2187661.5debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
junit-4.8.2.jar231.78 kB267230301.5debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
jackson-core-asl-1.9.11.jar226.69 kB13712181.5debug
TotalSizeEntriesClassesPackagesJDK RevDebug
103.17 MB2,8322,4621141.510
compile: 5compile: 808.35 kBcompile: 802compile: 659compile: 56-compile: 5
test: 4test: 2.16 MBtest: 1,812test: 1,727test: 52-test: 4
provided: 1provided: 227.32 kBprovided: 218provided: 76provided: 6-provided: 1
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotscentral
com.google.code.findbugs:jsr305:jar:1.3.9--Found at http://repo.maven.apache.org/maven2
com.google.guava:guava-jdk5:jar:13.0--Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.1-rc-SNAPSHOT---
com.google.http-client:google-http-client-jackson:jar:1.17.1-rc-SNAPSHOT---
commons-codec:commons-codec:jar:1.6--Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1--Found at http://repo.maven.apache.org/maven2
junit:junit:jar:4.8.2--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.codehaus.jackson:jackson-core-asl:jar:1.9.11--Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotscentral
10 (compile: 5, test: 4, provided: 1)008
+
+
+
+
+
+ + + diff --git a/google-api-client-assembly/dependencies/google-oauth-client-java6-dependencies.html b/google-api-client-assembly/dependencies/google-oauth-client-java6-dependencies.html new file mode 100644 index 00000000..b115c04e --- /dev/null +++ b/google-api-client-assembly/dependencies/google-oauth-client-java6-dependencies.html @@ -0,0 +1,574 @@ + + + + + + Project Dependencies + + + + + + + + + +
+ +
+
+
+ +
+

Project Dependencies

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.oauth-clientgoogle-oauth-client1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
+
+

test

+

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

+ + + + + + + + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.guavaguava-jdk513.0jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client-jackson1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
junitjunit4.8.2jarCommon Public License Version 1.0
+
+

Project Transitive Dependencies

+

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
+
+

test

+

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

+ + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
org.codehaus.jacksonjackson-core-asl1.9.11jarThe Apache Software License, Version 2.0
+
+

provided

+

The following is a list of provided dependencies for this project. These dependencies are required to compile the application, but should be provided by default when using the library:

+ + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
commons-codeccommons-codec1.6jarThe Apache Software License, Version 2.0
+
+

Project Dependency Graph

+ +
+

Dependency Tree

+
+
+

Licenses

+

Apache License: HttpClient, HttpCore

+

Common Public License Version 1.0: JUnit

+

The Apache Software License, Version 2.0: Commons Codec, Commons Logging, FindBugs-jsr305, Google HTTP Client Library for Java, Google OAuth Client Library for Java, Guava: Google Core Libraries for Java, Jackson, Jackson extensions to the Google HTTP Client Library for Java., Java 6 (and higher) extensions to the Google OAuth Client Library for Java.

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
jsr305-1.3.9.jar32.24 kB723531.5debug
guava-jdk5-13.0.jar1.71 MB1,3961,372131.5debug
google-http-client-1.17.1-rc-SNAPSHOT.jar263.79 kB241208191.5debug
google-http-client-jackson-1.17.1-rc-SNAPSHOT.jar5.90 kB12411.5debug
google-oauth-client-1.17.1-rc-SNAPSHOT.jar59.63 kB574731.5debug
commons-codec-1.6.jar227.32 kB2187661.5debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
junit-4.8.2.jar231.78 kB267230301.5debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
jackson-core-asl-1.9.11.jar226.69 kB13712181.5debug
TotalSizeEntriesClassesPackagesJDK RevDebug
113.23 MB2,8892,5091171.511
compile: 6compile: 867.98 kBcompile: 859compile: 706compile: 59-compile: 6
test: 4test: 2.16 MBtest: 1,812test: 1,727test: 52-test: 4
provided: 1provided: 227.32 kBprovided: 218provided: 76provided: 6-provided: 1
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotscentral
com.google.code.findbugs:jsr305:jar:1.3.9--Found at http://repo.maven.apache.org/maven2
com.google.guava:guava-jdk5:jar:13.0--Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.1-rc-SNAPSHOT---
com.google.http-client:google-http-client-jackson:jar:1.17.1-rc-SNAPSHOT---
com.google.oauth-client:google-oauth-client:jar:1.17.1-rc-SNAPSHOT---
commons-codec:commons-codec:jar:1.6--Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1--Found at http://repo.maven.apache.org/maven2
junit:junit:jar:4.8.2--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1--Found at http://repo.maven.apache.org/maven2
org.codehaus.jackson:jackson-core-asl:jar:1.9.11--Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotscentral
11 (compile: 6, test: 4, provided: 1)008
+
+
+
+
+
+ + + diff --git a/google-api-client-assembly/dependencies/google-oauth-client-jetty-dependencies.html b/google-api-client-assembly/dependencies/google-oauth-client-jetty-dependencies.html new file mode 100644 index 00000000..096b392b --- /dev/null +++ b/google-api-client-assembly/dependencies/google-oauth-client-jetty-dependencies.html @@ -0,0 +1,601 @@ + + + + + + Project Dependencies + + + + + + + + + +
+ +
+
+
+ +
+

Project Dependencies

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.oauth-clientgoogle-oauth-client-java61.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
org.mortbay.jettyjetty6.1.26jarApache Software License - Version 2.0-Eclipse Public License - Version 1.0
+
+

Project Transitive Dependencies

+

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.oauth-clientgoogle-oauth-client1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
org.mortbay.jettyjetty-util6.1.26jarApache Software License - Version 2.0-Eclipse Public License - Version 1.0
org.mortbay.jettyservlet-api2.5-20081211jarApache License Version 2.0
+
+

provided

+

The following is a list of provided dependencies for this project. These dependencies are required to compile the application, but should be provided by default when using the library:

+ + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
commons-codeccommons-codec1.6jarThe Apache Software License, Version 2.0
+
+

Project Dependency Graph

+ +
+

Dependency Tree

+
+
+

Licenses

+

Eclipse Public License - Version 1.0: Jetty Server, Jetty Utilities

+

Apache License: HttpClient, HttpCore

+

Apache Software License - Version 2.0: Jetty Server, Jetty Utilities

+

The Apache Software License, Version 2.0: Commons Codec, Commons Logging, FindBugs-jsr305, Google HTTP Client Library for Java, Google OAuth Client Library for Java, Java 6 (and higher) extensions to the Google OAuth Client Library for Java., Jetty extensions to the Google OAuth Client Library for Java.

+

Apache License Version 2.0: Servlet Specification API

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
jsr305-1.3.9.jar32.24 kB723531.5debug
google-http-client-1.17.1-rc-SNAPSHOT.jar263.79 kB241208191.5debug
google-oauth-client-1.17.1-rc-SNAPSHOT.jar59.63 kB574731.5debug
google-oauth-client-java6-1.17.1-rc-SNAPSHOT.jar10.59 kB16611.5debug
commons-codec-1.6.jar227.32 kB2187661.5debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
jetty-6.1.26.jar527.26 kB267237141.4debug
jetty-util-6.1.26.jar172.98 kB12010561.4debug
servlet-api-2.5-20081211.jar130.99 kB794221.4debug
TotalSizeEntriesClassesPackagesJDK RevDebug
111.89 MB1,5591,172881.511
compile: 10compile: 1.67 MBcompile: 1,341compile: 1,096compile: 82-compile: 10
provided: 1provided: 227.32 kBprovided: 218provided: 76provided: 6-provided: 1
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
codehaus.orghttp://snapshots.repository.codehaus.org-Yes
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
java.nethttp://download.java.net/maven/2Yes-
m1.java.nethttp://download.java.net/maven/1Yes-
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactcodehaus.orgapache.snapshotssonatype-nexus-snapshotsjava.netm1.java.netcentral
com.google.code.findbugs:jsr305:jar:1.3.9-----Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.1-rc-SNAPSHOT------
com.google.oauth-client:google-oauth-client:jar:1.17.1-rc-SNAPSHOT------
com.google.oauth-client:google-oauth-client-java6:jar:1.17.1-rc-SNAPSHOT------
commons-codec:commons-codec:jar:1.6-----Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1-----Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1-----Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1-----Found at http://repo.maven.apache.org/maven2
org.mortbay.jetty:jetty:jar:6.1.26-----Found at http://repo.maven.apache.org/maven2
org.mortbay.jetty:jetty-util:jar:6.1.26-----Found at http://repo.maven.apache.org/maven2
org.mortbay.jetty:servlet-api:jar:2.5-20081211-----Found at http://repo.maven.apache.org/maven2
Totalcodehaus.orgapache.snapshotssonatype-nexus-snapshotsjava.netm1.java.netcentral
11 (compile: 10, provided: 1)000008
+
+
+
+
+
+ + + diff --git a/google-api-client-assembly/dependencies/google-oauth-client-servlet-dependencies.html b/google-api-client-assembly/dependencies/google-oauth-client-servlet-dependencies.html new file mode 100644 index 00000000..830ab088 --- /dev/null +++ b/google-api-client-assembly/dependencies/google-oauth-client-servlet-dependencies.html @@ -0,0 +1,759 @@ + + + + + + Project Dependencies + + + + + + + + + +
+ +
+
+
+ +
+

Project Dependencies

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.http-clientgoogle-http-client-jdo1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
com.google.oauth-clientgoogle-oauth-client1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
javax.jdojdo2-api2.3-ebjarApache 2
javax.servletservlet-api2.5jar-
+
+

test

+

The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.guavaguava-jdk513.0jarThe Apache Software License, Version 2.0
junitjunit4.8.2jarCommon Public License Version 1.0
mysqlmysql-connector-java5.1.18jarThe GNU General Public License, Version 2
org.datanucleusdatanucleus-api-jdo3.2.1jarThe Apache Software License, Version 2.0
org.datanucleusdatanucleus-core3.2.2jarThe Apache Software License, Version 2.0
org.datanucleusdatanucleus-rdbms3.2.1jarThe Apache Software License, Version 2.0
+
+

Project Transitive Dependencies

+

The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

+
+

compile

+

The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
com.google.code.findbugsjsr3051.3.9jarThe Apache Software License, Version 2.0
com.google.http-clientgoogle-http-client1.17.1-rc-SNAPSHOTjarThe Apache Software License, Version 2.0
commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
javax.transactiontransaction-api1.1jar-
org.apache.httpcomponentshttpclient4.0.1jar../LICENSE.txt
org.apache.httpcomponentshttpcore4.0.1jarApache License
+
+

provided

+

The following is a list of provided dependencies for this project. These dependencies are required to compile the application, but should be provided by default when using the library:

+ + + + + + + + + + + + +
GroupIdArtifactIdVersionTypeLicense
commons-codeccommons-codec1.6jarThe Apache Software License, Version 2.0
+
+

Project Dependency Graph

+ +
+

Dependency Tree

+
+
+

Licenses

+

Apache 2: JDO2 API

+

Unknown: servlet-api, transaction-api

+

Apache License: HttpClient, HttpCore

+

Common Public License Version 1.0: JUnit

+

The Apache Software License, Version 2.0: Commons Codec, Commons Logging, DataNucleus Core, DataNucleus JDO API plugin, DataNucleus RDBMS, FindBugs-jsr305, Google HTTP Client Library for Java, Google OAuth Client Library for Java, Guava: Google Core Libraries for Java, JDO extensions to the Google HTTP Client Library for Java., Servlet and JDO extensions to the Google OAuth Client Library for Java.

+

The GNU General Public License, Version 2: MySQL java connector

+
+

Dependency File Details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilenameSizeEntriesClassesPackagesJDK RevDebug
jsr305-1.3.9.jar32.24 kB723531.5debug
guava-jdk5-13.0.jar1.71 MB1,3961,372131.5debug
google-http-client-1.17.1-rc-SNAPSHOT.jar263.79 kB241208191.5debug
google-http-client-jdo-1.17.1-rc-SNAPSHOT.jar11.46 kB14611.5debug
google-oauth-client-1.17.1-rc-SNAPSHOT.jar59.63 kB574731.5debug
commons-codec-1.6.jar227.32 kB2187661.5debug
commons-logging-1.1.1.jar59.26 kB422821.1debug
jdo2-api-2.3-eb.jar188.18 kB22618271.5debug
servlet-api-2.5.jar102.65 kB684221.5debug
transaction-api-1.1.jar14.72 kB241821.3debug
junit-4.8.2.jar231.78 kB267230301.5debug
mysql-connector-java-5.1.18.jar771.37 kB279245121.6debug
httpclient-4.0.1.jar284.22 kB266230221.5debug
httpcore-4.0.1.jar168.84 kB181158101.3debug
datanucleus-api-jdo-3.2.1.jar329.11 kB18012661.5debug
datanucleus-core-3.2.2.jar1.72 MB943841501.5debug
datanucleus-rdbms-3.2.1.jar1.69 MB768715291.6debug
TotalSizeEntriesClassesPackagesJDK RevDebug
177.79 MB5,2424,5592171.617
compile: 10compile: 1.16 MBcompile: 1,191compile: 954compile: 71-compile: 10
test: 6test: 6.42 MBtest: 3,833test: 3,529test: 140-test: 6
provided: 1provided: 227.32 kBprovided: 218provided: 76provided: 6-provided: 1
+
+

Dependency Repository Locations

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Repo IDURLReleaseSnapshot
apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes
sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
DN_M2_Repohttp://www.datanucleus.org/downloads/maven2/Yes-
centralhttp://repo.maven.apache.org/maven2Yes-
+

Repository locations for each of the Dependencies.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Artifactapache.snapshotssonatype-nexus-snapshotsDN_M2_Repocentral
com.google.code.findbugs:jsr305:jar:1.3.9---Found at http://repo.maven.apache.org/maven2
com.google.guava:guava-jdk5:jar:13.0---Found at http://repo.maven.apache.org/maven2
com.google.http-client:google-http-client:jar:1.17.1-rc-SNAPSHOT----
com.google.http-client:google-http-client-jdo:jar:1.17.1-rc-SNAPSHOT----
com.google.oauth-client:google-oauth-client:jar:1.17.1-rc-SNAPSHOT----
commons-codec:commons-codec:jar:1.6---Found at http://repo.maven.apache.org/maven2
commons-logging:commons-logging:jar:1.1.1---Found at http://repo.maven.apache.org/maven2
javax.jdo:jdo2-api:jar:2.3-eb--Found at http://www.datanucleus.org/downloads/maven2/Found at http://repo.maven.apache.org/maven2
javax.servlet:servlet-api:jar:2.5---Found at http://repo.maven.apache.org/maven2
javax.transaction:transaction-api:jar:1.1---Found at http://repo.maven.apache.org/maven2
junit:junit:jar:4.8.2---Found at http://repo.maven.apache.org/maven2
mysql:mysql-connector-java:jar:5.1.18---Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpclient:jar:4.0.1---Found at http://repo.maven.apache.org/maven2
org.apache.httpcomponents:httpcore:jar:4.0.1---Found at http://repo.maven.apache.org/maven2
org.datanucleus:datanucleus-api-jdo:jar:3.2.1--Found at http://www.datanucleus.org/downloads/maven2/Found at http://repo.maven.apache.org/maven2
org.datanucleus:datanucleus-core:jar:3.2.2--Found at http://www.datanucleus.org/downloads/maven2/Found at http://repo.maven.apache.org/maven2
org.datanucleus:datanucleus-rdbms:jar:3.2.1--Found at http://www.datanucleus.org/downloads/maven2/Found at http://repo.maven.apache.org/maven2
Totalapache.snapshotssonatype-nexus-snapshotsDN_M2_Repocentral
17 (compile: 10, test: 6, provided: 1)00414
+
+
+
+
+
+ + + diff --git a/google-api-client-assembly/dependencies/images/close.gif b/google-api-client-assembly/dependencies/images/close.gif new file mode 100644 index 0000000000000000000000000000000000000000..1c26bbc5264fcc943ad7b5a0f1a84daece211f34 GIT binary patch literal 279 zcmZ?wbhEHb6kyFkwP}e}6+mLp=yE)H5&?6cps==O-j2#K*@61O)i|`#U%|*xTD17#Qg5 z>nkWI$ji$M2ng`=^D}^ygDj#2&;c6F0P+h1n~g(5frm~PL&uV$l`S$eFDwzBDbhJD v>}Bvw*Al_tWna1PC9OaGVdk23i}vRhZI{iR^*V|n<^22a#~T_O9T}_vbswrX literal 0 HcmV?d00001 diff --git a/google-api-client-assembly/dependencies/images/collapsed.gif b/google-api-client-assembly/dependencies/images/collapsed.gif new file mode 100644 index 0000000000000000000000000000000000000000..6e710840640c1bfd9dd76ce7fef56f1004092508 GIT binary patch literal 53 ycmZ?wbhEHbWM^P!XkdT>#h)yUTnvm1Iv_qshJlI4r7uBZ*YkPFU8d4p4Aua}2?(?R literal 0 HcmV?d00001 diff --git a/google-api-client-assembly/dependencies/images/expanded.gif b/google-api-client-assembly/dependencies/images/expanded.gif new file mode 100644 index 0000000000000000000000000000000000000000..0fef3d89e0df1f8bc49a0cd827f2607c7d7fd2f0 GIT binary patch literal 52 xcmZ?wbhEHbWM^P!XkdT>#h)yUTnvm1Iv_qshJlH@g}+fUi&t{amUB!D)&R0C2fzRT literal 0 HcmV?d00001 diff --git a/google-api-client-assembly/dependencies/images/external.png b/google-api-client-assembly/dependencies/images/external.png new file mode 100644 index 0000000000000000000000000000000000000000..3f999fc88b360074e41f38c3b4bc06ccb3bb7cf8 GIT binary patch literal 230 zcmeAS@N?(olHy`uVBq!ia0vp^+(699!3-oX?^2ToQY`6?zK#qG>ra@ocD)4hB}-f* zN`mv#O3D+9QW+dm@{>{(JaZG%Q-e|yQz{EjrrH1%@dWsUxR#cd{{R1fCIbVIy!atN z8e~{WkY6y6%iy53@(Yk3;OXKRQgJIOfsI*BO@UFsfhWLBc>*(#PB?Jn2*(o!76E4F z2oaVU3``tH+Kgs0GI5+@Tg}d)z%jd%F@?{8!SRZ5b1yT80-FZIMn)zc2Ca66y`pzY R*nwsJMCn#OVEqF*oew~oaAu*+mN;-=y?VHT3tIe$XQqrDo-uB_a z!$aaK`z6))OKGn34?nwc^SuifkIL#EmDgV_qjg-#8v*0u4q4%1moUw{LZ54UeCgzNF^jX`uv-XK+9g@yFrG9?@ z!9&5&Tgk*j(b!GF&{N4I-Owl3GNQ;Kslp@APSw&&&ux9d>WxL~{EYoKm2KHvv3+ax zZUYB?Ae*8JnchZheXeEaa>@87?_fB*jV>(`erUx0B6j@wa!KnN)QWMO1rn9HC8 zQU}Tt3>@bftT|;oHYhlHH8T8tc{qL2LBC1&wnQeg^-S05<#H=J%;q~&KX!$OXH$lP zifQJ#9>L8|xhAVRHT-xPa*}7JK>(A*!AmL!CQC~j>707p+C5b#ib-SZ5@wfn#-0y8 zor_pb3M^%mkXhlduwjw4dk@RWhYZ<*tSUAV9x3eYyi#^d39lH{872xT#>g14FgCZb z+Lvv}DClhGVU*`8y(Qe}(9I>Lw<6->0~Q`zX3oMH2272dBARI`0wDzxS_G8b_H+a` TZ#n2*^y*Bf^Krq04Gh)*dSnrT literal 0 HcmV?d00001 diff --git a/google-api-client-assembly/dependencies/images/icon_info_sml.gif b/google-api-client-assembly/dependencies/images/icon_info_sml.gif new file mode 100644 index 0000000000000000000000000000000000000000..c6cb9ad7ce438a798426703e86a7ffc197d51dbb GIT binary patch literal 606 zcmZ?wbhEHb!Rj)7jHhhdgsOUdoQoueZi?7 z>>gViTe&E#V48n=mrru5S3;v}WQB8hiDz7$TU2Fg8RZkU)J)l4H+4sO@7jjxJ4?G(<~7c1nYFul=C0P+d#d`@bj{yi z-npcE!T#Qb2PP~z)H;3B%r(bntUlH>Y2~CvyV|C%UbyM>vTf&9?!2&e&!siHFV0_c zVB`KP8}?n^dg$7Yqc`@PxOMQ%-NWbZ9Xfk=)1K2OFF!hV;r{6>kIr6ua^~ve%eS9j zy7lbD`I|4_et!J??bq+WzI^-n`RfmdkOIfh!pgqYwSCK`t~@$#!^!1aj_y2mzyI{@?vuB79>2N$==JkApPs$`_~ygc*YCf)diVLp z{pXKfy#M&+`?nvze*gIk#Q*;N0|qHLXbBUFKUo+V7>XElKuSSz!oa?}p{S|3rL`#` zEj=M8CWV#D$GthOu#hRgfH^NPHz`Z6or!6tudIJkhF|)EqL_SUmH;#E=*;vU)ut4d z*}1MJ+3|6yK5|W*0YQlwY}}E_93D;*P3)($(!#iHyj&dYc$?gAB*f@)n?~7Mn)5Ze zB*b!gs&gB@F*e|Da`5(ac688Lp~TGAEh5PBlHo`4aV}w%hy?;49h(#+>`NXTD0Bjy;4ci{C-1K14rU#4Xoa9{m6qopA9n0cn|!>ecYkij zwyX=!4*mH3EoqLqSGiVbyFqxD(bS8XSDu{6U1jZO70Ic@{~t&7=B^ zBD)NOoAkU&Gy^LQJ5PtV?u{&65}4ZUmfYbweP{LTy^YnAGv=AGa7*6wj}%~b0?7r5!@qH7P%p1*$L z@#{ODxoUwG+WsY)zWExj-aqxpQS(e!bx&6L`u)?tfB$~}{{8*?cVO&*V`-G2NeC$Z zWMO1r=w{FXnGVVm3>>=|#5rX=HY{-DP?VFNPL-%m%>B+*~5-k^-+4*MLFr;tQ0}^rlS-^!^Q`Mx1hrB$jwn&hk~Xk=#Nl+_9Nu|Y$D G!5RQ;-6)O# literal 0 HcmV?d00001 diff --git a/google-api-client-assembly/dependencies/images/icon_warning_sml.gif b/google-api-client-assembly/dependencies/images/icon_warning_sml.gif new file mode 100644 index 0000000000000000000000000000000000000000..873bbb52cb9768103c27fbb9a9bac16ac615fce5 GIT binary patch literal 576 zcmZ?wbhEHbB!Sy%bj7w z8LP{2I!WYbmF&-Ixi?j6tD|K1XR2M#l>Aw*aXL%wXS3nYW}{zi=4WzsU5r%E6qx+# za{AThd85YVOsT`KDUrWsBtGknIa3>Sy(4;AS@f^Dxt>-=XPXm#FD(1Lr2hBv=9?3X zZS^!XrNw@)>eiN((2|w-y>{aB1+99DGMA?}+UTggT+(Z*rf8+5x~aWVOGcurtl;&U zIa)H3I&#vwvQjJBn`YHj9iKlB7`)(M#!e{yWMO1rC}Yq8NrU2qfqia6SyOXMYa1sM zM_a34eqyRfcQbQJY;^IYGTuzaxglKLqNQEA}OiQec+sQ#rUUjLqg_MpsPmY43 zsgmVV8EHK$eV-B~6*UcAW2+w%1e4o&9#aAczLGF}PmMg|6J0Ey4q A)Bpeg literal 0 HcmV?d00001 diff --git a/google-api-client-assembly/dependencies/images/logos/build-by-maven-black.png b/google-api-client-assembly/dependencies/images/logos/build-by-maven-black.png new file mode 100644 index 0000000000000000000000000000000000000000..919fd0f66a7f713920dd7422035db1c9d484351d GIT binary patch literal 2294 zcmVKOG`!VuDc=fnx$+R6#>c^>b&wcOS?|$!`a}U6ptjU_J zlBA}l*3{J0)YMd0R~Hr*dU$xO^ie1jhYlTLS+=C4#MRYRCX#twGUSD6Il$6AA+=UAlkY(ZF;m4037Yc>v&!1mPsNXdliHV74&z>zUEv=}iC@U)i zfc^XTJ3BiAKvYyzczAd~K){|od(ip)`}f`5-HnZnv$L~Hzqq=(y7Kb!>gsAwPfu@e z@3gcu0LabFC4?{xBNPh18Fpy3+Tr2hfq{Yc_V$w}PjVdhGtMTH$zU){PfznaPmK)? z4KH52=;-KZX=#a#jlFZ{PF7YH!!Q{c8Taqs=Xt)UsK{tE{@>vc{2Hgh!NL0adH}e0 z@19Df^78Tm0ES@zz{SO7Zf@=upJ1_AP_bIAgpih&mWqmsojZ4GG#a&9{f)&Au~_Wm z<0F^L4;(mPHk)-io!M*-3JMa7#VIK%EBy%}_$g6IPEM9cBvPp~K0f}{t5+6_rMbEJ z(xpqcZ{G$0j^p<2+vnuu^bN3MdU`rLJ3Br;9ss7MrVbuFxUjHLQBhGX6WriQ5|M*_w z@5bUDdV71dTCG;AO-@dx@4a~OA{y)K>k+2N$jAo|9?w z?b_+nr`2k;!{M;o?Qh<^`R=>#RtFA0KR<`Vfh)Li;|5+X!otGn&U<@%H*VaBDU;Gf zr_<5=()7Iqfmk>yLj`}084`48Zf?d|M~)mpOHfeI{QNv2WMN?;Dk=&9GBY#LVzb%$ z`};Aq6GAK&OK4~)&U*g*IT{xh7M8K~%9SgtQ-;OG#ZeC5ym=F=X|vf(9h#b&K7RZN z05+S=X0xGjU|@g-%ePwl!GC`7t=5VDruDp`t9rXwq=tAb*88KQqo~N`a#V_oixKzA z%F4dJzL1cRy1F{CSUfW`qfjWeZ{Hpm7>H$yNF>V6&c<>vGBOgU_w@7}J9g~o(WA6z z#sgc0B0VlH4i&T6{Pyiz)FUDys6$s*7rnXCi!3z)!0DGJ5eITHyM2Q|E@qtti{QRD z*nbiZg+h^&lY>QINl6I+oH}*N-Q67kYHMqqoSd*@fE67^695Pa36aTU0HD+95)%{g zFw)c0Gcqy&K&4WxG906$qk6p_b=txpgmiazqaGF(M)NU+!{3cPsc^{*a`Ja$nXfZ@ zhsL%N4whw0OG`2M6&4oG&CQ8KBHBPHC@3f>C|I^a>__(qFp!^RU zV`F0uhl6EVxm><`_ijATmoHz|)ztxjL?XdmSuB<(Po5A$mM!w}C3kdS~ef}W>dub-Hhz&fI`vJ#oXvTST@?6qsxN=r)tz|+%n^XARiL+I)0 z!HGL|?4Z?OC@z>ppO+fmk zEDIk1FgrV2R8&O&@;qNwR)+h@$;nZx)dqvXVzG2}b>-#d_4oHa!G&Dp59OYMg zd;9A2I}{29&+|ObzkB!Y^XJcKjE;^*({SomlT)I^E^_90Q{xPG;bvU;38ml zcng&pTZhKxAmAX-{xuvUBO`bZu-omWrKK8;X6fkl>(@`5I6;GyySuwkDCBv*tE;QE zwH1kg)0Ijk1~{Qms8A@Vadob6a=9D}VUx-9>C-1l1S|^dcDq`w#&Z*k#hB*+K%>#n z=0$)zo8T)X1Ujc}V+Omw8!O@%0GKp7%(fp1ER{;7QYogYiHQlT)w*&q5{X2iP;Ak literal 0 HcmV?d00001 diff --git a/google-api-client-assembly/dependencies/images/logos/build-by-maven-white.png b/google-api-client-assembly/dependencies/images/logos/build-by-maven-white.png new file mode 100644 index 0000000000000000000000000000000000000000..7d44c9c2e5742bdf8649ad282f83208f1da9b982 GIT binary patch literal 2260 zcmV;_2rKuAP)4hTLUyOQ{PVbVY5&Y3g!&hN~bnR7}ZgkXUt ziC%zU0gf+&kEv>t|d$x|zXw1mS0D%1b{8z7DF%0wW-8(XBFc`A3vVI|O z^!N97baWg(eE86zLn4uA_wL=Zb@+UKU|=8sJb3V6XlSUctSl!dhm4xd=KJ^W|8h2q zR4NS%3yX+|NKQ`f?d=7Cf`Wo)&z=E5TU%REQIXYZefjbwRvsQ6zIyfQojZ3l8V#{v zv)R(q)39Vr2GBPsa+apV2%%fIZY3ln0Kl+1Y8c*(xe3X6sWFH9kH*UDDLl)ZN`}u~;f9D%P!A2LK5P2`MQl z(b3TuDUC++_U+qm01k;n!Z1u+TwGjS+}X2d^Yil+3Pn;B-~q z{Qdm_z{kf&EEb1^gw)j3R904!x}#RBj~+c578Vv16olc}xpQZGd;7k9`>@WHD_2M| z{%VB2fNVCK&1U^_rTW_bx`C@MK&%ZR^ybZ*=;&yb zN);0mV>X+~OA`|lRVtNAr7A8i#zL)DyJycHxm+$5izO0?QmM?$%p@6le0*H3R;yI1 z=;-LCrlu1oPI!8HIypHhmCA~Wig|;>WHON!GbSbmcN`jxhJ=GssnlpRR;zVzaF8J4 z>+3sJhW@0w{LH6-`(Afr<9kMWBXoSUM7Dox&JGJtojOI96z3EG z*uH)HWN?qO7x!`hzQnzLg5JL3Ui^ps%X$n4`+YK2S-yNZo>gC8kJmXUC#D?-i_a7IlwdR(Kkw#T>s)<( zJ!ZVTycREBO!{t;H9|r{F#q)FQ_`LjAsBnPnnKk2PZ;V3*7{M#@%jyBNObh|^_fg2 zd|f0I3eTTEPf=83VhUbHWgRft|{%MRRMp6H>seM7wV6&k5Vn7H0DDSDT_wn(;aaUDU zWi%QoiptK;CgqIWB$bwy78Mm?w@oI~&6_tPBO~$kExCLno}10)mX;RGM?^%-PjqOt zTFi(#=@4C7NJmxEVK7l6G0yhEp_Lq9)1fj}S-2%Mdrv$L~tStVt%xVSheDG9e5EX$6J zj8GIMm&=bIKaK;TqoYG05D0}r0!Kqb1E0?q2n1`_uAR{_f0E{OgnR$~y~Sd|+0n_# z2@6L?MsUQ^H0|QzLJoDKqobtlneyk|8`Sp{cp}PUC5RRQ^8?;2;Iss$eWk%*n3$Nr z(73v~e)3}s219#$yTM=(2n6o#?!LahxUO>?H!v`O%bZ*;$Ideh!!Qg0h{fVXix$lf i91DLtEx@rr0RIK2cl{g~?Z1Nn0000}s literal 0 HcmV?d00001 diff --git a/google-api-client-assembly/dependencies/images/logos/maven-feather.png b/google-api-client-assembly/dependencies/images/logos/maven-feather.png new file mode 100644 index 0000000000000000000000000000000000000000..b5ada836e9eb4af4db810f648b013933e72c8fbe GIT binary patch literal 3330 zcmX9>c{JN;_x~o5Ac>t)`_^PEV{L6MNl>(?QcG&7ly=N-Xep}HlEki6%d`xGQff?J zZ3V5?nxMK^TW!%rlc2Oi#TE&YeBaFbd(OGfJqdI` zc>}=J0{}qD0)QP*?7suRWeWiKhXeo)6#$?b`+NA18vvk_kGT^3lRrj~)ZiX~E=7&X z2SKm_0zsnO+$cbVdd$U-?NJjv4pVQ1Nhjly1q-WLl67`_;z%v-QHPc;g_!S~IRE^{ z!-r;4Azogl1_mw!0>pbvoPqVZ9U2s5dwy6sHa1p4L7^@xJ3CvqEtc6=V;Sjo`SKw` zH=oaUc5x93g$)f2RLqLwrQCI9Ez?$q{#(_7txem8O7-r(E=u3NrnVzb>g3;N!E`D4 z$F(MEarBhUUxI^!j~_>3u~Bhx7JsSR*w|dSa6vbc*_R&srRM|ftV?XHdFb}1C$WrQ zvCqw{t=r+KeZT{28=Et|SGiR|Ew_)PCPc7HL$FRx^tIjT!gS^&HZAG+)pJ^j_L!yB z-&JbQI5tJZ0TS}9l}GV-#=yY9@UZdW!+Wo8V)3OP+M~kh8Cox&UgiEXkb|OHrtnt7 z^5^7qoPgd(mzSp^UljFw^Ea1#($jleS~zn<*Qt%~?;g8p7T$+e1_e6_0RivD9i_fn zntBj|S0D{TF>ZC0BjrC=O}^<#pa0LS&uvarfWzp2`pUd__f_%7YV~7dt=r6SgMYpk zjT&tozdBVDfMU+}3PBKu{I@a0eE%y;<26%LfpraXnsz78oRL+ASlucsJ9Ov}^-cnR z?X0S*D(PH#SsA1;IVGjHr-u@pc=<9LQ|*-QU~8*d0k5yGUszbEsHmW5uYUjj;c@h| zc=i>Ql~f4Q{2jFogTeH_k#4q)N#10=x?L3lT5fn+n;f?)a5}#)D(b9?5F`jW*8R2B zY10|kzu50Yt-pEkr?pP=J)v#j+39IETXnv??EKOqdr`^I$PR$!&#+i*wr^07q=V|W zRr`cRLkwol7wvCgY>XVWV#HBVP$e>vs8#}bhe8j(d*@G*O1g5TCFF^jnVIZQvS`z% z5v0FEpQe3XqLbN{Z+4@!!}?n1jYn$VqUAWElr$a=d)NRcr?dxiBP0c$a4eq)C6kW} zg`-#3YZthl;XEcu_;g!xn!}4v15@n5*WxOpB14=8A8Dk>`K z>FLRD7bsziv>lNxci1YB3`T!HV#jF&kvayv7^9-Sg&l|eQ^qB(FU%g~JDx-!K6@(Waovi+Tc$s`@s@Sv* z9p0C*!~5#c{h1>d>@N5DL);Ea=d|PU4}@o zGdG0Ng%R<9V_jn-yfB3nD7kxXb8!sMIXlJ1WeD*5?60hT&XSa)+yVTVl9iP_o8v^w8_0650v?-3$V0uILqsvdAu+2y6|YCewgNhga^h4Y-lNq0Cah}ivo zpoq6EpmWSceZAoF%B5UfVPU3op{AfPhFM{FSFJMU!)c~SDTMch@trf6$~-E;5xn-d z<8`e~UPj0w%vDYVje(iQii)`c=wzHbR6^djAF^dnW5A}!CD-JMWyVHEkW;BwukLPq z9nsR%B=!TuB0vQ|DPO#J@zkle(n^?>&z)~)XSMt|Ks2+uT9af6QEqK-hanLX5&&xP z-l-<%m`WTuBR<~hh#iYkQxoQNXtTFvX)i0JF_1Iu5Wn+7^XJlfPFX+T%IM9_7+4B=%5Y=a!X6S`QV)~knSitusE`|vEgD?+D*SdgtN-v z@2!tnPsQ$W9OoldXg5!7EGfyuKEmbk%8!pz518D&%P>a8*ji>n+N5Y15QI!N3aw76 zk?~TlC_r^z21V(@jrIB2O=fW{*e;OxLwTOl%b7{65NYoUzv46uU?y1WK`h1$gXk#s zGM!NC1T6)2&vea(*Gjoe-Y0OseT68UKVi7GtWs>+{mTm3?9wmCl9JqVL7fcIg7PHy zS|uV8fd^!W2I;)j*_@ml#-BrjgIWH)bTI&Jf1fXAax!YjYcdmoW44Np%MhjRZR?D*fO!{1UqRj~p#EAohT=T-17$$k6AmQb( zr9h0V!aUsY=NL_BPmf|~=n=+2*+gqRK=3w1+z;yxltfUx%}G^AqM7qBoD>Zu#))>h z(O-H}7=Go_Xv&X~RNksk#{u}JDqbNyJIauD&lJ!>cpV`%&T(-`&1Vx}= z8{BIG$r-+Li5}_#{j}s%FlGk$jM1|WKp=Pv|*T=m!~I+rUjJ3F@7W!gumQD8RFwVZryr0 zG6IWssk0)%eJuVTRDtKPo&xDaOWF|RzCnozye=JYW-)oDFHKrbK}AL7sWkcH57B~D zWIZ`=QNK#g)SEJB!`69JGO3P=r08pDX))Bb6t@_;R!2TlYhv>Ek*cIBeDucB zNbDTV5C(L01Ze7}3Kc7OC~(zLdAV~G`9N+1xB3ie(wD=k6U z@g3gU065J9XPq{lyp>keB&(ixxdnV8$%i$asL6b0O)JUdYtCpuubGB*DbEFHXlQtp zXgMTG%@{+j0dI{Adnj6-$)BcQylA>}r~l(e_1pE-*`Eac5PAGF#EWMIO6;2ECZAeo ziPF85kd7Ft6f{I>ZQIUbf5YND4#d%gJpKl~IaM@Xl!bUvZj*0lQRvUOOhugnVG zMF7OiLdS5a+otCLNQI8V^8vu3ka8NP_S>32`v3S)2n{Pe(fRVLdLST=H+AiBqCTY3 zZWI=>Zsgp=`Z%jG=8)QMYZO=@1A#!)z2kiwpnq3DhkpUGZV&>CeaB0vA>Y6+Mrd+| zrA52d@P7Qe=6m=0Lz-`5yrGM(x*9Y0sP7_5T2*v`@~JgS7L3#>yY-7x_MJ+9`9JqyEa*$Q0 ziiL%hken<6A7+&3D;!0f@qP3TvIRVoufv)c8?&aw&B~1Y(02aUpDjK7B)cSkx8QDV zQMj_M+x+$UXOfa)nmweB@KP^Xm2R7$9(p;LCnufvW}*eG4R>Eak)Ei}%-KE8gsec^ zj=HuX z(qyBjd`DTC3ZeF2!np?{CKA-DtE=Op^zuqOJMFU}UTntQB1KKp81%{!bT~6heKA2v zt?`kF-Zi+k^YcNCz>V!+^RbV}r|Gp2j0+=crL`N5t}4tX=Ugo&7+C6ua?F4oX!wQ+)83@^vkY zDLFc>n(A(&_r09T&@t7l6XQ+b#6#=gA#14-D;h1Uq<(+=C8$D8`D^qmZ z9NOcdL`OIEho{GDl585|eQ0-*j0e6Rr=PNtyozBAqJr literal 0 HcmV?d00001 diff --git a/google-api-client-assembly/dependencies/images/newwindow.png b/google-api-client-assembly/dependencies/images/newwindow.png new file mode 100644 index 0000000000000000000000000000000000000000..6287f72bd08a870908e7361d98c35ee0d6dcbc82 GIT binary patch literal 220 zcmeAS@N?(olHy`uVBq!ia0vp^+(699!3-oX?^2ToQY`6?zK#qG>ra@ocD)4hB}-f* zN`mv#O3D+9QW+dm@{>{(JaZG%Q-e|yQz{EjrrH1%@dWsUxR#cd&SYTt4+aeuCvSob zD+%%o1`04ZXs!GLj7%Iec?BF2%&y2ZFfeUwWbk2P5nvW+xWT~4#-PT{uyM;F);OSv44$rjF6*2U FngH~|K)3(^ literal 0 HcmV?d00001 diff --git a/google-api-client-assembly/dependencies/xpp3_LICENSE.txt b/google-api-client-assembly/dependencies/xpp3_LICENSE.txt new file mode 100644 index 00000000..d84c14b3 --- /dev/null +++ b/google-api-client-assembly/dependencies/xpp3_LICENSE.txt @@ -0,0 +1,46 @@ +Indiana University Extreme! Lab Software License + +Version 1.1.1 + +Copyright (c) 2002 Extreme! Lab, Indiana University. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the distribution. + +3. The end-user documentation included with the redistribution, if any, + must include the following acknowledgment: + + "This product includes software developed by the Indiana University + Extreme! Lab (http://www.extreme.indiana.edu/)." + +Alternately, this acknowledgment may appear in the software itself, +if and wherever such third-party acknowledgments normally appear. + +4. The names "Indiana Univeristy" and "Indiana Univeristy Extreme! Lab" +must not be used to endorse or promote products derived from this +software without prior written permission. For written permission, +please contact http://www.extreme.indiana.edu/. + +5. Products derived from this software may not use "Indiana Univeristy" +name nor may "Indiana Univeristy" appear in their name, without prior +written permission of the Indiana University. + +THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHORS, COPYRIGHT HOLDERS OR ITS CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/google-api-client-assembly/pom.xml b/google-api-client-assembly/pom.xml new file mode 100644 index 00000000..7cf94f51 --- /dev/null +++ b/google-api-client-assembly/pom.xml @@ -0,0 +1,116 @@ + + 4.0.0 + + com.google.api-client + google-api-client-parent + 1.17.1-rc-SNAPSHOT + ../pom.xml + + com.google.api-client + google-api-client-assembly + pom + Assembly for the Google APIs Client Library for Java + + + + com.google.http-client + google-http-client-assembly + pom + + + com.google.oauth-client + google-oauth-client-assembly + pom + + + com.google.api-client + google-api-client + + + com.google.api-client + google-api-client-appengine + + + com.google.api-client + google-api-client-servlet + + + com.google.api-client + google-api-client-android + + + com.google.api-client + google-api-client-gson + + + com.google.api-client + google-api-client-jackson2 + + + com.google.api-client + google-api-client-java6 + + + com.google.api-client + google-api-client-protobuf + + + com.google.api-client + google-api-client-xml + + + + + + + maven-dependency-plugin + + + dependencies + prepare-package + + copy-dependencies + + + false + ${project.build.directory}/libs + android,opengl-api,google-collections,xmlParserAPIs,servlet-api,commons-codec,json,google-play-services + + + + src-dependencies + prepare-package + + copy-dependencies + + + sources + false + ${project.build.directory}/libs-sources + android,opengl-api,google-collections,xmlParserAPIs,servlet-api,commons-codec,json,google-play-services + + + + + + maven-assembly-plugin + + + make-assembly + package + + single + + + + assembly.xml + + google-api-java-client + + + + + + + diff --git a/google-api-client-assembly/proguard-google-api-client.txt b/google-api-client-assembly/proguard-google-api-client.txt new file mode 100644 index 00000000..3f3f45b0 --- /dev/null +++ b/google-api-client-assembly/proguard-google-api-client.txt @@ -0,0 +1,19 @@ +# ProGuard Configuration file +# +# See http://proguard.sourceforge.net/index.html#manual/usage.html + +# Needed to keep generic types and @Key annotations accessed via reflection + +-keepattributes Signature,RuntimeVisibleAnnotations,AnnotationDefault + +-keepclassmembers class * { + @com.google.api.client.util.Key ; +} + +# Needed by google-http-client-android when linking against an older platform version + +-dontwarn com.google.api.client.extensions.android.** + +# Needed by google-api-client-android when linking against an older platform version + +-dontwarn com.google.api.client.googleapis.extensions.android.** diff --git a/google-api-client-assembly/readme.html b/google-api-client-assembly/readme.html new file mode 100644 index 00000000..cc4ee4e9 --- /dev/null +++ b/google-api-client-assembly/readme.html @@ -0,0 +1,210 @@ + +${project.name} ${project.version} + +

${project.name} ${project.version}

+ +

Overview

+

+ High-level details about this library can be found at http://code.google.com/p/google-api-java-client +

+ + +

Dependencies and Licenses

+ The license can be found + here. +
Dependent jars can be found in the + libs folder and the corresponding source jars can be found + in the + libs-sources folder. +
+
The dependency structure and licenses for the different libraries can + be found here: + + +

Maven Usage

+ For information on how to add these libraries to your Maven project please see + http://code.google.com/p/google-api-java-client/wiki/Setup#Maven. + +

Eclipse

+ A .classpath file snippet that can be included in your project's .classpath + has been provided + here. Please only use the classpathentry's you + actually need (see below for details). + +

ProGuard

+

+ A ProGuard configuration file proguard-google-api-client.txt + is included for common settings for using the library. On Android projects, + you may want to add a reference to + proguard-google-api-client.txt + in the + project.properties + file under the + proguard.config + property. +

+

+ Please read Setup + ProGuard for more details. +

+ +

Dependencies for all Platforms

+ The following are the jars from the + libs folder needed for applications on all platform: +
    +
  • google-api-client-${project.version}.jar
  • +
  • google-oauth-client-${project.oauth.version}.jar
  • +
  • google-http-client-${project.http.version}.jar
  • +
  • jsr305-${project.jsr305.version}.jar
  • +
  • google-api-client-protobuf-${project.api.version}.jar (when using + protobuf-java) +
      +
    • google-http-client-protobuf-${project.http.version}.jar
    • +
    • protobuf-java-${project.protobuf-java.version}.jar
    • +
    +
  • +
  • google-api-client-gson-${project.api.version}.jar (when using + GSON) +
      +
    • google-http-client-gson-${project.http.version}.jar
    • +
    • gson-${project.gson.version}.jar
    • +
    +
  • +
  • google-api-client-jackson2-${project.api.version}.jar (when using + Jackson 2) +
      +
    • google-http-client-jackson2-${project.http.version}.jar
    • +
    • jackson-core-${project.jackson-core2.version}.jar
    • +
    +
  • +
  • google-http-client-jackson-${project.http.version}.jar (when using + Jackson 1) +
      +
    • jackson-core-asl-${project.jackson-core-asl.version}.jar
    • +
    +
  • +
  • google-api-client-xml-${project.version}.jar (when using XML) +
      +
    • google-http-client-xml-${project.version}.jar
    • +
    • xpp3-${project.xpp3.version}.jar (when NOT on Android)
    • +
    +
  • +
+ +

Android Dependencies

+ The following are the jars from the + libs folder required for Android applications: +
    +
  • google-api-client-android-${project.version}.jar (for SDK >= 2.1)
  • +
  • google-http-client-android-${project.http.version}.jar
  • +
+ The + libs folder also contains properties files that specify the + location of source jars for Android projects in Eclipse. +
Please see the + Android + wiki for the Android Developer's Guide. + +

Google App Engine Dependencies

+ The following are the jars from the + libs folder required for Google App Engine applications or + a newer compatible version: +
    +
  • google-api-client-appengine-${project.version}.jar
  • +
  • google-api-client-servlet-${project.version}.jar
  • +
  • google-oauth-client-appengine-${project.oauth.version}.jar
  • +
  • google-oauth-client-servlet-${project.oauth.version}.jar
  • +
  • google-http-client-appengine-${project.http.version}.jar
  • +
  • jdo2-api-${project.jdo2-api.version}.jar
  • +
  • transaction-api-${project.transaction-api.version}.jar
  • +
+ Please see the + GoogleAppEngine + wiki for the Google App Engine Developer's Guide. + +

Servlet Dependencies

+ The following are the jars from the + libs folder required for Servlet applications or a newer + compatible version: +
    +
  • google-api-client-servlet-${project.version}.jar
  • +
  • google-oauth-client-servlet-${project.oauth.version}.jar
  • +
  • commons-logging-${project.commons-logging.version}.jar
  • +
  • httpclient-${project.httpclient.version}.jar
  • +
  • httpcore-${project.httpcore.version}.jar
  • +
  • jdo2-api-${project.jdo2-api.version}.jar
  • +
  • transaction-api-${project.transaction-api.version}.jar
  • +
+ +

General Purpose Java 5 Environment Dependencies

+ The following are the jars from the + libs folder required for general purpose Java 5 + applications or a newer compatible version: +
    +
  • google-api-client-java6-${project.version}.jar
  • +
  • google-oauth-client-java6-${project.oauth.version}.jar (for JDK >= + 6) +
      +
    • google-oauth-client-jetty-${project.oauth.version}.jar (for + Jetty 6) +
        +
      • jetty-${project.jetty.version}.jar
      • +
      • jetty-util-${project.jetty.version}.jar
      • +
      +
    • +
    +
  • +
  • google-oauth-client-java7-${project.version}.jar (for JDK >= 7)
  • +
  • commons-logging-${project.commons-logging.version}.jar
  • +
  • httpclient-${project.httpclient.version}.jar
  • +
  • httpcore-${project.httpcore.version}.jar
  • +
+ + + diff --git a/google-api-client-gson/.classpath b/google-api-client-gson/.classpath new file mode 100644 index 00000000..68a2c33f --- /dev/null +++ b/google-api-client-gson/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/google-api-client-gson/.project b/google-api-client-gson/.project new file mode 100644 index 00000000..3c36793f --- /dev/null +++ b/google-api-client-gson/.project @@ -0,0 +1,23 @@ + + + google-api-client-gson + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/google-api-client-gson/.settings/org.eclipse.jdt.core.prefs b/google-api-client-gson/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..56c60d70 --- /dev/null +++ b/google-api-client-gson/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,418 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.codeComplete.argumentPrefixes= +org.eclipse.jdt.core.codeComplete.argumentSuffixes= +org.eclipse.jdt.core.codeComplete.fieldPrefixes= +org.eclipse.jdt.core.codeComplete.fieldSuffixes= +org.eclipse.jdt.core.codeComplete.localPrefixes= +org.eclipse.jdt.core.codeComplete.localSuffixes= +org.eclipse.jdt.core.codeComplete.staticFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.5 +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=ignore +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=enabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore +org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=warning +org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning +org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning +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=warning +org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=ignore +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=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled +org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +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=warning +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=ignore +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.source=1.5 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field=1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field.count_dependent=1585|-1|1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable=569 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable.count_dependent=1585|-1|1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_member=569 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method=1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method.count_dependent=1585|-1|1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package=1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package.count_dependent=1585|-1|1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package_declaration=569 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter=24 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter.count_dependent=1040|-1|1040 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type=1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type.count_dependent=1585|-1|1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type_declaration=569 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16|4|80 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=16 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_cascading_method_invocation_with_arguments=16 +org.eclipse.jdt.core.formatter.alignment_for_cascading_method_invocation_with_arguments.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=16|5|48 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants.count_dependent=0|-1|0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_field_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_for_statement=16 +org.eclipse.jdt.core.formatter.alignment_for_generic_type_arguments=16 +org.eclipse.jdt.core.formatter.alignment_for_generic_type_arguments.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_local_variable_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_new_anonymous_class=0 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16|4|48 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16|4|49 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16|4|48 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16|4|48 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16|4|48 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=0 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=0 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=2 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=true +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=false +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=do not insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert +org.eclipse.jdt.core.formatter.comment.line_length=100 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.comment_new_line_at_start_of_html_paragraph=true +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.force_if_else_statement_brace=true +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comment_prefix=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.join_lines_in_comments=true +org.eclipse.jdt.core.formatter.join_wrapped_lines=true +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=true +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=100 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=3 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false +org.eclipse.jdt.core.formatter.sort_local_variable_annotations=false +org.eclipse.jdt.core.formatter.sort_member_annotations=false +org.eclipse.jdt.core.formatter.sort_package_annotations=false +org.eclipse.jdt.core.formatter.sort_parameter_annotations=false +org.eclipse.jdt.core.formatter.sort_type_annotations=false +org.eclipse.jdt.core.formatter.tabulation.char=space +org.eclipse.jdt.core.formatter.tabulation.size=2 +org.eclipse.jdt.core.formatter.use_on_off_tags=false +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_comment_inline_tags=false +org.eclipse.jdt.core.formatter.wrap_non_simple_local_variable_annotation=true +org.eclipse.jdt.core.formatter.wrap_non_simple_member_annotation=true +org.eclipse.jdt.core.formatter.wrap_non_simple_package_annotation=true +org.eclipse.jdt.core.formatter.wrap_non_simple_parameter_annotation=false +org.eclipse.jdt.core.formatter.wrap_non_simple_type_annotation=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true +org.eclipse.jdt.core.formatter.wrap_prefer_two_fragments=false diff --git a/google-api-client-gson/.settings/org.eclipse.jdt.ui.prefs b/google-api-client-gson/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000..08ebc976 --- /dev/null +++ b/google-api-client-gson/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,119 @@ +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=false +cleanup.add_serial_version_id=true +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=false +cleanup.always_use_this_for_non_static_method_access=false +cleanup.convert_to_enhanced_for_loop=false +cleanup.correct_indentation=true +cleanup.format_source_code=true +cleanup.format_source_code_changes_only=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=false +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.organize_imports=true +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=true +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.remove_private_constructors=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=true +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.use_blocks=true +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_parentheses_in_expressions=true +cleanup.use_this_for_non_static_field_access=true +cleanup.use_this_for_non_static_field_access_only_if_necessary=true +cleanup.use_this_for_non_static_method_access=true +cleanup.use_this_for_non_static_method_access_only_if_necessary=true +cleanup_profile=_google-api-java-client +cleanup_settings_version=2 +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=_google-api-java-client 100 +formatter_settings_version=12 +org.eclipse.jdt.ui.exception.name=exception +org.eclipse.jdt.ui.gettersetter.use.is=false +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=com.google;;java;javax; +org.eclipse.jdt.ui.javadoc=true +org.eclipse.jdt.ui.keywordthis=false +org.eclipse.jdt.ui.ondemandthreshold=999 +org.eclipse.jdt.ui.overrideannotation=true +org.eclipse.jdt.ui.staticondemandthreshold=999 +org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=true +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=false +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=false +sp_cleanup.always_use_this_for_non_static_method_access=false +sp_cleanup.convert_to_enhanced_for_loop=false +sp_cleanup.correct_indentation=false +sp_cleanup.format_source_code=false +sp_cleanup.format_source_code_changes_only=true +sp_cleanup.make_local_variable_final=false +sp_cleanup.make_parameters_final=false +sp_cleanup.make_private_fields_final=true +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=false +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.organize_imports=true +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=false +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_trailing_whitespaces=true +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_casts=true +sp_cleanup.remove_unnecessary_nls_tags=false +sp_cleanup.remove_unused_imports=false +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.use_blocks=false +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_parentheses_in_expressions=false +sp_cleanup.use_this_for_non_static_field_access=false +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true +sp_cleanup.use_this_for_non_static_method_access=false +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true diff --git a/google-api-client-gson/pom.xml b/google-api-client-gson/pom.xml new file mode 100644 index 00000000..1aa615e8 --- /dev/null +++ b/google-api-client-gson/pom.xml @@ -0,0 +1,68 @@ + + 4.0.0 + + com.google.api-client + google-api-client-parent + 1.17.1-rc-SNAPSHOT + ../pom.xml + + google-api-client-gson + GSON extensions to the Google APIs Client Library for Java + + + + maven-javadoc-plugin + + + http://download.oracle.com/javase/1.5.0/docs/api/ + http://javadoc.google-http-java-client.googlecode.com/hg/${project.http.version} + + ${project.name} ${project.version} + ${project.artifactId} ${project.version} + + + + maven-jar-plugin + + + + true + + + + + + jar + compile + + jar + + + + + + maven-source-plugin + + + source-jar + compile + + jar + + + + + + + + + com.google.api-client + google-api-client + + + com.google.http-client + google-http-client-gson + + + diff --git a/google-api-client-gson/src/main/java/com/google/api/client/googleapis/notifications/json/gson/GsonNotificationCallback.java b/google-api-client-gson/src/main/java/com/google/api/client/googleapis/notifications/json/gson/GsonNotificationCallback.java new file mode 100644 index 00000000..7df0ed25 --- /dev/null +++ b/google-api-client-gson/src/main/java/com/google/api/client/googleapis/notifications/json/gson/GsonNotificationCallback.java @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2013 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.api.client.googleapis.notifications.json.gson; + +import com.google.api.client.googleapis.notifications.TypedNotificationCallback; +import com.google.api.client.googleapis.notifications.json.JsonNotificationCallback; +import com.google.api.client.json.JsonFactory; +import com.google.api.client.json.gson.GsonFactory; +import com.google.api.client.util.Beta; + +/** + * {@link Beta}
+ * A {@link TypedNotificationCallback} which uses an JSON content encoding with + * {@link GsonFactory#getDefaultInstance()}. + * + *

+ * Must NOT be implemented in form of an anonymous class as this will break serialization. + *

+ * + *

+ * Implementation should be thread-safe. + *

+ * + * Example usage: + * + *
+  static class MyNotificationCallback
+      extends GsonNotificationCallback{@literal <}ListResponse{@literal >} {
+
+    private static final long serialVersionUID = 1L;
+
+    {@literal @}Override
+    protected void onNotification(
+        StoredChannel channel, TypedNotification{@literal <}ListResponse{@literal >} notification) {
+      ListResponse content = notification.getContent();
+      switch (notification.getResourceState()) {
+        case ResourceStates.SYNC:
+          break;
+        case ResourceStates.EXISTS:
+          break;
+        case ResourceStates.NOT_EXISTS:
+          break;
+      }
+    }
+
+    {@literal @}Override
+    protected Class{@literal <}ListResponse{@literal >} getDataClass() throws IOException {
+      return ListResponse.class;
+    }
+  }
+ * 
+ * + * @param Type of the data contained within a notification + * @author Yaniv Inbar + * @since 1.16 + */ +@Beta +public abstract class GsonNotificationCallback extends JsonNotificationCallback { + + private static final long serialVersionUID = 1L; + + @Override + protected JsonFactory getJsonFactory() { + return GsonFactory.getDefaultInstance(); + } +} diff --git a/google-api-client-gson/src/main/java/com/google/api/client/googleapis/notifications/json/gson/package-info.java b/google-api-client-gson/src/main/java/com/google/api/client/googleapis/notifications/json/gson/package-info.java new file mode 100644 index 00000000..7587ca56 --- /dev/null +++ b/google-api-client-gson/src/main/java/com/google/api/client/googleapis/notifications/json/gson/package-info.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2013 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. + */ + +/** + * {@link com.google.api.client.util.Beta}
+ * Notification channel handling based on the GSON JSON library. + * + * @author Yaniv Inbar + * @since 1.16 + */ +@com.google.api.client.util.Beta +package com.google.api.client.googleapis.notifications.json.gson; + diff --git a/google-api-client-jackson2/.classpath b/google-api-client-jackson2/.classpath new file mode 100644 index 00000000..68a2c33f --- /dev/null +++ b/google-api-client-jackson2/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/google-api-client-jackson2/.project b/google-api-client-jackson2/.project new file mode 100644 index 00000000..09c18e90 --- /dev/null +++ b/google-api-client-jackson2/.project @@ -0,0 +1,23 @@ + + + google-api-client-jackson2 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/google-api-client-jackson2/.settings/org.eclipse.jdt.core.prefs b/google-api-client-jackson2/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..56c60d70 --- /dev/null +++ b/google-api-client-jackson2/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,418 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.codeComplete.argumentPrefixes= +org.eclipse.jdt.core.codeComplete.argumentSuffixes= +org.eclipse.jdt.core.codeComplete.fieldPrefixes= +org.eclipse.jdt.core.codeComplete.fieldSuffixes= +org.eclipse.jdt.core.codeComplete.localPrefixes= +org.eclipse.jdt.core.codeComplete.localSuffixes= +org.eclipse.jdt.core.codeComplete.staticFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.5 +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=ignore +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=enabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore +org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=warning +org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning +org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning +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=warning +org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=ignore +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=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled +org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +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=warning +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=ignore +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.source=1.5 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field=1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field.count_dependent=1585|-1|1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable=569 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable.count_dependent=1585|-1|1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_member=569 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method=1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method.count_dependent=1585|-1|1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package=1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package.count_dependent=1585|-1|1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package_declaration=569 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter=24 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter.count_dependent=1040|-1|1040 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type=1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type.count_dependent=1585|-1|1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type_declaration=569 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16|4|80 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=16 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_cascading_method_invocation_with_arguments=16 +org.eclipse.jdt.core.formatter.alignment_for_cascading_method_invocation_with_arguments.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=16|5|48 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants.count_dependent=0|-1|0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_field_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_for_statement=16 +org.eclipse.jdt.core.formatter.alignment_for_generic_type_arguments=16 +org.eclipse.jdt.core.formatter.alignment_for_generic_type_arguments.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_local_variable_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_new_anonymous_class=0 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16|4|48 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16|4|49 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16|4|48 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16|4|48 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16|4|48 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=0 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=0 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=2 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=true +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=false +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=do not insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert +org.eclipse.jdt.core.formatter.comment.line_length=100 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.comment_new_line_at_start_of_html_paragraph=true +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.force_if_else_statement_brace=true +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comment_prefix=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.join_lines_in_comments=true +org.eclipse.jdt.core.formatter.join_wrapped_lines=true +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=true +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=100 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=3 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false +org.eclipse.jdt.core.formatter.sort_local_variable_annotations=false +org.eclipse.jdt.core.formatter.sort_member_annotations=false +org.eclipse.jdt.core.formatter.sort_package_annotations=false +org.eclipse.jdt.core.formatter.sort_parameter_annotations=false +org.eclipse.jdt.core.formatter.sort_type_annotations=false +org.eclipse.jdt.core.formatter.tabulation.char=space +org.eclipse.jdt.core.formatter.tabulation.size=2 +org.eclipse.jdt.core.formatter.use_on_off_tags=false +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_comment_inline_tags=false +org.eclipse.jdt.core.formatter.wrap_non_simple_local_variable_annotation=true +org.eclipse.jdt.core.formatter.wrap_non_simple_member_annotation=true +org.eclipse.jdt.core.formatter.wrap_non_simple_package_annotation=true +org.eclipse.jdt.core.formatter.wrap_non_simple_parameter_annotation=false +org.eclipse.jdt.core.formatter.wrap_non_simple_type_annotation=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true +org.eclipse.jdt.core.formatter.wrap_prefer_two_fragments=false diff --git a/google-api-client-jackson2/.settings/org.eclipse.jdt.ui.prefs b/google-api-client-jackson2/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000..08ebc976 --- /dev/null +++ b/google-api-client-jackson2/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,119 @@ +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=false +cleanup.add_serial_version_id=true +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=false +cleanup.always_use_this_for_non_static_method_access=false +cleanup.convert_to_enhanced_for_loop=false +cleanup.correct_indentation=true +cleanup.format_source_code=true +cleanup.format_source_code_changes_only=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=false +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.organize_imports=true +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=true +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.remove_private_constructors=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=true +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.use_blocks=true +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_parentheses_in_expressions=true +cleanup.use_this_for_non_static_field_access=true +cleanup.use_this_for_non_static_field_access_only_if_necessary=true +cleanup.use_this_for_non_static_method_access=true +cleanup.use_this_for_non_static_method_access_only_if_necessary=true +cleanup_profile=_google-api-java-client +cleanup_settings_version=2 +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=_google-api-java-client 100 +formatter_settings_version=12 +org.eclipse.jdt.ui.exception.name=exception +org.eclipse.jdt.ui.gettersetter.use.is=false +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=com.google;;java;javax; +org.eclipse.jdt.ui.javadoc=true +org.eclipse.jdt.ui.keywordthis=false +org.eclipse.jdt.ui.ondemandthreshold=999 +org.eclipse.jdt.ui.overrideannotation=true +org.eclipse.jdt.ui.staticondemandthreshold=999 +org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=true +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=false +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=false +sp_cleanup.always_use_this_for_non_static_method_access=false +sp_cleanup.convert_to_enhanced_for_loop=false +sp_cleanup.correct_indentation=false +sp_cleanup.format_source_code=false +sp_cleanup.format_source_code_changes_only=true +sp_cleanup.make_local_variable_final=false +sp_cleanup.make_parameters_final=false +sp_cleanup.make_private_fields_final=true +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=false +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.organize_imports=true +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=false +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_trailing_whitespaces=true +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_casts=true +sp_cleanup.remove_unnecessary_nls_tags=false +sp_cleanup.remove_unused_imports=false +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.use_blocks=false +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_parentheses_in_expressions=false +sp_cleanup.use_this_for_non_static_field_access=false +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true +sp_cleanup.use_this_for_non_static_method_access=false +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true diff --git a/google-api-client-jackson2/pom.xml b/google-api-client-jackson2/pom.xml new file mode 100644 index 00000000..3f94c7b7 --- /dev/null +++ b/google-api-client-jackson2/pom.xml @@ -0,0 +1,68 @@ + + 4.0.0 + + com.google.api-client + google-api-client-parent + 1.17.1-rc-SNAPSHOT + ../pom.xml + + google-api-client-jackson2 + Jackson 2 extensions to the Google APIs Client Library for Java + + + + maven-javadoc-plugin + + + http://download.oracle.com/javase/1.5.0/docs/api/ + http://javadoc.google-http-java-client.googlecode.com/hg/${project.http.version} + + ${project.name} ${project.version} + ${project.artifactId} ${project.version} + + + + maven-jar-plugin + + + + true + + + + + + jar + compile + + jar + + + + + + maven-source-plugin + + + source-jar + compile + + jar + + + + + + + + + com.google.api-client + google-api-client + + + com.google.http-client + google-http-client-jackson2 + + + diff --git a/google-api-client-jackson2/src/main/java/com/google/api/client/googleapis/notifications/json/jackson2/JacksonNotificationCallback.java b/google-api-client-jackson2/src/main/java/com/google/api/client/googleapis/notifications/json/jackson2/JacksonNotificationCallback.java new file mode 100644 index 00000000..564df173 --- /dev/null +++ b/google-api-client-jackson2/src/main/java/com/google/api/client/googleapis/notifications/json/jackson2/JacksonNotificationCallback.java @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2013 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.api.client.googleapis.notifications.json.jackson2; + +import com.google.api.client.googleapis.notifications.TypedNotificationCallback; +import com.google.api.client.googleapis.notifications.json.JsonNotificationCallback; +import com.google.api.client.json.JsonFactory; +import com.google.api.client.json.jackson2.JacksonFactory; +import com.google.api.client.util.Beta; + +/** + * {@link Beta}
+ * A {@link TypedNotificationCallback} which uses an JSON content encoding with + * {@link JacksonFactory#getDefaultInstance()}. + * + *

+ * Must NOT be implemented in form of an anonymous class as this will break serialization. + *

+ * + *

+ * Implementation should be thread-safe. + *

+ * + * Example usage: + * + *
+  static class MyNotificationCallback
+      extends GsonNotificationCallback{@literal <}ListResponse{@literal >} {
+
+    private static final long serialVersionUID = 1L;
+
+    {@literal @}Override
+    protected void onNotification(
+        StoredChannel channel, TypedNotification{@literal <}ListResponse{@literal >} notification) {
+      ListResponse content = notification.getContent();
+      switch (notification.getResourceState()) {
+        case ResourceStates.SYNC:
+          break;
+        case ResourceStates.EXISTS:
+          break;
+        case ResourceStates.NOT_EXISTS:
+          break;
+      }
+    }
+
+    {@literal @}Override
+    protected Class{@literal <}ListResponse{@literal >} getDataClass() throws IOException {
+      return ListResponse.class;
+    }
+  }
+ * 
+ * + * @param Type of the data contained within a notification + * @author Yaniv Inbar + * @since 1.16 + */ +@Beta +public abstract class JacksonNotificationCallback extends JsonNotificationCallback { + + private static final long serialVersionUID = 1L; + + @Override + protected JsonFactory getJsonFactory() { + return JacksonFactory.getDefaultInstance(); + } +} diff --git a/google-api-client-jackson2/src/main/java/com/google/api/client/googleapis/notifications/json/jackson2/package-info.java b/google-api-client-jackson2/src/main/java/com/google/api/client/googleapis/notifications/json/jackson2/package-info.java new file mode 100644 index 00000000..866f26b9 --- /dev/null +++ b/google-api-client-jackson2/src/main/java/com/google/api/client/googleapis/notifications/json/jackson2/package-info.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2013 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. + */ + +/** + * {@link com.google.api.client.util.Beta}
+ * Notification channel handling based on the Jackson 2 JSON library. + * + * @author Yaniv Inbar + * @since 1.16 + */ +@com.google.api.client.util.Beta +package com.google.api.client.googleapis.notifications.json.jackson2; + diff --git a/google-api-client-java6/.classpath b/google-api-client-java6/.classpath new file mode 100644 index 00000000..68a2c33f --- /dev/null +++ b/google-api-client-java6/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/google-api-client-java6/.project b/google-api-client-java6/.project new file mode 100644 index 00000000..910f35b5 --- /dev/null +++ b/google-api-client-java6/.project @@ -0,0 +1,17 @@ + + google-api-client-java6 + + + + + + org.eclipse.m2e.core.maven2Builder + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Nature + org.eclipse.jdt.core.javanature + + diff --git a/google-api-client-java6/.settings/org.eclipse.jdt.core.prefs b/google-api-client-java6/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..2bb99ad7 --- /dev/null +++ b/google-api-client-java6/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,380 @@ +#Thu Nov 17 08:38:45 EST 2011 +eclipse.preferences.version=1 +org.eclipse.jdt.core.codeComplete.argumentPrefixes= +org.eclipse.jdt.core.codeComplete.argumentSuffixes= +org.eclipse.jdt.core.codeComplete.fieldPrefixes= +org.eclipse.jdt.core.codeComplete.fieldSuffixes= +org.eclipse.jdt.core.codeComplete.localPrefixes= +org.eclipse.jdt.core.codeComplete.localSuffixes= +org.eclipse.jdt.core.codeComplete.staticFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.6 +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=ignore +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=enabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore +org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=warning +org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning +org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning +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=warning +org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=ignore +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=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning +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=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +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=warning +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=ignore +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.source=1.6 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable=569 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_member=569 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package_declaration=569 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter=24 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type_declaration=569 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16|4|80 +org.eclipse.jdt.core.formatter.alignment_for_assignment=16 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=16|5|48 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_field_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_for_statement=16 +org.eclipse.jdt.core.formatter.alignment_for_generic_type_arguments=16 +org.eclipse.jdt.core.formatter.alignment_for_local_variable_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_new_anonymous_class=0 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16|4|48 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16|4|49 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16|4|48 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16|4|48 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16|4|48 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=0 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=0 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=2 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=true +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=false +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=do not insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert +org.eclipse.jdt.core.formatter.comment.line_length=100 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.comment_new_line_at_start_of_html_paragraph=true +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.force_if_else_statement_brace=true +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.join_lines_in_comments=true +org.eclipse.jdt.core.formatter.join_wrapped_lines=true +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=true +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=100 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=3 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false +org.eclipse.jdt.core.formatter.sort_local_variable_annotations=false +org.eclipse.jdt.core.formatter.sort_member_annotations=false +org.eclipse.jdt.core.formatter.sort_package_annotations=false +org.eclipse.jdt.core.formatter.sort_parameter_annotations=false +org.eclipse.jdt.core.formatter.sort_type_annotations=false +org.eclipse.jdt.core.formatter.tabulation.char=space +org.eclipse.jdt.core.formatter.tabulation.size=2 +org.eclipse.jdt.core.formatter.use_on_off_tags=false +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_comment_inline_tags=false +org.eclipse.jdt.core.formatter.wrap_non_simple_local_variable_annotation=true +org.eclipse.jdt.core.formatter.wrap_non_simple_member_annotation=true +org.eclipse.jdt.core.formatter.wrap_non_simple_package_annotation=true +org.eclipse.jdt.core.formatter.wrap_non_simple_parameter_annotation=false +org.eclipse.jdt.core.formatter.wrap_non_simple_type_annotation=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true +org.eclipse.jdt.core.formatter.wrap_prefer_two_fragments=false diff --git a/google-api-client-java6/.settings/org.eclipse.jdt.ui.prefs b/google-api-client-java6/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000..fea3eb89 --- /dev/null +++ b/google-api-client-java6/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,119 @@ +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=true +cleanup.add_serial_version_id=true +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=false +cleanup.always_use_this_for_non_static_method_access=false +cleanup.convert_to_enhanced_for_loop=false +cleanup.correct_indentation=true +cleanup.format_source_code=true +cleanup.format_source_code_changes_only=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=false +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.organize_imports=true +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=true +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.remove_private_constructors=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=true +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.use_blocks=true +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_parentheses_in_expressions=true +cleanup.use_this_for_non_static_field_access=true +cleanup.use_this_for_non_static_field_access_only_if_necessary=true +cleanup.use_this_for_non_static_method_access=true +cleanup.use_this_for_non_static_method_access_only_if_necessary=true +cleanup_profile=_google-api-java-client +cleanup_settings_version=2 +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=_google-api-java-client 100 +formatter_settings_version=12 +org.eclipse.jdt.ui.exception.name=exception +org.eclipse.jdt.ui.gettersetter.use.is=false +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=com.google;;java;javax; +org.eclipse.jdt.ui.javadoc=true +org.eclipse.jdt.ui.keywordthis=false +org.eclipse.jdt.ui.ondemandthreshold=999 +org.eclipse.jdt.ui.overrideannotation=true +org.eclipse.jdt.ui.staticondemandthreshold=999 +org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=true +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=true +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=false +sp_cleanup.always_use_this_for_non_static_method_access=false +sp_cleanup.convert_to_enhanced_for_loop=false +sp_cleanup.correct_indentation=false +sp_cleanup.format_source_code=false +sp_cleanup.format_source_code_changes_only=true +sp_cleanup.make_local_variable_final=false +sp_cleanup.make_parameters_final=false +sp_cleanup.make_private_fields_final=true +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=false +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.organize_imports=true +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=false +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_trailing_whitespaces=true +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_casts=true +sp_cleanup.remove_unnecessary_nls_tags=false +sp_cleanup.remove_unused_imports=false +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.use_blocks=false +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_parentheses_in_expressions=false +sp_cleanup.use_this_for_non_static_field_access=false +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true +sp_cleanup.use_this_for_non_static_method_access=false +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true diff --git a/google-api-client-java6/pom.xml b/google-api-client-java6/pom.xml new file mode 100644 index 00000000..e05133e4 --- /dev/null +++ b/google-api-client-java6/pom.xml @@ -0,0 +1,85 @@ + + 4.0.0 + + com.google.api-client + google-api-client-parent + 1.17.1-rc-SNAPSHOT + ../pom.xml + + google-api-client-java6 + Java 6 (and higher) Extensions to the Google API Client Library for Java. + + + + maven-javadoc-plugin + + + http://download.oracle.com/javase/6/docs/api/ + http://javadoc.google-http-java-client.googlecode.com/hg/${project.http.version} + + ${project.name} ${project.version} + ${project.artifactId} ${project.version} + + + + maven-jar-plugin + + + + true + + + + + + jar + compile + + jar + + + + + + maven-source-plugin + + + source-jar + compile + + jar + + + + + + + org.codehaus.mojo + animal-sniffer-maven-plugin + + + org.codehaus.mojo.signature + java16 + 1.0 + + + + + + + + com.google.api-client + google-api-client + + + com.google.oauth-client + google-oauth-client-java6 + + + junit + junit + test + + + diff --git a/google-api-client-java6/src/main/java/com/google/api/client/googleapis/extensions/java6/auth/oauth2/GooglePromptReceiver.java b/google-api-client-java6/src/main/java/com/google/api/client/googleapis/extensions/java6/auth/oauth2/GooglePromptReceiver.java new file mode 100644 index 00000000..b21785ad --- /dev/null +++ b/google-api-client-java6/src/main/java/com/google/api/client/googleapis/extensions/java6/auth/oauth2/GooglePromptReceiver.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2012 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.api.client.googleapis.extensions.java6.auth.oauth2; + +import com.google.api.client.extensions.java6.auth.oauth2.AbstractPromptReceiver; +import com.google.api.client.googleapis.auth.oauth2.GoogleOAuthConstants; + +import java.io.IOException; + +/** + * Google OAuth 2.0 abstract verification code receiver that prompts user to paste the code copied + * from the browser. + * + *

+ * Implementation is thread-safe. + *

+ * + * @since 1.11 + * @author Yaniv Inbar + */ +public class GooglePromptReceiver extends AbstractPromptReceiver { + + @Override + public String getRedirectUri() throws IOException { + return GoogleOAuthConstants.OOB_REDIRECT_URI; + } +} diff --git a/google-api-client-java6/src/main/java/com/google/api/client/googleapis/extensions/java6/auth/oauth2/package-info.java b/google-api-client-java6/src/main/java/com/google/api/client/googleapis/extensions/java6/auth/oauth2/package-info.java new file mode 100644 index 00000000..8a57bb90 --- /dev/null +++ b/google-api-client-java6/src/main/java/com/google/api/client/googleapis/extensions/java6/auth/oauth2/package-info.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2012 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. + */ + +/** + * Google OAuth 2.0 utilities that help simplify the authorization flow on Java 6. + * + * @since 1.11 + * @author Yaniv Inbar + */ +package com.google.api.client.googleapis.extensions.java6.auth.oauth2; + diff --git a/google-api-client-protobuf/.classpath b/google-api-client-protobuf/.classpath new file mode 100644 index 00000000..47154502 --- /dev/null +++ b/google-api-client-protobuf/.classpath @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/google-api-client-protobuf/.project b/google-api-client-protobuf/.project new file mode 100644 index 00000000..311c9440 --- /dev/null +++ b/google-api-client-protobuf/.project @@ -0,0 +1,23 @@ + + + google-api-client-protobuf + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/google-api-client-protobuf/.settings/org.eclipse.jdt.core.prefs b/google-api-client-protobuf/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..56c60d70 --- /dev/null +++ b/google-api-client-protobuf/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,418 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.codeComplete.argumentPrefixes= +org.eclipse.jdt.core.codeComplete.argumentSuffixes= +org.eclipse.jdt.core.codeComplete.fieldPrefixes= +org.eclipse.jdt.core.codeComplete.fieldSuffixes= +org.eclipse.jdt.core.codeComplete.localPrefixes= +org.eclipse.jdt.core.codeComplete.localSuffixes= +org.eclipse.jdt.core.codeComplete.staticFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.5 +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=ignore +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=enabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore +org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=warning +org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning +org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning +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=warning +org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=ignore +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=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled +org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +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=warning +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=ignore +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.source=1.5 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field=1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field.count_dependent=1585|-1|1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable=569 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable.count_dependent=1585|-1|1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_member=569 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method=1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method.count_dependent=1585|-1|1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package=1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package.count_dependent=1585|-1|1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package_declaration=569 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter=24 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter.count_dependent=1040|-1|1040 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type=1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type.count_dependent=1585|-1|1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type_declaration=569 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16|4|80 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=16 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_cascading_method_invocation_with_arguments=16 +org.eclipse.jdt.core.formatter.alignment_for_cascading_method_invocation_with_arguments.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=16|5|48 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants.count_dependent=0|-1|0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_field_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_for_statement=16 +org.eclipse.jdt.core.formatter.alignment_for_generic_type_arguments=16 +org.eclipse.jdt.core.formatter.alignment_for_generic_type_arguments.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_local_variable_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_new_anonymous_class=0 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16|4|48 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16|4|49 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16|4|48 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16|4|48 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16|4|48 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=0 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=0 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=2 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=true +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=false +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=do not insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert +org.eclipse.jdt.core.formatter.comment.line_length=100 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.comment_new_line_at_start_of_html_paragraph=true +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.force_if_else_statement_brace=true +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comment_prefix=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.join_lines_in_comments=true +org.eclipse.jdt.core.formatter.join_wrapped_lines=true +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=true +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=100 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=3 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false +org.eclipse.jdt.core.formatter.sort_local_variable_annotations=false +org.eclipse.jdt.core.formatter.sort_member_annotations=false +org.eclipse.jdt.core.formatter.sort_package_annotations=false +org.eclipse.jdt.core.formatter.sort_parameter_annotations=false +org.eclipse.jdt.core.formatter.sort_type_annotations=false +org.eclipse.jdt.core.formatter.tabulation.char=space +org.eclipse.jdt.core.formatter.tabulation.size=2 +org.eclipse.jdt.core.formatter.use_on_off_tags=false +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_comment_inline_tags=false +org.eclipse.jdt.core.formatter.wrap_non_simple_local_variable_annotation=true +org.eclipse.jdt.core.formatter.wrap_non_simple_member_annotation=true +org.eclipse.jdt.core.formatter.wrap_non_simple_package_annotation=true +org.eclipse.jdt.core.formatter.wrap_non_simple_parameter_annotation=false +org.eclipse.jdt.core.formatter.wrap_non_simple_type_annotation=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true +org.eclipse.jdt.core.formatter.wrap_prefer_two_fragments=false diff --git a/google-api-client-protobuf/.settings/org.eclipse.jdt.ui.prefs b/google-api-client-protobuf/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000..08ebc976 --- /dev/null +++ b/google-api-client-protobuf/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,119 @@ +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=false +cleanup.add_serial_version_id=true +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=false +cleanup.always_use_this_for_non_static_method_access=false +cleanup.convert_to_enhanced_for_loop=false +cleanup.correct_indentation=true +cleanup.format_source_code=true +cleanup.format_source_code_changes_only=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=false +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.organize_imports=true +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=true +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.remove_private_constructors=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=true +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.use_blocks=true +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_parentheses_in_expressions=true +cleanup.use_this_for_non_static_field_access=true +cleanup.use_this_for_non_static_field_access_only_if_necessary=true +cleanup.use_this_for_non_static_method_access=true +cleanup.use_this_for_non_static_method_access_only_if_necessary=true +cleanup_profile=_google-api-java-client +cleanup_settings_version=2 +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=_google-api-java-client 100 +formatter_settings_version=12 +org.eclipse.jdt.ui.exception.name=exception +org.eclipse.jdt.ui.gettersetter.use.is=false +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=com.google;;java;javax; +org.eclipse.jdt.ui.javadoc=true +org.eclipse.jdt.ui.keywordthis=false +org.eclipse.jdt.ui.ondemandthreshold=999 +org.eclipse.jdt.ui.overrideannotation=true +org.eclipse.jdt.ui.staticondemandthreshold=999 +org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=true +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=false +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=false +sp_cleanup.always_use_this_for_non_static_method_access=false +sp_cleanup.convert_to_enhanced_for_loop=false +sp_cleanup.correct_indentation=false +sp_cleanup.format_source_code=false +sp_cleanup.format_source_code_changes_only=true +sp_cleanup.make_local_variable_final=false +sp_cleanup.make_parameters_final=false +sp_cleanup.make_private_fields_final=true +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=false +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.organize_imports=true +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=false +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_trailing_whitespaces=true +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_casts=true +sp_cleanup.remove_unnecessary_nls_tags=false +sp_cleanup.remove_unused_imports=false +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.use_blocks=false +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_parentheses_in_expressions=false +sp_cleanup.use_this_for_non_static_field_access=false +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true +sp_cleanup.use_this_for_non_static_method_access=false +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true diff --git a/google-api-client-protobuf/pom.xml b/google-api-client-protobuf/pom.xml new file mode 100644 index 00000000..f109aea9 --- /dev/null +++ b/google-api-client-protobuf/pom.xml @@ -0,0 +1,161 @@ + + 4.0.0 + + com.google.api-client + google-api-client-parent + 1.17.1-rc-SNAPSHOT + ../pom.xml + + google-api-client-protobuf + Protocol Buffer extensions to the Google APIs Client Library for Java + + + + maven-javadoc-plugin + + + http://download.oracle.com/javase/1.5.0/docs/api/ + http://javadoc.google-http-java-client.googlecode.com/hg/${project.http.version} + + ${project.name} ${project.version} + ${project.artifactId} ${project.version} + + + + maven-jar-plugin + + + + true + + + + + + jar + compile + + jar + + + + + + maven-source-plugin + + + source-jar + compile + + jar + + + + + + maven-antrun-plugin + + + generate-sources + generate-sources + + + + + + + + + + + run + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.5 + + + add-test-source + generate-test-sources + + add-test-source + + + + target/generated-test-sources + + + + + + + + + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + + org.apache.maven.plugins + + + maven-antrun-plugin + + [1.6,) + + run + + + + + + + + + org.codehaus.mojo + + build-helper-maven-plugin + + [1.5,) + + add-test-source + + + + + + + + + + + + + + + + com.google.http-client + google-http-client-protobuf + + + com.google.api-client + google-api-client + + + junit + junit + test + + + diff --git a/google-api-client-protobuf/src/main/java/com/google/api/client/googleapis/services/protobuf/AbstractGoogleProtoClient.java b/google-api-client-protobuf/src/main/java/com/google/api/client/googleapis/services/protobuf/AbstractGoogleProtoClient.java new file mode 100644 index 00000000..04fc6c07 --- /dev/null +++ b/google-api-client-protobuf/src/main/java/com/google/api/client/googleapis/services/protobuf/AbstractGoogleProtoClient.java @@ -0,0 +1,118 @@ +/* + * Copyright (c) 2013 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.api.client.googleapis.services.protobuf; + +import com.google.api.client.googleapis.services.AbstractGoogleClient; +import com.google.api.client.googleapis.services.GoogleClientRequestInitializer; +import com.google.api.client.http.HttpRequestInitializer; +import com.google.api.client.http.HttpTransport; +import com.google.api.client.protobuf.ProtoObjectParser; +import com.google.api.client.util.Beta; + +/** + * {@link Beta}
+ * Thread-safe Google protocol buffer client. + * + * @since 1.16 + * @author Yaniv Inbar + */ +@Beta +public abstract class AbstractGoogleProtoClient extends AbstractGoogleClient { + + /** + * @param builder builder + */ + protected AbstractGoogleProtoClient(Builder builder) { + super(builder); + } + + @Override + public ProtoObjectParser getObjectParser() { + return (ProtoObjectParser) super.getObjectParser(); + } + + /** + * {@link Beta}
+ * Builder for {@link AbstractGoogleProtoClient}. + * + *

+ * Implementation is not thread-safe. + *

+ * @since 1.16 + */ + @Beta + public abstract static class Builder extends AbstractGoogleClient.Builder { + + /** + * @param transport HTTP transport + * @param rootUrl root URL of the service + * @param servicePath service path + * @param httpRequestInitializer HTTP request initializer or {@code null} for none + */ + protected Builder(HttpTransport transport, String rootUrl, String servicePath, + HttpRequestInitializer httpRequestInitializer) { + super(transport, rootUrl, servicePath, new ProtoObjectParser(), httpRequestInitializer); + } + + @Override + public final ProtoObjectParser getObjectParser() { + return (ProtoObjectParser) super.getObjectParser(); + } + + @Override + public abstract AbstractGoogleProtoClient build(); + + @Override + public Builder setRootUrl(String rootUrl) { + return (Builder) super.setRootUrl(rootUrl); + } + + @Override + public Builder setServicePath(String servicePath) { + return (Builder) super.setServicePath(servicePath); + } + + @Override + public Builder setGoogleClientRequestInitializer( + GoogleClientRequestInitializer googleClientRequestInitializer) { + return (Builder) super.setGoogleClientRequestInitializer(googleClientRequestInitializer); + } + + @Override + public Builder setHttpRequestInitializer(HttpRequestInitializer httpRequestInitializer) { + return (Builder) super.setHttpRequestInitializer(httpRequestInitializer); + } + + @Override + public Builder setApplicationName(String applicationName) { + return (Builder) super.setApplicationName(applicationName); + } + + @Override + public Builder setSuppressPatternChecks(boolean suppressPatternChecks) { + return (Builder) super.setSuppressPatternChecks(suppressPatternChecks); + } + + @Override + public Builder setSuppressRequiredParameterChecks(boolean suppressRequiredParameterChecks) { + return (Builder) super.setSuppressRequiredParameterChecks(suppressRequiredParameterChecks); + } + + @Override + public Builder setSuppressAllChecks(boolean suppressAllChecks) { + return (Builder) super.setSuppressAllChecks(suppressAllChecks); + } + } +} diff --git a/google-api-client-protobuf/src/main/java/com/google/api/client/googleapis/services/protobuf/AbstractGoogleProtoClientRequest.java b/google-api-client-protobuf/src/main/java/com/google/api/client/googleapis/services/protobuf/AbstractGoogleProtoClientRequest.java new file mode 100644 index 00000000..943457d9 --- /dev/null +++ b/google-api-client-protobuf/src/main/java/com/google/api/client/googleapis/services/protobuf/AbstractGoogleProtoClientRequest.java @@ -0,0 +1,120 @@ +/* + * Copyright (c) 2013 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.api.client.googleapis.services.protobuf; + +import com.google.api.client.googleapis.batch.BatchCallback; +import com.google.api.client.googleapis.batch.BatchRequest; +import com.google.api.client.googleapis.services.AbstractGoogleClientRequest; +import com.google.api.client.http.HttpHeaders; +import com.google.api.client.http.UriTemplate; +import com.google.api.client.http.protobuf.ProtoHttpContent; +import com.google.api.client.util.Beta; +import com.google.protobuf.MessageLite; + +import java.io.IOException; + +/** + * {@link Beta}
+ * Google protocol buffer request for a {@link AbstractGoogleProtoClient}. + * + *

+ * Implementation is not thread-safe. + *

+ * + * @param type of the response + * @since 1.16 + * @author Yaniv Inbar + */ +@Beta +public abstract class AbstractGoogleProtoClientRequest extends AbstractGoogleClientRequest { + + /** Message to serialize or {@code null} for none. */ + private final MessageLite message; + + /** + * @param abstractGoogleProtoClient Google protocol buffer client + * @param requestMethod HTTP Method + * @param uriTemplate URI template for the path relative to the base URL. If it starts with a "/" + * the base path from the base URL will be stripped out. The URI template can also be a + * full URL. URI template expansion is done using + * {@link UriTemplate#expand(String, String, Object, boolean)} + * @param message message to serialize or {@code null} for none + * @param responseClass response class to parse into + */ + protected AbstractGoogleProtoClientRequest(AbstractGoogleProtoClient abstractGoogleProtoClient, + String requestMethod, String uriTemplate, MessageLite message, Class responseClass) { + super(abstractGoogleProtoClient, requestMethod, uriTemplate, message == null + ? null : new ProtoHttpContent(message), responseClass); + this.message = message; + } + + @Override + public AbstractGoogleProtoClient getAbstractGoogleClient() { + return (AbstractGoogleProtoClient) super.getAbstractGoogleClient(); + } + + @Override + public AbstractGoogleProtoClientRequest setDisableGZipContent(boolean disableGZipContent) { + return (AbstractGoogleProtoClientRequest) super.setDisableGZipContent(disableGZipContent); + } + + @Override + public AbstractGoogleProtoClientRequest setRequestHeaders(HttpHeaders headers) { + return (AbstractGoogleProtoClientRequest) super.setRequestHeaders(headers); + } + + /** + * Queues the request into the specified batch request container. + * + *

+ * Batched requests are then executed when {@link BatchRequest#execute()} is called. + *

+ *

+ * Example usage: + *

+ * + *
+   *
+    request.queue(batchRequest, new BatchCallback{@literal <}SomeResponseType, Void{@literal >}() {
+
+      public void onSuccess(SomeResponseType content, HttpHeaders responseHeaders) {
+        log("Success");
+      }
+
+      public void onFailure(Void unused, HttpHeaders responseHeaders) {
+        log(e.getMessage());
+      }
+    });
+   * 
+ * + * + * @param batchRequest batch request container + * @param callback batch callback + */ + public final void queue(BatchRequest batchRequest, BatchCallback callback) + throws IOException { + super.queue(batchRequest, Void.class, callback); + } + + /** Returns the message to serialize or {@code null} for none. */ + public Object getMessage() { + return message; + } + + @Override + public AbstractGoogleProtoClientRequest set(String fieldName, Object value) { + return (AbstractGoogleProtoClientRequest) super.set(fieldName, value); + } +} diff --git a/google-api-client-protobuf/src/main/java/com/google/api/client/googleapis/services/protobuf/CommonGoogleProtoClientRequestInitializer.java b/google-api-client-protobuf/src/main/java/com/google/api/client/googleapis/services/protobuf/CommonGoogleProtoClientRequestInitializer.java new file mode 100644 index 00000000..d8a18ccb --- /dev/null +++ b/google-api-client-protobuf/src/main/java/com/google/api/client/googleapis/services/protobuf/CommonGoogleProtoClientRequestInitializer.java @@ -0,0 +1,129 @@ +/* + * Copyright (c) 2013 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.api.client.googleapis.services.protobuf; + +import com.google.api.client.googleapis.services.AbstractGoogleClientRequest; +import com.google.api.client.googleapis.services.CommonGoogleClientRequestInitializer; +import com.google.api.client.util.Beta; + +import java.io.IOException; + +/** + * {@link Beta}
+ * Google protocol buffer client request initializer implementation for setting properties like key + * and userIp. + * + *

+ * The simplest usage is to use it to set the key parameter: + *

+ * + *
+  public static final GoogleClientRequestInitializer KEY_INITIALIZER =
+      new CommonGoogleProtoClientRequestInitializer(KEY);
+ * 
+ * + *

+ * There is also a constructor to set both the key and userIp parameters: + *

+ * + *
+  public static final GoogleClientRequestInitializer INITIALIZER =
+      new CommonGoogleProtoClientRequestInitializer(KEY, USER_IP);
+ * 
+ * + *

+ * If you want to implement custom logic, extend it like this: + *

+ * + *
+  public static class MyRequestInitializer extends CommonGoogleProtoClientRequestInitializer {
+
+    {@literal @}Override
+    public void initialize(AbstractGoogleProtoClientRequest{@literal <}?{@literal >} request)
+        throws IOException {
+      // custom logic
+    }
+  }
+ * 
+ * + *

+ * Finally, to set the key and userIp parameters and insert custom logic, extend it like this: + *

+ * + *
+  public static class MyKeyRequestInitializer extends CommonGoogleProtoClientRequestInitializer {
+
+    public MyKeyRequestInitializer() {
+      super(KEY, USER_IP);
+    }
+
+    {@literal @}Override
+    public void initializeProtoRequest(
+        AbstractGoogleProtoClientRequest{@literal <}?{@literal >} request) throws IOException {
+      // custom logic
+    }
+  }
+ * 
+ * + *

+ * Subclasses should be thread-safe. + *

+ * + * @since 1.16 + * @author Yaniv Inbar + */ +@Beta +public class CommonGoogleProtoClientRequestInitializer + extends CommonGoogleClientRequestInitializer { + + public CommonGoogleProtoClientRequestInitializer() { + super(); + } + + /** + * @param key API key or {@code null} to leave it unchanged + */ + public CommonGoogleProtoClientRequestInitializer(String key) { + super(key); + } + + /** + * @param key API key or {@code null} to leave it unchanged + * @param userIp user IP or {@code null} to leave it unchanged + */ + public CommonGoogleProtoClientRequestInitializer(String key, String userIp) { + super(key, userIp); + } + + @Override + public final void initialize(AbstractGoogleClientRequest request) throws IOException { + super.initialize(request); + initializeProtoRequest((AbstractGoogleProtoClientRequest) request); + } + + /** + * Initializes a Google protocol buffer client request. + * + *

+ * Default implementation does nothing. Called from + * {@link #initialize(AbstractGoogleClientRequest)}. + *

+ * + * @throws IOException I/O exception + */ + protected void initializeProtoRequest(AbstractGoogleProtoClientRequest request) + throws IOException { + } +} diff --git a/google-api-client-protobuf/src/main/java/com/google/api/client/googleapis/services/protobuf/package-info.java b/google-api-client-protobuf/src/main/java/com/google/api/client/googleapis/services/protobuf/package-info.java new file mode 100644 index 00000000..2ee462c9 --- /dev/null +++ b/google-api-client-protobuf/src/main/java/com/google/api/client/googleapis/services/protobuf/package-info.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2013 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. + */ + +/** + * {@link com.google.api.client.util.Beta}
+ * Contains the basis for the generated service-specific libraries based on the Protobuf format. + * + * @since 1.16 + * @author Yaniv Inbar + */ +@com.google.api.client.util.Beta +package com.google.api.client.googleapis.services.protobuf; + diff --git a/google-api-client-protobuf/src/main/java/com/google/api/client/googleapis/testing/services/protobuf/MockGoogleProtoClient.java b/google-api-client-protobuf/src/main/java/com/google/api/client/googleapis/testing/services/protobuf/MockGoogleProtoClient.java new file mode 100644 index 00000000..a1c63628 --- /dev/null +++ b/google-api-client-protobuf/src/main/java/com/google/api/client/googleapis/testing/services/protobuf/MockGoogleProtoClient.java @@ -0,0 +1,119 @@ +/* + * Copyright (c) 2013 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.api.client.googleapis.testing.services.protobuf; + +import com.google.api.client.googleapis.services.GoogleClientRequestInitializer; +import com.google.api.client.googleapis.services.protobuf.AbstractGoogleProtoClient; +import com.google.api.client.http.HttpRequestInitializer; +import com.google.api.client.http.HttpTransport; +import com.google.api.client.util.Beta; + +/** + * {@link Beta}
+ * Thread-safe mock Google protocol buffer client. + * + * @since 1.16 + * @author Yaniv Inbar + */ +@Beta +public class MockGoogleProtoClient extends AbstractGoogleProtoClient { + + /** + * @param builder builder + */ + protected MockGoogleProtoClient(Builder builder) { + super(builder); + } + + /** + * @param transport HTTP transport + * @param rootUrl root URL of the service + * @param servicePath service path + * @param httpRequestInitializer HTTP request initializer or {@code null} for none + */ + public MockGoogleProtoClient(HttpTransport transport, String rootUrl, String servicePath, + HttpRequestInitializer httpRequestInitializer) { + this(new Builder(transport, rootUrl, servicePath, httpRequestInitializer)); + } + + /** + * {@link Beta}
+ * Builder for {@link MockGoogleProtoClient}. + * + *

+ * Implementation is not thread-safe. + *

+ */ + @Beta + public static class Builder extends AbstractGoogleProtoClient.Builder { + + /** + * @param transport HTTP transport + * @param rootUrl root URL of the service + * @param servicePath service path + * @param httpRequestInitializer HTTP request initializer or {@code null} for none + */ + public Builder(HttpTransport transport, String rootUrl, String servicePath, + HttpRequestInitializer httpRequestInitializer) { + super(transport, rootUrl, servicePath, httpRequestInitializer); + } + + @Override + public MockGoogleProtoClient build() { + return new MockGoogleProtoClient(this); + } + + @Override + public Builder setRootUrl(String rootUrl) { + return (Builder) super.setRootUrl(rootUrl); + } + + @Override + public Builder setServicePath(String servicePath) { + return (Builder) super.setServicePath(servicePath); + } + + @Override + public Builder setGoogleClientRequestInitializer( + GoogleClientRequestInitializer googleClientRequestInitializer) { + return (Builder) super.setGoogleClientRequestInitializer(googleClientRequestInitializer); + } + + @Override + public Builder setHttpRequestInitializer(HttpRequestInitializer httpRequestInitializer) { + return (Builder) super.setHttpRequestInitializer(httpRequestInitializer); + } + + @Override + public Builder setApplicationName(String applicationName) { + return (Builder) super.setApplicationName(applicationName); + } + + @Override + public Builder setSuppressPatternChecks(boolean suppressPatternChecks) { + return (Builder) super.setSuppressPatternChecks(suppressPatternChecks); + } + + @Override + public Builder setSuppressRequiredParameterChecks(boolean suppressRequiredParameterChecks) { + return (Builder) super.setSuppressRequiredParameterChecks(suppressRequiredParameterChecks); + } + + @Override + public Builder setSuppressAllChecks(boolean suppressAllChecks) { + return (Builder) super.setSuppressAllChecks(suppressAllChecks); + } + } +} diff --git a/google-api-client-protobuf/src/main/java/com/google/api/client/googleapis/testing/services/protobuf/MockGoogleProtoClientRequest.java b/google-api-client-protobuf/src/main/java/com/google/api/client/googleapis/testing/services/protobuf/MockGoogleProtoClientRequest.java new file mode 100644 index 00000000..fe89918a --- /dev/null +++ b/google-api-client-protobuf/src/main/java/com/google/api/client/googleapis/testing/services/protobuf/MockGoogleProtoClientRequest.java @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2013 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.api.client.googleapis.testing.services.protobuf; + +import com.google.api.client.googleapis.services.protobuf.AbstractGoogleProtoClient; +import com.google.api.client.googleapis.services.protobuf.AbstractGoogleProtoClientRequest; +import com.google.api.client.http.HttpHeaders; +import com.google.api.client.http.UriTemplate; +import com.google.api.client.util.Beta; +import com.google.protobuf.MessageLite; + +/** + * {@link Beta}
+ * Thread-safe mock Google protocol buffer request. + * + * @param type of the response + * @since 1.16 + * @author Yaniv Inbar + */ +@Beta +public class MockGoogleProtoClientRequest extends AbstractGoogleProtoClientRequest { + + /** + * @param client Google client + * @param method HTTP Method + * @param uriTemplate URI template for the path relative to the base URL. If it starts with a "/" + * the base path from the base URL will be stripped out. The URI template can also be a + * full URL. URI template expansion is done using + * {@link UriTemplate#expand(String, String, Object, boolean)} + * @param message message to serialize or {@code null} for none + * @param responseClass response class to parse into + */ + public MockGoogleProtoClientRequest(AbstractGoogleProtoClient client, String method, + String uriTemplate, MessageLite message, Class responseClass) { + super(client, method, uriTemplate, message, responseClass); + } + + @Override + public MockGoogleProtoClient getAbstractGoogleClient() { + return (MockGoogleProtoClient) super.getAbstractGoogleClient(); + } + + @Override + public MockGoogleProtoClientRequest setDisableGZipContent(boolean disableGZipContent) { + return (MockGoogleProtoClientRequest) super.setDisableGZipContent(disableGZipContent); + } + + @Override + public MockGoogleProtoClientRequest setRequestHeaders(HttpHeaders headers) { + return (MockGoogleProtoClientRequest) super.setRequestHeaders(headers); + } +} diff --git a/google-api-client-protobuf/src/main/java/com/google/api/client/googleapis/testing/services/protobuf/package-info.java b/google-api-client-protobuf/src/main/java/com/google/api/client/googleapis/testing/services/protobuf/package-info.java new file mode 100644 index 00000000..619fe213 --- /dev/null +++ b/google-api-client-protobuf/src/main/java/com/google/api/client/googleapis/testing/services/protobuf/package-info.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2013 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. + */ + +/** + * {@link com.google.api.client.util.Beta}
+ * Test utilities for the {@code com.google.api.client.googleapis.protobuf} package. + * + * @since 1.16 + * @author Yaniv Inbar + */ +@com.google.api.client.util.Beta +package com.google.api.client.googleapis.testing.services.protobuf; + diff --git a/google-api-client-protobuf/src/test/java/com/google/api/client/googleapis/services/protobuf/CommonGoogleProtoClientRequestInitializerTest.java b/google-api-client-protobuf/src/test/java/com/google/api/client/googleapis/services/protobuf/CommonGoogleProtoClientRequestInitializerTest.java new file mode 100644 index 00000000..48364377 --- /dev/null +++ b/google-api-client-protobuf/src/test/java/com/google/api/client/googleapis/services/protobuf/CommonGoogleProtoClientRequestInitializerTest.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2013 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.api.client.googleapis.services.protobuf; + +import com.google.api.client.googleapis.testing.services.protobuf.MockGoogleProtoClient; +import com.google.api.client.testing.http.HttpTesting; +import com.google.api.client.testing.http.MockHttpTransport; +import com.google.api.client.util.Key; +import com.google.protobuf.MessageLite; + +import junit.framework.TestCase; + +/** + * Tests {@link CommonGoogleProtoClientRequestInitializer}. + * + * @author Yaniv Inbar + */ +public class CommonGoogleProtoClientRequestInitializerTest extends TestCase { + + public static class MyRequest extends AbstractGoogleProtoClientRequest { + @Key + String key; + + protected MyRequest(MockGoogleProtoClient client, String method, String uriTemplate, + MessageLite message, Class responseClass) { + super(client, method, uriTemplate, message, responseClass); + } + } + + public void testInitialize() throws Exception { + CommonGoogleProtoClientRequestInitializer key = + new CommonGoogleProtoClientRequestInitializer("foo"); + MockGoogleProtoClient client = + new MockGoogleProtoClient.Builder(new MockHttpTransport(), HttpTesting.SIMPLE_URL, "test/", + null).setApplicationName("Test Application").build(); + MyRequest request = new MyRequest(client, "GET", "", null, String.class); + assertNull(request.key); + key.initialize(request); + assertEquals("foo", request.key); + } +} diff --git a/google-api-client-protobuf/src/test/java/com/google/api/client/googleapis/services/protobuf/simple_proto.proto b/google-api-client-protobuf/src/test/java/com/google/api/client/googleapis/services/protobuf/simple_proto.proto new file mode 100644 index 00000000..aa4ca98c --- /dev/null +++ b/google-api-client-protobuf/src/test/java/com/google/api/client/googleapis/services/protobuf/simple_proto.proto @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2013 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. + */ + +syntax = "proto2"; +option optimize_for = LITE_RUNTIME; +option java_package = "com.google.api.client.googleapis.services.protobuf"; + +message TestMessage { + required TestStatus status = 1; + required string name = 2; + required int64 value = 3; +} + +enum TestStatus { + SUCCESS = 1; + FAILURE = 2; +} \ No newline at end of file diff --git a/google-api-client-servlet/.classpath b/google-api-client-servlet/.classpath new file mode 100644 index 00000000..68a2c33f --- /dev/null +++ b/google-api-client-servlet/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/google-api-client-servlet/.project b/google-api-client-servlet/.project new file mode 100644 index 00000000..26abebf9 --- /dev/null +++ b/google-api-client-servlet/.project @@ -0,0 +1,23 @@ + + + google-api-client-servlet + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/google-api-client-servlet/.settings/org.eclipse.jdt.core.prefs b/google-api-client-servlet/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..511d2482 --- /dev/null +++ b/google-api-client-servlet/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,380 @@ +#Thu Nov 17 08:38:45 EST 2011 +eclipse.preferences.version=1 +org.eclipse.jdt.core.codeComplete.argumentPrefixes= +org.eclipse.jdt.core.codeComplete.argumentSuffixes= +org.eclipse.jdt.core.codeComplete.fieldPrefixes= +org.eclipse.jdt.core.codeComplete.fieldSuffixes= +org.eclipse.jdt.core.codeComplete.localPrefixes= +org.eclipse.jdt.core.codeComplete.localSuffixes= +org.eclipse.jdt.core.codeComplete.staticFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.5 +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=ignore +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=enabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore +org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=warning +org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning +org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning +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=warning +org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=ignore +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=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning +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=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +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=warning +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=ignore +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.source=1.5 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable=569 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_member=569 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package_declaration=569 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter=24 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type_declaration=569 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16|4|80 +org.eclipse.jdt.core.formatter.alignment_for_assignment=16 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=16|5|48 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_field_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_for_statement=16 +org.eclipse.jdt.core.formatter.alignment_for_generic_type_arguments=16 +org.eclipse.jdt.core.formatter.alignment_for_local_variable_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_new_anonymous_class=0 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16|4|48 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16|4|49 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16|4|48 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16|4|48 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16|4|48 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=0 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=0 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=2 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=true +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=false +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=do not insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert +org.eclipse.jdt.core.formatter.comment.line_length=100 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.comment_new_line_at_start_of_html_paragraph=true +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.force_if_else_statement_brace=true +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.join_lines_in_comments=true +org.eclipse.jdt.core.formatter.join_wrapped_lines=true +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=true +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=100 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=3 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false +org.eclipse.jdt.core.formatter.sort_local_variable_annotations=false +org.eclipse.jdt.core.formatter.sort_member_annotations=false +org.eclipse.jdt.core.formatter.sort_package_annotations=false +org.eclipse.jdt.core.formatter.sort_parameter_annotations=false +org.eclipse.jdt.core.formatter.sort_type_annotations=false +org.eclipse.jdt.core.formatter.tabulation.char=space +org.eclipse.jdt.core.formatter.tabulation.size=2 +org.eclipse.jdt.core.formatter.use_on_off_tags=false +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_comment_inline_tags=false +org.eclipse.jdt.core.formatter.wrap_non_simple_local_variable_annotation=true +org.eclipse.jdt.core.formatter.wrap_non_simple_member_annotation=true +org.eclipse.jdt.core.formatter.wrap_non_simple_package_annotation=true +org.eclipse.jdt.core.formatter.wrap_non_simple_parameter_annotation=false +org.eclipse.jdt.core.formatter.wrap_non_simple_type_annotation=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true +org.eclipse.jdt.core.formatter.wrap_prefer_two_fragments=false diff --git a/google-api-client-servlet/.settings/org.eclipse.jdt.ui.prefs b/google-api-client-servlet/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000..f8d746d3 --- /dev/null +++ b/google-api-client-servlet/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,118 @@ +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_serial_version_id=true +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=false +cleanup.always_use_this_for_non_static_method_access=false +cleanup.convert_to_enhanced_for_loop=false +cleanup.correct_indentation=true +cleanup.format_source_code=true +cleanup.format_source_code_changes_only=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=false +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.organize_imports=true +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=true +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.remove_private_constructors=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=true +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.use_blocks=true +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_parentheses_in_expressions=true +cleanup.use_this_for_non_static_field_access=true +cleanup.use_this_for_non_static_field_access_only_if_necessary=true +cleanup.use_this_for_non_static_method_access=true +cleanup.use_this_for_non_static_method_access_only_if_necessary=true +cleanup_profile=_google-api-java-client +cleanup_settings_version=2 +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=_google-api-java-client 100 +formatter_settings_version=12 +org.eclipse.jdt.ui.exception.name=exception +org.eclipse.jdt.ui.gettersetter.use.is=false +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=com.google;;java;javax; +org.eclipse.jdt.ui.javadoc=true +org.eclipse.jdt.ui.keywordthis=false +org.eclipse.jdt.ui.ondemandthreshold=999 +org.eclipse.jdt.ui.overrideannotation=true +org.eclipse.jdt.ui.staticondemandthreshold=999 +org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=true +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=false +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=false +sp_cleanup.always_use_this_for_non_static_method_access=false +sp_cleanup.convert_to_enhanced_for_loop=false +sp_cleanup.correct_indentation=false +sp_cleanup.format_source_code=false +sp_cleanup.format_source_code_changes_only=true +sp_cleanup.make_local_variable_final=false +sp_cleanup.make_parameters_final=false +sp_cleanup.make_private_fields_final=true +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=false +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.organize_imports=true +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=false +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_trailing_whitespaces=true +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_casts=true +sp_cleanup.remove_unnecessary_nls_tags=false +sp_cleanup.remove_unused_imports=false +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.use_blocks=false +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_parentheses_in_expressions=false +sp_cleanup.use_this_for_non_static_field_access=false +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true +sp_cleanup.use_this_for_non_static_method_access=false +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true diff --git a/google-api-client-servlet/pom.xml b/google-api-client-servlet/pom.xml new file mode 100644 index 00000000..778e4a2f --- /dev/null +++ b/google-api-client-servlet/pom.xml @@ -0,0 +1,98 @@ + + 4.0.0 + + com.google.api-client + google-api-client-parent + 1.17.1-rc-SNAPSHOT + ../pom.xml + + google-api-client-servlet + Servlet and JDO extensions to the Google API Client Library for Java. + + + + maven-javadoc-plugin + + + http://download.oracle.com/javase/1.5.0/docs/api/ + http://javadoc.google-http-java-client.googlecode.com/hg/${project.http.version} + http://javadoc.google-oauth-java-client.googlecode.com/hg/${project.oauth.version} + + ${project.name} ${project.version} + ${project.artifactId} ${project.version} + + + + maven-jar-plugin + + + + true + + + + + + jar + compile + + jar + + + + + + maven-source-plugin + + + source-jar + compile + + jar + + + + + + org.datanucleus + maven-datanucleus-plugin + 2.2.1 + + true + + + + process-classes + + enhance + + + + + + + + + com.google.oauth-client + google-oauth-client-servlet + + + com.google.api-client + google-api-client + + + junit + junit + test + + + javax.servlet + servlet-api + + + javax.jdo + jdo2-api + + + diff --git a/google-api-client-servlet/src/main/java/com/google/api/client/googleapis/extensions/servlet/notifications/NotificationServlet.java b/google-api-client-servlet/src/main/java/com/google/api/client/googleapis/extensions/servlet/notifications/NotificationServlet.java new file mode 100644 index 00000000..85645d77 --- /dev/null +++ b/google-api-client-servlet/src/main/java/com/google/api/client/googleapis/extensions/servlet/notifications/NotificationServlet.java @@ -0,0 +1,135 @@ +/* + * Copyright (c) 2013 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.api.client.googleapis.extensions.servlet.notifications; + +import com.google.api.client.googleapis.notifications.StoredChannel; +import com.google.api.client.util.Beta; +import com.google.api.client.util.store.DataStore; +import com.google.api.client.util.store.DataStoreFactory; +import com.google.api.client.util.store.MemoryDataStoreFactory; + +import java.io.IOException; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * {@link Beta}
+ * Thread-safe Webhook Servlet to receive notifications. + * + *

+ * In order to use this servlet you should create a class inheriting from + * {@link NotificationServlet} and register the servlet in your web.xml. + *

+ * + *

+ * It is a simple wrapper around {@link WebhookUtils#processWebhookNotification}, so if you you may + * alternatively call that method instead from your {@link HttpServlet#doPost} with no loss of + * functionality. + *

+ * + * Example usage: + * + *
+  public class MyNotificationServlet extends NotificationServlet {
+
+    private static final long serialVersionUID = 1L;
+
+    public MyNotificationServlet() throws IOException {
+      super(new SomeDataStoreFactory());
+    }
+  }
+ * 
+ * + * Sample web.xml setup: + * + *
+  {@literal <}servlet{@literal >}
+      {@literal <}servlet-name{@literal >}MyNotificationServlet{@literal <}/servlet-name{@literal >}
+      {@literal <}servlet-class{@literal >}com.mypackage.MyNotificationServlet{@literal <}/servlet-class{@literal >}
+  {@literal <}/servlet{@literal >}
+  {@literal <}servlet-mapping{@literal >}
+      {@literal <}servlet-name{@literal >}MyNotificationServlet{@literal <}/servlet-name{@literal >}
+      {@literal <}url-pattern{@literal >}/notifications{@literal <}/url-pattern{@literal >}
+  {@literal <}/servlet-mapping{@literal >}
+ * 
+ * + *

+ * WARNING: by default it uses {@link MemoryDataStoreFactory#getDefaultInstance()} which means it + * will NOT persist the notification channels when the servlet process dies, so it is a BAD CHOICE + * for a production application. But it is a convenient choice when testing locally, in which case + * you don't need to override it, and can simply reference it directly in your web.xml file. For + * example: + *

+ * + *
+  {@literal <}servlet{@literal >}
+      {@literal <}servlet-name{@literal >}NotificationServlet{@literal <}/servlet-name{@literal >}
+      {@literal <}servlet-class{@literal >}com.google.api.client.googleapis.extensions.servlet.notificationsNotificationServlet{@literal <}/servlet-class{@literal >}
+  {@literal <}/servlet{@literal >}
+  {@literal <}servlet-mapping{@literal >}
+      {@literal <}servlet-name{@literal >}NotificationServlet{@literal <}/servlet-name{@literal >}
+      {@literal <}url-pattern{@literal >}/notifications{@literal <}/url-pattern{@literal >}
+  {@literal <}/servlet-mapping{@literal >}
+ * 
+ * + * @author Yaniv Inbar + * @since 1.16 + */ +@Beta +public class NotificationServlet extends HttpServlet { + + private static final long serialVersionUID = 1L; + + /** Notification channel data store. */ + private final transient DataStore channelDataStore; + + /** + * Constructor to be used for testing and demo purposes that uses + * {@link MemoryDataStoreFactory#getDefaultInstance()} which means it will NOT persist the + * notification channels when the servlet process dies, so it is a bad choice for a production + * application. + */ + public NotificationServlet() throws IOException { + this(MemoryDataStoreFactory.getDefaultInstance()); + } + + /** + * Constructor which uses {@link StoredChannel#getDefaultDataStore(DataStoreFactory)} on the given + * data store factory, which is the normal use case. + * + * @param dataStoreFactory data store factory + */ + protected NotificationServlet(DataStoreFactory dataStoreFactory) throws IOException { + this(StoredChannel.getDefaultDataStore(dataStoreFactory)); + } + + /** + * Constructor that allows a specific notification data store to be specified. + * + * @param channelDataStore notification channel data store + */ + protected NotificationServlet(DataStore channelDataStore) { + this.channelDataStore = channelDataStore; + } + + @Override + protected void doPost(HttpServletRequest req, HttpServletResponse resp) + throws ServletException, IOException { + WebhookUtils.processWebhookNotification(req, resp, channelDataStore); + } +} diff --git a/google-api-client-servlet/src/main/java/com/google/api/client/googleapis/extensions/servlet/notifications/WebhookHeaders.java b/google-api-client-servlet/src/main/java/com/google/api/client/googleapis/extensions/servlet/notifications/WebhookHeaders.java new file mode 100644 index 00000000..66310ac8 --- /dev/null +++ b/google-api-client-servlet/src/main/java/com/google/api/client/googleapis/extensions/servlet/notifications/WebhookHeaders.java @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2013 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.api.client.googleapis.extensions.servlet.notifications; + +import com.google.api.client.googleapis.notifications.ResourceStates; +import com.google.api.client.util.Beta; + +/** + * {@link Beta}
+ * Headers for Webhook notifications. + * + * @author Yaniv Inbar + * @since 1.16 + */ +@Beta +public final class WebhookHeaders { + + /** Name of header for the message number (a monotonically increasing value starting with 1). */ + public static final String MESSAGE_NUMBER = "X-Goog-Message-Number"; + + /** Name of header for the {@link ResourceStates resource state}. */ + public static final String RESOURCE_STATE = "X-Goog-Resource-State"; + + /** + * Name of header for the opaque ID for the watched resource that is stable across API versions. + */ + public static final String RESOURCE_ID = "X-Goog-Resource-ID"; + + /** + * Name of header for the opaque ID (in the form of a canonicalized URI) for the watched resource + * that is sensitive to the API version. + */ + public static final String RESOURCE_URI = "X-Goog-Resource-URI"; + + /** + * Name of header for the notification channel UUID provided by the client in the watch request. + */ + public static final String CHANNEL_ID = "X-Goog-Channel-ID"; + + /** Name of header for the notification channel expiration time. */ + public static final String CHANNEL_EXPIRATION = "X-Goog-Channel-Expiration"; + + /** + * Name of header for the notification channel token (an opaque string) provided by the client in + * the watch request. + */ + public static final String CHANNEL_TOKEN = "X-Goog-Channel-Token"; + + /** Name of header for the type of change performed on the resource. */ + public static final String CHANGED = "X-Goog-Changed"; + + private WebhookHeaders() { + } +} diff --git a/google-api-client-servlet/src/main/java/com/google/api/client/googleapis/extensions/servlet/notifications/WebhookUtils.java b/google-api-client-servlet/src/main/java/com/google/api/client/googleapis/extensions/servlet/notifications/WebhookUtils.java new file mode 100644 index 00000000..33f25987 --- /dev/null +++ b/google-api-client-servlet/src/main/java/com/google/api/client/googleapis/extensions/servlet/notifications/WebhookUtils.java @@ -0,0 +1,166 @@ +/* + * Copyright (c) 2013 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.api.client.googleapis.extensions.servlet.notifications; + +import com.google.api.client.googleapis.notifications.StoredChannel; +import com.google.api.client.googleapis.notifications.UnparsedNotification; +import com.google.api.client.googleapis.notifications.UnparsedNotificationCallback; +import com.google.api.client.util.Beta; +import com.google.api.client.util.LoggingInputStream; +import com.google.api.client.util.Preconditions; +import com.google.api.client.util.StringUtils; +import com.google.api.client.util.store.DataStore; +import com.google.api.client.util.store.DataStoreFactory; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Enumeration; +import java.util.logging.Level; +import java.util.logging.Logger; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * {@link Beta}
+ * Utilities for Webhook notifications. + * + * @author Yaniv Inbar + * @since 1.16 + */ +@Beta +public final class WebhookUtils { + + static final Logger LOGGER = Logger.getLogger(WebhookUtils.class.getName()); + + /** Webhook notification channel type to use in the watch request. */ + public static final String TYPE = "web_hook"; + + /** + * Utility method to process the webhook notification from {@link HttpServlet#doPost} by finding + * the notification channel in the given data store factory. + * + *

+ * It is a wrapper around + * {@link #processWebhookNotification(HttpServletRequest, HttpServletResponse, DataStore)} that + * uses the data store from {@link StoredChannel#getDefaultDataStore(DataStoreFactory)}. + *

+ * + * @param req an {@link HttpServletRequest} object that contains the request the client has made + * of the servlet + * @param resp an {@link HttpServletResponse} object that contains the response the servlet sends + * to the client + * @param dataStoreFactory data store factory + * @exception IOException if an input or output error is detected when the servlet handles the + * request + * @exception ServletException if the request for the POST could not be handled + */ + public static void processWebhookNotification( + HttpServletRequest req, HttpServletResponse resp, DataStoreFactory dataStoreFactory) + throws ServletException, IOException { + processWebhookNotification(req, resp, StoredChannel.getDefaultDataStore(dataStoreFactory)); + } + + /** + * Utility method to process the webhook notification from {@link HttpServlet#doPost}. + * + *

+ * The {@link HttpServletRequest#getInputStream()} is closed in a finally block inside this + * method. If it is not detected to be a webhook notification, an + * {@link HttpServletResponse#SC_BAD_REQUEST} error will be displayed. If the notification channel + * is found in the given notification channel data store, it will call + * {@link UnparsedNotificationCallback#onNotification} for the registered notification callback + * method. + *

+ * + * @param req an {@link HttpServletRequest} object that contains the request the client has made + * of the servlet + * @param resp an {@link HttpServletResponse} object that contains the response the servlet sends + * to the client + * @param channelDataStore notification channel data store + * @exception IOException if an input or output error is detected when the servlet handles the + * request + * @exception ServletException if the request for the POST could not be handled + */ + public static void processWebhookNotification( + HttpServletRequest req, HttpServletResponse resp, DataStore channelDataStore) + throws ServletException, IOException { + Preconditions.checkArgument("POST".equals(req.getMethod())); + InputStream contentStream = req.getInputStream(); + try { + // log headers + if (LOGGER.isLoggable(Level.CONFIG)) { + StringBuilder builder = new StringBuilder(); + Enumeration e = req.getHeaderNames(); + if (e != null) { + while (e.hasMoreElements()) { + Object nameObj = e.nextElement(); + if (nameObj instanceof String) { + String name = (String) nameObj; + Enumeration ev = req.getHeaders(name); + if (ev != null) { + while (ev.hasMoreElements()) { + builder.append(name) + .append(": ").append(ev.nextElement()).append(StringUtils.LINE_SEPARATOR); + } + } + } + } + } + LOGGER.config(builder.toString()); + contentStream = new LoggingInputStream(contentStream, LOGGER, Level.CONFIG, 0x4000); + // TODO(yanivi): allow to override logging content limit + } + // parse the relevant headers, and create a notification + Long messageNumber; + try { + messageNumber = Long.valueOf(req.getHeader(WebhookHeaders.MESSAGE_NUMBER)); + } catch (NumberFormatException e) { + messageNumber = null; + } + String resourceState = req.getHeader(WebhookHeaders.RESOURCE_STATE); + String resourceId = req.getHeader(WebhookHeaders.RESOURCE_ID); + String resourceUri = req.getHeader(WebhookHeaders.RESOURCE_URI); + String channelId = req.getHeader(WebhookHeaders.CHANNEL_ID); + String channelExpiration = req.getHeader(WebhookHeaders.CHANNEL_EXPIRATION); + String channelToken = req.getHeader(WebhookHeaders.CHANNEL_TOKEN); + String changed = req.getHeader(WebhookHeaders.CHANGED); + if (messageNumber == null || resourceState == null || resourceId == null + || resourceUri == null || channelId == null) { + resp.sendError(HttpServletResponse.SC_BAD_REQUEST, + "Notification did not contain all required information."); + return; + } + UnparsedNotification notification = new UnparsedNotification(messageNumber, resourceState, + resourceId, resourceUri, channelId).setChannelExpiration(channelExpiration) + .setChannelToken(channelToken) + .setChanged(changed) + .setContentType(req.getContentType()) + .setContentStream(contentStream); + // check if we know about the channel, hand over the notification to the notification callback + StoredChannel storedChannel = channelDataStore.get(notification.getChannelId()); + if (storedChannel != null) { + storedChannel.getNotificationCallback().onNotification(storedChannel, notification); + } + } finally { + contentStream.close(); + } + } + + private WebhookUtils() { + } +} diff --git a/google-api-client-servlet/src/main/java/com/google/api/client/googleapis/extensions/servlet/notifications/package-info.java b/google-api-client-servlet/src/main/java/com/google/api/client/googleapis/extensions/servlet/notifications/package-info.java new file mode 100644 index 00000000..b67c30c9 --- /dev/null +++ b/google-api-client-servlet/src/main/java/com/google/api/client/googleapis/extensions/servlet/notifications/package-info.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2013 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. + */ + +/** + * {@link com.google.api.client.util.Beta}
+ * Support for subscribing to topics and receiving notifications on servlet-based platforms. + * + * @author Yaniv Inbar + * @since 1.16 + */ +@com.google.api.client.util.Beta +package com.google.api.client.googleapis.extensions.servlet.notifications; + diff --git a/google-api-client-xml/.classpath b/google-api-client-xml/.classpath new file mode 100644 index 00000000..2c81b208 --- /dev/null +++ b/google-api-client-xml/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/google-api-client-xml/.project b/google-api-client-xml/.project new file mode 100644 index 00000000..58c600c2 --- /dev/null +++ b/google-api-client-xml/.project @@ -0,0 +1,23 @@ + + + google-api-client-xml + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/google-api-client-xml/.settings/org.eclipse.jdt.core.prefs b/google-api-client-xml/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..56c60d70 --- /dev/null +++ b/google-api-client-xml/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,418 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.codeComplete.argumentPrefixes= +org.eclipse.jdt.core.codeComplete.argumentSuffixes= +org.eclipse.jdt.core.codeComplete.fieldPrefixes= +org.eclipse.jdt.core.codeComplete.fieldSuffixes= +org.eclipse.jdt.core.codeComplete.localPrefixes= +org.eclipse.jdt.core.codeComplete.localSuffixes= +org.eclipse.jdt.core.codeComplete.staticFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.5 +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=ignore +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=enabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore +org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=warning +org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning +org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning +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=warning +org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=ignore +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=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled +org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +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=warning +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=ignore +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.source=1.5 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field=1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field.count_dependent=1585|-1|1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable=569 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable.count_dependent=1585|-1|1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_member=569 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method=1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method.count_dependent=1585|-1|1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package=1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package.count_dependent=1585|-1|1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package_declaration=569 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter=24 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter.count_dependent=1040|-1|1040 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type=1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type.count_dependent=1585|-1|1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type_declaration=569 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16|4|80 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=16 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_cascading_method_invocation_with_arguments=16 +org.eclipse.jdt.core.formatter.alignment_for_cascading_method_invocation_with_arguments.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=16|5|48 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants.count_dependent=0|-1|0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_field_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_for_statement=16 +org.eclipse.jdt.core.formatter.alignment_for_generic_type_arguments=16 +org.eclipse.jdt.core.formatter.alignment_for_generic_type_arguments.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_local_variable_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_new_anonymous_class=0 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16|4|48 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16|4|49 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16|4|48 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16|4|48 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16|4|48 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=0 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=0 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=2 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=true +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=false +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=do not insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert +org.eclipse.jdt.core.formatter.comment.line_length=100 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.comment_new_line_at_start_of_html_paragraph=true +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.force_if_else_statement_brace=true +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comment_prefix=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.join_lines_in_comments=true +org.eclipse.jdt.core.formatter.join_wrapped_lines=true +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=true +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=100 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=3 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false +org.eclipse.jdt.core.formatter.sort_local_variable_annotations=false +org.eclipse.jdt.core.formatter.sort_member_annotations=false +org.eclipse.jdt.core.formatter.sort_package_annotations=false +org.eclipse.jdt.core.formatter.sort_parameter_annotations=false +org.eclipse.jdt.core.formatter.sort_type_annotations=false +org.eclipse.jdt.core.formatter.tabulation.char=space +org.eclipse.jdt.core.formatter.tabulation.size=2 +org.eclipse.jdt.core.formatter.use_on_off_tags=false +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_comment_inline_tags=false +org.eclipse.jdt.core.formatter.wrap_non_simple_local_variable_annotation=true +org.eclipse.jdt.core.formatter.wrap_non_simple_member_annotation=true +org.eclipse.jdt.core.formatter.wrap_non_simple_package_annotation=true +org.eclipse.jdt.core.formatter.wrap_non_simple_parameter_annotation=false +org.eclipse.jdt.core.formatter.wrap_non_simple_type_annotation=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true +org.eclipse.jdt.core.formatter.wrap_prefer_two_fragments=false diff --git a/google-api-client-xml/.settings/org.eclipse.jdt.ui.prefs b/google-api-client-xml/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000..08ebc976 --- /dev/null +++ b/google-api-client-xml/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,119 @@ +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=false +cleanup.add_serial_version_id=true +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=false +cleanup.always_use_this_for_non_static_method_access=false +cleanup.convert_to_enhanced_for_loop=false +cleanup.correct_indentation=true +cleanup.format_source_code=true +cleanup.format_source_code_changes_only=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=false +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.organize_imports=true +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=true +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.remove_private_constructors=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=true +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.use_blocks=true +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_parentheses_in_expressions=true +cleanup.use_this_for_non_static_field_access=true +cleanup.use_this_for_non_static_field_access_only_if_necessary=true +cleanup.use_this_for_non_static_method_access=true +cleanup.use_this_for_non_static_method_access_only_if_necessary=true +cleanup_profile=_google-api-java-client +cleanup_settings_version=2 +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=_google-api-java-client 100 +formatter_settings_version=12 +org.eclipse.jdt.ui.exception.name=exception +org.eclipse.jdt.ui.gettersetter.use.is=false +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=com.google;;java;javax; +org.eclipse.jdt.ui.javadoc=true +org.eclipse.jdt.ui.keywordthis=false +org.eclipse.jdt.ui.ondemandthreshold=999 +org.eclipse.jdt.ui.overrideannotation=true +org.eclipse.jdt.ui.staticondemandthreshold=999 +org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=true +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=false +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=false +sp_cleanup.always_use_this_for_non_static_method_access=false +sp_cleanup.convert_to_enhanced_for_loop=false +sp_cleanup.correct_indentation=false +sp_cleanup.format_source_code=false +sp_cleanup.format_source_code_changes_only=true +sp_cleanup.make_local_variable_final=false +sp_cleanup.make_parameters_final=false +sp_cleanup.make_private_fields_final=true +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=false +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.organize_imports=true +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=false +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_trailing_whitespaces=true +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_casts=true +sp_cleanup.remove_unnecessary_nls_tags=false +sp_cleanup.remove_unused_imports=false +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.use_blocks=false +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_parentheses_in_expressions=false +sp_cleanup.use_this_for_non_static_field_access=false +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true +sp_cleanup.use_this_for_non_static_method_access=false +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true diff --git a/google-api-client-xml/pom.xml b/google-api-client-xml/pom.xml new file mode 100644 index 00000000..0ded5a16 --- /dev/null +++ b/google-api-client-xml/pom.xml @@ -0,0 +1,73 @@ + + 4.0.0 + + com.google.api-client + google-api-client-parent + 1.17.1-rc-SNAPSHOT + ../pom.xml + + google-api-client-xml + XML extensions to the Google APIs Client Library for Java + + + + maven-javadoc-plugin + + + http://download.oracle.com/javase/1.5.0/docs/api/ + http://javadoc.google-http-java-client.googlecode.com/hg/${project.http.version} + + ${project.name} ${project.version} + ${project.artifactId} ${project.version} + + + + maven-jar-plugin + + + + true + + + + + + jar + compile + + jar + + + + + + maven-source-plugin + + + source-jar + compile + + jar + + + + + + + + + com.google.api-client + google-api-client + + + com.google.http-client + google-http-client-xml + + + junit + junit + test + + + diff --git a/google-api-client-xml/src/main/java/com/google/api/client/googleapis/xml/atom/AtomPatchContent.java b/google-api-client-xml/src/main/java/com/google/api/client/googleapis/xml/atom/AtomPatchContent.java new file mode 100644 index 00000000..6755d3fb --- /dev/null +++ b/google-api-client-xml/src/main/java/com/google/api/client/googleapis/xml/atom/AtomPatchContent.java @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2010 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.api.client.googleapis.xml.atom; + +import com.google.api.client.http.HttpMediaType; +import com.google.api.client.http.xml.atom.AtomContent; +import com.google.api.client.util.Beta; +import com.google.api.client.xml.Xml; +import com.google.api.client.xml.XmlNamespaceDictionary; + +/** + * {@link Beta}
+ * Serializes Atom XML PATCH HTTP content based on the data key/value mapping object for an Atom + * entry. + * + *

+ * Default value for {@link #getType()} is {@link Xml#MEDIA_TYPE}. + *

+ * + *

+ * Sample usage: + *

+ * + *
+ *
+  static void setContent(
+      HttpRequest request, XmlNamespaceDictionary namespaceDictionary, Object patchEntry) {
+    request.setContent(new AtomPatchContent(namespaceDictionary, patchEntry));
+  }
+ * 
+ * 
+ * + *

+ * Implementation is not thread-safe. + *

+ * + * @since 1.0 + * @author Yaniv Inbar + */ +@Beta +public final class AtomPatchContent extends AtomContent { + + /** + * @param namespaceDictionary XML namespace dictionary + * @param patchEntry key/value pair data for the Atom PATCH entry + * @since 1.5 + */ + public AtomPatchContent(XmlNamespaceDictionary namespaceDictionary, Object patchEntry) { + super(namespaceDictionary, patchEntry, true); + setMediaType(new HttpMediaType(Xml.MEDIA_TYPE)); + } + + @Override + public AtomPatchContent setMediaType(HttpMediaType mediaType) { + super.setMediaType(mediaType); + return this; + } +} diff --git a/google-api-client-xml/src/main/java/com/google/api/client/googleapis/xml/atom/AtomPatchRelativeToOriginalContent.java b/google-api-client-xml/src/main/java/com/google/api/client/googleapis/xml/atom/AtomPatchRelativeToOriginalContent.java new file mode 100644 index 00000000..0d43c856 --- /dev/null +++ b/google-api-client-xml/src/main/java/com/google/api/client/googleapis/xml/atom/AtomPatchRelativeToOriginalContent.java @@ -0,0 +1,100 @@ +/* + * Copyright (c) 2010 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.api.client.googleapis.xml.atom; + +import com.google.api.client.http.HttpMediaType; +import com.google.api.client.http.xml.AbstractXmlHttpContent; +import com.google.api.client.util.Beta; +import com.google.api.client.util.Preconditions; +import com.google.api.client.xml.XmlNamespaceDictionary; +import com.google.api.client.xml.atom.Atom; + +import org.xmlpull.v1.XmlSerializer; + +import java.io.IOException; +import java.util.Map; + +/** + * {@link Beta}
+ * Serializes an optimal Atom XML PATCH HTTP content based on the data key/value mapping object for + * an Atom entry, by comparing the original value to the patched value. + * + *

+ * Sample usage: + *

+ * + *
+ * 
+  static void setContent(HttpRequest request, XmlNamespaceDictionary namespaceDictionary,
+      Object originalEntry, Object patchedEntry) {
+    request.setContent(
+        new AtomPatchRelativeToOriginalContent(namespaceDictionary, originalEntry, patchedEntry));
+  }
+ * 
+ * 
+ * + * @since 1.0 + * @author Yaniv Inbar + */ +@Beta +public final class AtomPatchRelativeToOriginalContent extends AbstractXmlHttpContent { + + /** Key/value pair data for the updated/patched Atom entry. */ + private final Object patchedEntry; + + /** Key/value pair data for the original unmodified Atom entry. */ + private final Object originalEntry; + + /** + * @param namespaceDictionary XML namespace dictionary + * @since 1.5 + */ + public AtomPatchRelativeToOriginalContent( + XmlNamespaceDictionary namespaceDictionary, Object originalEntry, Object patchedEntry) { + super(namespaceDictionary); + this.originalEntry = Preconditions.checkNotNull(originalEntry); + this.patchedEntry = Preconditions.checkNotNull(patchedEntry); + } + + @Override + protected void writeTo(XmlSerializer serializer) throws IOException { + Map patch = GoogleAtom.computePatch(patchedEntry, originalEntry); + getNamespaceDictionary().serialize(serializer, Atom.ATOM_NAMESPACE, "entry", patch); + } + + @Override + public AtomPatchRelativeToOriginalContent setMediaType(HttpMediaType mediaType) { + super.setMediaType(mediaType); + return this; + } + + /** + * Returns the data key name/value pairs for the updated/patched Atom entry. + * + * @since 1.5 + */ + public final Object getPatchedEntry() { + return patchedEntry; + } + + /** + * Returns the data key name/value pairs for the original unmodified Atom entry. + * + * @since 1.5 + */ + public final Object getOriginalEntry() { + return originalEntry; + } +} diff --git a/google-api-client-xml/src/main/java/com/google/api/client/googleapis/xml/atom/GoogleAtom.java b/google-api-client-xml/src/main/java/com/google/api/client/googleapis/xml/atom/GoogleAtom.java new file mode 100644 index 00000000..e3d435ad --- /dev/null +++ b/google-api-client-xml/src/main/java/com/google/api/client/googleapis/xml/atom/GoogleAtom.java @@ -0,0 +1,272 @@ +/* + * Copyright (c) 2010 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.api.client.googleapis.xml.atom; + +import com.google.api.client.util.ArrayMap; +import com.google.api.client.util.Beta; +import com.google.api.client.util.ClassInfo; +import com.google.api.client.util.Data; +import com.google.api.client.util.FieldInfo; +import com.google.api.client.util.GenericData; +import com.google.api.client.util.Types; + +import java.util.Collection; +import java.util.Map; +import java.util.TreeSet; + +/** + * {@link Beta}
+ * Utilities for working with the Atom XML of Google Data APIs. + * + * @since 1.0 + * @author Yaniv Inbar + */ +@Beta +public class GoogleAtom { + + /** + * GData namespace. + * + * @since 1.0 + */ + public static final String GD_NAMESPACE = "http://schemas.google.com/g/2005"; + + /** + * Content type used on an error formatted in XML. + * + * @since 1.5 + */ + public static final String ERROR_CONTENT_TYPE = "application/vnd.google.gdata.error+xml"; + + // TODO(yanivi): require XmlNamespaceDictory and include xmlns declarations since there is no + // guarantee that there is a match between Google's mapping and the one used by client + + /** + * Returns the fields mask to use for the given data class of key/value pairs. It cannot be a + * {@link Map}, {@link GenericData} or a {@link Collection}. + * + * @param dataClass data class of key/value pairs + */ + public static String getFieldsFor(Class dataClass) { + StringBuilder fieldsBuf = new StringBuilder(); + appendFieldsFor(fieldsBuf, dataClass, new int[1]); + return fieldsBuf.toString(); + } + + /** + * Returns the fields mask to use for the given data class of key/value pairs for the feed class + * and for the entry class. This should only be used if the feed class does not contain the entry + * class as a field. The data classes cannot be a {@link Map}, {@link GenericData} or a + * {@link Collection}. + * + * @param feedClass feed data class + * @param entryClass entry data class + */ + public static String getFeedFields(Class feedClass, Class entryClass) { + StringBuilder fieldsBuf = new StringBuilder(); + appendFeedFields(fieldsBuf, feedClass, entryClass); + return fieldsBuf.toString(); + } + + private static void appendFieldsFor( + StringBuilder fieldsBuf, Class dataClass, int[] numFields) { + if (Map.class.isAssignableFrom(dataClass) || Collection.class.isAssignableFrom(dataClass)) { + throw new IllegalArgumentException( + "cannot specify field mask for a Map or Collection class: " + dataClass); + } + ClassInfo classInfo = ClassInfo.of(dataClass); + for (String name : new TreeSet(classInfo.getNames())) { + FieldInfo fieldInfo = classInfo.getFieldInfo(name); + if (fieldInfo.isFinal()) { + continue; + } + if (++numFields[0] != 1) { + fieldsBuf.append(','); + } + fieldsBuf.append(name); + // TODO(yanivi): handle Java arrays? + Class fieldClass = fieldInfo.getType(); + if (Collection.class.isAssignableFrom(fieldClass)) { + // TODO(yanivi): handle Java collection of Java collection or Java map? + fieldClass = (Class) Types.getIterableParameter(fieldInfo.getField().getGenericType()); + } + // TODO(yanivi): implement support for map when server implements support for *:* + if (fieldClass != null) { + if (fieldInfo.isPrimitive()) { + if (name.charAt(0) != '@' && !name.equals("text()")) { + // TODO(yanivi): wait for bug fix from server to support text() -- already fixed??? + // buf.append("/text()"); + } + } else if (!Collection.class.isAssignableFrom(fieldClass) + && !Map.class.isAssignableFrom(fieldClass)) { + int[] subNumFields = new int[1]; + int openParenIndex = fieldsBuf.length(); + fieldsBuf.append('('); + // TODO(yanivi): abort if found cycle to avoid infinite loop + appendFieldsFor(fieldsBuf, fieldClass, subNumFields); + updateFieldsBasedOnNumFields(fieldsBuf, openParenIndex, subNumFields[0]); + } + } + } + } + + private static void appendFeedFields( + StringBuilder fieldsBuf, Class feedClass, Class entryClass) { + int[] numFields = new int[1]; + appendFieldsFor(fieldsBuf, feedClass, numFields); + if (numFields[0] != 0) { + fieldsBuf.append(","); + } + fieldsBuf.append("entry("); + int openParenIndex = fieldsBuf.length() - 1; + numFields[0] = 0; + appendFieldsFor(fieldsBuf, entryClass, numFields); + updateFieldsBasedOnNumFields(fieldsBuf, openParenIndex, numFields[0]); + } + + private static void updateFieldsBasedOnNumFields( + StringBuilder fieldsBuf, int openParenIndex, int numFields) { + switch (numFields) { + case 0: + fieldsBuf.deleteCharAt(openParenIndex); + break; + case 1: + fieldsBuf.setCharAt(openParenIndex, '/'); + break; + default: + fieldsBuf.append(')'); + } + } + + /** + * Compute the patch object of key/value pairs from the given original and patched objects, adding + * a {@code @gd:fields} key for the fields mask. + * + * @param patched patched object + * @param original original object + * @return patch object of key/value pairs + */ + public static Map computePatch(Object patched, Object original) { + FieldsMask fieldsMask = new FieldsMask(); + ArrayMap result = computePatchInternal(fieldsMask, patched, original); + if (fieldsMask.numDifferences != 0) { + result.put("@gd:fields", fieldsMask.buf.toString()); + } + return result; + } + + private static ArrayMap computePatchInternal( + FieldsMask fieldsMask, Object patchedObject, Object originalObject) { + ArrayMap result = ArrayMap.create(); + Map patchedMap = Data.mapOf(patchedObject); + Map originalMap = Data.mapOf(originalObject); + TreeSet fieldNames = new TreeSet(); + fieldNames.addAll(patchedMap.keySet()); + fieldNames.addAll(originalMap.keySet()); + for (String name : fieldNames) { + Object originalValue = originalMap.get(name); + Object patchedValue = patchedMap.get(name); + if (originalValue == patchedValue) { + continue; + } + Class type = originalValue == null ? patchedValue.getClass() : originalValue.getClass(); + if (Data.isPrimitive(type)) { + if (originalValue != null && originalValue.equals(patchedValue)) { + continue; + } + fieldsMask.append(name); + // TODO(yanivi): wait for bug fix from server + // if (!name.equals("text()") && name.charAt(0) != '@') { + // fieldsMask.buf.append("/text()"); + // } + if (patchedValue != null) { + result.add(name, patchedValue); + } + } else if (Collection.class.isAssignableFrom(type)) { + if (originalValue != null && patchedValue != null) { + @SuppressWarnings("unchecked") + Collection originalCollection = (Collection) originalValue; + @SuppressWarnings("unchecked") + Collection patchedCollection = (Collection) patchedValue; + int size = originalCollection.size(); + if (size == patchedCollection.size()) { + int i; + for (i = 0; i < size; i++) { + FieldsMask subFieldsMask = new FieldsMask(); + computePatchInternal(subFieldsMask, patchedValue, originalValue); + if (subFieldsMask.numDifferences != 0) { + break; + } + } + if (i == size) { + continue; + } + } + } + // TODO(yanivi): implement + throw new UnsupportedOperationException( + "not yet implemented: support for patching collections"); + } else { + if (originalValue == null) { // TODO(yanivi): test + fieldsMask.append(name); + result.add(name, Data.mapOf(patchedValue)); + } else if (patchedValue == null) { // TODO(yanivi): test + fieldsMask.append(name); + } else { + FieldsMask subFieldsMask = new FieldsMask(); + ArrayMap patch = + computePatchInternal(subFieldsMask, patchedValue, originalValue); + int numDifferences = subFieldsMask.numDifferences; + if (numDifferences != 0) { + fieldsMask.append(name, subFieldsMask); + result.add(name, patch); + } + } + } + } + return result; + } + + static class FieldsMask { + int numDifferences; + StringBuilder buf = new StringBuilder(); + + void append(String name) { + StringBuilder buf = this.buf; + if (++numDifferences != 1) { + buf.append(','); + } + buf.append(name); + } + + void append(String name, FieldsMask subFields) { + append(name); + StringBuilder buf = this.buf; + boolean isSingle = subFields.numDifferences == 1; + if (isSingle) { + buf.append('/'); + } else { + buf.append('('); + } + buf.append(subFields.buf); + if (!isSingle) { + buf.append(')'); + } + } + } + + private GoogleAtom() { + } +} diff --git a/google-api-client-xml/src/main/java/com/google/api/client/googleapis/xml/atom/MultiKindFeedParser.java b/google-api-client-xml/src/main/java/com/google/api/client/googleapis/xml/atom/MultiKindFeedParser.java new file mode 100644 index 00000000..76218d33 --- /dev/null +++ b/google-api-client-xml/src/main/java/com/google/api/client/googleapis/xml/atom/MultiKindFeedParser.java @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2010 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.api.client.googleapis.xml.atom; + +import com.google.api.client.http.HttpResponse; +import com.google.api.client.util.Beta; +import com.google.api.client.util.ClassInfo; +import com.google.api.client.util.FieldInfo; +import com.google.api.client.util.Types; +import com.google.api.client.xml.Xml; +import com.google.api.client.xml.XmlNamespaceDictionary; +import com.google.api.client.xml.atom.AbstractAtomFeedParser; +import com.google.api.client.xml.atom.Atom; + +import org.xmlpull.v1.XmlPullParser; +import org.xmlpull.v1.XmlPullParserException; + +import java.io.IOException; +import java.io.InputStream; +import java.lang.reflect.Field; +import java.util.HashMap; + +/** + * {@link Beta}
+ * GData Atom feed pull parser when the entry class can be computed from the kind. + * + * @param feed type + * + * @since 1.0 + * @author Yaniv Inbar + */ +@Beta +public final class MultiKindFeedParser extends AbstractAtomFeedParser { + + private final HashMap> kindToEntryClassMap = new HashMap>(); + + /** + * @param namespaceDictionary XML namespace dictionary + * @param parser XML pull parser to use + * @param inputStream input stream to read + * @param feedClass feed class to parse + */ + MultiKindFeedParser(XmlNamespaceDictionary namespaceDictionary, XmlPullParser parser, + InputStream inputStream, Class feedClass) { + super(namespaceDictionary, parser, inputStream, feedClass); + } + + /** Sets the entry classes to use when parsing. */ + public void setEntryClasses(Class... entryClasses) { + int numEntries = entryClasses.length; + HashMap> kindToEntryClassMap = this.kindToEntryClassMap; + for (int i = 0; i < numEntries; i++) { + Class entryClass = entryClasses[i]; + ClassInfo typeInfo = ClassInfo.of(entryClass); + Field field = typeInfo.getField("@gd:kind"); + if (field == null) { + throw new IllegalArgumentException("missing @gd:kind field for " + entryClass.getName()); + } + Object entry = Types.newInstance(entryClass); + String kind = (String) FieldInfo.getFieldValue(field, entry); + if (kind == null) { + throw new IllegalArgumentException( + "missing value for @gd:kind field in " + entryClass.getName()); + } + kindToEntryClassMap.put(kind, entryClass); + } + } + + @Override + protected Object parseEntryInternal() throws IOException, XmlPullParserException { + XmlPullParser parser = getParser(); + String kind = parser.getAttributeValue(GoogleAtom.GD_NAMESPACE, "kind"); + Class entryClass = this.kindToEntryClassMap.get(kind); + if (entryClass == null) { + throw new IllegalArgumentException("unrecognized kind: " + kind); + } + Object result = Types.newInstance(entryClass); + Xml.parseElement(parser, result, getNamespaceDictionary(), null); + return result; + } + + /** + * Parses the given HTTP response using the given feed class and entry classes. + * + * @param feed type + * @param entry type + * @param response HTTP response + * @param namespaceDictionary XML namespace dictionary + * @param feedClass feed class + * @param entryClasses entry class + * @return Atom multi-kind feed pull parser + * @throws IOException I/O exception + * @throws XmlPullParserException XML pull parser exception + */ + public static MultiKindFeedParser create(HttpResponse response, + XmlNamespaceDictionary namespaceDictionary, Class feedClass, Class... entryClasses) + throws IOException, XmlPullParserException { + InputStream content = response.getContent(); + try { + Atom.checkContentType(response.getContentType()); + XmlPullParser parser = Xml.createParser(); + parser.setInput(content, null); + MultiKindFeedParser result = + new MultiKindFeedParser(namespaceDictionary, parser, content, feedClass); + result.setEntryClasses(entryClasses); + return result; + } finally { + content.close(); + } + } +} diff --git a/google-api-client-xml/src/main/java/com/google/api/client/googleapis/xml/atom/package-info.java b/google-api-client-xml/src/main/java/com/google/api/client/googleapis/xml/atom/package-info.java new file mode 100644 index 00000000..2690aa39 --- /dev/null +++ b/google-api-client-xml/src/main/java/com/google/api/client/googleapis/xml/atom/package-info.java @@ -0,0 +1,319 @@ +/* + * Copyright (c) 2010 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. + */ + +/** + * {@link com.google.api.client.util.Beta}
+ * Utilities for Google's Atom XML implementation (see detailed package specification). + * + *

Package Specification

+ * + *

+ * User-defined Partial XML data models allow you to defined Plain Old Java Objects (POJO's) to + * define how the library should parse/serialize XML. Each field that should be included must have + * an @{@link com.google.api.client.util.Key} annotation. The field can be of any visibility + * (private, package private, protected, or public) and must not be static. + *

+ * + *

+ * The optional value parameter of this @{@link com.google.api.client.util.Key} annotation specifies + * the XPath name to use to represent the field. For example, an XML attribute a has an + * XPath name of @a, an XML element <a> has an XPath name of + *a + * , and an XML text content has an XPath name of text(). These are named based + * on their usage with the partial + * response/update syntax for Google API's. If the @{@link com.google.api.client.util.Key} + * annotation is missing, the default is to use the Atom XML namespace and the Java field's name as + * the local XML name. By default, the field name is used as the JSON key. Any unrecognized XML is + * normally simply ignored and not stored. If the ability to store unknown keys is important, use + * {@link com.google.api.client.xml.GenericXml}. + *

+ * + *

+ * Let's take a look at a typical partial Atom XML album feed from the Picasa Web Albums Data API: + *

+ * + *

+<?xml version='1.0' encoding='utf-8'?>
+<feed xmlns='http://www.w3.org/2005/Atom'
+    xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/'
+    xmlns:gphoto='http://schemas.google.com/photos/2007'>
+  <link rel='http://schemas.google.com/g/2005#post'
+    type='application/atom+xml'
+    href='http://picasaweb.google.com/data/feed/api/user/liz' />
+  <author>
+    <name>Liz</name>
+  </author>
+  <openSearch:totalResults>1</openSearch:totalResults>
+  <entry gd:etag='"RXY8fjVSLyp7ImA9WxVVGE8KQAE."'>
+    <category scheme='http://schemas.google.com/g/2005#kind'
+      term='http://schemas.google.com/photos/2007#album' />
+    <title>lolcats</title>
+    <summary>Hilarious Felines</summary>
+    <gphoto:access>public</gphoto:access>
+  </entry>
+</feed>
+
+ * + *

+ * Here's one possible way to design the Java data classes for this (each class in its own Java + * file): + *

+ * + *

+import com.google.api.client.util.*;
+import java.util.List;
+
+  public class Link {
+
+    @Key("@href")
+    public String href;
+
+    @Key("@rel")
+    public String rel;
+
+    public static String find(List<Link> links, String rel) {
+      if (links != null) {
+        for (Link link : links) {
+          if (rel.equals(link.rel)) {
+            return link.href;
+          }
+        }
+      }
+      return null;
+    }
+  }
+
+  public class Category {
+
+    @Key("@scheme")
+    public String scheme;
+
+    @Key("@term")
+    public String term;
+
+    public static Category newKind(String kind) {
+      Category category = new Category();
+      category.scheme = "http://schemas.google.com/g/2005#kind";
+      category.term = "http://schemas.google.com/photos/2007#" + kind;
+      return category;
+    }
+  }
+
+  public class AlbumEntry {
+
+    @Key
+    public String summary;
+
+    @Key
+    public String title;
+
+    @Key("gphoto:access")
+    public String access;
+
+    public Category category = newKind("album");
+
+    private String getEditLink() {
+      return Link.find(links, "edit");
+    }
+  }
+
+  public class Author {
+
+    @Key
+    public String name;
+  }
+
+  public class AlbumFeed {
+
+    @Key
+    public Author author;
+
+    @Key("openSearch:totalResults")
+    public int totalResults;
+
+    @Key("entry")
+    public List<AlbumEntry> photos;
+
+    @Key("link")
+    public List<Link> links;
+
+    private String getPostLink() {
+      return Link.find(links, "http://schemas.google.com/g/2005#post");
+    }
+  }
+
+ * + *

+ * You can also use the @{@link com.google.api.client.util.Key} annotation to defined query + * parameters for a URL. For example: + *

+ * + *

+public class PicasaUrl extends GoogleUrl {
+
+  @Key("max-results")
+  public Integer maxResults;
+
+  @Key
+  public String kinds;
+
+  public PicasaUrl(String url) {
+    super(url);
+  }
+
+  public static PicasaUrl fromRelativePath(String relativePath) {
+    PicasaUrl result = new PicasaUrl(PicasaWebAlbums.ROOT_URL);
+    result.path += relativePath;
+    return result;
+  }
+}
+
+ * + *

+ * To work with a Google API, you first need to set up the + * {@link com.google.api.client.http.HttpTransport}. For example: + *

+ * + *

+  private static HttpTransport setUpTransport() throws IOException {
+    HttpTransport result = new NetHttpTransport();
+    GoogleUtils.useMethodOverride(result);
+    HttpHeaders headers = new HttpHeaders();
+    headers.setApplicationName("Google-PicasaSample/1.0");
+    headers.gdataVersion = "2";
+    AtomParser parser = new AtomParser();
+    parser.namespaceDictionary = PicasaWebAlbumsAtom.NAMESPACE_DICTIONARY;
+    transport.addParser(parser);
+    // insert authentication code...
+    return transport;
+  }
+
+ * + *

+ * Now that we have a transport, we can execute a partial GET request to the Picasa Web Albums API + * and parse the result: + *

+ * + *

+  public static AlbumFeed executeGet(HttpTransport transport, PicasaUrl url)
+      throws IOException {
+    url.fields = GoogleAtom.getFieldsFor(AlbumFeed.class);
+    url.kinds = "photo";
+    url.maxResults = 5;
+    HttpRequest request = transport.buildGetRequest();
+    request.url = url;
+    return request.execute().parseAs(AlbumFeed.class);
+  }
+
+ * + *

+ * If the server responds with an error the {@link com.google.api.client.http.HttpRequest#execute} + * method will throw an {@link com.google.api.client.http.HttpResponseException}, which has an + * {@link com.google.api.client.http.HttpResponse} field which can be parsed the same way as a + * success response inside of a catch block. For example: + *

+ * + *

+    try {
+...
+    } catch (HttpResponseException e) {
+      if (e.response.getParser() != null) {
+        Error error = e.response.parseAs(Error.class);
+        // process error response
+      } else {
+        String errorContentString = e.response.parseAsString();
+        // process error response as string
+      }
+      throw e;
+    }
+
+ * + *

+ * To update an album, we use the transport to execute an efficient partial update request using the + * PATCH method to the Picasa Web Albums API: + *

+ * + *

+  public AlbumEntry executePatchRelativeToOriginal(HttpTransport transport,
+      AlbumEntry original) throws IOException {
+    HttpRequest request = transport.buildPatchRequest();
+    request.setUrl(getEditLink());
+    request.headers.ifMatch = etag;
+    AtomPatchRelativeToOriginalContent content =
+        new AtomPatchRelativeToOriginalContent();
+    content.namespaceDictionary = PicasaWebAlbumsAtom.NAMESPACE_DICTIONARY;
+    content.originalEntry = original;
+    content.patchedEntry = this;
+    request.content = content;
+    return request.execute().parseAs(AlbumEntry.class);
+  }
+
+  private static AlbumEntry updateTitle(HttpTransport transport,
+      AlbumEntry album) throws IOException {
+    AlbumEntry patched = album.clone();
+    patched.title = "An alternate title";
+    return patched.executePatchRelativeToOriginal(transport, album);
+  }
+
+ * + *

+ * To insert an album, we use the transport to execute a POST request to the Picasa Web Albums API: + *

+ * + *

+  public AlbumEntry insertAlbum(HttpTransport transport, AlbumEntry entry)
+      throws IOException {
+    HttpRequest request = transport.buildPostRequest();
+    request.setUrl(getPostLink());
+    AtomContent content = new AtomContent();
+    content.namespaceDictionary = PicasaWebAlbumsAtom.NAMESPACE_DICTIONARY;
+    content.entry = entry;
+    request.content = content;
+    return request.execute().parseAs(AlbumEntry.class);
+  }
+
+ * + *

+ * To delete an album, we use the transport to execute a DELETE request to the Picasa Web Albums + * API: + *

+ * + *

+  public void executeDelete(HttpTransport transport) throws IOException {
+    HttpRequest request = transport.buildDeleteRequest();
+    request.setUrl(getEditLink());
+    request.headers.ifMatch = etag;
+    request.execute().ignore();
+  }
+
+ * + *

+ * NOTE: As you might guess, the library uses reflection to populate the user-defined data model. + * It's not quite as fast as writing the wire format parsing code yourself can potentially be, but + * it's a lot easier. + *

+ * + *

+ * NOTE: If you prefer to use your favorite XML parsing library instead (there are many of them), + * that's supported as well. Just call {@link com.google.api.client.http.HttpRequest#execute()} and + * parse the returned byte stream. + *

+ * + * @since 1.0 + * @author Yaniv Inbar + */ +@com.google.api.client.util.Beta +package com.google.api.client.googleapis.xml.atom; + diff --git a/google-api-client-xml/src/test/java/com/google/api/client/googleapis/xml/atom/GoogleAtomTest.java b/google-api-client-xml/src/test/java/com/google/api/client/googleapis/xml/atom/GoogleAtomTest.java new file mode 100644 index 00000000..a4aa90b3 --- /dev/null +++ b/google-api-client-xml/src/test/java/com/google/api/client/googleapis/xml/atom/GoogleAtomTest.java @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2010 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.api.client.googleapis.xml.atom; + +import com.google.api.client.util.Key; +import com.google.api.client.xml.GenericXml; + +import junit.framework.TestCase; + +/** + * Tests {@link GoogleAtom}. + * + * @author Yaniv Inbar + */ +public class GoogleAtomTest extends TestCase { + + public GoogleAtomTest() { + super(); + } + + public GoogleAtomTest(String name) { + super(name); + } + + class A { + @Key + int x; + + @Key + B b; + + @Key + C c; + @Key + G g; + } + + class B { + @Key + int y; + } + + class C { + @Key + int z; + @Key + GenericXml generic; + @Key + B b; + } + + class G extends GenericXml { + @Key + int something; + } + + public void testGetFieldsFor() { + assertEquals("", GoogleAtom.getFieldsFor(Object.class)); + assertEquals("b/y,c(b/y,generic,z),g,x", GoogleAtom.getFieldsFor(A.class)); + } +} diff --git a/google-api-client/.classpath b/google-api-client/.classpath new file mode 100644 index 00000000..5e220716 --- /dev/null +++ b/google-api-client/.classpath @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/google-api-client/.project b/google-api-client/.project new file mode 100644 index 00000000..e787a93b --- /dev/null +++ b/google-api-client/.project @@ -0,0 +1,23 @@ + + + google-api-client + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/google-api-client/.settings/org.eclipse.jdt.core.prefs b/google-api-client/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..56c60d70 --- /dev/null +++ b/google-api-client/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,418 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.codeComplete.argumentPrefixes= +org.eclipse.jdt.core.codeComplete.argumentSuffixes= +org.eclipse.jdt.core.codeComplete.fieldPrefixes= +org.eclipse.jdt.core.codeComplete.fieldSuffixes= +org.eclipse.jdt.core.codeComplete.localPrefixes= +org.eclipse.jdt.core.codeComplete.localSuffixes= +org.eclipse.jdt.core.codeComplete.staticFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.5 +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=ignore +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=enabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore +org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=warning +org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning +org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning +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=warning +org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=ignore +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=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled +org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +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=warning +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=ignore +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.source=1.5 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field=1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field.count_dependent=1585|-1|1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable=569 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable.count_dependent=1585|-1|1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_member=569 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method=1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method.count_dependent=1585|-1|1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package=1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package.count_dependent=1585|-1|1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package_declaration=569 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter=24 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter.count_dependent=1040|-1|1040 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type=1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type.count_dependent=1585|-1|1585 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type_declaration=569 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16|4|80 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=16 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_cascading_method_invocation_with_arguments=16 +org.eclipse.jdt.core.formatter.alignment_for_cascading_method_invocation_with_arguments.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=16|5|48 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants.count_dependent=0|-1|0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_field_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_for_statement=16 +org.eclipse.jdt.core.formatter.alignment_for_generic_type_arguments=16 +org.eclipse.jdt.core.formatter.alignment_for_generic_type_arguments.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_local_variable_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_new_anonymous_class=0 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16|5|80 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16|4|48 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16|4|49 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16|4|48 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16|4|48 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16|4|48 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration.count_dependent=16|-1|16 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=0 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=0 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=2 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=true +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=false +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=do not insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert +org.eclipse.jdt.core.formatter.comment.line_length=100 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.comment_new_line_at_start_of_html_paragraph=true +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.force_if_else_statement_brace=true +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comment_prefix=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.join_lines_in_comments=true +org.eclipse.jdt.core.formatter.join_wrapped_lines=true +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=true +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=100 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=3 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false +org.eclipse.jdt.core.formatter.sort_local_variable_annotations=false +org.eclipse.jdt.core.formatter.sort_member_annotations=false +org.eclipse.jdt.core.formatter.sort_package_annotations=false +org.eclipse.jdt.core.formatter.sort_parameter_annotations=false +org.eclipse.jdt.core.formatter.sort_type_annotations=false +org.eclipse.jdt.core.formatter.tabulation.char=space +org.eclipse.jdt.core.formatter.tabulation.size=2 +org.eclipse.jdt.core.formatter.use_on_off_tags=false +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_comment_inline_tags=false +org.eclipse.jdt.core.formatter.wrap_non_simple_local_variable_annotation=true +org.eclipse.jdt.core.formatter.wrap_non_simple_member_annotation=true +org.eclipse.jdt.core.formatter.wrap_non_simple_package_annotation=true +org.eclipse.jdt.core.formatter.wrap_non_simple_parameter_annotation=false +org.eclipse.jdt.core.formatter.wrap_non_simple_type_annotation=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true +org.eclipse.jdt.core.formatter.wrap_prefer_two_fragments=false diff --git a/google-api-client/.settings/org.eclipse.jdt.ui.prefs b/google-api-client/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000..08ebc976 --- /dev/null +++ b/google-api-client/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,119 @@ +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=false +cleanup.add_serial_version_id=true +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=false +cleanup.always_use_this_for_non_static_method_access=false +cleanup.convert_to_enhanced_for_loop=false +cleanup.correct_indentation=true +cleanup.format_source_code=true +cleanup.format_source_code_changes_only=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=false +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.organize_imports=true +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=true +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.remove_private_constructors=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=true +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.use_blocks=true +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_parentheses_in_expressions=true +cleanup.use_this_for_non_static_field_access=true +cleanup.use_this_for_non_static_field_access_only_if_necessary=true +cleanup.use_this_for_non_static_method_access=true +cleanup.use_this_for_non_static_method_access_only_if_necessary=true +cleanup_profile=_google-api-java-client +cleanup_settings_version=2 +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=_google-api-java-client 100 +formatter_settings_version=12 +org.eclipse.jdt.ui.exception.name=exception +org.eclipse.jdt.ui.gettersetter.use.is=false +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=com.google;;java;javax; +org.eclipse.jdt.ui.javadoc=true +org.eclipse.jdt.ui.keywordthis=false +org.eclipse.jdt.ui.ondemandthreshold=999 +org.eclipse.jdt.ui.overrideannotation=true +org.eclipse.jdt.ui.staticondemandthreshold=999 +org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=true +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=false +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=false +sp_cleanup.always_use_this_for_non_static_method_access=false +sp_cleanup.convert_to_enhanced_for_loop=false +sp_cleanup.correct_indentation=false +sp_cleanup.format_source_code=false +sp_cleanup.format_source_code_changes_only=true +sp_cleanup.make_local_variable_final=false +sp_cleanup.make_parameters_final=false +sp_cleanup.make_private_fields_final=true +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=false +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.organize_imports=true +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=false +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_trailing_whitespaces=true +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_casts=true +sp_cleanup.remove_unnecessary_nls_tags=false +sp_cleanup.remove_unused_imports=false +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.use_blocks=false +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_parentheses_in_expressions=false +sp_cleanup.use_this_for_non_static_field_access=false +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true +sp_cleanup.use_this_for_non_static_method_access=false +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true diff --git a/google-api-client/pom.xml b/google-api-client/pom.xml new file mode 100644 index 00000000..4ef45bb1 --- /dev/null +++ b/google-api-client/pom.xml @@ -0,0 +1,92 @@ + + 4.0.0 + + com.google.api-client + google-api-client-parent + 1.17.1-rc-SNAPSHOT + ../pom.xml + + google-api-client + Google APIs Client Library for Java + + + + maven-javadoc-plugin + + + http://download.oracle.com/javase/1.5.0/docs/api/ + http://code.google.com/appengine/docs/java/javadoc + http://javadoc.google-http-java-client.googlecode.com/hg/${project.http.version} + http://javadoc.google-oauth-java-client.googlecode.com/hg/${project.oauth.version} + + ${project.name} ${project.version} + ${project.artifactId} ${project.version} + + + + maven-jar-plugin + + + + true + + + + + + jar + compile + + jar + + + + + + maven-source-plugin + + + source-jar + compile + + jar + + + + + + + + + com.google.oauth-client + google-oauth-client + + + com.google.http-client + google-http-client-gson + test + + + com.google.http-client + google-http-client-jackson + test + + + junit + junit + test + + + commons-codec + commons-codec + provided + 1.6 + + + com.google.guava + guava-jdk5 + test + + + diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/GoogleUtils.java b/google-api-client/src/main/java/com/google/api/client/googleapis/GoogleUtils.java new file mode 100644 index 00000000..f50ceb24 --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/GoogleUtils.java @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2013 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.api.client.googleapis; + +import com.google.api.client.util.SecurityUtils; + +import java.io.IOException; +import java.io.InputStream; +import java.security.GeneralSecurityException; +import java.security.KeyStore; + +/** + * Utility class for the Google API Client Library. + * + * @since 1.12 + * @author rmistry@google.com (Ravi Mistry) + */ +public final class GoogleUtils { + + // NOTE: Integer instead of int so compiler thinks it isn't a constant, so it won't inline it + /** + * Major part of the current release version. + * + * @since 1.14 + */ + public static final Integer MAJOR_VERSION = 1; + + /** + * Minor part of the current release version. + * + * @since 1.14 + */ + public static final Integer MINOR_VERSION = 17; + + /** + * Bug fix part of the current release version. + * + * @since 1.14 + */ + public static final Integer BUGFIX_VERSION = 1; + + /** Current release version. */ + // NOTE: toString() so compiler thinks it isn't a constant, so it won't inline it + public static final String VERSION = (MAJOR_VERSION + "." + MINOR_VERSION + "." + BUGFIX_VERSION + + "-rc").toString(); + + /** Cached value for {@link #getCertificateTrustStore()}. */ + static KeyStore certTrustStore; + + /** + * Returns the key store for trusted root certificates to use for Google APIs. + * + *

+ * Value is cached, so subsequent access is fast. + *

+ * + * @since 1.14 + */ + public static synchronized KeyStore getCertificateTrustStore() + throws IOException, GeneralSecurityException { + if (certTrustStore == null) { + certTrustStore = SecurityUtils.getJavaKeyStore(); + InputStream keyStoreStream = GoogleUtils.class.getResourceAsStream("google.jks"); + SecurityUtils.loadKeyStore(certTrustStore, keyStoreStream, "notasecret"); + } + return certTrustStore; + } + + private GoogleUtils() { + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/MethodOverride.java b/google-api-client/src/main/java/com/google/api/client/googleapis/MethodOverride.java new file mode 100644 index 00000000..c1309393 --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/MethodOverride.java @@ -0,0 +1,161 @@ +/* + * Copyright (c) 2010 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.api.client.googleapis; + +import com.google.api.client.http.EmptyContent; +import com.google.api.client.http.HttpExecuteInterceptor; +import com.google.api.client.http.HttpMethods; +import com.google.api.client.http.HttpRequest; +import com.google.api.client.http.HttpRequestInitializer; +import com.google.api.client.http.UrlEncodedContent; + +import java.io.IOException; + +/** + * Thread-safe HTTP request execute interceptor for Google API's that wraps HTTP requests inside of + * a POST request and uses {@link #HEADER} header to specify the actual HTTP method. + * + *

+ * Use this for example for an HTTP transport that doesn't support PATCH like + * {@code NetHttpTransport} or {@code UrlFetchTransport}. By default, only the methods not supported + * by the transport will be overridden. When running behind a firewall that does not support certain + * verbs like PATCH, use the {@link MethodOverride.Builder#setOverrideAllMethods(boolean)} + * constructor instead to specify to override all methods. POST is never overridden. + *

+ * + *

+ * This class also allows GET requests with a long URL (> 2048 chars) to be instead sent using + * method override as a POST request. + *

+ * + *

+ * Sample usage, taking advantage that this class implements {@link HttpRequestInitializer}: + *

+ * + *
+  public static HttpRequestFactory createRequestFactory(HttpTransport transport) {
+    return transport.createRequestFactory(new MethodOverride());
+  }
+ * 
+ * + *

+ * If you have a custom request initializer, take a look at the sample usage for + * {@link HttpExecuteInterceptor}, which this class also implements. + *

+ * + * @since 1.4 + * @author Yaniv Inbar + */ +public final class MethodOverride implements HttpExecuteInterceptor, HttpRequestInitializer { + + /** + * Name of the method override header. + * + * @since 1.13 + */ + public static final String HEADER = "X-HTTP-Method-Override"; + + /** Maximum supported URL length. */ + static final int MAX_URL_LENGTH = 2048; + + /** + * Whether to allow all methods (except GET and POST) to be overridden regardless of whether the + * transport supports them. + */ + private final boolean overrideAllMethods; + + /** Only overrides HTTP methods that the HTTP transport does not support. */ + public MethodOverride() { + this(false); + } + + MethodOverride(boolean overrideAllMethods) { + this.overrideAllMethods = overrideAllMethods; + } + + public void initialize(HttpRequest request) { + request.setInterceptor(this); + } + + public void intercept(HttpRequest request) throws IOException { + if (overrideThisMethod(request)) { + String requestMethod = request.getRequestMethod(); + request.setRequestMethod(HttpMethods.POST); + request.getHeaders().set(HEADER, requestMethod); + if (requestMethod.equals(HttpMethods.GET)) { + // take the URI query part and put it into the HTTP body + request.setContent(new UrlEncodedContent(request.getUrl().clone())); + // remove query parameters from URI + request.getUrl().clear(); + } else if (request.getContent() == null) { + // Google servers will fail to process a POST unless the Content-Length header is specified + request.setContent(new EmptyContent()); + } + } + } + + private boolean overrideThisMethod(HttpRequest request) throws IOException { + String requestMethod = request.getRequestMethod(); + if (requestMethod.equals(HttpMethods.POST)) { + return false; + } + if (requestMethod.equals(HttpMethods.GET) + ? request.getUrl().build().length() > MAX_URL_LENGTH : overrideAllMethods) { + return true; + } + return !request.getTransport().supportsMethod(requestMethod); + } + + /** + * Builder for {@link MethodOverride}. + * + * @since 1.12 + * @author Yaniv Inbar + */ + public static final class Builder { + + /** + * Whether to allow all methods (except GET and POST) to be overridden regardless of whether the + * transport supports them. + */ + private boolean overrideAllMethods; + + /** Builds the {@link MethodOverride}. */ + public MethodOverride build() { + return new MethodOverride(overrideAllMethods); + } + + /** + * Returns whether to allow all methods (except GET and POST) to be overridden regardless of + * whether the transport supports them. + */ + public boolean getOverrideAllMethods() { + return overrideAllMethods; + } + + /** + * Sets whether to allow all methods (except GET and POST) to be overridden regardless of + * whether the transport supports them. + * + *

+ * Default is {@code false}. + *

+ */ + public Builder setOverrideAllMethods(boolean overrideAllMethods) { + this.overrideAllMethods = overrideAllMethods; + return this; + } + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/apache/GoogleApacheHttpTransport.java b/google-api-client/src/main/java/com/google/api/client/googleapis/apache/GoogleApacheHttpTransport.java new file mode 100644 index 00000000..fbb3e64a --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/apache/GoogleApacheHttpTransport.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2013 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.api.client.googleapis.apache; + +import com.google.api.client.googleapis.GoogleUtils; +import com.google.api.client.http.apache.ApacheHttpTransport; + +import java.io.IOException; +import java.security.GeneralSecurityException; +import java.security.KeyStore; + +/** + * Utilities for Google APIs based on {@link ApacheHttpTransport}. + * + * @since 1.14 + * @author Yaniv Inbar + */ +public final class GoogleApacheHttpTransport { + + /** + * Returns a new instance of {@link ApacheHttpTransport} that uses + * {@link GoogleUtils#getCertificateTrustStore()} for the trusted certificates using + * {@link com.google.api.client.http.apache.ApacheHttpTransport.Builder#trustCertificates(KeyStore)}. + */ + public static ApacheHttpTransport newTrustedTransport() throws GeneralSecurityException, + IOException { + return new ApacheHttpTransport.Builder().trustCertificates( + GoogleUtils.getCertificateTrustStore()).build(); + } + + private GoogleApacheHttpTransport() { + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/apache/package-info.java b/google-api-client/src/main/java/com/google/api/client/googleapis/apache/package-info.java new file mode 100644 index 00000000..5bc40683 --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/apache/package-info.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2013 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. + */ + +/** + * Google API's support based on the Apache HTTP Client. + * + * @since 1.14 + * @author Yaniv Inbar + */ + +package com.google.api.client.googleapis.apache; + diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/auth/clientlogin/AuthKeyValueParser.java b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/clientlogin/AuthKeyValueParser.java new file mode 100644 index 00000000..4dacf441 --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/clientlogin/AuthKeyValueParser.java @@ -0,0 +1,156 @@ +/* + * Copyright (c) 2010 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.api.client.googleapis.auth.clientlogin; + +import com.google.api.client.http.HttpResponse; +import com.google.api.client.util.Beta; +import com.google.api.client.util.ClassInfo; +import com.google.api.client.util.FieldInfo; +import com.google.api.client.util.GenericData; +import com.google.api.client.util.ObjectParser; +import com.google.api.client.util.Types; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.Reader; +import java.lang.reflect.Field; +import java.lang.reflect.Type; +import java.nio.charset.Charset; +import java.util.Map; + +/** + * {@link Beta}
+ * HTTP parser for Google response to an Authorization request. + * + * @since 1.10 + * @author Yaniv Inbar + */ +@Beta +final class AuthKeyValueParser implements ObjectParser { + + /** Singleton instance. */ + public static final AuthKeyValueParser INSTANCE = new AuthKeyValueParser(); + + public String getContentType() { + return "text/plain"; + } + + public T parse(HttpResponse response, Class dataClass) throws IOException { + response.setContentLoggingLimit(0); + InputStream content = response.getContent(); + try { + return parse(content, dataClass); + } finally { + content.close(); + } + } + + public T parse(InputStream content, Class dataClass) throws IOException { + ClassInfo classInfo = ClassInfo.of(dataClass); + T newInstance = Types.newInstance(dataClass); + BufferedReader reader = new BufferedReader(new InputStreamReader(content)); + while (true) { + String line = reader.readLine(); + if (line == null) { + break; + } + int equals = line.indexOf('='); + String key = line.substring(0, equals); + String value = line.substring(equals + 1); + // get the field from the type information + Field field = classInfo.getField(key); + if (field != null) { + Class fieldClass = field.getType(); + Object fieldValue; + if (fieldClass == boolean.class || fieldClass == Boolean.class) { + fieldValue = Boolean.valueOf(value); + } else { + fieldValue = value; + } + FieldInfo.setFieldValue(field, newInstance, fieldValue); + } else if (GenericData.class.isAssignableFrom(dataClass)) { + GenericData data = (GenericData) newInstance; + data.set(key, value); + } else if (Map.class.isAssignableFrom(dataClass)) { + @SuppressWarnings("unchecked") + Map map = (Map) newInstance; + map.put(key, value); + } + } + + return newInstance; + } + + private AuthKeyValueParser() { + } + + public T parseAndClose(InputStream in, Charset charset, Class dataClass) + throws IOException { + Reader reader = new InputStreamReader(in, charset); + return parseAndClose(reader, dataClass); + } + + public Object parseAndClose(InputStream in, Charset charset, Type dataType) { + throw new UnsupportedOperationException( + "Type-based parsing is not yet supported -- use Class instead"); + } + + public T parseAndClose(Reader reader, Class dataClass) throws IOException { + try { + ClassInfo classInfo = ClassInfo.of(dataClass); + T newInstance = Types.newInstance(dataClass); + BufferedReader breader = new BufferedReader(reader); + while (true) { + String line = breader.readLine(); + if (line == null) { + break; + } + int equals = line.indexOf('='); + String key = line.substring(0, equals); + String value = line.substring(equals + 1); + // get the field from the type information + Field field = classInfo.getField(key); + if (field != null) { + Class fieldClass = field.getType(); + Object fieldValue; + if (fieldClass == boolean.class || fieldClass == Boolean.class) { + fieldValue = Boolean.valueOf(value); + } else { + fieldValue = value; + } + FieldInfo.setFieldValue(field, newInstance, fieldValue); + } else if (GenericData.class.isAssignableFrom(dataClass)) { + GenericData data = (GenericData) newInstance; + data.set(key, value); + } else if (Map.class.isAssignableFrom(dataClass)) { + @SuppressWarnings("unchecked") + Map map = (Map) newInstance; + map.put(key, value); + } + } + + return newInstance; + } finally { + reader.close(); + } + } + + public Object parseAndClose(Reader reader, Type dataType) { + throw new UnsupportedOperationException( + "Type-based parsing is not yet supported -- use Class instead"); + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/auth/clientlogin/ClientLogin.java b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/clientlogin/ClientLogin.java new file mode 100644 index 00000000..8e335ed4 --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/clientlogin/ClientLogin.java @@ -0,0 +1,209 @@ +/* + * Copyright (c) 2010 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.api.client.googleapis.auth.clientlogin; + +import com.google.api.client.http.GenericUrl; +import com.google.api.client.http.HttpExecuteInterceptor; +import com.google.api.client.http.HttpRequest; +import com.google.api.client.http.HttpRequestInitializer; +import com.google.api.client.http.HttpResponse; +import com.google.api.client.http.HttpResponseException; +import com.google.api.client.http.HttpTransport; +import com.google.api.client.http.UrlEncodedContent; +import com.google.api.client.util.Beta; +import com.google.api.client.util.Key; +import com.google.api.client.util.StringUtils; +import com.google.api.client.util.Strings; + +import java.io.IOException; + +/** + * {@link Beta}
+ * Client Login authentication method as described in ClientLogin for + * Installed Applications. + * + * @since 1.0 + * @author Yaniv Inbar + */ +@Beta +public final class ClientLogin { + + /** + * HTTP transport required for executing request in {@link #authenticate()}. + * + * @since 1.3 + */ + public HttpTransport transport; + + /** + * URL for the Client Login authorization server. + * + *

+ * By default this is {@code "https://www.google.com"}, but it may be overridden for testing + * purposes. + *

+ * + * @since 1.3 + */ + public GenericUrl serverUrl = new GenericUrl("https://www.google.com"); + + /** + * Short string identifying your application for logging purposes of the form: + * "companyName-applicationName-versionID". + */ + @Key("source") + public String applicationName; + + /** + * Name of the Google service you're requesting authorization for, for example {@code "cl"} for + * Google Calendar. + */ + @Key("service") + public String authTokenType; + + /** User's full email address. */ + @Key("Email") + public String username; + + /** User's password. */ + @Key("Passwd") + public String password; + + /** + * Type of account to request authorization for. Possible values are: + * + *
    + *
  • GOOGLE (get authorization for a Google account only)
  • + *
  • HOSTED (get authorization for a hosted account only)
  • + *
  • HOSTED_OR_GOOGLE (get authorization first for a hosted account; if attempt fails, get + * authorization for a Google account)
  • + *
+ * + * Use HOSTED_OR_GOOGLE if you're not sure which type of account you want authorization for. If + * the user information matches both a hosted and a Google account, only the hosted account is + * authorized. + * + * @since 1.1 + */ + @Key + public String accountType; + + /** (optional) Token representing the specific CAPTCHA challenge. */ + @Key("logintoken") + public String captchaToken; + + /** (optional) String entered by the user as an answer to a CAPTCHA challenge. */ + @Key("logincaptcha") + public String captchaAnswer; + + /** + * Key/value data to parse a success response. + * + *

+ * Sample usage, taking advantage that this class implements {@link HttpRequestInitializer}: + *

+ * + *
+    public static HttpRequestFactory createRequestFactory(
+        HttpTransport transport, Response response) {
+      return transport.createRequestFactory(response);
+    }
+   * 
+ * + *

+ * If you have a custom request initializer, take a look at the sample usage for + * {@link HttpExecuteInterceptor}, which this class also implements. + *

+ */ + public static final class Response implements HttpExecuteInterceptor, HttpRequestInitializer { + + /** Authentication token. */ + @Key("Auth") + public String auth; + + /** Returns the authorization header value to use based on the authentication token. */ + public String getAuthorizationHeaderValue() { + return ClientLogin.getAuthorizationHeaderValue(auth); + } + + public void initialize(HttpRequest request) { + request.setInterceptor(this); + } + + public void intercept(HttpRequest request) { + request.getHeaders().setAuthorization(getAuthorizationHeaderValue()); + } + } + + /** Key/value data to parse an error response. */ + public static final class ErrorInfo { + + @Key("Error") + public String error; + + @Key("Url") + public String url; + + @Key("CaptchaToken") + public String captchaToken; + + @Key("CaptchaUrl") + public String captchaUrl; + } + + /** + * Authenticates based on the provided field values. + * + * @throws ClientLoginResponseException if the authentication response has an error code, such as + * for a CAPTCHA challenge. + */ + public Response authenticate() throws IOException { + GenericUrl url = serverUrl.clone(); + url.appendRawPath("/accounts/ClientLogin"); + HttpRequest request = + transport.createRequestFactory().buildPostRequest(url, new UrlEncodedContent(this)); + request.setParser(AuthKeyValueParser.INSTANCE); + request.setContentLoggingLimit(0); + request.setThrowExceptionOnExecuteError(false); + HttpResponse response = request.execute(); + // check for an HTTP success response (2xx) + if (response.isSuccessStatusCode()) { + return response.parseAs(Response.class); + } + HttpResponseException.Builder builder = new HttpResponseException.Builder( + response.getStatusCode(), response.getStatusMessage(), response.getHeaders()); + // On error, throw a ClientLoginResponseException with the parsed error details + ErrorInfo details = response.parseAs(ErrorInfo.class); + String detailString = details.toString(); + StringBuilder message = HttpResponseException.computeMessageBuffer(response); + if (!Strings.isNullOrEmpty(detailString)) { + message.append(StringUtils.LINE_SEPARATOR).append(detailString); + builder.setContent(detailString); + } + builder.setMessage(message.toString()); + throw new ClientLoginResponseException(builder, details); + } + + /** + * Returns Google Login {@code "Authorization"} header value based on the given authentication + * token. + * + * @since 1.13 + */ + public static String getAuthorizationHeaderValue(String authToken) { + return "GoogleLogin auth=" + authToken; + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/auth/clientlogin/ClientLoginResponseException.java b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/clientlogin/ClientLoginResponseException.java new file mode 100644 index 00000000..b6d74f54 --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/clientlogin/ClientLoginResponseException.java @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2011 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.api.client.googleapis.auth.clientlogin; + +import com.google.api.client.googleapis.auth.clientlogin.ClientLogin.ErrorInfo; +import com.google.api.client.http.HttpResponseException; +import com.google.api.client.util.Beta; + +/** + * {@link Beta}
+ * Exception thrown when an error status code is detected in an HTTP response to a Google + * ClientLogin request in {@link ClientLogin} . + * + *

+ * To get the structured details, use {@link #getDetails()}. + *

+ * + * @since 1.7 + * @author Yaniv Inbar + */ +@Beta +public class ClientLoginResponseException extends HttpResponseException { + + private static final long serialVersionUID = 4974317674023010928L; + + /** Error details or {@code null} for none. */ + private final transient ErrorInfo details; + + /** + * @param builder builder + * @param details error details or {@code null} for none + */ + ClientLoginResponseException(Builder builder, ErrorInfo details) { + super(builder); + this.details = details; + } + + /** Return the error details or {@code null} for none. */ + public final ErrorInfo getDetails() { + return details; + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/auth/clientlogin/package-info.java b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/clientlogin/package-info.java new file mode 100644 index 00000000..2ff371f3 --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/clientlogin/package-info.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2010 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. + */ + +/** + * {@link com.google.api.client.util.Beta}
+ * Google's legacy ClientLogin authentication method as described in ClientLogin for + * Installed Applications. + * + * @since 1.0 + * @author Yaniv Inbar + */ +@com.google.api.client.util.Beta +package com.google.api.client.googleapis.auth.clientlogin; + diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleAuthorizationCodeFlow.java b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleAuthorizationCodeFlow.java new file mode 100644 index 00000000..3ce4cb70 --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleAuthorizationCodeFlow.java @@ -0,0 +1,370 @@ +/* + * Copyright (c) 2012 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.api.client.googleapis.auth.oauth2; + +import com.google.api.client.auth.oauth2.AuthorizationCodeFlow; +import com.google.api.client.auth.oauth2.BearerToken; +import com.google.api.client.auth.oauth2.ClientParametersAuthentication; +import com.google.api.client.auth.oauth2.Credential.AccessMethod; +import com.google.api.client.auth.oauth2.CredentialRefreshListener; +import com.google.api.client.auth.oauth2.CredentialStore; +import com.google.api.client.auth.oauth2.StoredCredential; +import com.google.api.client.auth.oauth2.TokenResponse; +import com.google.api.client.http.GenericUrl; +import com.google.api.client.http.HttpExecuteInterceptor; +import com.google.api.client.http.HttpRequestInitializer; +import com.google.api.client.http.HttpTransport; +import com.google.api.client.json.JsonFactory; +import com.google.api.client.util.Beta; +import com.google.api.client.util.Clock; +import com.google.api.client.util.Preconditions; +import com.google.api.client.util.store.DataStore; +import com.google.api.client.util.store.DataStoreFactory; + +import java.io.IOException; +import java.util.Collection; + +/** + * Thread-safe Google OAuth 2.0 authorization code flow that manages and persists end-user + * credentials. + * + *

+ * This is designed to simplify the flow in which an end-user authorizes the application to access + * their protected data, and then the application has access to their data based on an access token + * and a refresh token to refresh that access token when it expires. + *

+ * + *

+ * The first step is to call {@link #loadCredential(String)} based on the known user ID to check if + * the end-user's credentials are already known. If not, call {@link #newAuthorizationUrl()} and + * direct the end-user's browser to an authorization page. The web browser will then redirect to the + * redirect URL with a {@code "code"} query parameter which can then be used to request an access + * token using {@link #newTokenRequest(String)}. Finally, use + * {@link #createAndStoreCredential(TokenResponse, String)} to store and obtain a credential for + * accessing protected resources. + *

+ * + *

+ * The default for the {@code approval_prompt} and {@code access_type} parameters is {@code null}. + * For web applications that means {@code "approval_prompt=auto&access_type=online"} and for + * installed applications that means {@code "approval_prompt=force&access_type=offline"}. To + * override the default, you need to explicitly call {@link Builder#setApprovalPrompt(String)} and + * {@link Builder#setAccessType(String)}. + *

+ * + * @author Yaniv Inbar + * @since 1.7 + */ +@SuppressWarnings("deprecation") +public class GoogleAuthorizationCodeFlow extends AuthorizationCodeFlow { + + /** + * Prompt for consent behavior ({@code "auto"} to request auto-approval or {@code "force"} to + * force the approval UI to show) or {@code null} for the default behavior. + */ + private final String approvalPrompt; + + /** + * Access type ({@code "online"} to request online access or {@code "offline"} to request offline + * access) or {@code null} for the default behavior. + */ + private final String accessType; + + /** + * @param transport HTTP transport + * @param jsonFactory JSON factory + * @param clientId client identifier + * @param clientSecret client secret + * @param scopes collection of scopes to be joined by a space separator + * + * @since 1.15 + */ + public GoogleAuthorizationCodeFlow(HttpTransport transport, JsonFactory jsonFactory, + String clientId, String clientSecret, Collection scopes) { + this(new Builder(transport, jsonFactory, clientId, clientSecret, scopes)); + } + + /** + * @param builder Google authorization code flow builder + * + * @since 1.14 + */ + protected GoogleAuthorizationCodeFlow(Builder builder) { + super(builder); + accessType = builder.accessType; + approvalPrompt = builder.approvalPrompt; + } + + @Override + public GoogleAuthorizationCodeTokenRequest newTokenRequest(String authorizationCode) { + // don't need to specify clientId & clientSecret because specifying clientAuthentication + // don't want to specify redirectUri to give control of it to user of this class + return new GoogleAuthorizationCodeTokenRequest(getTransport(), getJsonFactory(), + getTokenServerEncodedUrl(), "", "", authorizationCode, "").setClientAuthentication( + getClientAuthentication()) + .setRequestInitializer(getRequestInitializer()).setScopes(getScopes()); + } + + @Override + public GoogleAuthorizationCodeRequestUrl newAuthorizationUrl() { + // don't want to specify redirectUri to give control of it to user of this class + return new GoogleAuthorizationCodeRequestUrl( + getAuthorizationServerEncodedUrl(), getClientId(), "", getScopes()).setAccessType( + accessType).setApprovalPrompt(approvalPrompt); + } + + /** + * Returns the approval prompt behavior ({@code "auto"} to request auto-approval or + * {@code "force"} to force the approval UI to show) or {@code null} for the default behavior of + * {@code "auto"}. + */ + public final String getApprovalPrompt() { + return approvalPrompt; + } + + /** + * Returns the access type ({@code "online"} to request online access or {@code "offline"} to + * request offline access) or {@code null} for the default behavior of {@code "online"}. + */ + public final String getAccessType() { + return accessType; + } + + /** + * Google authorization code flow builder. + * + *

+ * Implementation is not thread-safe. + *

+ */ + public static class Builder extends AuthorizationCodeFlow.Builder { + + /** + * Prompt for consent behavior ({@code "auto"} to request auto-approval or {@code "force"} to + * force the approval UI to show) or {@code null} for the default behavior. + */ + String approvalPrompt; + + /** + * Access type ({@code "online"} to request online access or {@code "offline"} to request + * offline access) or {@code null} for the default behavior. + */ + String accessType; + + /** + * + * @param transport HTTP transport + * @param jsonFactory JSON factory + * @param clientId client identifier + * @param clientSecret client secret + * @param scopes collection of scopes to be joined by a space separator (or a single value + * containing multiple space-separated scopes) + * + * @since 1.15 + */ + public Builder(HttpTransport transport, JsonFactory jsonFactory, String clientId, + String clientSecret, Collection scopes) { + super(BearerToken.authorizationHeaderAccessMethod(), transport, jsonFactory, new GenericUrl( + GoogleOAuthConstants.TOKEN_SERVER_URL), new ClientParametersAuthentication( + clientId, clientSecret), clientId, GoogleOAuthConstants.AUTHORIZATION_SERVER_URL); + setScopes(scopes); + } + + /** + * @param transport HTTP transport + * @param jsonFactory JSON factory + * @param clientSecrets Google client secrets + * @param scopes collection of scopes to be joined by a space separator + * + * @since 1.15 + */ + public Builder(HttpTransport transport, JsonFactory jsonFactory, + GoogleClientSecrets clientSecrets, Collection scopes) { + super(BearerToken.authorizationHeaderAccessMethod(), transport, jsonFactory, new GenericUrl( + GoogleOAuthConstants.TOKEN_SERVER_URL), new ClientParametersAuthentication( + clientSecrets.getDetails().getClientId(), clientSecrets.getDetails().getClientSecret()), + clientSecrets.getDetails().getClientId(), GoogleOAuthConstants.AUTHORIZATION_SERVER_URL); + setScopes(scopes); + } + + @Override + public GoogleAuthorizationCodeFlow build() { + return new GoogleAuthorizationCodeFlow(this); + } + + @Override + public Builder setDataStoreFactory(DataStoreFactory dataStore) throws IOException { + return (Builder) super.setDataStoreFactory(dataStore); + } + + @Override + public Builder setCredentialDataStore(DataStore typedDataStore) { + return (Builder) super.setCredentialDataStore(typedDataStore); + } + + @Override + public Builder setCredentialCreatedListener( + CredentialCreatedListener credentialCreatedListener) { + return (Builder) super.setCredentialCreatedListener(credentialCreatedListener); + } + + @Beta + @Override + @Deprecated + public Builder setCredentialStore(CredentialStore credentialStore) { + return (Builder) super.setCredentialStore(credentialStore); + } + + @Override + public Builder setRequestInitializer(HttpRequestInitializer requestInitializer) { + return (Builder) super.setRequestInitializer(requestInitializer); + } + + @Override + public Builder setScopes(Collection scopes) { + Preconditions.checkState(!scopes.isEmpty()); + return (Builder) super.setScopes(scopes); + } + + /** + * @since 1.11 + */ + @Override + public Builder setMethod(AccessMethod method) { + return (Builder) super.setMethod(method); + } + + /** + * @since 1.11 + */ + @Override + public Builder setTransport(HttpTransport transport) { + return (Builder) super.setTransport(transport); + } + + /** + * @since 1.11 + */ + @Override + public Builder setJsonFactory(JsonFactory jsonFactory) { + return (Builder) super.setJsonFactory(jsonFactory); + } + + /** + * @since 1.11 + */ + @Override + public Builder setTokenServerUrl(GenericUrl tokenServerUrl) { + return (Builder) super.setTokenServerUrl(tokenServerUrl); + } + + /** + * @since 1.11 + */ + @Override + public Builder setClientAuthentication(HttpExecuteInterceptor clientAuthentication) { + return (Builder) super.setClientAuthentication(clientAuthentication); + } + + /** + * @since 1.11 + */ + @Override + public Builder setClientId(String clientId) { + return (Builder) super.setClientId(clientId); + } + + /** + * @since 1.11 + */ + @Override + public Builder setAuthorizationServerEncodedUrl(String authorizationServerEncodedUrl) { + return (Builder) super.setAuthorizationServerEncodedUrl(authorizationServerEncodedUrl); + } + + /** + * @since 1.11 + */ + @Override + public Builder setClock(Clock clock) { + return (Builder) super.setClock(clock); + } + + @Override + public Builder addRefreshListener(CredentialRefreshListener refreshListener) { + return (Builder) super.addRefreshListener(refreshListener); + } + + @Override + public Builder setRefreshListeners(Collection refreshListeners) { + return (Builder) super.setRefreshListeners(refreshListeners); + } + + /** + * Sets the approval prompt behavior ({@code "auto"} to request auto-approval or {@code "force"} + * to force the approval UI to show) or {@code null} for the default behavior ({@code "auto"} + * for web applications and {@code "force"} for installed applications). + * + *

+ * By default this has the value {@code null}. + *

+ * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + public Builder setApprovalPrompt(String approvalPrompt) { + this.approvalPrompt = approvalPrompt; + return this; + } + + /** + * Returns the approval prompt behavior ({@code "auto"} to request auto-approval or + * {@code "force"} to force the approval UI to show) or {@code null} for the default behavior of + * {@code "auto"}. + */ + public final String getApprovalPrompt() { + return approvalPrompt; + } + + /** + * Sets the access type ({@code "online"} to request online access or {@code "offline"} to + * request offline access) or {@code null} for the default behavior ({@code "online"} for web + * applications and {@code "offline"} for installed applications). + * + *

+ * By default this has the value {@code null}. + *

+ * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + public Builder setAccessType(String accessType) { + this.accessType = accessType; + return this; + } + + /** + * Returns the access type ({@code "online"} to request online access or {@code "offline"} to + * request offline access) or {@code null} for the default behavior of {@code "online"}. + */ + public final String getAccessType() { + return accessType; + } + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleAuthorizationCodeRequestUrl.java b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleAuthorizationCodeRequestUrl.java new file mode 100644 index 00000000..386c3d7d --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleAuthorizationCodeRequestUrl.java @@ -0,0 +1,201 @@ +/* + * Copyright (c) 2011 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.api.client.googleapis.auth.oauth2; + +import com.google.api.client.auth.oauth2.AuthorizationCodeRequestUrl; +import com.google.api.client.auth.oauth2.AuthorizationCodeResponseUrl; +import com.google.api.client.util.Key; +import com.google.api.client.util.Preconditions; + +import java.util.Collection; + +/** + * Google-specific implementation of the OAuth 2.0 URL builder for an authorization web page to + * allow the end user to authorize the application to access their protected resources and that + * returns an authorization code, as specified in Using OAuth 2.0 for Web Server + * Applications. + * + *

+ * The default for {@link #getResponseTypes()} is {@code "code"}. Use + * {@link AuthorizationCodeResponseUrl} to parse the redirect response after the end user + * grants/denies the request. Using the authorization code in this response, use + * {@link GoogleAuthorizationCodeTokenRequest} to request the access token. + *

+ * + *

+ * Sample usage for a web application: + *

+ * + *
+  public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
+    String url =
+        new GoogleAuthorizationCodeRequestUrl("812741506391.apps.googleusercontent.com",
+            "https://oauth2-login-demo.appspot.com/code", Arrays.asList(
+                "https://www.googleapis.com/auth/userinfo.email",
+                "https://www.googleapis.com/auth/userinfo.profile")).setState("/profile").build();
+    response.sendRedirect(url);
+  }
+ * 
+ * + *

+ * Implementation is not thread-safe. + *

+ * + * @since 1.7 + * @author Yaniv Inbar + */ +public class GoogleAuthorizationCodeRequestUrl extends AuthorizationCodeRequestUrl { + + /** + * Prompt for consent behavior ({@code "auto"} to request auto-approval or {@code "force"} to + * force the approval UI to show) or {@code null} for the default behavior. + */ + @Key("approval_prompt") + private String approvalPrompt; + + /** + * Access type ({@code "online"} to request online access or {@code "offline"} to request offline + * access) or {@code null} for the default behavior. + */ + @Key("access_type") + private String accessType; + + /** + * @param clientId client identifier + * @param redirectUri URI that the authorization server directs the resource owner's user-agent + * back to the client after a successful authorization grant + * @param scopes scopes (see {@link #setScopes(Collection)}) + * + * @since 1.15 + */ + public GoogleAuthorizationCodeRequestUrl( + String clientId, String redirectUri, Collection scopes) { + this(GoogleOAuthConstants.AUTHORIZATION_SERVER_URL, clientId, redirectUri, scopes); + } + + /** + * @param authorizationServerEncodedUrl authorization server encoded URL + * @param clientId client identifier + * @param redirectUri URI that the authorization server directs the resource owner's user-agent + * back to the client after a successful authorization grant + * @param scopes scopes (see {@link #setScopes(Collection)}) + * + * @since 1.15 + */ + public GoogleAuthorizationCodeRequestUrl(String authorizationServerEncodedUrl, String clientId, + String redirectUri, Collection scopes) { + super(authorizationServerEncodedUrl, clientId); + setRedirectUri(redirectUri); + setScopes(scopes); + } + + /** + * @param clientSecrets OAuth 2.0 client secrets JSON model as specified in + * client_secrets.json file format + * @param redirectUri URI that the authorization server directs the resource owner's user-agent + * back to the client after a successful authorization grant + * @param scopes scopes (see {@link #setScopes(Collection)}) + * + * @since 1.15 + */ + public GoogleAuthorizationCodeRequestUrl( + GoogleClientSecrets clientSecrets, String redirectUri, Collection scopes) { + this(clientSecrets.getDetails().getClientId(), redirectUri, scopes); + } + + /** + * Returns the approval prompt behavior ({@code "auto"} to request auto-approval or + * {@code "force"} to force the approval UI to show) or {@code null} for the default behavior of + * {@code "auto"}. + */ + public final String getApprovalPrompt() { + return approvalPrompt; + } + + /** + * Sets the approval prompt behavior ({@code "auto"} to request auto-approval or {@code "force"} + * to force the approval UI to show) or {@code null} for the default behavior of {@code "auto"}. + * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + public GoogleAuthorizationCodeRequestUrl setApprovalPrompt(String approvalPrompt) { + this.approvalPrompt = approvalPrompt; + return this; + } + + /** + * Returns the access type ({@code "online"} to request online access or {@code "offline"} to + * request offline access) or {@code null} for the default behavior of {@code "online"}. + */ + public final String getAccessType() { + return accessType; + } + + /** + * Sets the access type ({@code "online"} to request online access or {@code "offline"} to request + * offline access) or {@code null} for the default behavior of {@code "online"}. + * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + public GoogleAuthorizationCodeRequestUrl setAccessType(String accessType) { + this.accessType = accessType; + return this; + } + + @Override + public GoogleAuthorizationCodeRequestUrl setResponseTypes(Collection responseTypes) { + return (GoogleAuthorizationCodeRequestUrl) super.setResponseTypes(responseTypes); + } + + @Override + public GoogleAuthorizationCodeRequestUrl setRedirectUri(String redirectUri) { + Preconditions.checkNotNull(redirectUri); + return (GoogleAuthorizationCodeRequestUrl) super.setRedirectUri(redirectUri); + } + + @Override + public GoogleAuthorizationCodeRequestUrl setScopes(Collection scopes) { + Preconditions.checkArgument(scopes.iterator().hasNext()); + return (GoogleAuthorizationCodeRequestUrl) super.setScopes(scopes); + } + + @Override + public GoogleAuthorizationCodeRequestUrl setClientId(String clientId) { + return (GoogleAuthorizationCodeRequestUrl) super.setClientId(clientId); + } + + @Override + public GoogleAuthorizationCodeRequestUrl setState(String state) { + return (GoogleAuthorizationCodeRequestUrl) super.setState(state); + } + + @Override + public GoogleAuthorizationCodeRequestUrl set(String fieldName, Object value) { + return (GoogleAuthorizationCodeRequestUrl) super.set(fieldName, value); + } + + @Override + public GoogleAuthorizationCodeRequestUrl clone() { + return (GoogleAuthorizationCodeRequestUrl) super.clone(); + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleAuthorizationCodeTokenRequest.java b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleAuthorizationCodeTokenRequest.java new file mode 100644 index 00000000..b3d7d77a --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleAuthorizationCodeTokenRequest.java @@ -0,0 +1,165 @@ +/* + * Copyright (c) 2011 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.api.client.googleapis.auth.oauth2; + +import com.google.api.client.auth.oauth2.AuthorizationCodeTokenRequest; +import com.google.api.client.auth.oauth2.ClientParametersAuthentication; +import com.google.api.client.auth.oauth2.TokenResponse; +import com.google.api.client.auth.oauth2.TokenResponseException; +import com.google.api.client.http.GenericUrl; +import com.google.api.client.http.HttpExecuteInterceptor; +import com.google.api.client.http.HttpRequestInitializer; +import com.google.api.client.http.HttpTransport; +import com.google.api.client.json.JsonFactory; +import com.google.api.client.util.Preconditions; + +import java.io.IOException; +import java.util.Collection; + +/** + * Google-specific implementation of the OAuth 2.0 request for an access token based on an + * authorization code (as specified in Using OAuth 2.0 for Web + * Server Applications). + * + *

+ * Use {@link GoogleCredential} to access protected resources from the resource server using the + * {@link TokenResponse} returned by {@link #execute()}. On error, it will instead throw + * {@link TokenResponseException}. + *

+ * + *

+ * Sample usage: + *

+ * + *
+  static void requestAccessToken() throws IOException {
+    try {
+      GoogleTokenResponse response =
+          new GoogleAuthorizationCodeTokenRequest(new NetHttpTransport(), new JacksonFactory(),
+              "812741506391.apps.googleusercontent.com", "{client_secret}",
+              "4/P7q7W91a-oMsCeLvIaQm6bTrgtp7", "https://oauth2-login-demo.appspot.com/code")
+              .execute();
+      System.out.println("Access token: " + response.getAccessToken());
+    } catch (TokenResponseException e) {
+      if (e.getDetails() != null) {
+        System.err.println("Error: " + e.getDetails().getError());
+        if (e.getDetails().getErrorDescription() != null) {
+          System.err.println(e.getDetails().getErrorDescription());
+        }
+        if (e.getDetails().getErrorUri() != null) {
+          System.err.println(e.getDetails().getErrorUri());
+        }
+      } else {
+        System.err.println(e.getMessage());
+      }
+    }
+  }
+ * 
+ * + *

+ * Implementation is not thread-safe. + *

+ * + * @since 1.7 + * @author Yaniv Inbar + */ +public class GoogleAuthorizationCodeTokenRequest extends AuthorizationCodeTokenRequest { + + /** + * @param transport HTTP transport + * @param jsonFactory JSON factory + * @param clientId client identifier issued to the client during the registration process + * @param clientSecret client secret + * @param code authorization code generated by the authorization server + * @param redirectUri redirect URL parameter matching the redirect URL parameter in the + * authorization request (see {@link #setRedirectUri(String)} + */ + public GoogleAuthorizationCodeTokenRequest(HttpTransport transport, JsonFactory jsonFactory, + String clientId, String clientSecret, String code, String redirectUri) { + this(transport, jsonFactory, GoogleOAuthConstants.TOKEN_SERVER_URL, clientId, clientSecret, + code, redirectUri); + } + + /** + * @param transport HTTP transport + * @param jsonFactory JSON factory + * @param tokenServerEncodedUrl token server encoded URL + * @param clientId client identifier issued to the client during the registration process + * @param clientSecret client secret + * @param code authorization code generated by the authorization server + * @param redirectUri redirect URL parameter matching the redirect URL parameter in the + * authorization request (see {@link #setRedirectUri(String)} + * + * @since 1.12 + */ + public GoogleAuthorizationCodeTokenRequest(HttpTransport transport, JsonFactory jsonFactory, + String tokenServerEncodedUrl, String clientId, String clientSecret, String code, + String redirectUri) { + super(transport, jsonFactory, new GenericUrl(tokenServerEncodedUrl), code); + setClientAuthentication(new ClientParametersAuthentication(clientId, clientSecret)); + setRedirectUri(redirectUri); + } + + @Override + public GoogleAuthorizationCodeTokenRequest setRequestInitializer( + HttpRequestInitializer requestInitializer) { + return (GoogleAuthorizationCodeTokenRequest) super.setRequestInitializer(requestInitializer); + } + + @Override + public GoogleAuthorizationCodeTokenRequest setTokenServerUrl(GenericUrl tokenServerUrl) { + return (GoogleAuthorizationCodeTokenRequest) super.setTokenServerUrl(tokenServerUrl); + } + + @Override + public GoogleAuthorizationCodeTokenRequest setScopes(Collection scopes) { + return (GoogleAuthorizationCodeTokenRequest) super.setScopes(scopes); + } + + @Override + public GoogleAuthorizationCodeTokenRequest setGrantType(String grantType) { + return (GoogleAuthorizationCodeTokenRequest) super.setGrantType(grantType); + } + + @Override + public GoogleAuthorizationCodeTokenRequest setClientAuthentication( + HttpExecuteInterceptor clientAuthentication) { + Preconditions.checkNotNull(clientAuthentication); + return (GoogleAuthorizationCodeTokenRequest) super.setClientAuthentication( + clientAuthentication); + } + + @Override + public GoogleAuthorizationCodeTokenRequest setCode(String code) { + return (GoogleAuthorizationCodeTokenRequest) super.setCode(code); + } + + @Override + public GoogleAuthorizationCodeTokenRequest setRedirectUri(String redirectUri) { + Preconditions.checkNotNull(redirectUri); + return (GoogleAuthorizationCodeTokenRequest) super.setRedirectUri(redirectUri); + } + + @Override + public GoogleTokenResponse execute() throws IOException { + return executeUnparsed().parseAs(GoogleTokenResponse.class); + } + + @Override + public GoogleAuthorizationCodeTokenRequest set(String fieldName, Object value) { + return (GoogleAuthorizationCodeTokenRequest) super.set(fieldName, value); + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleBrowserClientRequestUrl.java b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleBrowserClientRequestUrl.java new file mode 100644 index 00000000..a7da93a9 --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleBrowserClientRequestUrl.java @@ -0,0 +1,152 @@ +/* + * Copyright (c) 2011 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.api.client.googleapis.auth.oauth2; + +import com.google.api.client.auth.oauth2.BrowserClientRequestUrl; +import com.google.api.client.util.Key; +import com.google.api.client.util.Preconditions; + +import java.util.Collection; + +/** + * Google-specific implementation of the OAuth 2.0 URL builder for an authorization web page to + * allow the end user to authorize the application to access their protected resources and that + * returns the access token to a browser client using a scripting language such as JavaScript, as + * specified in Using OAuth + * 2.0 for Client-side Applications. + * + *

+ * The default for {@link #getResponseTypes()} is {@code "token"}. + *

+ * + *

+ * Sample usage for a web application: + *

+ * + *
+  public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
+    String url = new GoogleBrowserClientRequestUrl("812741506391.apps.googleusercontent.com",
+        "https://oauth2-login-demo.appspot.com/oauthcallback", Arrays.asList(
+            "https://www.googleapis.com/auth/userinfo.email",
+            "https://www.googleapis.com/auth/userinfo.profile")).setState("/profile").build();
+    response.sendRedirect(url);
+  }
+ * 
+ * + *

+ * Implementation is not thread-safe. + *

+ * + * @since 1.7 + * @author Yaniv Inbar + */ +public class GoogleBrowserClientRequestUrl extends BrowserClientRequestUrl { + + /** + * Prompt for consent behavior ({@code "auto"} to request auto-approval or {@code "force"} to + * force the approval UI to show) or {@code null} for the default behavior. + */ + @Key("approval_prompt") + private String approvalPrompt; + + /** + * @param clientId client identifier + * @param redirectUri URI that the authorization server directs the resource owner's user-agent + * back to the client after a successful authorization grant + * @param scopes scopes (see {@link #setScopes(Collection)}) + * + * @since 1.15 + */ + public GoogleBrowserClientRequestUrl( + String clientId, String redirectUri, Collection scopes) { + super(GoogleOAuthConstants.AUTHORIZATION_SERVER_URL, clientId); + setRedirectUri(redirectUri); + setScopes(scopes); + } + + /** + * @param clientSecrets OAuth 2.0 client secrets JSON model as specified in + * client_secrets.json file format + * @param redirectUri URI that the authorization server directs the resource owner's user-agent + * back to the client after a successful authorization grant + * @param scopes scopes (see {@link #setScopes(Collection)}) + * + * @since 1.15 + */ + public GoogleBrowserClientRequestUrl( + GoogleClientSecrets clientSecrets, String redirectUri, Collection scopes) { + this(clientSecrets.getDetails().getClientId(), redirectUri, scopes); + } + + /** + * Returns the approval prompt behavior ({@code "auto"} to request auto-approval or + * {@code "force"} to force the approval UI to show) or {@code null} for the default behavior of + * {@code "auto"}. + */ + public final String getApprovalPrompt() { + return approvalPrompt; + } + + /** + * Sets the approval prompt behavior ({@code "auto"} to request auto-approval or {@code "force"} + * to force the approval UI to show) or {@code null} for the default behavior of {@code "auto"}. + * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + public GoogleBrowserClientRequestUrl setApprovalPrompt(String approvalPrompt) { + this.approvalPrompt = approvalPrompt; + return this; + } + + @Override + public GoogleBrowserClientRequestUrl setResponseTypes(Collection responseTypes) { + return (GoogleBrowserClientRequestUrl) super.setResponseTypes(responseTypes); + } + + @Override + public GoogleBrowserClientRequestUrl setRedirectUri(String redirectUri) { + return (GoogleBrowserClientRequestUrl) super.setRedirectUri(redirectUri); + } + + @Override + public GoogleBrowserClientRequestUrl setScopes(Collection scopes) { + Preconditions.checkArgument(scopes.iterator().hasNext()); + return (GoogleBrowserClientRequestUrl) super.setScopes(scopes); + } + + @Override + public GoogleBrowserClientRequestUrl setClientId(String clientId) { + return (GoogleBrowserClientRequestUrl) super.setClientId(clientId); + } + + @Override + public GoogleBrowserClientRequestUrl setState(String state) { + return (GoogleBrowserClientRequestUrl) super.setState(state); + } + + @Override + public GoogleBrowserClientRequestUrl set(String fieldName, Object value) { + return (GoogleBrowserClientRequestUrl) super.set(fieldName, value); + } + + @Override + public GoogleBrowserClientRequestUrl clone() { + return (GoogleBrowserClientRequestUrl) super.clone(); + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleClientSecrets.java b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleClientSecrets.java new file mode 100644 index 00000000..4b42b4ff --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleClientSecrets.java @@ -0,0 +1,192 @@ +/* + * Copyright (c) 2011 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.api.client.googleapis.auth.oauth2; + +import com.google.api.client.json.GenericJson; +import com.google.api.client.json.JsonFactory; +import com.google.api.client.util.Key; +import com.google.api.client.util.Preconditions; + +import java.io.IOException; +import java.io.Reader; +import java.util.List; + +/** + * OAuth 2.0 client secrets JSON model as specified in client_secrets.json + * file format. + * + *

+ * Sample usage: + *

+ * + *
+  static GoogleClientSecrets loadClientSecretsResource(JsonFactory jsonFactory) throws IOException {
+    return GoogleClientSecrets.load(
+        jsonFactory, SampleClass.class.getResourceAsStream("/client_secrets.json"));
+  }
+ * 
+ * + * @since 1.7 + * @author Yaniv Inbar + */ +public final class GoogleClientSecrets extends GenericJson { + + /** Details for installed applications. */ + @Key + private Details installed; + + /** Details for web applications. */ + @Key + private Details web; + + /** Returns the details for installed applications. */ + public Details getInstalled() { + return installed; + } + + /** Sets the details for installed applications. */ + public GoogleClientSecrets setInstalled(Details installed) { + this.installed = installed; + return this; + } + + /** Returns the details for web applications. */ + public Details getWeb() { + return web; + } + + /** Sets the details for web applications. */ + public GoogleClientSecrets setWeb(Details web) { + this.web = web; + return this; + } + + /** Returns the details for either installed or web applications. */ + public Details getDetails() { + // that web or installed, but not both + Preconditions.checkArgument((web == null) != (installed == null)); + return web == null ? installed : web; + } + + /** Client credential details. */ + public static final class Details extends GenericJson { + + /** Client ID. */ + @Key("client_id") + private String clientId; + + /** Client secret. */ + @Key("client_secret") + private String clientSecret; + + /** Redirect URIs. */ + @Key("redirect_uris") + private List redirectUris; + + /** Authorization server URI. */ + @Key("auth_uri") + private String authUri; + + /** Token server URI. */ + @Key("token_uri") + private String tokenUri; + + /** Returns the client ID. */ + public String getClientId() { + return clientId; + } + + /** Sets the client ID. */ + public Details setClientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** Returns the client secret. */ + public String getClientSecret() { + return clientSecret; + } + + /** Sets the client secret. */ + public Details setClientSecret(String clientSecret) { + this.clientSecret = clientSecret; + return this; + } + + /** Returns the redirect URIs. */ + public List getRedirectUris() { + return redirectUris; + } + + /** Sets the redirect URIs. */ + public Details setRedirectUris(List redirectUris) { + this.redirectUris = redirectUris; + return this; + } + + /** Returns the authorization server URI. */ + public String getAuthUri() { + return authUri; + } + + /** Sets the authorization server URI. */ + public Details setAuthUri(String authUri) { + this.authUri = authUri; + return this; + } + + /** Returns the token server URI. */ + public String getTokenUri() { + return tokenUri; + } + + /** Sets the token server URI. */ + public Details setTokenUri(String tokenUri) { + this.tokenUri = tokenUri; + return this; + } + + @Override + public Details set(String fieldName, Object value) { + return (Details) super.set(fieldName, value); + } + + @Override + public Details clone() { + return (Details) super.clone(); + } + } + + @Override + public GoogleClientSecrets set(String fieldName, Object value) { + return (GoogleClientSecrets) super.set(fieldName, value); + } + + @Override + public GoogleClientSecrets clone() { + return (GoogleClientSecrets) super.clone(); + } + + /** + * Loads the {@code client_secrets.json} file from the given reader. + * + * @since 1.15 + */ + public static GoogleClientSecrets load(JsonFactory jsonFactory, Reader reader) + throws IOException { + return jsonFactory.fromReader(reader, GoogleClientSecrets.class); + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleCredential.java b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleCredential.java new file mode 100644 index 00000000..1cd39157 --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleCredential.java @@ -0,0 +1,589 @@ +/* + * Copyright (c) 2011 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.api.client.googleapis.auth.oauth2; + +import com.google.api.client.auth.oauth2.BearerToken; +import com.google.api.client.auth.oauth2.ClientParametersAuthentication; +import com.google.api.client.auth.oauth2.Credential; +import com.google.api.client.auth.oauth2.CredentialRefreshListener; +import com.google.api.client.auth.oauth2.DataStoreCredentialRefreshListener; +import com.google.api.client.auth.oauth2.TokenRequest; +import com.google.api.client.auth.oauth2.TokenResponse; +import com.google.api.client.googleapis.auth.oauth2.GoogleClientSecrets.Details; +import com.google.api.client.http.GenericUrl; +import com.google.api.client.http.HttpExecuteInterceptor; +import com.google.api.client.http.HttpRequestInitializer; +import com.google.api.client.http.HttpTransport; +import com.google.api.client.http.HttpUnsuccessfulResponseHandler; +import com.google.api.client.json.JsonFactory; +import com.google.api.client.json.webtoken.JsonWebSignature; +import com.google.api.client.json.webtoken.JsonWebToken; +import com.google.api.client.util.Beta; +import com.google.api.client.util.Clock; +import com.google.api.client.util.Joiner; +import com.google.api.client.util.PemReader; +import com.google.api.client.util.Preconditions; +import com.google.api.client.util.SecurityUtils; +import com.google.api.client.util.store.DataStoreFactory; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileReader; +import java.io.IOException; +import java.security.GeneralSecurityException; +import java.security.PrivateKey; +import java.security.spec.PKCS8EncodedKeySpec; +import java.util.Collection; +import java.util.Collections; + +/** + * Thread-safe Google-specific implementation of the OAuth 2.0 helper for accessing protected + * resources using an access token, as well as optionally refreshing the access token when it + * expires using a refresh token. + * + *

+ * There are three modes supported: access token only, refresh token flow, and service account flow + * (with or without impersonating a user). + *

+ * + *

+ * If all you have is an access token, you simply pass the {@link TokenResponse} to the credential + * using {@link Builder#setFromTokenResponse(TokenResponse)}. Google credential uses + * {@link BearerToken#authorizationHeaderAccessMethod()} as the access method. Sample usage: + *

+ * + *
+  public static GoogleCredential createCredentialWithAccessTokenOnly(
+      HttpTransport transport, JsonFactory jsonFactory, TokenResponse tokenResponse) {
+    return new GoogleCredential().setFromTokenResponse(tokenResponse);
+  }
+ * 
+ * + *

+ * If you have a refresh token, it is similar to the case of access token only, but you additionally + * need to pass the credential the client secrets using + * {@link Builder#setClientSecrets(GoogleClientSecrets)} or + * {@link Builder#setClientSecrets(String, String)}. Google credential uses + * {@link GoogleOAuthConstants#TOKEN_SERVER_URL} as the token server URL, and + * {@link ClientParametersAuthentication} with the client ID and secret as the client + * authentication. Sample usage: + *

+ * + *
+  public static GoogleCredential createCredentialWithRefreshToken(HttpTransport transport,
+      JsonFactory jsonFactory, GoogleClientSecrets clientSecrets, TokenResponse tokenResponse) {
+    return new GoogleCredential.Builder().setTransport(transport)
+        .setJsonFactory(jsonFactory)
+        .setClientSecrets(clientSecrets)
+        .build()
+        .setFromTokenResponse(tokenResponse);
+  }
+ * 
+ * + *

+ * The service account + * flow is used when you want to access data owned by your client application. You download the + * private key in a {@code .p12} file from the Google APIs Console. Use + * {@link Builder#setServiceAccountId(String)}, + * {@link Builder#setServiceAccountPrivateKeyFromP12File(File)}, and + * {@link Builder#setServiceAccountScopes(Collection)}. Sample usage: + *

+ * + *
+  public static GoogleCredential createCredentialForServiceAccount(
+      HttpTransport transport,
+      JsonFactory jsonFactory,
+      String serviceAccountId,
+      Collection<String> serviceAccountScopes,
+      File p12File) throws GeneralSecurityException, IOException {
+    return new GoogleCredential.Builder().setTransport(transport)
+        .setJsonFactory(jsonFactory)
+        .setServiceAccountId(serviceAccountId)
+        .setServiceAccountScopes(serviceAccountScopes)
+        .setServiceAccountPrivateKeyFromP12File(p12File)
+        .build();
+  }
+ * 
+ * + *

+ * You can also use the service account flow to impersonate a user in a domain that you own. This is + * very similar to the service account flow above, but you additionally call + * {@link Builder#setServiceAccountUser(String)}. Sample usage: + *

+ * + *
+  public static GoogleCredential createCredentialForServiceAccountImpersonateUser(
+      HttpTransport transport,
+      JsonFactory jsonFactory,
+      String serviceAccountId,
+      Collection<String> serviceAccountScopes,
+      File p12File,
+      String serviceAccountUser) throws GeneralSecurityException, IOException {
+    return new GoogleCredential.Builder().setTransport(transport)
+        .setJsonFactory(jsonFactory)
+        .setServiceAccountId(serviceAccountId)
+        .setServiceAccountScopes(serviceAccountScopes)
+        .setServiceAccountPrivateKeyFromP12File(p12File)
+        .setServiceAccountUser(serviceAccountUser)
+        .build();
+  }
+ * 
+ * + *

+ * If you need to persist the access token in a data store, use {@link DataStoreFactory} and + * {@link Builder#addRefreshListener(CredentialRefreshListener)} with + * {@link DataStoreCredentialRefreshListener}. + *

+ * + *

+ * If you have a custom request initializer, request execute interceptor, or unsuccessful response + * handler, take a look at the sample usage for {@link HttpExecuteInterceptor} and + * {@link HttpUnsuccessfulResponseHandler}, which are interfaces that this class also implements. + *

+ * + * @since 1.7 + * @author Yaniv Inbar + */ +public class GoogleCredential extends Credential { + + /** + * Service account ID (typically an e-mail address) or {@code null} if not using the service + * account flow. + */ + private String serviceAccountId; + + /** + * Collection of OAuth scopes to use with the the service account flow or {@code null} if not + * using the service account flow. + */ + private Collection serviceAccountScopes; + + /** + * Private key to use with the the service account flow or {@code null} if not using the service + * account flow. + */ + private PrivateKey serviceAccountPrivateKey; + + /** + * Email address of the user the application is trying to impersonate in the service account flow + * or {@code null} for none or if not using the service account flow. + */ + private String serviceAccountUser; + + /** + * Constructor with the ability to access protected resources, but not refresh tokens. + * + *

+ * To use with the ability to refresh tokens, use {@link Builder}. + *

+ */ + public GoogleCredential() { + this(new Builder()); + } + + /** + * @param builder Google credential builder + * + * @since 1.14 + */ + protected GoogleCredential(Builder builder) { + super(builder); + if (builder.serviceAccountPrivateKey == null) { + Preconditions.checkArgument(builder.serviceAccountId == null + && builder.serviceAccountScopes == null && builder.serviceAccountUser == null); + } else { + serviceAccountId = Preconditions.checkNotNull(builder.serviceAccountId); + serviceAccountScopes = Collections.unmodifiableCollection(builder.serviceAccountScopes); + serviceAccountPrivateKey = builder.serviceAccountPrivateKey; + serviceAccountUser = builder.serviceAccountUser; + } + } + + @Override + public GoogleCredential setAccessToken(String accessToken) { + return (GoogleCredential) super.setAccessToken(accessToken); + } + + @Override + public GoogleCredential setRefreshToken(String refreshToken) { + if (refreshToken != null) { + Preconditions.checkArgument( + getJsonFactory() != null && getTransport() != null && getClientAuthentication() != null, + "Please use the Builder and call setJsonFactory, setTransport and setClientSecrets"); + } + return (GoogleCredential) super.setRefreshToken(refreshToken); + } + + @Override + public GoogleCredential setExpirationTimeMilliseconds(Long expirationTimeMilliseconds) { + return (GoogleCredential) super.setExpirationTimeMilliseconds(expirationTimeMilliseconds); + } + + @Override + public GoogleCredential setExpiresInSeconds(Long expiresIn) { + return (GoogleCredential) super.setExpiresInSeconds(expiresIn); + } + + @Override + public GoogleCredential setFromTokenResponse(TokenResponse tokenResponse) { + return (GoogleCredential) super.setFromTokenResponse(tokenResponse); + } + + @Override + @Beta + protected TokenResponse executeRefreshToken() throws IOException { + if (serviceAccountPrivateKey == null) { + return super.executeRefreshToken(); + } + // service accounts: no refresh token; instead use private key to request new access token + JsonWebSignature.Header header = new JsonWebSignature.Header(); + header.setAlgorithm("RS256"); + header.setType("JWT"); + JsonWebToken.Payload payload = new JsonWebToken.Payload(); + long currentTime = getClock().currentTimeMillis(); + payload.setIssuer(serviceAccountId); + payload.setAudience(getTokenServerEncodedUrl()); + payload.setIssuedAtTimeSeconds(currentTime / 1000); + payload.setExpirationTimeSeconds(currentTime / 1000 + 3600); + payload.setSubject(serviceAccountUser); + payload.put("scope", Joiner.on(' ').join(serviceAccountScopes)); + try { + String assertion = JsonWebSignature.signUsingRsaSha256( + serviceAccountPrivateKey, getJsonFactory(), header, payload); + TokenRequest request = new TokenRequest( + getTransport(), getJsonFactory(), new GenericUrl(getTokenServerEncodedUrl()), + "urn:ietf:params:oauth:grant-type:jwt-bearer"); + request.put("assertion", assertion); + return request.execute(); + } catch (GeneralSecurityException exception) { + IOException e = new IOException(); + e.initCause(exception); + throw e; + } + } + + /** + * {@link Beta}
+ * Returns the service account ID (typically an e-mail address) or {@code null} if not using the + * service account flow. + */ + @Beta + public final String getServiceAccountId() { + return serviceAccountId; + } + + /** + * {@link Beta}
+ * Returns a collection of OAuth scopes to use with the the service account flow or {@code null} + * if not using the service account flow. + */ + @Beta + public final Collection getServiceAccountScopes() { + return serviceAccountScopes; + } + + /** + * {@link Beta}
+ * Returns the space-separated OAuth scopes to use with the the service account flow or + * {@code null} if not using the service account flow. + * + * @since 1.15 + */ + @Beta + public final String getServiceAccountScopesAsString() { + return serviceAccountScopes == null ? null : Joiner.on(' ').join(serviceAccountScopes); + } + + /** + * {@link Beta}
+ * Returns the private key to use with the the service account flow or {@code null} if not using + * the service account flow. + */ + @Beta + public final PrivateKey getServiceAccountPrivateKey() { + return serviceAccountPrivateKey; + } + + /** + * {@link Beta}
+ * Returns the email address of the user the application is trying to impersonate in the service + * account flow or {@code null} for none or if not using the service account flow. + */ + @Beta + public final String getServiceAccountUser() { + return serviceAccountUser; + } + + /** + * Google credential builder. + * + *

+ * Implementation is not thread-safe. + *

+ */ + public static class Builder extends Credential.Builder { + + /** Service account ID (typically an e-mail address) or {@code null} for none. */ + String serviceAccountId; + + /** + * Collection of OAuth scopes to use with the the service account flow or {@code null} for none. + */ + Collection serviceAccountScopes; + + /** Private key to use with the the service account flow or {@code null} for none. */ + PrivateKey serviceAccountPrivateKey; + + /** + * Email address of the user the application is trying to impersonate in the service account + * flow or {@code null} for none. + */ + String serviceAccountUser; + + public Builder() { + super(BearerToken.authorizationHeaderAccessMethod()); + setTokenServerEncodedUrl(GoogleOAuthConstants.TOKEN_SERVER_URL); + } + + @Override + public GoogleCredential build() { + return new GoogleCredential(this); + } + + @Override + public Builder setTransport(HttpTransport transport) { + return (Builder) super.setTransport(transport); + } + + @Override + public Builder setJsonFactory(JsonFactory jsonFactory) { + return (Builder) super.setJsonFactory(jsonFactory); + } + + /** + * @since 1.9 + */ + @Override + public Builder setClock(Clock clock) { + return (Builder) super.setClock(clock); + } + + /** + * Sets the client identifier and secret. + * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + public Builder setClientSecrets(String clientId, String clientSecret) { + setClientAuthentication(new ClientParametersAuthentication(clientId, clientSecret)); + return this; + } + + /** + * Sets the client secrets. + * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + public Builder setClientSecrets(GoogleClientSecrets clientSecrets) { + Details details = clientSecrets.getDetails(); + setClientAuthentication( + new ClientParametersAuthentication(details.getClientId(), details.getClientSecret())); + return this; + } + + /** + * {@link Beta}
+ * Returns the service account ID (typically an e-mail address) or {@code null} for none. + */ + @Beta + public final String getServiceAccountId() { + return serviceAccountId; + } + + /** + * {@link Beta}
+ * Sets the service account ID (typically an e-mail address) or {@code null} for none. + * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + @Beta + public Builder setServiceAccountId(String serviceAccountId) { + this.serviceAccountId = serviceAccountId; + return this; + } + + /** + * {@link Beta}
+ * Returns a collection of OAuth scopes to use with the the service account flow or {@code null} + * for none. + */ + @Beta + public final Collection getServiceAccountScopes() { + return serviceAccountScopes; + } + + /** + * {@link Beta}
+ * Sets the space-separated OAuth scopes to use with the the service account flow or + * {@code null} for none. + * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ * + * @param serviceAccountScopes collection of scopes to be joined by a space separator (or a + * single value containing multiple space-separated scopes) + * @since 1.15 + */ + @Beta + public Builder setServiceAccountScopes(Collection serviceAccountScopes) { + this.serviceAccountScopes = serviceAccountScopes; + return this; + } + + /** + * {@link Beta}
+ * Returns the private key to use with the the service account flow or {@code null} for none. + */ + @Beta + public final PrivateKey getServiceAccountPrivateKey() { + return serviceAccountPrivateKey; + } + + /** + * {@link Beta}
+ * Sets the private key to use with the the service account flow or {@code null} for none. + * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + @Beta + public Builder setServiceAccountPrivateKey(PrivateKey serviceAccountPrivateKey) { + this.serviceAccountPrivateKey = serviceAccountPrivateKey; + return this; + } + + /** + * {@link Beta}
+ * Sets the private key to use with the the service account flow or {@code null} for none. + * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ * + * @param p12File input stream to the p12 file (closed at the end of this method in a finally + * block) + */ + @Beta + public Builder setServiceAccountPrivateKeyFromP12File(File p12File) + throws GeneralSecurityException, IOException { + serviceAccountPrivateKey = SecurityUtils.loadPrivateKeyFromKeyStore( + SecurityUtils.getPkcs12KeyStore(), new FileInputStream(p12File), "notasecret", + "privatekey", "notasecret"); + return this; + } + + /** + * {@link Beta}
+ * Sets the private key to use with the the service account flow or {@code null} for none. + * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ * + * @param pemFile input stream to the PEM file (closed at the end of this method in a finally + * block) + * @since 1.13 + */ + @Beta + public Builder setServiceAccountPrivateKeyFromPemFile(File pemFile) + throws GeneralSecurityException, IOException { + byte[] bytes = PemReader.readFirstSectionAndClose(new FileReader(pemFile), "PRIVATE KEY") + .getBase64DecodedBytes(); + serviceAccountPrivateKey = + SecurityUtils.getRsaKeyFactory().generatePrivate(new PKCS8EncodedKeySpec(bytes)); + return this; + } + + /** + * {@link Beta}
+ * Returns the email address of the user the application is trying to impersonate in the service + * account flow or {@code null} for none. + */ + @Beta + public final String getServiceAccountUser() { + return serviceAccountUser; + } + + /** + * {@link Beta}
+ * Sets the email address of the user the application is trying to impersonate in the service + * account flow or {@code null} for none. + * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + @Beta + public Builder setServiceAccountUser(String serviceAccountUser) { + this.serviceAccountUser = serviceAccountUser; + return this; + } + + @Override + public Builder setRequestInitializer(HttpRequestInitializer requestInitializer) { + return (Builder) super.setRequestInitializer(requestInitializer); + } + + @Override + public Builder addRefreshListener(CredentialRefreshListener refreshListener) { + return (Builder) super.addRefreshListener(refreshListener); + } + + @Override + public Builder setRefreshListeners(Collection refreshListeners) { + return (Builder) super.setRefreshListeners(refreshListeners); + } + + @Override + public Builder setTokenServerUrl(GenericUrl tokenServerUrl) { + return (Builder) super.setTokenServerUrl(tokenServerUrl); + } + + @Override + public Builder setTokenServerEncodedUrl(String tokenServerEncodedUrl) { + return (Builder) super.setTokenServerEncodedUrl(tokenServerEncodedUrl); + } + + @Override + public Builder setClientAuthentication(HttpExecuteInterceptor clientAuthentication) { + return (Builder) super.setClientAuthentication(clientAuthentication); + } + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleIdToken.java b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleIdToken.java new file mode 100644 index 00000000..09619b7d --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleIdToken.java @@ -0,0 +1,325 @@ +/* + * Copyright (c) 2012 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.api.client.googleapis.auth.oauth2; + +import com.google.api.client.auth.openidconnect.IdToken; +import com.google.api.client.json.JsonFactory; +import com.google.api.client.json.webtoken.JsonWebSignature; +import com.google.api.client.util.Beta; +import com.google.api.client.util.Key; + +import java.io.IOException; +import java.security.GeneralSecurityException; +import java.util.List; + +/** + * {@link Beta}
+ * Google ID tokens as specified in Using OAuth 2.0 for Login. + * + *

+ * Google ID tokens contain useful information about the authorized end user. Google ID tokens are + * signed and the signature must be verified using {@link #verify(GoogleIdTokenVerifier)}. + *

+ * + *

+ * Implementation is not thread-safe. + *

+ * + * @since 1.7 + * @author Yaniv Inbar + */ +@SuppressWarnings("javadoc") +@Beta +public class GoogleIdToken extends IdToken { + + /** + * Parses the given ID token string and returns the parsed {@link GoogleIdToken}. + * + * @param jsonFactory JSON factory + * @param idTokenString ID token string + * @return parsed Google ID token + */ + public static GoogleIdToken parse(JsonFactory jsonFactory, String idTokenString) + throws IOException { + JsonWebSignature jws = + JsonWebSignature.parser(jsonFactory).setPayloadClass(Payload.class).parse(idTokenString); + return new GoogleIdToken(jws.getHeader(), (Payload) jws.getPayload(), jws.getSignatureBytes(), + jws.getSignedContentBytes()); + } + + /** + * @param header header + * @param payload payload + * @param signatureBytes bytes of the signature + * @param signedContentBytes bytes of the signature content + */ + public GoogleIdToken( + Header header, Payload payload, byte[] signatureBytes, byte[] signedContentBytes) { + super(header, payload, signatureBytes, signedContentBytes); + } + + /** + * Verifies that this ID token is valid using {@link GoogleIdTokenVerifier#verify(GoogleIdToken)}. + */ + public boolean verify(GoogleIdTokenVerifier verifier) + throws GeneralSecurityException, IOException { + return verifier.verify(this); + } + + @Override + public Payload getPayload() { + return (Payload) super.getPayload(); + } + + /** + * {@link Beta}
+ * Google ID token payload. + */ + @Beta + public static class Payload extends IdToken.Payload { + /** Hosted domain name if asserted user is a domain managed user or {@code null} for none. */ + @Key("hd") + private String hostedDomain; + + /** E-mail of the user or {@code null} if not requested. */ + @Key("email") + private String email; + + /** + * {@code true} if the email is verified. + * TODO(mwan): change the type of the field to Boolean and the handling in + * {@link #getEmailVerified()} accordingly after Google OpenID Connect endpoint fixes the + * type of the field in ID Token. + */ + @Key("email_verified") + private Object emailVerified; + + public Payload() { + } + + /** + * Returns the obfuscated Google user id or {@code null} for none. + * + * @deprecated (scheduled to be removed in 1.18) Use {@link #getSubject()} instead. + */ + @Deprecated + public String getUserId() { + return getSubject(); + } + + /** + * Sets the obfuscated Google user id or {@code null} for none. + * + * @deprecated (scheduled to be removed in 1.18) Use {@link #setSubject(String)} instead. + */ + @Deprecated + public Payload setUserId(String userId) { + return setSubject(userId); + } + + /** + * Returns the client ID of issuee or {@code null} for none. + * + * @deprecated (scheduled to be removed in 1.18) Use {@link #getAuthorizedParty()} instead. + */ + @Deprecated + public String getIssuee() { + return getAuthorizedParty(); + } + + /** + * Sets the client ID of issuee or {@code null} for none. + * + * @deprecated (scheduled to be removed in 1.18) Use {@link #setAuthorizedParty(String)} + * instead. + */ + @Deprecated + public Payload setIssuee(String issuee) { + return setAuthorizedParty(issuee); + } + + /** + * Returns the hosted domain name if asserted user is a domain managed user or {@code null} for + * none. + */ + public String getHostedDomain() { + return hostedDomain; + } + + /** + * Sets the hosted domain name if asserted user is a domain managed user or {@code null} for + * none. + */ + public Payload setHostedDomain(String hostedDomain) { + this.hostedDomain = hostedDomain; + return this; + } + + /** + * Returns the e-mail address of the user or {@code null} if it was not requested. + * + *

+ * Requires the {@code "https://www.googleapis.com/auth/userinfo.email"} scope. + *

+ * + * @since 1.10 + */ + public String getEmail() { + return email; + } + + /** + * Sets the e-mail address of the user or {@code null} if it was not requested. + * + *

+ * Used in conjunction with the {@code "https://www.googleapis.com/auth/userinfo.email"} scope. + *

+ * + * @since 1.10 + */ + public Payload setEmail(String email) { + this.email = email; + return this; + } + + /** + * Returns {@code true} if the users e-mail address has been verified by Google. + * + *

+ * Requires the {@code "https://www.googleapis.com/auth/userinfo.email"} scope. + *

+ * + * @since 1.10 + * + *

+ * Upgrade warning: in prior version 1.16 this method accessed {@code "verified_email"} + * and returns a boolean, but starting with verison 1.17, it now accesses + * {@code "email_verified"} and returns a Boolean. Previously, if this value was not + * specified, this method would return {@code false}, but now it returns {@code null}. + *

+ */ + public Boolean getEmailVerified() { + if (emailVerified == null) { + return null; + } + if (emailVerified instanceof Boolean) { + return (Boolean) emailVerified; + } + + return Boolean.valueOf((String) emailVerified); + } + + /** + * Sets whether the users e-mail address has been verified by Google or not. + * + *

+ * Used in conjunction with the {@code "https://www.googleapis.com/auth/userinfo.email"} scope. + *

+ * + * @since 1.10 + * + *

+ * Upgrade warning: in prior version 1.16 this method accessed {@code "verified_email"} and + * required a boolean parameter, but starting with verison 1.17, it now accesses + * {@code "email_verified"} and requires a Boolean parameter. + *

+ */ + public Payload setEmailVerified(Boolean emailVerified) { + this.emailVerified = emailVerified; + return this; + } + + @Override + public Payload setAuthorizationTimeSeconds(Long authorizationTimeSeconds) { + return (Payload) super.setAuthorizationTimeSeconds(authorizationTimeSeconds); + } + + @Override + public Payload setAuthorizedParty(String authorizedParty) { + return (Payload) super.setAuthorizedParty(authorizedParty); + } + + @Override + public Payload setNonce(String nonce) { + return (Payload) super.setNonce(nonce); + } + + @Override + public Payload setAccessTokenHash(String accessTokenHash) { + return (Payload) super.setAccessTokenHash(accessTokenHash); + } + + @Override + public Payload setClassReference(String classReference) { + return (Payload) super.setClassReference(classReference); + } + + @Override + public Payload setMethodsReferences(List methodsReferences) { + return (Payload) super.setMethodsReferences(methodsReferences); + } + + @Override + public Payload setExpirationTimeSeconds(Long expirationTimeSeconds) { + return (Payload) super.setExpirationTimeSeconds(expirationTimeSeconds); + } + + @Override + public Payload setNotBeforeTimeSeconds(Long notBeforeTimeSeconds) { + return (Payload) super.setNotBeforeTimeSeconds(notBeforeTimeSeconds); + } + + @Override + public Payload setIssuedAtTimeSeconds(Long issuedAtTimeSeconds) { + return (Payload) super.setIssuedAtTimeSeconds(issuedAtTimeSeconds); + } + + @Override + public Payload setIssuer(String issuer) { + return (Payload) super.setIssuer(issuer); + } + + @Override + public Payload setAudience(Object audience) { + return (Payload) super.setAudience(audience); + } + + @Override + public Payload setJwtId(String jwtId) { + return (Payload) super.setJwtId(jwtId); + } + + @Override + public Payload setType(String type) { + return (Payload) super.setType(type); + } + + @Override + public Payload setSubject(String subject) { + return (Payload) super.setSubject(subject); + } + + @Override + public Payload set(String fieldName, Object value) { + return (Payload) super.set(fieldName, value); + } + + @Override + public Payload clone() { + return (Payload) super.clone(); + } + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleIdTokenVerifier.java b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleIdTokenVerifier.java new file mode 100644 index 00000000..eda859d5 --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleIdTokenVerifier.java @@ -0,0 +1,329 @@ +/* + * Copyright (c) 2012 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.api.client.googleapis.auth.oauth2; + +import com.google.api.client.auth.openidconnect.IdToken; +import com.google.api.client.auth.openidconnect.IdTokenVerifier; +import com.google.api.client.http.HttpTransport; +import com.google.api.client.json.JsonFactory; +import com.google.api.client.util.Beta; +import com.google.api.client.util.Clock; +import com.google.api.client.util.Preconditions; + +import java.io.IOException; +import java.security.GeneralSecurityException; +import java.security.PublicKey; +import java.util.Collection; +import java.util.List; + +/** + * {@link Beta}
+ * Thread-safe Google ID token verifier. + * + *

+ * Call {@link #verify(IdToken)} to verify a ID token. Use the constructor + * {@link #GoogleIdTokenVerifier(HttpTransport, JsonFactory)} for the typical simpler case if your + * application has only a single instance of {@link GoogleIdTokenVerifier}. Otherwise, ideally you + * should use {@link #GoogleIdTokenVerifier(GooglePublicKeysManager)} with a shared global instance + * of the {@link GooglePublicKeysManager} since that way the Google public keys are cached. Sample + * usage: + *

+ * + *
+    GoogleIdTokenVerifier verifier = new GoogleIdTokenVerifier.Builder(transport, jsonFactory)
+        .setAudience(Arrays.asList("myClientId"))
+        .build();
+    ...
+    if (!verifier.verify(googleIdToken)) {...}
+ * 
+ * + * @since 1.7 + */ +@Beta +public class GoogleIdTokenVerifier extends IdTokenVerifier { + + /** Google public keys manager. */ + private final GooglePublicKeysManager publicKeys; + + /** + * @param transport HTTP transport + * @param jsonFactory JSON factory + */ + public GoogleIdTokenVerifier(HttpTransport transport, JsonFactory jsonFactory) { + this(new Builder(transport, jsonFactory)); + } + + /** + * @param publicKeys Google public keys manager + * + * @since 1.17 + */ + public GoogleIdTokenVerifier(GooglePublicKeysManager publicKeys) { + this(new Builder(publicKeys)); + } + + /** + * @param builder builder + * + * @since 1.14 + */ + protected GoogleIdTokenVerifier(Builder builder) { + super(builder); + publicKeys = builder.publicKeys; + } + + /** + * Returns the Google public keys manager. + * + * @since 1.17 + */ + public final GooglePublicKeysManager getPublicKeysManager() { + return publicKeys; + } + + /** + * Returns the HTTP transport. + * + * @since 1.14 + */ + public final HttpTransport getTransport() { + return publicKeys.getTransport(); + } + + /** Returns the JSON factory. */ + public final JsonFactory getJsonFactory() { + return publicKeys.getJsonFactory(); + } + + /** + * Returns the public certificates encoded URL. + * + * @since 1.15 + * @deprecated (scheduled to be removed in 1.18) Use {@link #getPublicKeysManager()} and + * {@link GooglePublicKeysManager#getPublicCertsEncodedUrl()} instead. + */ + @Deprecated + public final String getPublicCertsEncodedUrl() { + return publicKeys.getPublicCertsEncodedUrl(); + } + + /** + * Returns the public keys. + * + *

+ * Upgrade warning: in prior version 1.16 it may return {@code null} and not throw any exceptions, + * but starting with version 1.17 it cannot return {@code null} and may throw + * {@link GeneralSecurityException} or {@link IOException}. + *

+ * + * @deprecated (scheduled to be removed in 1.18) Use {@link #getPublicKeysManager()} and + * {@link GooglePublicKeysManager#getPublicCertsEncodedUrl()} instead. + */ + @Deprecated + public final List getPublicKeys() throws GeneralSecurityException, IOException { + return publicKeys.getPublicKeys(); + } + + /** + * Returns the expiration time in milliseconds to be used with {@link Clock#currentTimeMillis()} + * or {@code 0} for none. + * + * @deprecated (scheduled to be removed in 1.18) Use {@link #getPublicKeysManager()} and + * {@link GooglePublicKeysManager#getExpirationTimeMilliseconds()} instead. + */ + @Deprecated + public final long getExpirationTimeMilliseconds() { + return publicKeys.getExpirationTimeMilliseconds(); + } + + /** + * Verifies that the given ID token is valid using the cached public keys. + * + * It verifies: + * + *
    + *
  • The RS256 signature, which uses RSA and SHA-256 based on the public keys downloaded from + * the public certificate endpoint.
  • + *
  • The current time against the issued at and expiration time (allowing for a 5 minute clock + * skew).
  • + *
  • The issuer is {@code "accounts.google.com"}.
  • + *
+ * + * @param googleIdToken Google ID token + * @return {@code true} if verified successfully or {@code false} if failed + */ + public boolean verify(GoogleIdToken googleIdToken) throws GeneralSecurityException, IOException { + // check the payload + if (!super.verify(googleIdToken)) { + return false; + } + // verify signature + for (PublicKey publicKey : publicKeys.getPublicKeys()) { + if (googleIdToken.verifySignature(publicKey)) { + return true; + } + } + return false; + } + + /** + * Verifies that the given ID token is valid using {@link #verify(GoogleIdToken)} and returns the + * ID token if succeeded. + * + * @param idTokenString Google ID token string + * @return Google ID token if verified successfully or {@code null} if failed + * @since 1.9 + */ + public GoogleIdToken verify(String idTokenString) throws GeneralSecurityException, IOException { + GoogleIdToken idToken = GoogleIdToken.parse(getJsonFactory(), idTokenString); + return verify(idToken) ? idToken : null; + } + + /** + * Downloads the public keys from the public certificates endpoint at + * {@link #getPublicCertsEncodedUrl}. + * + *

+ * This method is automatically called if the public keys have not yet been initialized or if the + * expiration time is very close, so normally this doesn't need to be called. Only call this + * method explicitly to force the public keys to be updated. + *

+ * + * @deprecated (scheduled to be removed in 1.18) Use {@link #getPublicKeysManager()} and + * {@link GooglePublicKeysManager#refresh()} instead. + */ + @Deprecated + public GoogleIdTokenVerifier loadPublicCerts() throws GeneralSecurityException, IOException { + publicKeys.refresh(); + return this; + } + + /** + * {@link Beta}
+ * Builder for {@link GoogleIdTokenVerifier}. + * + *

+ * Implementation is not thread-safe. + *

+ * + * @since 1.9 + */ + @Beta + public static class Builder extends IdTokenVerifier.Builder { + + /** Google public keys manager. */ + GooglePublicKeysManager publicKeys; + + /** + * @param transport HTTP transport + * @param jsonFactory JSON factory + */ + public Builder(HttpTransport transport, JsonFactory jsonFactory) { + this(new GooglePublicKeysManager(transport, jsonFactory)); + } + + /** + * @param publicKeys Google public keys manager + * + * @since 1.17 + */ + public Builder(GooglePublicKeysManager publicKeys) { + this.publicKeys = Preconditions.checkNotNull(publicKeys); + setIssuer("accounts.google.com"); + } + + /** Builds a new instance of {@link GoogleIdTokenVerifier}. */ + @Override + public GoogleIdTokenVerifier build() { + return new GoogleIdTokenVerifier(this); + } + + /** + * Returns the Google public keys manager. + * + * @since 1.17 + */ + public final GooglePublicKeysManager getPublicCerts() { + return publicKeys; + } + + /** Returns the HTTP transport. */ + public final HttpTransport getTransport() { + return publicKeys.getTransport(); + } + + /** Returns the JSON factory. */ + public final JsonFactory getJsonFactory() { + return publicKeys.getJsonFactory(); + } + + /** + * Returns the public certificates encoded URL. + * + * @since 1.15 + * @deprecated (scheduled to be removed in 1.18) Use {@link #getPublicCerts()} and + * {@link GooglePublicKeysManager#getPublicCertsEncodedUrl()} instead. + */ + @Deprecated + public final String getPublicCertsEncodedUrl() { + return publicKeys.getPublicCertsEncodedUrl(); + } + + /** + * Sets the public certificates encoded URL. + * + *

+ * The default value is {@link GoogleOAuthConstants#DEFAULT_PUBLIC_CERTS_ENCODED_URL}. + *

+ * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ * + * @since 1.15 + * @deprecated (scheduled to be removed in 1.18) Use + * {@link GooglePublicKeysManager.Builder#setPublicCertsEncodedUrl(String)} instead. + */ + @Deprecated + public Builder setPublicCertsEncodedUrl(String publicKeysEncodedUrl) { + // TODO(yanivi): make publicKeys field final when this method is removed + publicKeys = new GooglePublicKeysManager.Builder( + getTransport(), getJsonFactory()).setPublicCertsEncodedUrl(publicKeysEncodedUrl) + .setClock(publicKeys.getClock()).build(); + return this; + } + + @Override + public Builder setIssuer(String issuer) { + return (Builder) super.setIssuer(issuer); + } + + @Override + public Builder setAudience(Collection audience) { + return (Builder) super.setAudience(audience); + } + + @Override + public Builder setAcceptableTimeSkewSeconds(long acceptableTimeSkewSeconds) { + return (Builder) super.setAcceptableTimeSkewSeconds(acceptableTimeSkewSeconds); + } + + @Override + public Builder setClock(Clock clock) { + return (Builder) super.setClock(clock); + } + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleOAuthConstants.java b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleOAuthConstants.java new file mode 100644 index 00000000..80da89a4 --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleOAuthConstants.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2011 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.api.client.googleapis.auth.oauth2; + +import com.google.api.client.util.Beta; + +/** + * Constants for Google's OAuth 2.0 implementation. + * + * @since 1.7 + * @author Yaniv Inbar + */ +public class GoogleOAuthConstants { + + /** Encoded URL of Google's end-user authorization server. */ + public static final String AUTHORIZATION_SERVER_URL = "https://accounts.google.com/o/oauth2/auth"; + + /** Encoded URL of Google's token server. */ + public static final String TOKEN_SERVER_URL = "https://accounts.google.com/o/oauth2/token"; + + /** + * {@link Beta}
+ * Encoded URL of Google's public certificates. + * + * @since 1.15 + */ + @Beta + public static final String DEFAULT_PUBLIC_CERTS_ENCODED_URL = + "https://www.googleapis.com/oauth2/v1/certs"; + + /** + * Redirect URI to use for an installed application as specified in Using OAuth 2.0 for + * Installed Applications. + */ + public static final String OOB_REDIRECT_URI = "urn:ietf:wg:oauth:2.0:oob"; + + private GoogleOAuthConstants() { + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GooglePublicKeysManager.java b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GooglePublicKeysManager.java new file mode 100644 index 00000000..7b0b848d --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GooglePublicKeysManager.java @@ -0,0 +1,317 @@ +/* + * Copyright (c) 2013 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.api.client.googleapis.auth.oauth2; + +import com.google.api.client.http.GenericUrl; +import com.google.api.client.http.HttpHeaders; +import com.google.api.client.http.HttpResponse; +import com.google.api.client.http.HttpTransport; +import com.google.api.client.json.JsonFactory; +import com.google.api.client.json.JsonParser; +import com.google.api.client.json.JsonToken; +import com.google.api.client.util.Beta; +import com.google.api.client.util.Clock; +import com.google.api.client.util.Preconditions; +import com.google.api.client.util.SecurityUtils; +import com.google.api.client.util.StringUtils; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.security.GeneralSecurityException; +import java.security.PublicKey; +import java.security.cert.CertificateFactory; +import java.security.cert.X509Certificate; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReentrantLock; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * {@link Beta}
+ * Thread-safe Google public keys manager. + * + *

+ * The public keys are loaded from the public certificates endpoint at + * {@link #getPublicCertsEncodedUrl} and cached in this instance. Therefore, for maximum efficiency, + * applications should use a single globally-shared instance of the {@link GooglePublicKeysManager}. + *

+ * + * @since 1.17 + */ +@Beta +public class GooglePublicKeysManager { + + /** Number of milliseconds before expiration time to force a refresh. */ + private static final long REFRESH_SKEW_MILLIS = 300000; + + /** Pattern for the max-age header element of Cache-Control. */ + private static final Pattern MAX_AGE_PATTERN = Pattern.compile("\\s*max-age\\s*=\\s*(\\d+)\\s*"); + + /** JSON factory. */ + private final JsonFactory jsonFactory; + + /** Unmodifiable view of the public keys or {@code null} for none. */ + private List publicKeys; + + /** + * Expiration time in milliseconds to be used with {@link Clock#currentTimeMillis()} or {@code 0} + * for none. + */ + private long expirationTimeMilliseconds; + + /** HTTP transport. */ + private final HttpTransport transport; + + /** Lock on the public keys. */ + private final Lock lock = new ReentrantLock(); + + /** Clock to use for expiration checks. */ + private final Clock clock; + + /** Public certificates encoded URL. */ + private final String publicCertsEncodedUrl; + + /** + * @param transport HTTP transport + * @param jsonFactory JSON factory + */ + public GooglePublicKeysManager(HttpTransport transport, JsonFactory jsonFactory) { + this(new Builder(transport, jsonFactory)); + } + + /** + * @param builder builder + */ + protected GooglePublicKeysManager(Builder builder) { + transport = builder.transport; + jsonFactory = builder.jsonFactory; + clock = builder.clock; + publicCertsEncodedUrl = builder.publicCertsEncodedUrl; + } + + /** Returns the HTTP transport. */ + public final HttpTransport getTransport() { + return transport; + } + + /** Returns the JSON factory. */ + public final JsonFactory getJsonFactory() { + return jsonFactory; + } + + /** Returns the public certificates encoded URL. */ + public final String getPublicCertsEncodedUrl() { + return publicCertsEncodedUrl; + } + + /** Returns the clock. */ + public final Clock getClock() { + return clock; + } + + /** + * Returns an unmodifiable view of the public keys. + * + *

+ * For efficiency, an in-memory cache of the public keys is used here. If this method is called + * for the first time, or the certificates have expired since last time it has been called (or are + * within 5 minutes of expiring), {@link #refresh()} will be called before returning the value. + *

+ */ + public final List getPublicKeys() throws GeneralSecurityException, IOException { + lock.lock(); + try { + if (publicKeys == null + || clock.currentTimeMillis() + REFRESH_SKEW_MILLIS > expirationTimeMilliseconds) { + refresh(); + } + return publicKeys; + } finally { + lock.unlock(); + } + } + + /** + * Returns the expiration time in milliseconds to be used with {@link Clock#currentTimeMillis()} + * or {@code 0} for none. + */ + public final long getExpirationTimeMilliseconds() { + return expirationTimeMilliseconds; + } + + /** + * Forces a refresh of the public certificates downloaded from {@link #getPublicCertsEncodedUrl}. + * + *

+ * This method is automatically called from {@link #getPublicKeys()} if the public keys have not + * yet been initialized or if the expiration time is very close, so normally this doesn't need to + * be called. Only call this method to explicitly force the public keys to be updated. + *

+ */ + public GooglePublicKeysManager refresh() throws GeneralSecurityException, IOException { + lock.lock(); + try { + publicKeys = new ArrayList(); + // HTTP request to public endpoint + CertificateFactory factory = SecurityUtils.getX509CertificateFactory(); + HttpResponse certsResponse = transport.createRequestFactory() + .buildGetRequest(new GenericUrl(publicCertsEncodedUrl)).execute(); + expirationTimeMilliseconds = + clock.currentTimeMillis() + getCacheTimeInSec(certsResponse.getHeaders()) * 1000; + // parse each public key in the JSON response + JsonParser parser = jsonFactory.createJsonParser(certsResponse.getContent()); + JsonToken currentToken = parser.getCurrentToken(); + // token is null at start, so get next token + if (currentToken == null) { + currentToken = parser.nextToken(); + } + Preconditions.checkArgument(currentToken == JsonToken.START_OBJECT); + try { + while (parser.nextToken() != JsonToken.END_OBJECT) { + parser.nextToken(); + String certValue = parser.getText(); + X509Certificate x509Cert = (X509Certificate) factory.generateCertificate( + new ByteArrayInputStream(StringUtils.getBytesUtf8(certValue))); + publicKeys.add(x509Cert.getPublicKey()); + } + publicKeys = Collections.unmodifiableList(publicKeys); + } finally { + parser.close(); + } + return this; + } finally { + lock.unlock(); + } + } + + /** + * Gets the cache time in seconds. "max-age" in "Cache-Control" header and "Age" header are + * considered. + * + * @param httpHeaders the http header of the response + * @return the cache time in seconds or zero if the response should not be cached + */ + long getCacheTimeInSec(HttpHeaders httpHeaders) { + long cacheTimeInSec = 0; + if (httpHeaders.getCacheControl() != null) { + for (String arg : httpHeaders.getCacheControl().split(",")) { + Matcher m = MAX_AGE_PATTERN.matcher(arg); + if (m.matches()) { + cacheTimeInSec = Long.valueOf(m.group(1)); + break; + } + } + } + if (httpHeaders.getAge() != null) { + cacheTimeInSec -= httpHeaders.getAge(); + } + return Math.max(0, cacheTimeInSec); + } + + /** + * {@link Beta}
+ * Builder for {@link GooglePublicKeysManager}. + * + *

+ * Implementation is not thread-safe. + *

+ * + * @since 1.17 + */ + @Beta + public static class Builder { + + /** Clock. */ + Clock clock = Clock.SYSTEM; + + /** HTTP transport. */ + final HttpTransport transport; + + /** JSON factory. */ + final JsonFactory jsonFactory; + + /** Public certificates encoded URL. */ + String publicCertsEncodedUrl = GoogleOAuthConstants.DEFAULT_PUBLIC_CERTS_ENCODED_URL; + + /** + * Returns an instance of a new builder. + * + * @param transport HTTP transport + * @param jsonFactory JSON factory + */ + public Builder(HttpTransport transport, JsonFactory jsonFactory) { + this.transport = Preconditions.checkNotNull(transport); + this.jsonFactory = Preconditions.checkNotNull(jsonFactory); + } + + /** Builds a new instance of {@link GooglePublicKeysManager}. */ + public GooglePublicKeysManager build() { + return new GooglePublicKeysManager(this); + } + + /** Returns the HTTP transport. */ + public final HttpTransport getTransport() { + return transport; + } + + /** Returns the JSON factory. */ + public final JsonFactory getJsonFactory() { + return jsonFactory; + } + + /** Returns the public certificates encoded URL. */ + public final String getPublicCertsEncodedUrl() { + return publicCertsEncodedUrl; + } + + /** + * Sets the public certificates encoded URL. + * + *

+ * The default value is {@link GoogleOAuthConstants#DEFAULT_PUBLIC_CERTS_ENCODED_URL}. + *

+ * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + public Builder setPublicCertsEncodedUrl(String publicCertsEncodedUrl) { + this.publicCertsEncodedUrl = Preconditions.checkNotNull(publicCertsEncodedUrl); + return this; + } + + /** Returns the clock. */ + public final Clock getClock() { + return clock; + } + + /** + * Sets the clock. + * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + public Builder setClock(Clock clock) { + this.clock = Preconditions.checkNotNull(clock); + return this; + } + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleRefreshTokenRequest.java b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleRefreshTokenRequest.java new file mode 100644 index 00000000..f71fd85c --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleRefreshTokenRequest.java @@ -0,0 +1,132 @@ +/* + * Copyright (c) 2011 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.api.client.googleapis.auth.oauth2; + +import com.google.api.client.auth.oauth2.ClientParametersAuthentication; +import com.google.api.client.auth.oauth2.RefreshTokenRequest; +import com.google.api.client.auth.oauth2.TokenResponse; +import com.google.api.client.auth.oauth2.TokenResponseException; +import com.google.api.client.http.GenericUrl; +import com.google.api.client.http.HttpExecuteInterceptor; +import com.google.api.client.http.HttpRequestInitializer; +import com.google.api.client.http.HttpTransport; +import com.google.api.client.json.JsonFactory; + +import java.io.IOException; +import java.util.Collection; + +/** + * Google-specific implementation of the OAuth 2.0 request to refresh an access token using a + * refresh token as specified in Refreshing + * an Access Token. + * + *

+ * Use {@link GoogleCredential} to access protected resources from the resource server using the + * {@link TokenResponse} returned by {@link #execute()}. On error, it will instead throw + * {@link TokenResponseException}. + *

+ * + *

+ * Sample usage: + *

+ * + *
+  static void refreshAccessToken() throws IOException {
+    try {
+      TokenResponse response =
+          new GoogleRefreshTokenRequest(new NetHttpTransport(), new JacksonFactory(),
+              "tGzv3JOkF0XG5Qx2TlKWIA", "s6BhdRkqt3", "7Fjfp0ZBr1KtDRbnfVdmIw").execute();
+      System.out.println("Access token: " + response.getAccessToken());
+    } catch (TokenResponseException e) {
+      if (e.getDetails() != null) {
+        System.err.println("Error: " + e.getDetails().getError());
+        if (e.getDetails().getErrorDescription() != null) {
+          System.err.println(e.getDetails().getErrorDescription());
+        }
+        if (e.getDetails().getErrorUri() != null) {
+          System.err.println(e.getDetails().getErrorUri());
+        }
+      } else {
+        System.err.println(e.getMessage());
+      }
+    }
+  }
+ * 
+ * + *

+ * Implementation is not thread-safe. + *

+ * + * @since 1.7 + * @author Yaniv Inbar + */ +public class GoogleRefreshTokenRequest extends RefreshTokenRequest { + + /** + * @param transport HTTP transport + * @param jsonFactory JSON factory + * @param refreshToken refresh token issued to the client + * @param clientId client identifier issued to the client during the registration process + * @param clientSecret client secret + */ + public GoogleRefreshTokenRequest(HttpTransport transport, JsonFactory jsonFactory, + String refreshToken, String clientId, String clientSecret) { + super(transport, jsonFactory, new GenericUrl(GoogleOAuthConstants.TOKEN_SERVER_URL), + refreshToken); + setClientAuthentication(new ClientParametersAuthentication(clientId, clientSecret)); + } + + @Override + public GoogleRefreshTokenRequest setRequestInitializer( + HttpRequestInitializer requestInitializer) { + return (GoogleRefreshTokenRequest) super.setRequestInitializer(requestInitializer); + } + + @Override + public GoogleRefreshTokenRequest setTokenServerUrl(GenericUrl tokenServerUrl) { + return (GoogleRefreshTokenRequest) super.setTokenServerUrl(tokenServerUrl); + } + + @Override + public GoogleRefreshTokenRequest setScopes(Collection scopes) { + return (GoogleRefreshTokenRequest) super.setScopes(scopes); + } + + @Override + public GoogleRefreshTokenRequest setGrantType(String grantType) { + return (GoogleRefreshTokenRequest) super.setGrantType(grantType); + } + + @Override + public GoogleRefreshTokenRequest setClientAuthentication( + HttpExecuteInterceptor clientAuthentication) { + return (GoogleRefreshTokenRequest) super.setClientAuthentication(clientAuthentication); + } + + @Override + public GoogleRefreshTokenRequest setRefreshToken(String refreshToken) { + return (GoogleRefreshTokenRequest) super.setRefreshToken(refreshToken); + } + + @Override + public GoogleTokenResponse execute() throws IOException { + return executeUnparsed().parseAs(GoogleTokenResponse.class); + } + + @Override + public GoogleRefreshTokenRequest set(String fieldName, Object value) { + return (GoogleRefreshTokenRequest) super.set(fieldName, value); + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleTokenResponse.java b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleTokenResponse.java new file mode 100644 index 00000000..acae998f --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleTokenResponse.java @@ -0,0 +1,118 @@ +/* + * Copyright (c) 2012 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.api.client.googleapis.auth.oauth2; + +import com.google.api.client.auth.oauth2.TokenResponse; +import com.google.api.client.json.JsonFactory; +import com.google.api.client.util.Beta; +import com.google.api.client.util.Key; +import com.google.api.client.util.Preconditions; + +import java.io.IOException; + +/** + * Google OAuth 2.0 JSON model for a successful access token response as specified in Successful Response, including an ID + * token as specified in OpenID + * Connect Session Management 1.0. + * + *

+ * This response object is the result of {@link GoogleAuthorizationCodeTokenRequest#execute()} and + * {@link GoogleRefreshTokenRequest#execute()}. Use {@link #parseIdToken()} to parse the + * {@link GoogleIdToken} and then call {@link GoogleIdTokenVerifier#verify(GoogleIdToken)}. + *

+ * + *

+ * Implementation is not thread-safe. + *

+ * + * @since 1.7 + * @author Yaniv Inbar + */ +public class GoogleTokenResponse extends TokenResponse { + + /** ID token. */ + @Key("id_token") + private String idToken; + + @Override + public GoogleTokenResponse setAccessToken(String accessToken) { + return (GoogleTokenResponse) super.setAccessToken(accessToken); + } + + @Override + public GoogleTokenResponse setTokenType(String tokenType) { + return (GoogleTokenResponse) super.setTokenType(tokenType); + } + + @Override + public GoogleTokenResponse setExpiresInSeconds(Long expiresIn) { + return (GoogleTokenResponse) super.setExpiresInSeconds(expiresIn); + } + + @Override + public GoogleTokenResponse setRefreshToken(String refreshToken) { + return (GoogleTokenResponse) super.setRefreshToken(refreshToken); + } + + @Override + public GoogleTokenResponse setScope(String scope) { + return (GoogleTokenResponse) super.setScope(scope); + } + + /** + * {@link Beta}
+ * Returns the ID token. + */ + @Beta + public final String getIdToken() { + return idToken; + } + + /** + * {@link Beta}
+ * Sets the ID token. + * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + @Beta + public GoogleTokenResponse setIdToken(String idToken) { + this.idToken = Preconditions.checkNotNull(idToken); + return this; + } + + /** + * {@link Beta}
+ * Parses using {@link GoogleIdToken#parse(JsonFactory, String)} based on the {@link #getFactory() + * JSON factory} and {@link #getIdToken() ID token}. + */ + @Beta + public GoogleIdToken parseIdToken() throws IOException { + return GoogleIdToken.parse(getFactory(), getIdToken()); + } + + @Override + public GoogleTokenResponse set(String fieldName, Object value) { + return (GoogleTokenResponse) super.set(fieldName, value); + } + + @Override + public GoogleTokenResponse clone() { + return (GoogleTokenResponse) super.clone(); + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/package-info.java b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/package-info.java new file mode 100644 index 00000000..f92e5ab9 --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/package-info.java @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2011 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. + */ + +/** + * Google's additions to OAuth 2.0 authorization as specified in Using OAuth 2.0 to Access Google + * APIs. + * + *

+ * Before using this library, you must register your application at the APIs Console. The result of this + * registration process is a set of values that are known to both Google and your application, such + * as the "Client ID", "Client Secret", and "Redirect URIs". + *

+ * + *

+ * These are the typical steps of the web server flow based on an authorization code, as specified + * in Using OAuth 2.0 for + * Web Server Applications: + *

    + *
  • Redirect the end user in the browser to the authorization page using + * {@link com.google.api.client.googleapis.auth.oauth2.GoogleAuthorizationCodeRequestUrl} to grant + * your application access to the end user's protected data.
  • + *
  • Process the authorization response using + * {@link com.google.api.client.auth.oauth2.AuthorizationCodeResponseUrl} to parse the authorization + * code.
  • + *
  • Request an access token and possibly a refresh token using + * {@link com.google.api.client.googleapis.auth.oauth2.GoogleAuthorizationCodeTokenRequest}.
  • + *
  • Access protected resources using + * {@link com.google.api.client.googleapis.auth.oauth2.GoogleCredential}. Expired access tokens will + * automatically be refreshed using the refresh token (if applicable).
  • + *
+ *

+ * + *

+ * These are the typical steps of the the browser-based client flow specified in Using OAuth 2.0 for + * Client-side Applications: + *

    + *
  • Redirect the end user in the browser to the authorization page using + * {@link com.google.api.client.googleapis.auth.oauth2.GoogleBrowserClientRequestUrl} to grant your + * browser application access to the end user's protected data.
  • + *
  • Use the Google API Client + * library for JavaScript to process the access token found in the URL fragment at the redirect + * URI registered at the APIs Console. + *
  • + *
+ *

+ * + * @since 1.7 + * @author Yaniv Inbar + */ + +package com.google.api.client.googleapis.auth.oauth2; + diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/batch/BatchCallback.java b/google-api-client/src/main/java/com/google/api/client/googleapis/batch/BatchCallback.java new file mode 100644 index 00000000..f7f31f70 --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/batch/BatchCallback.java @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2012 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.api.client.googleapis.batch; + +import com.google.api.client.http.HttpHeaders; + +import java.io.IOException; + +/** + * Callback for an individual batch response. + * + *

+ * Sample use: + *

+ * + *
+   batch.queue(volumesList.buildHttpRequest(), Volumes.class, GoogleJsonErrorContainer.class,
+       new BatchCallback<Volumes, GoogleJsonErrorContainer>() {
+
+     public void onSuccess(Volumes volumes, HttpHeaders responseHeaders) {
+       log("Success");
+       printVolumes(volumes.getItems());
+     }
+
+     public void onFailure(GoogleJsonErrorContainer e, HttpHeaders responseHeaders) {
+       log(e.getError().getMessage());
+     }
+   });
+ * 
+ * + * @param Type of the data model class + * @param Type of the error data model class + * @since 1.9 + * @author rmistry@google.com (Ravi Mistry) + */ +public interface BatchCallback { + + /** + * Called if the individual batch response is successful. + * + * @param t instance of the parsed data model class + * @param responseHeaders Headers of the batch response + */ + void onSuccess(T t, HttpHeaders responseHeaders) throws IOException; + + /** + * Called if the individual batch response is unsuccessful. + * + * @param e instance of data class representing the error response content + * @param responseHeaders Headers of the batch response + */ + void onFailure(E e, HttpHeaders responseHeaders) throws IOException; +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/batch/BatchRequest.java b/google-api-client/src/main/java/com/google/api/client/googleapis/batch/BatchRequest.java new file mode 100644 index 00000000..3958b64e --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/batch/BatchRequest.java @@ -0,0 +1,306 @@ +/* + * Copyright (c) 2012 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.api.client.googleapis.batch; + +import com.google.api.client.http.BackOffPolicy; +import com.google.api.client.http.GenericUrl; +import com.google.api.client.http.HttpBackOffUnsuccessfulResponseHandler; +import com.google.api.client.http.HttpExecuteInterceptor; +import com.google.api.client.http.HttpHeaders; +import com.google.api.client.http.HttpRequest; +import com.google.api.client.http.HttpRequestFactory; +import com.google.api.client.http.HttpRequestInitializer; +import com.google.api.client.http.HttpResponse; +import com.google.api.client.http.HttpTransport; +import com.google.api.client.http.HttpUnsuccessfulResponseHandler; +import com.google.api.client.http.MultipartContent; +import com.google.api.client.util.Preconditions; +import com.google.api.client.util.Sleeper; + +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.List; + +/** + * An instance of this class represents a single batch of requests. + * + *

+ * Sample use: + *

+ * + *
+   BatchRequest batch = new BatchRequest(transport, httpRequestInitializer);
+   batch.queue(volumesList, Volumes.class, GoogleJsonErrorContainer.class,
+       new BatchCallback<Volumes, GoogleJsonErrorContainer>() {
+
+     public void onSuccess(Volumes volumes, HttpHeaders responseHeaders) {
+       log("Success");
+       printVolumes(volumes.getItems());
+     }
+
+     public void onFailure(GoogleJsonErrorContainer e, HttpHeaders responseHeaders) {
+       log(e.getError().getMessage());
+     }
+   });
+   batch.queue(volumesList, Volumes.class, GoogleJsonErrorContainer.class,
+       new BatchCallback<Volumes, GoogleJsonErrorContainer>() {
+
+     public void onSuccess(Volumes volumes, HttpHeaders responseHeaders) {
+       log("Success");
+       printVolumes(volumes.getItems());
+     }
+
+     public void onFailure(GoogleJsonErrorContainer e, HttpHeaders responseHeaders) {
+       log(e.getError().getMessage());
+     }
+   });
+   batch.execute();
+ * 
+ * + *

+ * The content of each individual response is stored in memory. There is thus a potential of + * encountering an {@link OutOfMemoryError} for very large responses. + *

+ * + *

+ * Redirects are currently not followed in {@link BatchRequest}. + *

+ * + *

+ * Implementation is not thread-safe. + *

+ * + *

+ * Note: When setting an {@link HttpUnsuccessfulResponseHandler} by calling to + * {@link HttpRequest#setUnsuccessfulResponseHandler}, the handler is called for each unsuccessful + * part. As a result it's not recommended to use {@link HttpBackOffUnsuccessfulResponseHandler} on a + * batch request, since the back-off policy is invoked for each unsuccessful part. + *

+ * + * @since 1.9 + * @author rmistry@google.com (Ravi Mistry) + */ +@SuppressWarnings("deprecation") +public final class BatchRequest { + + /** The URL where batch requests are sent. */ + private GenericUrl batchUrl = new GenericUrl("https://www.googleapis.com/batch"); + + /** The request factory for connections to the server. */ + private final HttpRequestFactory requestFactory; + + /** The list of queued request infos. */ + List> requestInfos = new ArrayList>(); + + /** Sleeper. */ + private Sleeper sleeper = Sleeper.DEFAULT; + + /** A container class used to hold callbacks and data classes. */ + static class RequestInfo { + final BatchCallback callback; + final Class dataClass; + final Class errorClass; + final HttpRequest request; + + RequestInfo(BatchCallback callback, Class dataClass, Class errorClass, + HttpRequest request) { + this.callback = callback; + this.dataClass = dataClass; + this.errorClass = errorClass; + this.request = request; + } + } + + /** + * Construct the {@link BatchRequest}. + * + * @param transport The transport to use for requests + * @param httpRequestInitializer The initializer to use when creating an {@link HttpRequest} or + * {@code null} for none + */ + public BatchRequest(HttpTransport transport, HttpRequestInitializer httpRequestInitializer) { + this.requestFactory = httpRequestInitializer == null + ? transport.createRequestFactory() : transport.createRequestFactory(httpRequestInitializer); + } + + /** + * Sets the URL that will be hit when {@link #execute()} is called. The default value is + * {@code https://www.googleapis.com/batch}. + */ + public BatchRequest setBatchUrl(GenericUrl batchUrl) { + this.batchUrl = batchUrl; + return this; + } + + /** Returns the URL that will be hit when {@link #execute()} is called. */ + public GenericUrl getBatchUrl() { + return batchUrl; + } + + /** + * Returns the sleeper. + * + * @since 1.15 + */ + public Sleeper getSleeper() { + return sleeper; + } + + /** + * Sets the sleeper. The default value is {@link Sleeper#DEFAULT}. + * + * @since 1.15 + */ + public BatchRequest setSleeper(Sleeper sleeper) { + this.sleeper = Preconditions.checkNotNull(sleeper); + return this; + } + + /** + * Queues the specified {@link HttpRequest} for batched execution. Batched requests are executed + * when {@link #execute()} is called. + * + * @param destination class type + * @param error class type + * @param httpRequest HTTP Request + * @param dataClass Data class the response will be parsed into or {@code Void.class} to ignore + * the content + * @param errorClass Data class the unsuccessful response will be parsed into or + * {@code Void.class} to ignore the content + * @param callback Batch Callback + * @return this Batch request + * @throws IOException If building the HTTP Request fails + */ + public BatchRequest queue(HttpRequest httpRequest, Class dataClass, Class errorClass, + BatchCallback callback) throws IOException { + Preconditions.checkNotNull(httpRequest); + // TODO(rmistry): Add BatchUnparsedCallback with onResponse(InputStream content, HttpHeaders). + Preconditions.checkNotNull(callback); + Preconditions.checkNotNull(dataClass); + Preconditions.checkNotNull(errorClass); + + requestInfos.add(new RequestInfo(callback, dataClass, errorClass, httpRequest)); + return this; + } + + /** + * Returns the number of queued requests in this batch request. + */ + public int size() { + return requestInfos.size(); + } + + /** + * Executes all queued HTTP requests in a single call, parses the responses and invokes callbacks. + * + *

+ * Calling {@link #execute()} executes and clears the queued requests. This means that the + * {@link BatchRequest} object can be reused to {@link #queue} and {@link #execute()} requests + * again. + *

+ */ + public void execute() throws IOException { + boolean retryAllowed; + Preconditions.checkState(!requestInfos.isEmpty()); + HttpRequest batchRequest = requestFactory.buildPostRequest(this.batchUrl, null); + // NOTE: batch does not support gzip encoding + HttpExecuteInterceptor originalInterceptor = batchRequest.getInterceptor(); + batchRequest.setInterceptor(new BatchInterceptor(originalInterceptor)); + int retriesRemaining = batchRequest.getNumberOfRetries(); + BackOffPolicy backOffPolicy = batchRequest.getBackOffPolicy(); + + if (backOffPolicy != null) { + // Reset the BackOffPolicy at the start of each execute. + backOffPolicy.reset(); + } + + do { + retryAllowed = retriesRemaining > 0; + MultipartContent batchContent = new MultipartContent(); + batchContent.getMediaType().setSubType("mixed"); + int contentId = 1; + for (RequestInfo requestInfo : requestInfos) { + batchContent.addPart(new MultipartContent.Part( + new HttpHeaders().setAcceptEncoding(null).set("Content-ID", contentId++), + new HttpRequestContent(requestInfo.request))); + } + batchRequest.setContent(batchContent); + HttpResponse response = batchRequest.execute(); + BatchUnparsedResponse batchResponse; + try { + // Find the boundary from the Content-Type header. + String boundary = "--" + response.getMediaType().getParameter("boundary"); + + // Parse the content stream. + InputStream contentStream = response.getContent(); + batchResponse = + new BatchUnparsedResponse(contentStream, boundary, requestInfos, retryAllowed); + + while (batchResponse.hasNext) { + batchResponse.parseNextResponse(); + } + } finally { + response.disconnect(); + } + + List> unsuccessfulRequestInfos = batchResponse.unsuccessfulRequestInfos; + if (!unsuccessfulRequestInfos.isEmpty()) { + requestInfos = unsuccessfulRequestInfos; + // backOff if required. + if (batchResponse.backOffRequired && backOffPolicy != null) { + long backOffTime = backOffPolicy.getNextBackOffMillis(); + if (backOffTime != BackOffPolicy.STOP) { + try { + sleeper.sleep(backOffTime); + } catch (InterruptedException exception) { + // ignore + } + } + } + } else { + break; + } + retriesRemaining--; + } while (retryAllowed); + requestInfos.clear(); + } + + /** + * Batch HTTP request execute interceptor that loops through all individual HTTP requests and runs + * their interceptors. + */ + class BatchInterceptor implements HttpExecuteInterceptor { + + private HttpExecuteInterceptor originalInterceptor; + + BatchInterceptor(HttpExecuteInterceptor originalInterceptor) { + this.originalInterceptor = originalInterceptor; + } + + public void intercept(HttpRequest batchRequest) throws IOException { + if (originalInterceptor != null) { + originalInterceptor.intercept(batchRequest); + } + for (RequestInfo requestInfo : requestInfos) { + HttpExecuteInterceptor interceptor = requestInfo.request.getInterceptor(); + if (interceptor != null) { + interceptor.intercept(requestInfo.request); + } + } + } + + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/batch/BatchUnparsedResponse.java b/google-api-client/src/main/java/com/google/api/client/googleapis/batch/BatchUnparsedResponse.java new file mode 100644 index 00000000..4f83dcba --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/batch/BatchUnparsedResponse.java @@ -0,0 +1,344 @@ +/* + * Copyright (c) 2012 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.api.client.googleapis.batch; + +import com.google.api.client.googleapis.batch.BatchRequest.RequestInfo; +import com.google.api.client.http.BackOffPolicy; +import com.google.api.client.http.GenericUrl; +import com.google.api.client.http.HttpContent; +import com.google.api.client.http.HttpHeaders; +import com.google.api.client.http.HttpRequest; +import com.google.api.client.http.HttpResponse; +import com.google.api.client.http.HttpStatusCodes; +import com.google.api.client.http.HttpTransport; +import com.google.api.client.http.HttpUnsuccessfulResponseHandler; +import com.google.api.client.http.LowLevelHttpRequest; +import com.google.api.client.http.LowLevelHttpResponse; +import com.google.api.client.util.StringUtils; + +import java.io.BufferedReader; +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.util.ArrayList; +import java.util.List; + + +/** + * The unparsed batch response. + * + * @author rmistry@google.com (Ravi Mistry) + */ +@SuppressWarnings("deprecation") +final class BatchUnparsedResponse { + + /** The boundary used in the batch response to separate individual responses. */ + private final String boundary; + + /** List of request infos. */ + private final List> requestInfos; + + /** Buffers characters from the input stream. */ + private final BufferedReader bufferedReader; + + /** Determines whether there are any responses to be parsed. */ + boolean hasNext = true; + + /** List of unsuccessful HTTP requests that can be retried. */ + List> unsuccessfulRequestInfos = new ArrayList>(); + + /** Indicates if back off is required before the next retry. */ + boolean backOffRequired; + + /** The content Id the response is currently at. */ + private int contentId = 0; + + /** Whether unsuccessful HTTP requests can be retried. */ + private final boolean retryAllowed; + + /** + * Construct the {@link BatchUnparsedResponse}. + * + * @param inputStream Input stream that contains the batch response + * @param boundary The boundary of the batch response + * @param requestInfos List of request infos + * @param retryAllowed Whether unsuccessful HTTP requests can be retried + */ + BatchUnparsedResponse(InputStream inputStream, String boundary, + List> requestInfos, boolean retryAllowed) + throws IOException { + this.boundary = boundary; + this.requestInfos = requestInfos; + this.retryAllowed = retryAllowed; + this.bufferedReader = new BufferedReader(new InputStreamReader(inputStream, "UTF-8")); + // First line in the stream will be the boundary. + checkForFinalBoundary(bufferedReader.readLine()); + } + + /** + * Parses the next response in the queue if a data class and a {@link BatchCallback} is specified. + * + *

+ * This method closes the input stream if there are no more individual responses left. + *

+ */ + void parseNextResponse() throws IOException { + contentId++; + + // Extract the outer headers. + String line; + while ((line = bufferedReader.readLine()) != null && !line.equals("")) { + // Do nothing. + } + + // Extract the status code. + String statusLine = bufferedReader.readLine(); + String[] statusParts = statusLine.split(" "); + int statusCode = Integer.parseInt(statusParts[1]); + + // Extract and store the inner headers. + // TODO(rmistry): Handle inner headers that span multiple lines. More details here: + // http://tools.ietf.org/html/rfc2616#section-2.2 + List headerNames = new ArrayList(); + List headerValues = new ArrayList(); + while ((line = bufferedReader.readLine()) != null && !line.equals("")) { + String[] headerParts = line.split(": ", 2); + headerNames.add(headerParts[0]); + headerValues.add(headerParts[1]); + } + + // Extract the response part content. + // TODO(rmistry): Investigate a way to use the stream directly. This is to reduce the chance of + // an OutOfMemoryError and will make parsing more efficient. + StringBuilder partContent = new StringBuilder(); + while ((line = bufferedReader.readLine()) != null && !line.startsWith(boundary)) { + partContent.append(line); + } + + HttpResponse response = + getFakeResponse(statusCode, partContent.toString(), headerNames, headerValues); + + parseAndCallback(requestInfos.get(contentId - 1), statusCode, contentId, response); + + checkForFinalBoundary(line); + } + + /** + * Parse an object into a new instance of the data class using + * {@link HttpResponse#parseAs(java.lang.reflect.Type)}. + */ + private void parseAndCallback( + RequestInfo requestInfo, int statusCode, int contentID, HttpResponse response) + throws IOException { + BatchCallback callback = requestInfo.callback; + + HttpHeaders responseHeaders = response.getHeaders(); + HttpUnsuccessfulResponseHandler unsuccessfulResponseHandler = + requestInfo.request.getUnsuccessfulResponseHandler(); + BackOffPolicy backOffPolicy = requestInfo.request.getBackOffPolicy(); + + // Reset backOff flag. + backOffRequired = false; + + if (HttpStatusCodes.isSuccess(statusCode)) { + if (callback == null) { + // No point in parsing if there is no callback. + return; + } + T parsed = getParsedDataClass( + requestInfo.dataClass, response, requestInfo, responseHeaders.getContentType()); + callback.onSuccess(parsed, responseHeaders); + } else { + HttpContent content = requestInfo.request.getContent(); + boolean retrySupported = retryAllowed && (content == null || content.retrySupported()); + boolean errorHandled = false; + boolean redirectRequest = false; + if (unsuccessfulResponseHandler != null) { + errorHandled = unsuccessfulResponseHandler.handleResponse( + requestInfo.request, response, retrySupported); + } + if (!errorHandled) { + if (requestInfo.request.handleRedirect(response.getStatusCode(), response.getHeaders())) { + redirectRequest = true; + } else if (retrySupported && backOffPolicy != null + && backOffPolicy.isBackOffRequired(response.getStatusCode())) { + backOffRequired = true; + } + } + if (retrySupported && (errorHandled || backOffRequired || redirectRequest)) { + unsuccessfulRequestInfos.add(requestInfo); + } else { + if (callback == null) { + // No point in parsing if there is no callback. + return; + } + E parsed = getParsedDataClass( + requestInfo.errorClass, response, requestInfo, responseHeaders.getContentType()); + callback.onFailure(parsed, responseHeaders); + } + } + } + + private A getParsedDataClass( + Class dataClass, HttpResponse response, RequestInfo requestInfo, String contentType) + throws IOException { + // TODO(yanivi): Remove the HttpResponse reference and directly parse the InputStream + if (dataClass == Void.class) { + return null; + } + return requestInfo.request.getParser().parseAndClose( + response.getContent(), response.getContentCharset(), dataClass); + } + + /** Create a fake HTTP response object populated with the partContent and the statusCode. */ + private HttpResponse getFakeResponse(final int statusCode, final String partContent, + List headerNames, List headerValues) + throws IOException { + HttpRequest request = new FakeResponseHttpTransport( + statusCode, partContent, headerNames, headerValues).createRequestFactory() + .buildPostRequest(new GenericUrl("http://google.com/"), null); + request.setLoggingEnabled(false); + request.setThrowExceptionOnExecuteError(false); + return request.execute(); + } + + /** + * If the boundary line consists of the boundary and "--" then there are no more individual + * responses left to be parsed and the input stream is closed. + */ + private void checkForFinalBoundary(String boundaryLine) throws IOException { + if (boundaryLine.equals(boundary + "--")) { + hasNext = false; + bufferedReader.close(); + } + } + + private static class FakeResponseHttpTransport extends HttpTransport { + + private int statusCode; + private String partContent; + private List headerNames; + private List headerValues; + + FakeResponseHttpTransport( + int statusCode, String partContent, List headerNames, List headerValues) { + super(); + this.statusCode = statusCode; + this.partContent = partContent; + this.headerNames = headerNames; + this.headerValues = headerValues; + } + + @Override + protected LowLevelHttpRequest buildRequest(String method, String url) { + return new FakeLowLevelHttpRequest(partContent, statusCode, headerNames, headerValues); + } + } + + private static class FakeLowLevelHttpRequest extends LowLevelHttpRequest { + + // TODO(rmistry): Read in partContent as bytes instead of String for efficiency. + private String partContent; + private int statusCode; + private List headerNames; + private List headerValues; + + FakeLowLevelHttpRequest( + String partContent, int statusCode, List headerNames, List headerValues) { + this.partContent = partContent; + this.statusCode = statusCode; + this.headerNames = headerNames; + this.headerValues = headerValues; + } + + @Override + public void addHeader(String name, String value) { + } + + @Override + public LowLevelHttpResponse execute() { + FakeLowLevelHttpResponse response = new FakeLowLevelHttpResponse(new ByteArrayInputStream( + StringUtils.getBytesUtf8(partContent)), statusCode, headerNames, headerValues); + return response; + } + } + + private static class FakeLowLevelHttpResponse extends LowLevelHttpResponse { + + private InputStream partContent; + private int statusCode; + private List headerNames = new ArrayList(); + private List headerValues = new ArrayList(); + + FakeLowLevelHttpResponse(InputStream partContent, int statusCode, List headerNames, + List headerValues) { + this.partContent = partContent; + this.statusCode = statusCode; + this.headerNames = headerNames; + this.headerValues = headerValues; + } + + @Override + public InputStream getContent() { + return partContent; + } + + @Override + public int getStatusCode() { + return statusCode; + } + + @Override + public String getContentEncoding() { + return null; + } + + @Override + public long getContentLength() { + return 0; + } + + @Override + public String getContentType() { + return null; + } + + @Override + public String getStatusLine() { + return null; + } + + @Override + public String getReasonPhrase() { + return null; + } + + @Override + public int getHeaderCount() { + return headerNames.size(); + } + + @Override + public String getHeaderName(int index) { + return headerNames.get(index); + } + + @Override + public String getHeaderValue(int index) { + return headerValues.get(index); + } + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/batch/HttpRequestContent.java b/google-api-client/src/main/java/com/google/api/client/googleapis/batch/HttpRequestContent.java new file mode 100644 index 00000000..654d8fbd --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/batch/HttpRequestContent.java @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2013 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.api.client.googleapis.batch; + +import com.google.api.client.http.AbstractHttpContent; +import com.google.api.client.http.HttpContent; +import com.google.api.client.http.HttpHeaders; +import com.google.api.client.http.HttpRequest; + +import java.io.IOException; +import java.io.OutputStream; +import java.io.OutputStreamWriter; +import java.io.Writer; + +/** + * HTTP request wrapped as a content part of a multipart/mixed request. + * + * @author Yaniv Inbar + */ +class HttpRequestContent extends AbstractHttpContent { + + static final String NEWLINE = "\r\n"; + + /** HTTP request. */ + private final HttpRequest request; + + HttpRequestContent(HttpRequest request) { + super("application/http"); + this.request = request; + } + + public void writeTo(OutputStream out) throws IOException { + Writer writer = new OutputStreamWriter(out, getCharset()); + // write method and URL + writer.write(request.getRequestMethod()); + writer.write(" "); + writer.write(request.getUrl().build()); + writer.write(NEWLINE); + // write headers + HttpHeaders headers = new HttpHeaders(); + headers.fromHttpHeaders(request.getHeaders()); + headers.setAcceptEncoding(null).setUserAgent(null) + .setContentEncoding(null).setContentType(null).setContentLength(null); + // analyze the content + HttpContent content = request.getContent(); + if (content != null) { + headers.setContentType(content.getType()); + // NOTE: batch does not support gzip encoding + long contentLength = content.getLength(); + if (contentLength != -1) { + headers.setContentLength(contentLength); + } + } + HttpHeaders.serializeHeadersForMultipartRequests(headers, null, null, writer); + // write content + if (content != null) { + writer.write(NEWLINE); + writer.flush(); + content.writeTo(out); + } + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/batch/json/JsonBatchCallback.java b/google-api-client/src/main/java/com/google/api/client/googleapis/batch/json/JsonBatchCallback.java new file mode 100644 index 00000000..65bea34f --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/batch/json/JsonBatchCallback.java @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2012 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.api.client.googleapis.batch.json; + +import com.google.api.client.googleapis.batch.BatchCallback; +import com.google.api.client.googleapis.json.GoogleJsonError; +import com.google.api.client.googleapis.json.GoogleJsonErrorContainer; +import com.google.api.client.http.HttpHeaders; + +import java.io.IOException; + +/** + * Callback for an individual batch JSON response. + * + *

+ * Sample use: + *

+ * + *
+   batch.queue(volumesList.buildHttpRequest(), Volumes.class, GoogleJsonErrorContainer.class,
+       new JsonBatchCallback<Volumes>() {
+
+     public void onSuccess(Volumes volumes, HttpHeaders responseHeaders) {
+       log("Success");
+       printVolumes(volumes.getItems());
+     }
+
+     public void onFailure(GoogleJsonError e, HttpHeaders responseHeaders) {
+       log(e.getMessage());
+     }
+   });
+ * 
+ * + * @param Type of the data model class + * @since 1.9 + * @author rmistry@google.com (Ravi Mistry) + */ +public abstract class JsonBatchCallback implements BatchCallback { + + public final void onFailure(GoogleJsonErrorContainer e, HttpHeaders responseHeaders) + throws IOException { + onFailure(e.getError(), responseHeaders); + } + + /** + * Called if the individual batch response is unsuccessful. + * + * @param e Google JSON error response content + * @param responseHeaders Headers of the batch response + */ + public abstract void onFailure(GoogleJsonError e, HttpHeaders responseHeaders) + throws IOException; +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/batch/json/package-info.java b/google-api-client/src/main/java/com/google/api/client/googleapis/batch/json/package-info.java new file mode 100644 index 00000000..33566b16 --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/batch/json/package-info.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2012 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. + */ + +/** + * JSON batch for Google API's. + * + * @since 1.9 + * @author Ravi Mistry + */ + +package com.google.api.client.googleapis.batch.json; + diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/batch/package-info.java b/google-api-client/src/main/java/com/google/api/client/googleapis/batch/package-info.java new file mode 100644 index 00000000..51f4087d --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/batch/package-info.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2012 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. + */ + +/** + * Batch for Google API's. + * + * @since 1.9 + * @author Ravi Mistry + */ + +package com.google.api.client.googleapis.batch; + diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/compute/ComputeCredential.java b/google-api-client/src/main/java/com/google/api/client/googleapis/compute/ComputeCredential.java new file mode 100644 index 00000000..a1f9c3a4 --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/compute/ComputeCredential.java @@ -0,0 +1,163 @@ +/* + * Copyright (c) 2013 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.api.client.googleapis.compute; + +import com.google.api.client.auth.oauth2.BearerToken; +import com.google.api.client.auth.oauth2.Credential; +import com.google.api.client.auth.oauth2.CredentialRefreshListener; +import com.google.api.client.auth.oauth2.TokenResponse; +import com.google.api.client.http.GenericUrl; +import com.google.api.client.http.HttpExecuteInterceptor; +import com.google.api.client.http.HttpRequest; +import com.google.api.client.http.HttpRequestInitializer; +import com.google.api.client.http.HttpTransport; +import com.google.api.client.json.JsonFactory; +import com.google.api.client.json.JsonObjectParser; +import com.google.api.client.util.Beta; +import com.google.api.client.util.Clock; +import com.google.api.client.util.Preconditions; + +import java.io.IOException; +import java.util.Collection; + +/** + * {@link Beta}
+ * Google Compute Engine service accounts OAuth 2.0 credential based on
Authenticating from Google + * Compute Engine. + * + *

+ * Sample usage: + *

+ * + *
+  public static HttpRequestFactory createRequestFactory(
+      HttpTransport transport, JsonFactory jsonFactory) {
+    return transport.createRequestFactory(new GoogleComputeCredential(transport, jsonFactory));
+  }
+ * 
+ * + *

+ * Implementation is immutable and thread-safe. + *

+ * + * @since 1.15 + * @author Yaniv Inbar + */ +@Beta +public class ComputeCredential extends Credential { + + /** Metadata Service Account token server encoded URL. */ + public static final String TOKEN_SERVER_ENCODED_URL = + "http://metadata/computeMetadata/v1beta1/instance/service-accounts/default/token"; + + /** + * @param transport HTTP transport + * @param jsonFactory JSON factory + */ + public ComputeCredential(HttpTransport transport, JsonFactory jsonFactory) { + this(new Builder(transport, jsonFactory)); + } + + /** + * @param builder builder + */ + protected ComputeCredential(Builder builder) { + super(builder); + } + + @Override + protected TokenResponse executeRefreshToken() throws IOException { + GenericUrl tokenUrl = new GenericUrl(getTokenServerEncodedUrl()); + HttpRequest request = getTransport().createRequestFactory().buildGetRequest(tokenUrl); + request.setParser(new JsonObjectParser(getJsonFactory())); + return request.execute().parseAs(TokenResponse.class); + } + + /** + * {@link Beta}
+ * Google Compute Engine credential builder. + * + *

+ * Implementation is not thread-safe. + *

+ */ + @Beta + public static class Builder extends Credential.Builder { + + /** + * @param transport HTTP transport + * @param jsonFactory JSON factory + */ + public Builder(HttpTransport transport, JsonFactory jsonFactory) { + super(BearerToken.authorizationHeaderAccessMethod()); + setTransport(transport); + setJsonFactory(jsonFactory); + setTokenServerEncodedUrl(TOKEN_SERVER_ENCODED_URL); + } + + @Override + public ComputeCredential build() { + return new ComputeCredential(this); + } + + @Override + public Builder setTransport(HttpTransport transport) { + return (Builder) super.setTransport(Preconditions.checkNotNull(transport)); + } + + @Override + public Builder setClock(Clock clock) { + return (Builder) super.setClock(clock); + } + + @Override + public Builder setJsonFactory(JsonFactory jsonFactory) { + return (Builder) super.setJsonFactory(Preconditions.checkNotNull(jsonFactory)); + } + + @Override + public Builder setTokenServerUrl(GenericUrl tokenServerUrl) { + return (Builder) super.setTokenServerUrl(Preconditions.checkNotNull(tokenServerUrl)); + } + + @Override + public Builder setTokenServerEncodedUrl(String tokenServerEncodedUrl) { + return (Builder) super.setTokenServerEncodedUrl( + Preconditions.checkNotNull(tokenServerEncodedUrl)); + } + + @Override + public Builder setClientAuthentication(HttpExecuteInterceptor clientAuthentication) { + Preconditions.checkArgument(clientAuthentication == null); + return this; + } + + @Override + public Builder setRequestInitializer(HttpRequestInitializer requestInitializer) { + return (Builder) super.setRequestInitializer(requestInitializer); + } + + @Override + public Builder addRefreshListener(CredentialRefreshListener refreshListener) { + return (Builder) super.addRefreshListener(refreshListener); + } + + @Override + public Builder setRefreshListeners(Collection refreshListeners) { + return (Builder) super.setRefreshListeners(refreshListeners); + } + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/compute/package-info.java b/google-api-client/src/main/java/com/google/api/client/googleapis/compute/package-info.java new file mode 100644 index 00000000..7ba6dc9c --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/compute/package-info.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2013 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. + */ + +/** + * {@link com.google.api.client.util.Beta}
+ * Support for Google Compute Engine. + * + * @since 1.15 + * @author Yaniv Inbar + */ +@com.google.api.client.util.Beta +package com.google.api.client.googleapis.compute; + diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/javanet/GoogleNetHttpTransport.java b/google-api-client/src/main/java/com/google/api/client/googleapis/javanet/GoogleNetHttpTransport.java new file mode 100644 index 00000000..9029ef11 --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/javanet/GoogleNetHttpTransport.java @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2013 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.api.client.googleapis.javanet; + +import com.google.api.client.googleapis.GoogleUtils; +import com.google.api.client.http.javanet.NetHttpTransport; + +import java.io.IOException; +import java.security.GeneralSecurityException; +import java.security.KeyStore; + +/** + * Utilities for Google APIs based on {@link NetHttpTransport}. + * + * @since 1.14 + * @author Yaniv Inbar + */ +public class GoogleNetHttpTransport { + + /** + * Returns a new instance of {@link NetHttpTransport} that uses + * {@link GoogleUtils#getCertificateTrustStore()} for the trusted certificates using + * {@link com.google.api.client.http.javanet.NetHttpTransport.Builder#trustCertificates(KeyStore)} + * . + * + *

+ * This helper method doesn't provide for customization of the {@link NetHttpTransport}, such as + * the ability to specify a proxy. To do use, use + * {@link com.google.api.client.http.javanet.NetHttpTransport.Builder}, for example: + *

+ * + *
+  static HttpTransport newProxyTransport() throws GeneralSecurityException, IOException {
+    NetHttpTransport.Builder builder = new NetHttpTransport.Builder();
+    builder.trustCertificates(GoogleUtils.getCertificateTrustStore());
+    builder.setProxy(new Proxy(Proxy.Type.HTTP, new InetSocketAddress("127.0.0.1", 3128)));
+    return builder.build();
+  }
+   * 
+ */ + public static NetHttpTransport newTrustedTransport() + throws GeneralSecurityException, IOException { + return new NetHttpTransport.Builder().trustCertificates(GoogleUtils.getCertificateTrustStore()) + .build(); + } + + private GoogleNetHttpTransport() { + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/javanet/package-info.java b/google-api-client/src/main/java/com/google/api/client/googleapis/javanet/package-info.java new file mode 100644 index 00000000..10669c03 --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/javanet/package-info.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2013 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. + */ + +/** + * Google API's support based on the {@code java.net} package. + * + * @since 1.14 + * @author Yaniv Inbar + */ + +package com.google.api.client.googleapis.javanet; + diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/json/GoogleJsonError.java b/google-api-client/src/main/java/com/google/api/client/googleapis/json/GoogleJsonError.java new file mode 100644 index 00000000..18864c3e --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/json/GoogleJsonError.java @@ -0,0 +1,266 @@ +/* + * Copyright (c) 2011 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.api.client.googleapis.json; + +import com.google.api.client.http.HttpResponse; +import com.google.api.client.json.GenericJson; +import com.google.api.client.json.Json; +import com.google.api.client.json.JsonFactory; +import com.google.api.client.json.JsonObjectParser; +import com.google.api.client.util.Data; +import com.google.api.client.util.Key; + +import java.io.IOException; +import java.util.Collections; +import java.util.List; + +/** + * Data class representing the Google JSON error response content, as documented for example in Error + * responses. + * + * @since 1.4 + * @author Yaniv Inbar + */ +public class GoogleJsonError extends GenericJson { + + /** + * Parses the given error HTTP response using the given JSON factory. + * + * @param jsonFactory JSON factory + * @param response HTTP response + * @return new instance of the Google JSON error information + * @throws IllegalArgumentException if content type is not {@link Json#MEDIA_TYPE} or if expected + * {@code "data"} or {@code "error"} key is not found + */ + public static GoogleJsonError parse(JsonFactory jsonFactory, HttpResponse response) + throws IOException { + JsonObjectParser jsonObjectParser = new JsonObjectParser.Builder(jsonFactory).setWrapperKeys( + Collections.singleton("error")).build(); + return jsonObjectParser.parseAndClose( + response.getContent(), response.getContentCharset(), GoogleJsonError.class); + } + + static { + // hack to force ProGuard to consider ErrorInfo used, since otherwise it would be stripped out + // see http://code.google.com/p/google-api-java-client/issues/detail?id=527 + Data.nullOf(ErrorInfo.class); + } + + /** Detailed error information. */ + public static class ErrorInfo extends GenericJson { + + /** Error classification or {@code null} for none. */ + @Key + private String domain; + + /** Error reason or {@code null} for none. */ + @Key + private String reason; + + /** Human readable explanation of the error or {@code null} for none. */ + @Key + private String message; + + /** + * Location in the request that caused the error or {@code null} for none or {@code null} for + * none. + */ + @Key + private String location; + + /** Type of location in the request that caused the error or {@code null} for none. */ + @Key + private String locationType; + + /** + * Returns the error classification or {@code null} for none. + * + * @since 1.8 + */ + public final String getDomain() { + return domain; + } + + /** + * Sets the error classification or {@code null} for none. + * + * @since 1.8 + */ + public final void setDomain(String domain) { + this.domain = domain; + } + + /** + * Returns the error reason or {@code null} for none. + * + * @since 1.8 + */ + public final String getReason() { + return reason; + } + + /** + * Sets the error reason or {@code null} for none. + * + * @since 1.8 + */ + public final void setReason(String reason) { + this.reason = reason; + } + + /** + * Returns the human readable explanation of the error or {@code null} for none. + * + * @since 1.8 + */ + public final String getMessage() { + return message; + } + + /** + * Sets the human readable explanation of the error or {@code null} for none. + * + * @since 1.8 + */ + public final void setMessage(String message) { + this.message = message; + } + + /** + * Returns the location in the request that caused the error or {@code null} for none or + * {@code null} for none. + * + * @since 1.8 + */ + public final String getLocation() { + return location; + } + + /** + * Sets the location in the request that caused the error or {@code null} for none or + * {@code null} for none. + * + * @since 1.8 + */ + public final void setLocation(String location) { + this.location = location; + } + + /** + * Returns the type of location in the request that caused the error or {@code null} for none. + * + * @since 1.8 + */ + public final String getLocationType() { + return locationType; + } + + /** + * Sets the type of location in the request that caused the error or {@code null} for none. + * + * @since 1.8 + */ + public final void setLocationType(String locationType) { + this.locationType = locationType; + } + + @Override + public ErrorInfo set(String fieldName, Object value) { + return (ErrorInfo) super.set(fieldName, value); + } + + @Override + public ErrorInfo clone() { + return (ErrorInfo) super.clone(); + } + } + + /** List of detailed errors or {@code null} for none. */ + @Key + private List errors; + + /** HTTP status code of this response or {@code null} for none. */ + @Key + private int code; + + /** Human-readable explanation of the error or {@code null} for none. */ + @Key + private String message; + + /** + * Returns the list of detailed errors or {@code null} for none. + * + * @since 1.8 + */ + public final List getErrors() { + return errors; + } + + /** + * Sets the list of detailed errors or {@code null} for none. + * + * @since 1.8 + */ + public final void setErrors(List errors) { + this.errors = errors; + } + + /** + * Returns the HTTP status code of this response or {@code null} for none. + * + * @since 1.8 + */ + public final int getCode() { + return code; + } + + /** + * Sets the HTTP status code of this response or {@code null} for none. + * + * @since 1.8 + */ + public final void setCode(int code) { + this.code = code; + } + + /** + * Returns the human-readable explanation of the error or {@code null} for none. + * + * @since 1.8 + */ + public final String getMessage() { + return message; + } + + /** + * Sets the human-readable explanation of the error or {@code null} for none. + * + * @since 1.8 + */ + public final void setMessage(String message) { + this.message = message; + } + + @Override + public GoogleJsonError set(String fieldName, Object value) { + return (GoogleJsonError) super.set(fieldName, value); + } + + @Override + public GoogleJsonError clone() { + return (GoogleJsonError) super.clone(); + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/json/GoogleJsonErrorContainer.java b/google-api-client/src/main/java/com/google/api/client/googleapis/json/GoogleJsonErrorContainer.java new file mode 100644 index 00000000..547eb027 --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/json/GoogleJsonErrorContainer.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2012 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.api.client.googleapis.json; + +import com.google.api.client.json.GenericJson; +import com.google.api.client.util.Key; + +/** + * Data class representing a container of {@link GoogleJsonError}. + * + * @since 1.9 + * @author rmistry@google.com (Ravi Mistry) + */ +public class GoogleJsonErrorContainer extends GenericJson { + + @Key + private GoogleJsonError error; + + /** Returns the {@link GoogleJsonError}. */ + public final GoogleJsonError getError() { + return error; + } + + /** Sets the {@link GoogleJsonError}. */ + public final void setError(GoogleJsonError error) { + this.error = error; + } + + @Override + public GoogleJsonErrorContainer set(String fieldName, Object value) { + return (GoogleJsonErrorContainer) super.set(fieldName, value); + } + + @Override + public GoogleJsonErrorContainer clone() { + return (GoogleJsonErrorContainer) super.clone(); + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/json/GoogleJsonResponseException.java b/google-api-client/src/main/java/com/google/api/client/googleapis/json/GoogleJsonResponseException.java new file mode 100644 index 00000000..6047aada --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/json/GoogleJsonResponseException.java @@ -0,0 +1,190 @@ +/* + * Copyright (c) 2011 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.api.client.googleapis.json; + +import com.google.api.client.http.HttpMediaType; +import com.google.api.client.http.HttpRequest; +import com.google.api.client.http.HttpResponse; +import com.google.api.client.http.HttpResponseException; +import com.google.api.client.json.Json; +import com.google.api.client.json.JsonFactory; +import com.google.api.client.json.JsonParser; +import com.google.api.client.json.JsonToken; +import com.google.api.client.util.Preconditions; +import com.google.api.client.util.StringUtils; + +import java.io.IOException; + +/** + * Exception thrown when an error status code is detected in an HTTP response to a Google API that + * uses the JSON format, using the format specified in Error + * Responses. + * + *

+ * To execute a request, call {@link #execute(JsonFactory, HttpRequest)}. This will throw a + * {@link GoogleJsonResponseException} on an error response. To get the structured details, use + * {@link #getDetails()}. + *

+ * + *
+  static void executeShowingError(JsonFactory factory, HttpRequest request) throws IOException {
+    try {
+      GoogleJsonResponseException.execute(factory, request);
+    } catch (GoogleJsonResponseException e) {
+      System.err.println(e.getDetails());
+    }
+  }
+ * 
+ * + * @since 1.6 + * @author Yaniv Inbar + */ +public class GoogleJsonResponseException extends HttpResponseException { + + private static final long serialVersionUID = 409811126989994864L; + + /** Google JSON error details or {@code null} for none (for example if response is not JSON). */ + private final transient GoogleJsonError details; + + /** + * @param builder builder + * @param details Google JSON error details + */ + GoogleJsonResponseException(Builder builder, GoogleJsonError details) { + super(builder); + this.details = details; + } + + /** + * Returns the Google JSON error details or {@code null} for none (for example if response is not + * JSON). + */ + public final GoogleJsonError getDetails() { + return details; + } + + /** + * Returns a new instance of {@link GoogleJsonResponseException}. + * + *

+ * If there is a JSON error response, it is parsed using {@link GoogleJsonError}, which can be + * inspected using {@link #getDetails()}. Otherwise, the full response content is read and + * included in the exception message. + *

+ * + * @param jsonFactory JSON factory + * @param response HTTP response + * @return new instance of {@link GoogleJsonResponseException} + */ + public static GoogleJsonResponseException from(JsonFactory jsonFactory, HttpResponse response) { + HttpResponseException.Builder builder = new HttpResponseException.Builder( + response.getStatusCode(), response.getStatusMessage(), response.getHeaders()); + // details + Preconditions.checkNotNull(jsonFactory); + GoogleJsonError details = null; + String detailString = null; + try { + if (!response.isSuccessStatusCode() + && HttpMediaType.equalsIgnoreParameters(Json.MEDIA_TYPE, response.getContentType()) + && response.getContent() != null) { + JsonParser parser = null; + try { + parser = jsonFactory.createJsonParser(response.getContent()); + JsonToken currentToken = parser.getCurrentToken(); + // token is null at start, so get next token + if (currentToken == null) { + currentToken = parser.nextToken(); + } + // check for empty content + if (currentToken != null) { + // make sure there is an "error" key + parser.skipToKey("error"); + if (parser.getCurrentToken() != JsonToken.END_OBJECT) { + details = parser.parseAndClose(GoogleJsonError.class); + detailString = details.toPrettyString(); + } + } + } catch (IOException exception) { + // it would be bad to throw an exception while throwing an exception + exception.printStackTrace(); + } finally { + if (parser == null) { + response.ignore(); + } else if (details == null) { + parser.close(); + } + } + } else { + detailString = response.parseAsString(); + } + } catch (IOException exception) { + // it would be bad to throw an exception while throwing an exception + exception.printStackTrace(); + } + // message + StringBuilder message = HttpResponseException.computeMessageBuffer(response); + if (!com.google.api.client.util.Strings.isNullOrEmpty(detailString)) { + message.append(StringUtils.LINE_SEPARATOR).append(detailString); + builder.setContent(detailString); + } + builder.setMessage(message.toString()); + // result + return new GoogleJsonResponseException(builder, details); + } + + /** + * Executes an HTTP request using {@link HttpRequest#execute()}, but throws a + * {@link GoogleJsonResponseException} on error instead of {@link HttpResponseException}. + * + *

+ * Callers should call {@link HttpResponse#disconnect} when the returned HTTP response object is + * no longer needed. However, {@link HttpResponse#disconnect} does not have to be called if the + * response stream is properly closed. Example usage: + *

+ * + *
+     HttpResponse response = GoogleJsonResponseException.execute(jsonFactory, request);
+     try {
+       // process the HTTP response object
+     } finally {
+       response.disconnect();
+     }
+   * 
+ * + * @param jsonFactory JSON factory + * @param request HTTP request + * @return HTTP response for an HTTP success code (or error code if + * {@link HttpRequest#getThrowExceptionOnExecuteError()}) + * @throws GoogleJsonResponseException for an HTTP error code (only if not + * {@link HttpRequest#getThrowExceptionOnExecuteError()}) + * @throws IOException some other kind of I/O exception + * @since 1.7 + */ + public static HttpResponse execute(JsonFactory jsonFactory, HttpRequest request) + throws GoogleJsonResponseException, IOException { + Preconditions.checkNotNull(jsonFactory); + boolean originalThrowExceptionOnExecuteError = request.getThrowExceptionOnExecuteError(); + if (originalThrowExceptionOnExecuteError) { + request.setThrowExceptionOnExecuteError(false); + } + HttpResponse response = request.execute(); + request.setThrowExceptionOnExecuteError(originalThrowExceptionOnExecuteError); + if (!originalThrowExceptionOnExecuteError || response.isSuccessStatusCode()) { + return response; + } + throw GoogleJsonResponseException.from(jsonFactory, response); + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/json/package-info.java b/google-api-client/src/main/java/com/google/api/client/googleapis/json/package-info.java new file mode 100644 index 00000000..96469344 --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/json/package-info.java @@ -0,0 +1,185 @@ +/* + * Copyright (c) 2010 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. + */ + +/** + * Google's JSON support (see detailed package specification). + * + *

Package Specification

+ * + *

+ * User-defined Partial JSON data models allow you to defined Plain Old Java Objects (POJO's) to + * define how the library should parse/serialize JSON. Each field that should be included must have + * an @{@link com.google.api.client.util.Key} annotation. The field can be of any visibility + * (private, package private, protected, or public) and must not be static. By default, the field + * name is used as the JSON key. To override this behavior, simply specify the JSON key use the + * optional value parameter of the annotation, for example {@code @Key("name")}. Any unrecognized + * keys from the JSON are normally simply ignored and not stored. If the ability to store unknown + * keys is important, use {@link com.google.api.client.json.GenericJson}. + *

+ * + *

+ * Let's take a look at a typical partial JSON-C video feed from the YouTube Data API (as specified + * in YouTube + * Developer's Guide: JSON-C / JavaScript) + *

+ * + *

+ "data":{
+    "updated":"2010-01-07T19:58:42.949Z",
+    "totalItems":800,
+    "startIndex":1,
+    "itemsPerPage":1,
+    "items":[
+        {"id":"hYB0mn5zh2c",
+         "updated":"2010-01-07T13:26:50.000Z",
+         "title":"Google Developers Day US - Maps API Introduction",
+         "description":"Google Maps API Introduction ...",
+         "tags":[
+            "GDD07","GDD07US","Maps"
+         ],
+         "player":{
+            "default":"http://www.youtube.com/watch?v\u003dhYB0mn5zh2c"
+         },
+...
+        }
+    ]
+ }
+
+ * + *

+ * Here's one possible way to design the Java data classes for this (each class in its own Java + * file): + *

+ * + *

+import com.google.api.client.util.*;
+import java.util.List;
+
+  public class VideoFeed {
+    @Key public int itemsPerPage;
+    @Key public int startIndex;
+    @Key public int totalItems;
+    @Key public DateTime updated;
+    @Key public List<Video> items;
+  }
+
+  public class Video {
+    @Key public String id;
+    @Key public String title;
+    @Key public DateTime updated;
+    @Key public String description;
+    @Key public List<String> tags;
+    @Key public Player player;
+  }
+
+  public class Player {
+    // "default" is a Java keyword, so need to specify the JSON key manually
+    @Key("default")
+    public String defaultUrl;
+  }
+
+ * + *

+ * You can also use the @{@link com.google.api.client.util.Key} annotation to defined query + * parameters for a URL. For example: + *

+ * + *

+public class YouTubeUrl extends GoogleUrl {
+
+  @Key
+  public String author;
+
+  @Key("max-results")
+  public Integer maxResults;
+
+  public YouTubeUrl(String encodedUrl) {
+    super(encodedUrl);
+    this.alt = "jsonc";
+  }
+
+ * + *

+ * To work with the YouTube API, you first need to set up the + * {@link com.google.api.client.http.HttpTransport}. For example: + *

+ * + *

+  private static HttpTransport setUpTransport() throws IOException {
+    HttpTransport result = new NetHttpTransport();
+    GoogleUtils.useMethodOverride(result);
+    HttpHeaders headers = new HttpHeaders();
+    headers.setApplicationName("Google-YouTubeSample/1.0");
+    headers.gdataVersion = "2";
+    JsonCParser parser = new JsonCParser();
+    parser.jsonFactory = new JacksonFactory();
+    transport.addParser(parser);
+    // insert authentication code...
+    return transport;
+  }
+
+ * + *

+ * Now that we have a transport, we can execute a request to the YouTube API and parse the result: + *

+ * + *

+  public static VideoFeed list(HttpTransport transport, YouTubeUrl url)
+      throws IOException {
+    HttpRequest request = transport.buildGetRequest();
+    request.url = url;
+    return request.execute().parseAs(VideoFeed.class);
+  }
+
+ * + *

+ * If the server responds with an error the {@link com.google.api.client.http.HttpRequest#execute} + * method will throw an {@link com.google.api.client.http.HttpResponseException}, which has an + * {@link com.google.api.client.http.HttpResponse} field which can be parsed the same way as a + * success response inside of a catch block. For example: + *

+ * + *

+    try {
+...
+    } catch (HttpResponseException e) {
+      if (e.response.getParser() != null) {
+        Error error = e.response.parseAs(Error.class);
+        // process error response
+      } else {
+        String errorContentString = e.response.parseAsString();
+        // process error response as string
+      }
+      throw e;
+    }
+
+ * + *

+ * NOTE: As you might guess, the library uses reflection to populate the user-defined data model. + * It's not quite as fast as writing the wire format parsing code yourself can potentially be, but + * it's a lot easier. + *

+ * + *

+ * NOTE: If you prefer to use your favorite JSON parsing library instead (there are many of them + * listed for example on json.org), that's supported as well. Just + * call {@link com.google.api.client.http.HttpRequest#execute()} and parse the returned byte stream. + *

+ * + * @since 1.0 + * @author Yaniv Inbar + */ + +package com.google.api.client.googleapis.json; + diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/media/MediaHttpDownloader.java b/google-api-client/src/main/java/com/google/api/client/googleapis/media/MediaHttpDownloader.java new file mode 100644 index 00000000..7add848f --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/media/MediaHttpDownloader.java @@ -0,0 +1,444 @@ +/* + * Copyright (c) 2012 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.api.client.googleapis.media; + +import com.google.api.client.http.GenericUrl; +import com.google.api.client.http.HttpBackOffIOExceptionHandler; +import com.google.api.client.http.HttpBackOffUnsuccessfulResponseHandler; +import com.google.api.client.http.HttpHeaders; +import com.google.api.client.http.HttpRequest; +import com.google.api.client.http.HttpRequestFactory; +import com.google.api.client.http.HttpRequestInitializer; +import com.google.api.client.http.HttpResponse; +import com.google.api.client.http.HttpTransport; +import com.google.api.client.util.IOUtils; +import com.google.api.client.util.Preconditions; + +import java.io.IOException; +import java.io.OutputStream; + +/** + * Media HTTP Downloader, with support for both direct and resumable media downloads. Documentation + * is available here. + * + *

+ * Implementation is not thread-safe. + *

+ * + *

+ * Back-off is disabled by default. To enable it for an abnormal HTTP response and an I/O exception + * you should call {@link HttpRequest#setUnsuccessfulResponseHandler} with a new + * {@link HttpBackOffUnsuccessfulResponseHandler} instance and + * {@link HttpRequest#setIOExceptionHandler} with {@link HttpBackOffIOExceptionHandler}. + *

+ * + *

+ * Upgrade warning: in prior version 1.14 exponential back-off was enabled by default for an + * abnormal HTTP response. Starting with version 1.15 it's disabled by default. + *

+ * + * @since 1.9 + * + * @author rmistry@google.com (Ravi Mistry) + */ +@SuppressWarnings("deprecation") +public final class MediaHttpDownloader { + + /** + * Download state associated with the Media HTTP downloader. + */ + public enum DownloadState { + /** The download process has not started yet. */ + NOT_STARTED, + + /** Set after a media file chunk is downloaded. */ + MEDIA_IN_PROGRESS, + + /** Set after the complete media file is successfully downloaded. */ + MEDIA_COMPLETE + } + + /** + * Default maximum number of bytes that will be downloaded from the server in any single HTTP + * request. Set to 32MB because that is the maximum App Engine request size. + */ + public static final int MAXIMUM_CHUNK_SIZE = 32 * MediaHttpUploader.MB; + + /** The request factory for connections to the server. */ + private final HttpRequestFactory requestFactory; + + /** The transport to use for requests. */ + private final HttpTransport transport; + + /** + * Determines whether direct media download is enabled or disabled. If value is set to + * {@code true} then a direct download will be done where the whole media content is downloaded in + * a single request. If value is set to {@code false} then the download uses the resumable media + * download protocol to download in data chunks. Defaults to {@code false}. + */ + private boolean directDownloadEnabled = false; + + /** + * Progress listener to send progress notifications to or {@code null} for none. + */ + private MediaHttpDownloaderProgressListener progressListener; + + /** + * Maximum size of individual chunks that will get downloaded by single HTTP requests. The default + * value is {@link #MAXIMUM_CHUNK_SIZE}. + */ + private int chunkSize = MAXIMUM_CHUNK_SIZE; + + /** + * The length of the HTTP media content or {@code 0} before it is initialized in + * {@link #setMediaContentLength}. + */ + private long mediaContentLength; + + /** The current state of the downloader. */ + private DownloadState downloadState = DownloadState.NOT_STARTED; + + /** The total number of bytes downloaded by this downloader. */ + private long bytesDownloaded; + + /** + * The last byte position of the media file we want to download, default value is {@code -1}. + * + *

+ * If its value is {@code -1} it means there is no upper limit on the byte position. + *

+ */ + private long lastBytePos = -1; + + /** + * Construct the {@link MediaHttpDownloader}. + * + * @param transport The transport to use for requests + * @param httpRequestInitializer The initializer to use when creating an {@link HttpRequest} or + * {@code null} for none + */ + public MediaHttpDownloader( + HttpTransport transport, HttpRequestInitializer httpRequestInitializer) { + this.transport = Preconditions.checkNotNull(transport); + this.requestFactory = httpRequestInitializer == null + ? transport.createRequestFactory() : transport.createRequestFactory(httpRequestInitializer); + } + + /** + * Executes a direct media download or a resumable media download. + * + *

+ * This method does not close the given output stream. + *

+ * + *

+ * This method is not reentrant. A new instance of {@link MediaHttpDownloader} must be + * instantiated before download called be called again. + *

+ * + * @param requestUrl The request URL where the download requests will be sent + * @param outputStream destination output stream + */ + public void download(GenericUrl requestUrl, OutputStream outputStream) throws IOException { + download(requestUrl, null, outputStream); + } + + /** + * Executes a direct media download or a resumable media download. + * + *

+ * This method does not close the given output stream. + *

+ * + *

+ * This method is not reentrant. A new instance of {@link MediaHttpDownloader} must be + * instantiated before download called be called again. + *

+ * + * @param requestUrl request URL where the download requests will be sent + * @param requestHeaders request headers or {@code null} to ignore + * @param outputStream destination output stream + * @since 1.12 + */ + public void download(GenericUrl requestUrl, HttpHeaders requestHeaders, OutputStream outputStream) + throws IOException { + Preconditions.checkArgument(downloadState == DownloadState.NOT_STARTED); + requestUrl.put("alt", "media"); + + if (directDownloadEnabled) { + updateStateAndNotifyListener(DownloadState.MEDIA_IN_PROGRESS); + HttpResponse response = + executeCurrentRequest(lastBytePos, requestUrl, requestHeaders, outputStream); + // All required bytes have been downloaded from the server. + mediaContentLength = response.getHeaders().getContentLength(); + bytesDownloaded = mediaContentLength; + updateStateAndNotifyListener(DownloadState.MEDIA_COMPLETE); + return; + } + + // Download the media content in chunks. + while (true) { + long currentRequestLastBytePos = bytesDownloaded + chunkSize - 1; + if (lastBytePos != -1) { + // If last byte position has been specified use it iff it is smaller than the chunksize. + currentRequestLastBytePos = Math.min(lastBytePos, currentRequestLastBytePos); + } + HttpResponse response = executeCurrentRequest( + currentRequestLastBytePos, requestUrl, requestHeaders, outputStream); + + String contentRange = response.getHeaders().getContentRange(); + long nextByteIndex = getNextByteIndex(contentRange); + setMediaContentLength(contentRange); + + if (mediaContentLength <= nextByteIndex) { + // All required bytes have been downloaded from the server. + bytesDownloaded = mediaContentLength; + updateStateAndNotifyListener(DownloadState.MEDIA_COMPLETE); + return; + } + + bytesDownloaded = nextByteIndex; + updateStateAndNotifyListener(DownloadState.MEDIA_IN_PROGRESS); + } + } + + /** + * Executes the current request. + * + * @param currentRequestLastBytePos last byte position for current request + * @param requestUrl request URL where the download requests will be sent + * @param requestHeaders request headers or {@code null} to ignore + * @param outputStream destination output stream + * @return HTTP response + */ + private HttpResponse executeCurrentRequest(long currentRequestLastBytePos, GenericUrl requestUrl, + HttpHeaders requestHeaders, OutputStream outputStream) throws IOException { + // prepare the GET request + HttpRequest request = requestFactory.buildGetRequest(requestUrl); + // add request headers + if (requestHeaders != null) { + request.getHeaders().putAll(requestHeaders); + } + // set Range header (if necessary) + if (bytesDownloaded != 0 || currentRequestLastBytePos != -1) { + StringBuilder rangeHeader = new StringBuilder(); + rangeHeader.append("bytes=").append(bytesDownloaded).append("-"); + if (currentRequestLastBytePos != -1) { + rangeHeader.append(currentRequestLastBytePos); + } + request.getHeaders().setRange(rangeHeader.toString()); + } + // execute the request and copy into the output stream + HttpResponse response = request.execute(); + try { + IOUtils.copy(response.getContent(), outputStream); + } finally { + response.disconnect(); + } + return response; + } + + /** + * Returns the next byte index identifying data that the server has not yet sent out, obtained + * from the HTTP Content-Range header (E.g a header of "Content-Range: 0-55/1000" would cause 56 + * to be returned). null headers cause 0 to be returned. + * + * @param rangeHeader in the HTTP response + * @return the byte index beginning where the server has yet to send out data + */ + private long getNextByteIndex(String rangeHeader) { + if (rangeHeader == null) { + return 0L; + } + return Long.parseLong( + rangeHeader.substring(rangeHeader.indexOf('-') + 1, rangeHeader.indexOf('/'))) + 1; + } + + /** + * Sets the total number of bytes that have been downloaded of the media resource. + * + *

+ * If a download was aborted mid-way due to a connection failure then users can resume the + * download from the point where it left off. + *

+ * + *

+ * Use {@link #setContentRange} if you need to specify both the bytes downloaded and the last byte + * position. + *

+ * + * @param bytesDownloaded The total number of bytes downloaded + */ + public MediaHttpDownloader setBytesDownloaded(long bytesDownloaded) { + Preconditions.checkArgument(bytesDownloaded >= 0); + this.bytesDownloaded = bytesDownloaded; + return this; + } + + /** + * Sets the content range of the next download request. Eg: bytes=firstBytePos-lastBytePos. + * + *

+ * If a download was aborted mid-way due to a connection failure then users can resume the + * download from the point where it left off. + *

+ * + *

+ * Use {@link #setBytesDownloaded} if you only need to specify the first byte position. + *

+ * + * @param firstBytePos The first byte position in the content range string + * @param lastBytePos The last byte position in the content range string. + * @since 1.13 + */ + public MediaHttpDownloader setContentRange(long firstBytePos, int lastBytePos) { + Preconditions.checkArgument(lastBytePos >= firstBytePos); + setBytesDownloaded(firstBytePos); + this.lastBytePos = lastBytePos; + return this; + } + + /** + * Sets the media content length from the HTTP Content-Range header (E.g a header of + * "Content-Range: 0-55/1000" would cause 1000 to be set. null headers do not set + * anything. + * + * @param rangeHeader in the HTTP response + */ + private void setMediaContentLength(String rangeHeader) { + if (rangeHeader == null) { + return; + } + if (mediaContentLength == 0) { + mediaContentLength = Long.parseLong(rangeHeader.substring(rangeHeader.indexOf('/') + 1)); + } + } + + /** + * Returns whether direct media download is enabled or disabled. If value is set to {@code true} + * then a direct download will be done where the whole media content is downloaded in a single + * request. If value is set to {@code false} then the download uses the resumable media download + * protocol to download in data chunks. Defaults to {@code false}. + */ + public boolean isDirectDownloadEnabled() { + return directDownloadEnabled; + } + + /** + * Returns whether direct media download is enabled or disabled. If value is set to {@code true} + * then a direct download will be done where the whole media content is downloaded in a single + * request. If value is set to {@code false} then the download uses the resumable media download + * protocol to download in data chunks. Defaults to {@code false}. + */ + public MediaHttpDownloader setDirectDownloadEnabled(boolean directDownloadEnabled) { + this.directDownloadEnabled = directDownloadEnabled; + return this; + } + + /** + * Sets the progress listener to send progress notifications to or {@code null} for none. + */ + public MediaHttpDownloader setProgressListener( + MediaHttpDownloaderProgressListener progressListener) { + this.progressListener = progressListener; + return this; + } + + /** + * Returns the progress listener to send progress notifications to or {@code null} for none. + */ + public MediaHttpDownloaderProgressListener getProgressListener() { + return progressListener; + } + + /** Returns the transport to use for requests. */ + public HttpTransport getTransport() { + return transport; + } + + /** + * Sets the maximum size of individual chunks that will get downloaded by single HTTP requests. + * The default value is {@link #MAXIMUM_CHUNK_SIZE}. + * + *

+ * The maximum allowable value is {@link #MAXIMUM_CHUNK_SIZE}. + *

+ */ + public MediaHttpDownloader setChunkSize(int chunkSize) { + Preconditions.checkArgument(chunkSize > 0 && chunkSize <= MAXIMUM_CHUNK_SIZE); + this.chunkSize = chunkSize; + return this; + } + + /** + * Returns the maximum size of individual chunks that will get downloaded by single HTTP requests. + * The default value is {@link #MAXIMUM_CHUNK_SIZE}. + */ + public int getChunkSize() { + return chunkSize; + } + + /** + * Gets the total number of bytes downloaded by this downloader. + * + * @return the number of bytes downloaded + */ + public long getNumBytesDownloaded() { + return bytesDownloaded; + } + + /** + * Gets the last byte position of the media file we want to download or {@code -1} if there is no + * upper limit on the byte position. + * + * @return the last byte position + * @since 1.13 + */ + public long getLastBytePosition() { + return lastBytePos; + } + + /** + * Sets the download state and notifies the progress listener. + * + * @param downloadState value to set to + */ + private void updateStateAndNotifyListener(DownloadState downloadState) throws IOException { + this.downloadState = downloadState; + if (progressListener != null) { + progressListener.progressChanged(this); + } + } + + /** + * Gets the current download state of the downloader. + * + * @return the download state + */ + public DownloadState getDownloadState() { + return downloadState; + } + + /** + * Gets the download progress denoting the percentage of bytes that have been downloaded, + * represented between 0.0 (0%) and 1.0 (100%). + * + * @return the download progress + */ + public double getProgress() { + return mediaContentLength == 0 ? 0 : (double) bytesDownloaded / mediaContentLength; + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/media/MediaHttpDownloaderProgressListener.java b/google-api-client/src/main/java/com/google/api/client/googleapis/media/MediaHttpDownloaderProgressListener.java new file mode 100644 index 00000000..064b2def --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/media/MediaHttpDownloaderProgressListener.java @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2012 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.api.client.googleapis.media; + +import java.io.IOException; + +/** + * An interface for receiving progress notifications for downloads. + * + *

+ * Sample usage: + *

+ * + *
+  public static class MyDownloadProgressListener implements MediaHttpDownloaderProgressListener {
+
+    public void progressChanged(MediaHttpDownloader downloader) throws IOException {
+      switch (downloader.getDownloadState()) {
+        case MEDIA_IN_PROGRESS:
+          System.out.println("Download in progress");
+          System.out.println("Download percentage: " + downloader.getProgress());
+          break;
+        case MEDIA_COMPLETE:
+          System.out.println("Download Completed!");
+          break;
+      }
+    }
+  }
+ * 
+ * + * @since 1.9 + * @author rmistry@google.com (Ravi Mistry) + */ +public interface MediaHttpDownloaderProgressListener { + + /** + * Called to notify that progress has been changed. + * + *

+ * This method is called multiple times depending on how many chunks are downloaded. Once the + * download completes it is called one final time. + *

+ * + *

+ * The download state can be queried by calling {@link MediaHttpDownloader#getDownloadState} and + * the progress by calling {@link MediaHttpDownloader#getProgress}. + *

+ * + * @param downloader Media HTTP downloader + */ + public void progressChanged(MediaHttpDownloader downloader) throws IOException; +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/media/MediaHttpUploader.java b/google-api-client/src/main/java/com/google/api/client/googleapis/media/MediaHttpUploader.java new file mode 100644 index 00000000..d432980c --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/media/MediaHttpUploader.java @@ -0,0 +1,939 @@ +/* + * Copyright (c) 2011 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.api.client.googleapis.media; + +import com.google.api.client.googleapis.MethodOverride; +import com.google.api.client.http.AbstractInputStreamContent; +import com.google.api.client.http.ByteArrayContent; +import com.google.api.client.http.EmptyContent; +import com.google.api.client.http.GZipEncoding; +import com.google.api.client.http.GenericUrl; +import com.google.api.client.http.HttpBackOffIOExceptionHandler; +import com.google.api.client.http.HttpBackOffUnsuccessfulResponseHandler; +import com.google.api.client.http.HttpContent; +import com.google.api.client.http.HttpHeaders; +import com.google.api.client.http.HttpMethods; +import com.google.api.client.http.HttpRequest; +import com.google.api.client.http.HttpRequestFactory; +import com.google.api.client.http.HttpRequestInitializer; +import com.google.api.client.http.HttpResponse; +import com.google.api.client.http.HttpTransport; +import com.google.api.client.http.InputStreamContent; +import com.google.api.client.http.MultipartContent; +import com.google.api.client.util.Beta; +import com.google.api.client.util.ByteStreams; +import com.google.api.client.util.Preconditions; +import com.google.api.client.util.Sleeper; + +import java.io.BufferedInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.Arrays; + +/** + * Media HTTP Uploader, with support for both direct and resumable media uploads. Documentation is + * available here. + * + *

+ * For resumable uploads, when the media content length is known, if the provided + * {@link InputStream} has {@link InputStream#markSupported} as {@code false} then it is wrapped in + * an {@link BufferedInputStream} to support the {@link InputStream#mark} and + * {@link InputStream#reset} methods required for handling server errors. If the media content + * length is unknown then each chunk is stored temporarily in memory. This is required to determine + * when the last chunk is reached. + *

+ * + *

+ * See {@link #setDisableGZipContent(boolean)} for information on when content is gzipped and how to + * control that behavior. + *

+ * + *

+ * Back-off is disabled by default. To enable it for an abnormal HTTP response and an I/O exception + * you should call {@link HttpRequest#setUnsuccessfulResponseHandler} with a new + * {@link HttpBackOffUnsuccessfulResponseHandler} instance and + * {@link HttpRequest#setIOExceptionHandler} with {@link HttpBackOffIOExceptionHandler}. + *

+ * + *

+ * Upgrade warning: in prior version 1.14 exponential back-off was enabled by default for an + * abnormal HTTP response and there was a regular retry (without back-off) when I/O exception was + * thrown. Starting with version 1.15 back-off is disabled and there is no retry on I/O exception by + * default. + *

+ * + *

+ * Upgrade warning: in prior version 1.16 {@link #serverErrorCallback} was public but starting with + * version 1.17 it has been removed from the public API, and changed to be package private. + *

+ * + *

+ * Implementation is not thread-safe. + *

+ * + * @since 1.9 + * + * @author rmistry@google.com (Ravi Mistry) + * @author peleyal@google.com (Eyal Peled) + */ +@SuppressWarnings("deprecation") +public final class MediaHttpUploader { + + /** + * Upload content type header. + * + * @since 1.13 + */ + public static final String CONTENT_LENGTH_HEADER = "X-Upload-Content-Length"; + + /** + * Upload content length header. + * + * @since 1.13 + */ + public static final String CONTENT_TYPE_HEADER = "X-Upload-Content-Type"; + + /** + * Upload state associated with the Media HTTP uploader. + */ + public enum UploadState { + /** The upload process has not started yet. */ + NOT_STARTED, + + /** Set before the initiation request is sent. */ + INITIATION_STARTED, + + /** Set after the initiation request completes. */ + INITIATION_COMPLETE, + + /** Set after a media file chunk is uploaded. */ + MEDIA_IN_PROGRESS, + + /** Set after the complete media file is successfully uploaded. */ + MEDIA_COMPLETE + } + + /** The current state of the uploader. */ + private UploadState uploadState = UploadState.NOT_STARTED; + + static final int MB = 0x100000; + private static final int KB = 0x400; + + /** + * Minimum number of bytes that can be uploaded to the server (set to 256KB). + */ + public static final int MINIMUM_CHUNK_SIZE = 256 * KB; + + /** + * Default maximum number of bytes that will be uploaded to the server in any single HTTP request + * (set to 10 MB). + */ + public static final int DEFAULT_CHUNK_SIZE = 10 * MB; + + /** The HTTP content of the media to be uploaded. */ + private final AbstractInputStreamContent mediaContent; + + /** The request factory for connections to the server. */ + private final HttpRequestFactory requestFactory; + + /** The transport to use for requests. */ + private final HttpTransport transport; + + /** HTTP content metadata of the media to be uploaded or {@code null} for none. */ + private HttpContent metadata; + + /** + * The length of the HTTP media content. + * + *

+ * {@code 0} before it is lazily initialized in {@link #getMediaContentLength()} after which it + * could still be {@code 0} for empty media content. Will be {@code < 0} if the media content + * length has not been specified. + *

+ */ + private long mediaContentLength; + + /** + * Determines if media content length has been calculated yet in {@link #getMediaContentLength()}. + */ + private boolean isMediaContentLengthCalculated; + + /** + * The HTTP method used for the initiation request. + * + *

+ * Can only be {@link HttpMethods#POST} (for media upload) or {@link HttpMethods#PUT} (for media + * update). The default value is {@link HttpMethods#POST}. + *

+ */ + private String initiationRequestMethod = HttpMethods.POST; + + /** The HTTP headers used in the initiation request. */ + private HttpHeaders initiationHeaders = new HttpHeaders(); + + /** + * The HTTP request object that is currently used to send upload requests or {@code null} before + * {@link #upload}. + */ + private HttpRequest currentRequest; + + /** An Input stream of the HTTP media content or {@code null} before {@link #upload}. */ + private InputStream contentInputStream; + + /** + * Determines whether direct media upload is enabled or disabled. If value is set to {@code true} + * then a direct upload will be done where the whole media content is uploaded in a single request + * If value is set to {@code false} then the upload uses the resumable media upload protocol to + * upload in data chunks. Defaults to {@code false}. + */ + private boolean directUploadEnabled; + + /** + * Progress listener to send progress notifications to or {@code null} for none. + */ + private MediaHttpUploaderProgressListener progressListener; + + /** + * The media content length is used in the "Content-Range" header. If we reached the end of the + * stream, this variable will be set with the length of the stream. This value is used only in + * resumable media upload. + */ + String mediaContentLengthStr = "*"; + + /** + * The number of bytes the server received so far. This value will not be calculated for direct + * uploads when the content length is not known in advance. + */ + // TODO(rmistry): Figure out a way to compute the content length using CountingInputStream. + private long totalBytesServerReceived; + + /** + * Maximum size of individual chunks that will get uploaded by single HTTP requests. The default + * value is {@link #DEFAULT_CHUNK_SIZE}. + */ + private int chunkSize = DEFAULT_CHUNK_SIZE; + + /** + * Used to cache a single byte when the media content length is unknown or {@code null} for none. + */ + private Byte cachedByte; + + /** + * The number of bytes the client had sent to the server so far or {@code 0} for none. It is used + * for resumable media upload when the media content length is not specified. + */ + private long totalBytesClientSent; + + /** + * The number of bytes of the current chunk which was sent to the server or {@code 0} for none. + * This value equals to chunk size for each chunk the client send to the server, except for the + * ending chunk. + */ + private int currentChunkLength; + + /** + * The content buffer of the current request or {@code null} for none. It is used for resumable + * media upload when the media content length is not specified. It is instantiated for every + * request in {@link #setContentAndHeadersOnCurrentRequest} and is set to {@code null} when the + * request is completed in {@link #upload}. + */ + private byte currentRequestContentBuffer[]; + + /** + * Whether to disable GZip compression of HTTP content. + * + *

+ * The default value is {@code false}. + *

+ */ + private boolean disableGZipContent; + + /** Sleeper. **/ + Sleeper sleeper = Sleeper.DEFAULT; + + /** + * Construct the {@link MediaHttpUploader}. + * + *

+ * The input stream received by calling {@link AbstractInputStreamContent#getInputStream} is + * closed when the upload process is successfully completed. For resumable uploads, when the media + * content length is known, if the input stream has {@link InputStream#markSupported} as + * {@code false} then it is wrapped in an {@link BufferedInputStream} to support the + * {@link InputStream#mark} and {@link InputStream#reset} methods required for handling server + * errors. If the media content length is unknown then each chunk is stored temporarily in memory. + * This is required to determine when the last chunk is reached. + *

+ * + * @param mediaContent The Input stream content of the media to be uploaded + * @param transport The transport to use for requests + * @param httpRequestInitializer The initializer to use when creating an {@link HttpRequest} or + * {@code null} for none + */ + public MediaHttpUploader(AbstractInputStreamContent mediaContent, HttpTransport transport, + HttpRequestInitializer httpRequestInitializer) { + this.mediaContent = Preconditions.checkNotNull(mediaContent); + this.transport = Preconditions.checkNotNull(transport); + this.requestFactory = httpRequestInitializer == null + ? transport.createRequestFactory() : transport.createRequestFactory(httpRequestInitializer); + } + + /** + * Executes a direct media upload or resumable media upload conforming to the specifications + * listed here. + * + *

+ * This method is not reentrant. A new instance of {@link MediaHttpUploader} must be instantiated + * before upload called be called again. + *

+ * + *

+ * If an error is encountered during the request execution the caller is responsible for parsing + * the response correctly. For example for JSON errors: + *

+ * + *
+    if (!response.isSuccessStatusCode()) {
+      throw GoogleJsonResponseException.from(jsonFactory, response);
+    }
+   * 
+ * + *

+ * Callers should call {@link HttpResponse#disconnect} when the returned HTTP response object is + * no longer needed. However, {@link HttpResponse#disconnect} does not have to be called if the + * response stream is properly closed. Example usage: + *

+ * + *
+     HttpResponse response = batch.upload(initiationRequestUrl);
+     try {
+       // process the HTTP response object
+     } finally {
+       response.disconnect();
+     }
+   * 
+ * + * @param initiationRequestUrl The request URL where the initiation request will be sent + * @return HTTP response + */ + public HttpResponse upload(GenericUrl initiationRequestUrl) throws IOException { + Preconditions.checkArgument(uploadState == UploadState.NOT_STARTED); + + if (directUploadEnabled) { + return directUpload(initiationRequestUrl); + } + return resumableUpload(initiationRequestUrl); + } + + /** + * Direct Uploads the media. + * + * @param initiationRequestUrl The request URL where the initiation request will be sent + * @return HTTP response + */ + private HttpResponse directUpload(GenericUrl initiationRequestUrl) throws IOException { + updateStateAndNotifyListener(UploadState.MEDIA_IN_PROGRESS); + + HttpContent content = mediaContent; + if (metadata != null) { + content = new MultipartContent().setContentParts(Arrays.asList(metadata, mediaContent)); + initiationRequestUrl.put("uploadType", "multipart"); + } else { + initiationRequestUrl.put("uploadType", "media"); + } + HttpRequest request = + requestFactory.buildRequest(initiationRequestMethod, initiationRequestUrl, content); + request.getHeaders().putAll(initiationHeaders); + // We do not have to do anything special here if media content length is unspecified because + // direct media upload works even when the media content length == -1. + HttpResponse response = executeCurrentRequest(request); + boolean responseProcessed = false; + try { + if (isMediaLengthKnown()) { + totalBytesServerReceived = getMediaContentLength(); + } + updateStateAndNotifyListener(UploadState.MEDIA_COMPLETE); + responseProcessed = true; + } finally { + if (!responseProcessed) { + response.disconnect(); + } + } + return response; + } + + /** + * Uploads the media in a resumable manner. + * + * @param initiationRequestUrl The request URL where the initiation request will be sent + * @return HTTP response + */ + private HttpResponse resumableUpload(GenericUrl initiationRequestUrl) throws IOException { + // Make initial request to get the unique upload URL. + HttpResponse initialResponse = executeUploadInitiation(initiationRequestUrl); + if (!initialResponse.isSuccessStatusCode()) { + // If the initiation request is not successful return it immediately. + return initialResponse; + } + GenericUrl uploadUrl; + try { + uploadUrl = new GenericUrl(initialResponse.getHeaders().getLocation()); + } finally { + initialResponse.disconnect(); + } + + // Convert media content into a byte stream to upload in chunks. + contentInputStream = mediaContent.getInputStream(); + if (!contentInputStream.markSupported() && isMediaLengthKnown()) { + // If we know the media content length then wrap the stream into a Buffered input stream to + // support the {@link InputStream#mark} and {@link InputStream#reset} methods required for + // handling server errors. + contentInputStream = new BufferedInputStream(contentInputStream); + } + + HttpResponse response; + // Upload the media content in chunks. + while (true) { + currentRequest = requestFactory.buildPutRequest(uploadUrl, null); + setContentAndHeadersOnCurrentRequest(); + // set mediaErrorHandler as I/O exception handler and as unsuccessful response handler for + // calling to serverErrorCallback on an I/O exception or an abnormal HTTP response + new MediaUploadErrorHandler(this, currentRequest); + + if (isMediaLengthKnown()) { + // TODO(rmistry): Support gzipping content for the case where media content length is + // known (https://code.google.com/p/google-api-java-client/issues/detail?id=691). + response = executeCurrentRequestWithoutGZip(currentRequest); + } else { + response = executeCurrentRequest(currentRequest); + } + boolean returningResponse = false; + try { + if (response.isSuccessStatusCode()) { + totalBytesServerReceived = getMediaContentLength(); + if (mediaContent.getCloseInputStream()) { + contentInputStream.close(); + } + updateStateAndNotifyListener(UploadState.MEDIA_COMPLETE); + returningResponse = true; + return response; + } + + if (response.getStatusCode() != 308) { + returningResponse = true; + return response; + } + + // Check to see if the upload URL has changed on the server. + String updatedUploadUrl = response.getHeaders().getLocation(); + if (updatedUploadUrl != null) { + uploadUrl = new GenericUrl(updatedUploadUrl); + } + + // we check the amount of bytes the server received so far, because the server may process + // fewer bytes than the amount of bytes the client had sent + long newBytesServerReceived = getNextByteIndex(response.getHeaders().getRange()); + // the server can receive any amount of bytes from 0 to current chunk length + long currentBytesServerReceived = newBytesServerReceived - totalBytesServerReceived; + Preconditions.checkState( + currentBytesServerReceived >= 0 && currentBytesServerReceived <= currentChunkLength); + long copyBytes = currentChunkLength - currentBytesServerReceived; + if (isMediaLengthKnown()) { + if (copyBytes > 0) { + // If the server didn't receive all the bytes the client sent the current position of + // the input stream is incorrect. So we should reset the stream and skip those bytes + // that the server had already received. + // Otherwise (the server got all bytes the client sent), the stream is in its right + // position, and we can continue from there + contentInputStream.reset(); + long actualSkipValue = contentInputStream.skip(currentBytesServerReceived); + Preconditions.checkState(currentBytesServerReceived == actualSkipValue); + } + } else if (copyBytes == 0) { + // server got all the bytes, so we don't need to use this buffer. Otherwise, we have to + // keep the buffer and copy part (or all) of its bytes to the stream we are sending to the + // server + currentRequestContentBuffer = null; + } + totalBytesServerReceived = newBytesServerReceived; + + updateStateAndNotifyListener(UploadState.MEDIA_IN_PROGRESS); + } finally { + if (!returningResponse) { + response.disconnect(); + } + } + } + } + + /** + * @return {@code true} if the media length is known, otherwise {@code false} + */ + private boolean isMediaLengthKnown() throws IOException { + return getMediaContentLength() >= 0; + } + + /** + * Uses lazy initialization to compute the media content length. + * + *

+ * This is done to avoid throwing an {@link IOException} in the constructor. + *

+ */ + private long getMediaContentLength() throws IOException { + if (!isMediaContentLengthCalculated) { + mediaContentLength = mediaContent.getLength(); + isMediaContentLengthCalculated = true; + } + return mediaContentLength; + } + + /** + * This method sends a POST request with empty content to get the unique upload URL. + * + * @param initiationRequestUrl The request URL where the initiation request will be sent + */ + private HttpResponse executeUploadInitiation(GenericUrl initiationRequestUrl) throws IOException { + updateStateAndNotifyListener(UploadState.INITIATION_STARTED); + + initiationRequestUrl.put("uploadType", "resumable"); + HttpContent content = metadata == null ? new EmptyContent() : metadata; + HttpRequest request = + requestFactory.buildRequest(initiationRequestMethod, initiationRequestUrl, content); + initiationHeaders.set(CONTENT_TYPE_HEADER, mediaContent.getType()); + if (isMediaLengthKnown()) { + initiationHeaders.set(CONTENT_LENGTH_HEADER, getMediaContentLength()); + } + request.getHeaders().putAll(initiationHeaders); + HttpResponse response = executeCurrentRequest(request); + boolean notificationCompleted = false; + + try { + updateStateAndNotifyListener(UploadState.INITIATION_COMPLETE); + notificationCompleted = true; + } finally { + if (!notificationCompleted) { + response.disconnect(); + } + } + return response; + } + + /** + * Executes the current request with some minimal common code. + * + * @param request current request + * @return HTTP response + */ + private HttpResponse executeCurrentRequestWithoutGZip(HttpRequest request) throws IOException { + // method override for non-POST verbs + new MethodOverride().intercept(request); + // don't throw an exception so we can let a custom Google exception be thrown + request.setThrowExceptionOnExecuteError(false); + // execute the request + HttpResponse response = request.execute(); + return response; + } + + /** + * Executes the current request with some common code that includes exponential backoff and GZip + * encoding. + * + * @param request current request + * @return HTTP response + */ + private HttpResponse executeCurrentRequest(HttpRequest request) throws IOException { + // enable GZip encoding if necessary + if (!disableGZipContent && !(request.getContent() instanceof EmptyContent)) { + request.setEncoding(new GZipEncoding()); + } + // execute request + HttpResponse response = executeCurrentRequestWithoutGZip(request); + return response; + } + + /** + * Sets the HTTP media content chunk and the required headers that should be used in the upload + * request. + */ + private void setContentAndHeadersOnCurrentRequest() throws IOException { + int blockSize; + if (isMediaLengthKnown()) { + // We know exactly what the blockSize will be because we know the media content length. + blockSize = (int) Math.min(chunkSize, getMediaContentLength() - totalBytesServerReceived); + } else { + // Use the chunkSize as the blockSize because we do know what what it is yet. + blockSize = chunkSize; + } + + AbstractInputStreamContent contentChunk; + int actualBlockSize = blockSize; + if (isMediaLengthKnown()) { + // Mark the current position in case we need to retry the request. + contentInputStream.mark(blockSize); + + InputStream limitInputStream = ByteStreams.limit(contentInputStream, blockSize); + contentChunk = new InputStreamContent( + mediaContent.getType(), limitInputStream).setRetrySupported(true) + .setLength(blockSize).setCloseInputStream(false); + mediaContentLengthStr = String.valueOf(getMediaContentLength()); + } else { + // If the media content length is not known we implement a custom buffered input stream that + // enables us to detect the length of the media content when the last chunk is sent. We + // accomplish this by always trying to read an extra byte further than the end of the current + // chunk. + int actualBytesRead; + int bytesAllowedToRead; + + // amount of bytes which need to be copied from last chunk buffer + int copyBytes = 0; + if (currentRequestContentBuffer == null) { + bytesAllowedToRead = cachedByte == null ? blockSize + 1 : blockSize; + currentRequestContentBuffer = new byte[blockSize + 1]; + if (cachedByte != null) { + currentRequestContentBuffer[0] = cachedByte; + } + } else { + // currentRequestContentBuffer is not null that means one of the following: + // 1. This is a request to recover from a server error (e.g. 503) + // or + // 2. The server received less bytes than the amount of bytes the client had sent. For + // example, the client sends bytes 100-199, but the server returns back status code 308, + // and its "Range" header is "bytes=0-150". + // In that case, the new request will be constructed from the previous request's byte buffer + // plus new bytes from the stream. + copyBytes = (int) (totalBytesClientSent - totalBytesServerReceived); + // shift copyBytes bytes to the beginning - those are the bytes which weren't received by + // the server in the last chunk. + System.arraycopy(currentRequestContentBuffer, currentChunkLength - copyBytes, + currentRequestContentBuffer, 0, copyBytes); + if (cachedByte != null) { + // add the last cached byte to the buffer + currentRequestContentBuffer[copyBytes] = cachedByte; + } + + bytesAllowedToRead = blockSize - copyBytes; + } + + actualBytesRead = ByteStreams.read( + contentInputStream, currentRequestContentBuffer, blockSize + 1 - bytesAllowedToRead, + bytesAllowedToRead); + + if (actualBytesRead < bytesAllowedToRead) { + actualBlockSize = copyBytes + Math.max(0, actualBytesRead); + if (cachedByte != null) { + actualBlockSize++; + cachedByte = null; + } + + if (mediaContentLengthStr.equals("*")) { + // At this point we know we reached the media content length because we either read less + // than the specified chunk size or there is no more data left to be read. + mediaContentLengthStr = String.valueOf(totalBytesServerReceived + actualBlockSize); + } + } else { + cachedByte = currentRequestContentBuffer[blockSize]; + } + + contentChunk = new ByteArrayContent( + mediaContent.getType(), currentRequestContentBuffer, 0, actualBlockSize); + totalBytesClientSent = totalBytesServerReceived + actualBlockSize; + } + + currentChunkLength = actualBlockSize; + currentRequest.setContent(contentChunk); + if (actualBlockSize == 0) { + // special case of zero content media being uploaded + currentRequest.getHeaders().setContentRange("bytes */0"); + } else { + currentRequest.getHeaders().setContentRange("bytes " + totalBytesServerReceived + "-" + + (totalBytesServerReceived + actualBlockSize - 1) + "/" + mediaContentLengthStr); + } + } + + /** + * {@link Beta}
+ * The call back method that will be invoked on a server error or an I/O exception during + * resumable upload inside {@link #upload}. + * + *

+ * This method changes the current request to query the current status of the upload to find how + * many bytes were successfully uploaded before the server error occurred. + *

+ */ + @Beta + void serverErrorCallback() throws IOException { + Preconditions.checkNotNull(currentRequest, "The current request should not be null"); + + // Query the current status of the upload by issuing an empty PUT request on the upload URI. + currentRequest.setContent(new EmptyContent()); + currentRequest.getHeaders() + .setContentRange("bytes */" + (isMediaLengthKnown() ? getMediaContentLength() : "*")); + } + + /** + * Returns the next byte index identifying data that the server has not yet received, obtained + * from the HTTP Range header (E.g a header of "Range: 0-55" would cause 56 to be returned). + * null or malformed headers cause 0 to be returned. + * + * @param rangeHeader in the HTTP response + * @return the byte index beginning where the server has yet to receive data + */ + private long getNextByteIndex(String rangeHeader) { + if (rangeHeader == null) { + return 0L; + } + return Long.parseLong(rangeHeader.substring(rangeHeader.indexOf('-') + 1)) + 1; + } + + /** Returns HTTP content metadata for the media request or {@code null} for none. */ + public HttpContent getMetadata() { + return metadata; + } + + /** Sets HTTP content metadata for the media request or {@code null} for none. */ + public MediaHttpUploader setMetadata(HttpContent metadata) { + this.metadata = metadata; + return this; + } + + /** Returns the HTTP content of the media to be uploaded. */ + public HttpContent getMediaContent() { + return mediaContent; + } + + /** Returns the transport to use for requests. */ + public HttpTransport getTransport() { + return transport; + } + + /** + * Sets whether direct media upload is enabled or disabled. + * + *

+ * If value is set to {@code true} then a direct upload will be done where the whole media content + * is uploaded in a single request. If value is set to {@code false} then the upload uses the + * resumable media upload protocol to upload in data chunks. + *

+ * + *

+ * Direct upload is recommended if the content size falls below a certain minimum limit. This is + * because there's minimum block write size for some Google APIs, so if the resumable request + * fails in the space of that first block, the client will have to restart from the beginning + * anyway. + *

+ * + *

+ * Defaults to {@code false}. + *

+ * + * @since 1.9 + */ + public MediaHttpUploader setDirectUploadEnabled(boolean directUploadEnabled) { + this.directUploadEnabled = directUploadEnabled; + return this; + } + + /** + * Returns whether direct media upload is enabled or disabled. If value is set to {@code true} + * then a direct upload will be done where the whole media content is uploaded in a single + * request. If value is set to {@code false} then the upload uses the resumable media upload + * protocol to upload in data chunks. Defaults to {@code false}. + * + * @since 1.9 + */ + public boolean isDirectUploadEnabled() { + return directUploadEnabled; + } + + /** + * Sets the progress listener to send progress notifications to or {@code null} for none. + */ + public MediaHttpUploader setProgressListener(MediaHttpUploaderProgressListener progressListener) { + this.progressListener = progressListener; + return this; + } + + /** + * Returns the progress listener to send progress notifications to or {@code null} for none. + */ + public MediaHttpUploaderProgressListener getProgressListener() { + return progressListener; + } + + /** + * Sets the maximum size of individual chunks that will get uploaded by single HTTP requests. The + * default value is {@link #DEFAULT_CHUNK_SIZE}. + * + *

+ * The minimum allowable value is {@link #MINIMUM_CHUNK_SIZE} and the specified chunk size must be + * a multiple of {@link #MINIMUM_CHUNK_SIZE}. + *

+ */ + public MediaHttpUploader setChunkSize(int chunkSize) { + Preconditions.checkArgument(chunkSize > 0 && chunkSize % MINIMUM_CHUNK_SIZE == 0); + this.chunkSize = chunkSize; + return this; + } + + /** + * Returns the maximum size of individual chunks that will get uploaded by single HTTP requests. + * The default value is {@link #DEFAULT_CHUNK_SIZE}. + */ + public int getChunkSize() { + return chunkSize; + } + + /** + * Returns whether to disable GZip compression of HTTP content. + * + * @since 1.13 + */ + public boolean getDisableGZipContent() { + return disableGZipContent; + } + + /** + * Sets whether to disable GZip compression of HTTP content. + * + *

+ * By default it is {@code false}. + *

+ * + *

+ * If {@link #setDisableGZipContent(boolean)} is set to false (the default value) then content is + * gzipped for direct media upload and resumable media uploads when content length is not known. + * Due to a current limitation, content is not gzipped for resumable media uploads when content + * length is known; this limitation will be removed in the future. + *

+ * + * @since 1.13 + */ + public MediaHttpUploader setDisableGZipContent(boolean disableGZipContent) { + this.disableGZipContent = disableGZipContent; + return this; + } + + /** + * Returns the sleeper. + * + * @since 1.15 + */ + public Sleeper getSleeper() { + return sleeper; + } + + /** + * Sets the sleeper. The default value is {@link Sleeper#DEFAULT}. + * + * @since 1.15 + */ + public MediaHttpUploader setSleeper(Sleeper sleeper) { + this.sleeper = sleeper; + return this; + } + + /** + * Returns the HTTP method used for the initiation request. + * + *

+ * The default value is {@link HttpMethods#POST}. + *

+ * + * @since 1.12 + */ + public String getInitiationRequestMethod() { + return initiationRequestMethod; + } + + /** + * Sets the HTTP method used for the initiation request. + * + *

+ * Can only be {@link HttpMethods#POST} (for media upload) or {@link HttpMethods#PUT} (for media + * update). The default value is {@link HttpMethods#POST}. + *

+ * + * @since 1.12 + */ + public MediaHttpUploader setInitiationRequestMethod(String initiationRequestMethod) { + Preconditions.checkArgument(initiationRequestMethod.equals(HttpMethods.POST) + || initiationRequestMethod.equals(HttpMethods.PUT)); + this.initiationRequestMethod = initiationRequestMethod; + return this; + } + + /** Sets the HTTP headers used for the initiation request. */ + public MediaHttpUploader setInitiationHeaders(HttpHeaders initiationHeaders) { + this.initiationHeaders = initiationHeaders; + return this; + } + + /** Returns the HTTP headers used for the initiation request. */ + public HttpHeaders getInitiationHeaders() { + return initiationHeaders; + } + + /** + * Gets the total number of bytes the server received so far or {@code 0} for direct uploads when + * the content length is not known. + * + * @return the number of bytes the server received so far + */ + public long getNumBytesUploaded() { + return totalBytesServerReceived; + } + + /** + * Sets the upload state and notifies the progress listener. + * + * @param uploadState value to set to + */ + private void updateStateAndNotifyListener(UploadState uploadState) throws IOException { + this.uploadState = uploadState; + if (progressListener != null) { + progressListener.progressChanged(this); + } + } + + /** + * Gets the current upload state of the uploader. + * + * @return the upload state + */ + public UploadState getUploadState() { + return uploadState; + } + + /** + * Gets the upload progress denoting the percentage of bytes that have been uploaded, represented + * between 0.0 (0%) and 1.0 (100%). + * + *

+ * Do not use if the specified {@link AbstractInputStreamContent} has no content length specified. + * Instead, consider using {@link #getNumBytesUploaded} to denote progress. + *

+ * + * @throws IllegalArgumentException if the specified {@link AbstractInputStreamContent} has no + * content length + * @return the upload progress + */ + public double getProgress() throws IOException { + Preconditions.checkArgument(isMediaLengthKnown(), "Cannot call getProgress() if " + + "the specified AbstractInputStreamContent has no content length. Use " + + " getNumBytesUploaded() to denote progress instead."); + return getMediaContentLength() == 0 ? 0 : (double) totalBytesServerReceived + / getMediaContentLength(); + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/media/MediaHttpUploaderProgressListener.java b/google-api-client/src/main/java/com/google/api/client/googleapis/media/MediaHttpUploaderProgressListener.java new file mode 100644 index 00000000..7f6c5f6d --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/media/MediaHttpUploaderProgressListener.java @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2011 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.api.client.googleapis.media; + +import java.io.IOException; + + +/** + * An interface for receiving progress notifications for uploads. + * + *

+ * Sample usage (if media content length is provided, else consider using + * {@link MediaHttpUploader#getNumBytesUploaded} instead of {@link MediaHttpUploader#getProgress}: + *

+ * + *
+  public static class MyUploadProgressListener implements MediaHttpUploaderProgressListener {
+
+    public void progressChanged(MediaHttpUploader uploader) throws IOException {
+      switch (uploader.getUploadState()) {
+        case INITIATION_STARTED:
+          System.out.println("Initiation Started");
+          break;
+        case INITIATION_COMPLETE:
+          System.out.println("Initiation Completed");
+          break;
+        case MEDIA_IN_PROGRESS:
+          System.out.println("Upload in progress");
+          System.out.println("Upload percentage: " + uploader.getProgress());
+          break;
+        case MEDIA_COMPLETE:
+          System.out.println("Upload Completed!");
+          break;
+      }
+    }
+  }
+ * 
+ * + * @since 1.9 + * @author rmistry@google.com (Ravi Mistry) + */ +public interface MediaHttpUploaderProgressListener { + + /** + * Called to notify that progress has been changed. + * + *

+ * This method is called once before and after the initiation request. For media uploads it is + * called multiple times depending on how many chunks are uploaded. Once the upload completes it + * is called one final time. + *

+ * + *

+ * The upload state can be queried by calling {@link MediaHttpUploader#getUploadState} and the + * progress by calling {@link MediaHttpUploader#getProgress}. + *

+ * + * @param uploader Media HTTP uploader + */ + public void progressChanged(MediaHttpUploader uploader) throws IOException; +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/media/MediaUploadErrorHandler.java b/google-api-client/src/main/java/com/google/api/client/googleapis/media/MediaUploadErrorHandler.java new file mode 100644 index 00000000..3e0a6503 --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/media/MediaUploadErrorHandler.java @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2013 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.api.client.googleapis.media; + +import com.google.api.client.http.HttpIOExceptionHandler; +import com.google.api.client.http.HttpRequest; +import com.google.api.client.http.HttpResponse; +import com.google.api.client.http.HttpUnsuccessfulResponseHandler; +import com.google.api.client.util.Beta; +import com.google.api.client.util.Preconditions; + +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * MediaUpload error handler handles an {@link IOException} and an abnormal HTTP response by calling + * to {@link MediaHttpUploader#serverErrorCallback()}. + * + * @author Eyal Peled + */ +@Beta +class MediaUploadErrorHandler implements HttpUnsuccessfulResponseHandler, HttpIOExceptionHandler { + + static final Logger LOGGER = Logger.getLogger(MediaUploadErrorHandler.class.getName()); + + /** The uploader to callback on if there is a server error. */ + private final MediaHttpUploader uploader; + + /** The original {@link HttpIOExceptionHandler} of the HTTP request. */ + private final HttpIOExceptionHandler originalIOExceptionHandler; + + /** The original {@link HttpUnsuccessfulResponseHandler} of the HTTP request. */ + private final HttpUnsuccessfulResponseHandler originalUnsuccessfulHandler; + + /** + * Constructs a new instance from {@link MediaHttpUploader} and {@link HttpRequest}. + */ + public MediaUploadErrorHandler(MediaHttpUploader uploader, HttpRequest request) { + this.uploader = Preconditions.checkNotNull(uploader); + originalIOExceptionHandler = request.getIOExceptionHandler(); + originalUnsuccessfulHandler = request.getUnsuccessfulResponseHandler(); + + request.setIOExceptionHandler(this); + request.setUnsuccessfulResponseHandler(this); + } + + public boolean handleIOException(HttpRequest request, boolean supportsRetry) throws IOException { + boolean handled = originalIOExceptionHandler != null + && originalIOExceptionHandler.handleIOException(request, supportsRetry); + + // TODO(peleyal): figure out what is best practice - call serverErrorCallback only if I/O + // exception was handled, or call it regardless + if (handled) { + try { + uploader.serverErrorCallback(); + } catch (IOException e) { + LOGGER.log(Level.WARNING, "exception thrown while calling server callback", e); + } + } + return handled; + } + + public boolean handleResponse(HttpRequest request, HttpResponse response, boolean supportsRetry) + throws IOException { + boolean handled = originalUnsuccessfulHandler != null + && originalUnsuccessfulHandler.handleResponse(request, response, supportsRetry); + + // TODO(peleyal): figure out what is best practice - call serverErrorCallback only if the + // abnormal response was handled, or call it regardless + if (handled && supportsRetry && response.getStatusCode() / 100 == 5) { + try { + uploader.serverErrorCallback(); + } catch (IOException e) { + LOGGER.log(Level.WARNING, "exception thrown while calling server callback", e); + } + } + return handled; + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/media/package-info.java b/google-api-client/src/main/java/com/google/api/client/googleapis/media/package-info.java new file mode 100644 index 00000000..98dd9023 --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/media/package-info.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2010 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. + */ + +/** + * Media for Google API's. + * + * @since 1.9 + * @author Ravi Mistry + */ + +package com.google.api.client.googleapis.media; + diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/AbstractNotification.java b/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/AbstractNotification.java new file mode 100644 index 00000000..f53e77cf --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/AbstractNotification.java @@ -0,0 +1,260 @@ +/* + * Copyright (c) 2013 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.api.client.googleapis.notifications; + +import com.google.api.client.util.Beta; +import com.google.api.client.util.Objects; +import com.google.api.client.util.Preconditions; + +/** + * {@link Beta}
+ * Notification metadata sent to this client about a watched resource. + * + *

+ * Implementation is not thread-safe. + *

+ * + * @author Yaniv Inbar + * @author Matthias Linder (mlinder) + * @since 1.16 + */ +@Beta +public abstract class AbstractNotification { + + /** Message number (a monotonically increasing value starting with 1). */ + private long messageNumber; + + /** {@link ResourceStates Resource state}. */ + private String resourceState; + + /** Opaque ID for the watched resource that is stable across API versions. */ + private String resourceId; + + /** + * Opaque ID (in the form of a canonicalized URI) for the watched resource that is sensitive to + * the API version. + */ + private String resourceUri; + + /** Notification channel UUID provided by the client in the watch request. */ + private String channelId; + + /** Notification channel expiration time or {@code null} for none. */ + private String channelExpiration; + + /** + * Notification channel token (an opaque string) provided by the client in the watch request or + * {@code null} for none. + */ + private String channelToken; + + /** Type of change performed on the resource or {@code null} for none. */ + private String changed; + + /** + * @param messageNumber message number (a monotonically increasing value starting with 1) + * @param resourceState {@link ResourceStates resource state} + * @param resourceId opaque ID for the watched resource that is stable across API versions + * @param resourceUri opaque ID (in the form of a canonicalized URI) for the watched resource that + * is sensitive to the API version + * @param channelId notification channel UUID provided by the client in the watch request + */ + protected AbstractNotification(long messageNumber, String resourceState, String resourceId, + String resourceUri, String channelId) { + setMessageNumber(messageNumber); + setResourceState(resourceState); + setResourceId(resourceId); + setResourceUri(resourceUri); + setChannelId(channelId); + } + + /** Copy constructor based on a source notification object. */ + protected AbstractNotification(AbstractNotification source) { + this(source.getMessageNumber(), source.getResourceState(), source.getResourceId(), source + .getResourceUri(), source.getChannelId()); + setChannelExpiration(source.getChannelExpiration()); + setChannelToken(source.getChannelToken()); + setChanged(source.getChanged()); + } + + @Override + public String toString() { + return toStringHelper().toString(); + } + + /** Returns the helper for {@link #toString()}. */ + protected Objects.ToStringHelper toStringHelper() { + return Objects.toStringHelper(this).add("messageNumber", messageNumber) + .add("resourceState", resourceState).add("resourceId", resourceId) + .add("resourceUri", resourceUri).add("channelId", channelId) + .add("channelExpiration", channelExpiration).add("channelToken", channelToken) + .add("changed", changed); + } + + /** Returns the message number (a monotonically increasing value starting with 1). */ + public final long getMessageNumber() { + return messageNumber; + } + + /** + * Sets the message number (a monotonically increasing value starting with 1). + * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + public AbstractNotification setMessageNumber(long messageNumber) { + Preconditions.checkArgument(messageNumber >= 1); + this.messageNumber = messageNumber; + return this; + } + + /** Returns the {@link ResourceStates resource state}. */ + public final String getResourceState() { + return resourceState; + } + + /** + * Sets the {@link ResourceStates resource state}. + * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + public AbstractNotification setResourceState(String resourceState) { + this.resourceState = Preconditions.checkNotNull(resourceState); + return this; + } + + /** Returns the opaque ID for the watched resource that is stable across API versions. */ + public final String getResourceId() { + return resourceId; + } + + /** + * Sets the opaque ID for the watched resource that is stable across API versions. + * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + public AbstractNotification setResourceId(String resourceId) { + this.resourceId = Preconditions.checkNotNull(resourceId); + return this; + } + + /** + * Returns the opaque ID (in the form of a canonicalized URI) for the watched resource that is + * sensitive to the API version. + */ + public final String getResourceUri() { + return resourceUri; + } + + /** + * Sets the opaque ID (in the form of a canonicalized URI) for the watched resource that is + * sensitive to the API version. + * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + public AbstractNotification setResourceUri(String resourceUri) { + this.resourceUri = Preconditions.checkNotNull(resourceUri); + return this; + } + + /** Returns the notification channel UUID provided by the client in the watch request. */ + public final String getChannelId() { + return channelId; + } + + /** + * Sets the notification channel UUID provided by the client in the watch request. + * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + public AbstractNotification setChannelId(String channelId) { + this.channelId = Preconditions.checkNotNull(channelId); + return this; + } + + /** Returns the notification channel expiration time or {@code null} for none. */ + public final String getChannelExpiration() { + return channelExpiration; + } + + /** + * Sets the notification channel expiration time or {@code null} for none. + * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + public AbstractNotification setChannelExpiration(String channelExpiration) { + this.channelExpiration = channelExpiration; + return this; + } + + /** + * Returns the notification channel token (an opaque string) provided by the client in the watch + * request or {@code null} for none. + */ + public final String getChannelToken() { + return channelToken; + } + + /** + * Sets the notification channel token (an opaque string) provided by the client in the watch + * request or {@code null} for none. + * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + public AbstractNotification setChannelToken(String channelToken) { + this.channelToken = channelToken; + return this; + } + + /** + * Returns the type of change performed on the resource or {@code null} for none. + */ + public final String getChanged() { + return changed; + } + + /** + * Sets the type of change performed on the resource or {@code null} for none. + * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + public AbstractNotification setChanged(String changed) { + this.changed = changed; + return this; + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/NotificationUtils.java b/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/NotificationUtils.java new file mode 100644 index 00000000..c39cbab2 --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/NotificationUtils.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2013 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.api.client.googleapis.notifications; + +import java.util.UUID; + +/** + * Utilities for notifications and notification channels. + * + * @author Yaniv Inbar + * @since 1.16 + */ +public final class NotificationUtils { + + /** Returns a new random UUID string to be used as a notification channel ID. */ + public static String randomUuidString() { + return UUID.randomUUID().toString(); + } + + private NotificationUtils() { + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/ResourceStates.java b/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/ResourceStates.java new file mode 100644 index 00000000..5de4b204 --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/ResourceStates.java @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2013 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.api.client.googleapis.notifications; + +import com.google.api.client.util.Beta; + +/** + * {@link Beta}
+ * Standard resource states used by notifications. + * + * @author Yaniv Inbar + * @since 1.16 + */ +@Beta +public final class ResourceStates { + + /** Notification that the subscription is alive (comes with no payload). */ + public static final String SYNC = "SYNC"; + + /** Resource exists, for example on a create or update. */ + public static final String EXISTS = "EXISTS"; + + /** Resource does not exist, for example on a delete. */ + public static final String NOT_EXISTS = "NOT_EXISTS"; + + private ResourceStates() { + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/StoredChannel.java b/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/StoredChannel.java new file mode 100644 index 00000000..36a52cc4 --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/StoredChannel.java @@ -0,0 +1,270 @@ +/* + * Copyright (c) 2013 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.api.client.googleapis.notifications; + +import com.google.api.client.util.Beta; +import com.google.api.client.util.Objects; +import com.google.api.client.util.Preconditions; +import com.google.api.client.util.store.DataStore; +import com.google.api.client.util.store.DataStoreFactory; + +import java.io.IOException; +import java.io.Serializable; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReentrantLock; + +/** + * {@link Beta}
+ * Notification channel information to be stored in a data store. + * + *

+ * Implementation is thread safe. + *

+ * + * @author Yaniv Inbar + * @author Matthias Linder (mlinder) + * @since 1.16 + */ +@Beta +public final class StoredChannel implements Serializable { + + /** Default data store ID. */ + public static final String DEFAULT_DATA_STORE_ID = StoredChannel.class.getSimpleName(); + + private static final long serialVersionUID = 1L; + + /** Lock on access to the store. */ + private final Lock lock = new ReentrantLock(); + + /** Notification callback called when a notification is received for this subscription. */ + private final UnparsedNotificationCallback notificationCallback; + + /** + * Arbitrary string provided by the client associated with this subscription that is delivered to + * the target address with each notification or {@code null} for none. + */ + private String clientToken; + + /** + * Milliseconds in Unix time at which the subscription will expire or {@code null} for an infinite + * TTL. + */ + private Long expiration; + + /** Subscription UUID. */ + private final String id; + + /** + * Opaque ID for the subscribed resource that is stable across API versions or {@code null} for + * none. + */ + private String topicId; + + /** + * Constructor with a random UUID using {@link NotificationUtils#randomUuidString()}. + * + * @param notificationCallback notification handler called when a notification is received for + * this subscription + */ + public StoredChannel(UnparsedNotificationCallback notificationCallback) { + this(notificationCallback, NotificationUtils.randomUuidString()); + } + + /** + * Constructor with a custom UUID. + * + * @param notificationCallback notification handler called when a notification is received for + * this subscription + * @param id subscription UUID + */ + public StoredChannel(UnparsedNotificationCallback notificationCallback, String id) { + this.notificationCallback = Preconditions.checkNotNull(notificationCallback); + this.id = Preconditions.checkNotNull(id); + } + + /** + * Stores this notification channel in the notification channel data store, which is derived from + * {@link #getDefaultDataStore(DataStoreFactory)} on the given data store factory. + * + *

+ * It is important that this method be called before the watch HTTP request is made in case the + * notification is received before the watch HTTP response is received. + *

+ * + * @param dataStoreFactory data store factory + */ + public StoredChannel store(DataStoreFactory dataStoreFactory) throws IOException { + return store(getDefaultDataStore(dataStoreFactory)); + } + + /** + * Stores this notification channel in the given notification channel data store. + * + *

+ * It is important that this method be called before the watch HTTP request is made in case the + * notification is received before the watch HTTP response is received. + *

+ * + * @param dataStore notification channel data store + */ + public StoredChannel store(DataStore dataStore) throws IOException { + lock.lock(); + try { + dataStore.set(getId(), this); + return this; + } finally { + lock.unlock(); + } + } + + /** + * Returns the notification callback called when a notification is received for this subscription. + */ + public UnparsedNotificationCallback getNotificationCallback() { + lock.lock(); + try { + return notificationCallback; + } finally { + lock.unlock(); + } + } + + /** + * Returns the arbitrary string provided by the client associated with this subscription that is + * delivered to the target address with each notification or {@code null} for none. + */ + public String getClientToken() { + lock.lock(); + try { + return clientToken; + } finally { + lock.unlock(); + } + } + + /** + * Sets the the arbitrary string provided by the client associated with this subscription that is + * delivered to the target address with each notification or {@code null} for none. + */ + public StoredChannel setClientToken(String clientToken) { + lock.lock(); + try { + this.clientToken = clientToken; + } finally { + lock.unlock(); + } + return this; + } + + /** + * Returns the milliseconds in Unix time at which the subscription will expire or {@code null} for + * an infinite TTL. + */ + public Long getExpiration() { + lock.lock(); + try { + return expiration; + } finally { + lock.unlock(); + } + } + + /** + * Sets the milliseconds in Unix time at which the subscription will expire or {@code null} for an + * infinite TTL. + */ + public StoredChannel setExpiration(Long expiration) { + lock.lock(); + try { + this.expiration = expiration; + } finally { + lock.unlock(); + } + return this; + } + + /** Returns the subscription UUID. */ + public String getId() { + lock.lock(); + try { + return id; + } finally { + lock.unlock(); + } + } + + /** + * Returns the opaque ID for the subscribed resource that is stable across API versions or + * {@code null} for none. + */ + public String getTopicId() { + lock.lock(); + try { + return topicId; + } finally { + lock.unlock(); + } + } + + /** + * Sets the opaque ID for the subscribed resource that is stable across API versions or + * {@code null} for none. + */ + public StoredChannel setTopicId(String topicId) { + lock.lock(); + try { + this.topicId = topicId; + } finally { + lock.unlock(); + } + return this; + } + + @Override + public String toString() { + return Objects.toStringHelper(StoredChannel.class) + .add("notificationCallback", getNotificationCallback()).add("clientToken", getClientToken()) + .add("expiration", getExpiration()).add("id", getId()).add("topicId", getTopicId()) + .toString(); + } + + @Override + public boolean equals(Object other) { + if (this == other) { + return true; + } + if (!(other instanceof StoredChannel)) { + return false; + } + StoredChannel o = (StoredChannel) other; + return getId().equals(o.getId()); + } + + @Override + public int hashCode() { + return getId().hashCode(); + } + + /** + * Returns the stored channel data store using the ID {@link #DEFAULT_DATA_STORE_ID}. + * + * @param dataStoreFactory data store factory + * @return stored channel data store + */ + public static DataStore getDefaultDataStore(DataStoreFactory dataStoreFactory) + throws IOException { + return dataStoreFactory.getDataStore(DEFAULT_DATA_STORE_ID); + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/TypedNotification.java b/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/TypedNotification.java new file mode 100644 index 00000000..e3da8d0b --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/TypedNotification.java @@ -0,0 +1,131 @@ +/* + * Copyright (c) 2013 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.api.client.googleapis.notifications; + +import com.google.api.client.util.Beta; + +/** + * {@link Beta}
+ * Notification metadata and parsed content sent to this client about a watched resource. + * + *

+ * Implementation is not thread-safe. + *

+ * + * @param Java type of the notification content + * + * @author Yaniv Inbar + * @author Matthias Linder (mlinder) + * @since 1.16 + */ +@Beta +public class TypedNotification extends AbstractNotification { + + /** Parsed notification content or {@code null} for none. */ + private T content; + + /** + * @param messageNumber message number (a monotonically increasing value starting with 1) + * @param resourceState {@link ResourceStates resource state} + * @param resourceId opaque ID for the watched resource that is stable across API versions + * @param resourceUri opaque ID (in the form of a canonicalized URI) for the watched resource that + * is sensitive to the API version + * @param channelId notification channel UUID provided by the client in the watch request + */ + public TypedNotification(long messageNumber, String resourceState, String resourceId, + String resourceUri, String channelId) { + super(messageNumber, resourceState, resourceId, resourceUri, channelId); + } + + /** + * @param sourceNotification source notification metadata to copy + */ + public TypedNotification(UnparsedNotification sourceNotification) { + super(sourceNotification); + } + + /** + * Returns the parsed notification content or {@code null} for none. + */ + public final T getContent() { + return content; + } + + /** + * Sets the parsed notification content or {@code null} for none. + * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + public TypedNotification setContent(T content) { + this.content = content; + return this; + } + + @Override + @SuppressWarnings("unchecked") + public TypedNotification setMessageNumber(long messageNumber) { + return (TypedNotification) super.setMessageNumber(messageNumber); + } + + @Override + @SuppressWarnings("unchecked") + public TypedNotification setResourceState(String resourceState) { + return (TypedNotification) super.setResourceState(resourceState); + } + + @Override + @SuppressWarnings("unchecked") + public TypedNotification setResourceId(String resourceId) { + return (TypedNotification) super.setResourceId(resourceId); + } + + @Override + @SuppressWarnings("unchecked") + public TypedNotification setResourceUri(String resourceUri) { + return (TypedNotification) super.setResourceUri(resourceUri); + } + + @Override + @SuppressWarnings("unchecked") + public TypedNotification setChannelId(String channelId) { + return (TypedNotification) super.setChannelId(channelId); + } + + @Override + @SuppressWarnings("unchecked") + public TypedNotification setChannelExpiration(String channelExpiration) { + return (TypedNotification) super.setChannelExpiration(channelExpiration); + } + + @Override + @SuppressWarnings("unchecked") + public TypedNotification setChannelToken(String channelToken) { + return (TypedNotification) super.setChannelToken(channelToken); + } + + @Override + @SuppressWarnings("unchecked") + public TypedNotification setChanged(String changed) { + return (TypedNotification) super.setChanged(changed); + } + + @Override + public String toString() { + return super.toStringHelper().add("content", content).toString(); + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/TypedNotificationCallback.java b/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/TypedNotificationCallback.java new file mode 100644 index 00000000..4c912d1b --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/TypedNotificationCallback.java @@ -0,0 +1,112 @@ +/* + * Copyright (c) 2013 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.api.client.googleapis.notifications; + +import com.google.api.client.http.HttpMediaType; +import com.google.api.client.util.Beta; +import com.google.api.client.util.ObjectParser; +import com.google.api.client.util.Preconditions; + +import java.io.IOException; +import java.nio.charset.Charset; + +/** + * {@link Beta}
+ * Callback to receive notifications for watched resource in which the . Callback which is used to + * receive typed {@link AbstractNotification}s after subscribing to a topic. + * + *

+ * Must NOT be implemented in form of an anonymous class as this will break serialization. + *

+ * + *

+ * Implementation should be thread-safe. + *

+ * + * Example usage: + * + *
+  static class MyNotificationCallback
+      extends JsonNotificationCallback{@literal <}ListResponse{@literal >} {
+
+    private static final long serialVersionUID = 1L;
+
+    {@literal @}Override
+    protected void onNotification(
+        StoredChannel subscription, Notification notification, ListResponse content) {
+      switch (notification.getResourceState()) {
+        case ResourceStates.SYNC:
+          break;
+        case ResourceStates.EXISTS:
+          break;
+        case ResourceStates.NOT_EXISTS:
+          break;
+      }
+    }
+
+    {@literal @}Override
+    protected ObjectParser getObjectParser(Notification notification) throws IOException {
+      return new JsonObjectParser(new JacksonFactory());
+    }
+
+    {@literal @}Override
+    protected Class{@literal <}ListResponse{@literal >} getDataClass() throws IOException {
+      return ListResponse.class;
+    }
+  }
+ * 
+ * + * @param Java type of the notification content + * @author Yaniv Inbar + * @author Matthias Linder (mlinder) + * @since 1.16 + */ +@Beta +public abstract class TypedNotificationCallback implements UnparsedNotificationCallback { + + private static final long serialVersionUID = 1L; + + /** + * Handles a received typed notification. + * + * @param storedChannel stored notification channel + * @param notification typed notification + */ + protected abstract void onNotification( + StoredChannel storedChannel, TypedNotification notification) throws IOException; + + /** Returns an {@link ObjectParser} which can be used to parse this notification. */ + protected abstract ObjectParser getObjectParser() throws IOException; + + /** + * Returns the data class to parse the notification content into or {@code Void.class} if no + * notification content is expected. + */ + protected abstract Class getDataClass() throws IOException; + + public final void onNotification(StoredChannel storedChannel, UnparsedNotification notification) + throws IOException { + TypedNotification typedNotification = new TypedNotification(notification); + // TODO(yanivi): how to properly detect if there is no content? + String contentType = notification.getContentType(); + if (contentType != null) { + Charset charset = new HttpMediaType(contentType).getCharsetParameter(); + Class dataClass = Preconditions.checkNotNull(getDataClass()); + typedNotification.setContent( + getObjectParser().parseAndClose(notification.getContentStream(), charset, dataClass)); + } + onNotification(storedChannel, typedNotification); + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/UnparsedNotification.java b/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/UnparsedNotification.java new file mode 100644 index 00000000..e9b65951 --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/UnparsedNotification.java @@ -0,0 +1,141 @@ +/* + * Copyright (c) 2013 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.api.client.googleapis.notifications; + +import com.google.api.client.util.Beta; + +import java.io.InputStream; + +/** + * {@link Beta}
+ * Notification metadata and unparsed content stream sent to this client about a watched resource. + * + *

+ * Implementation is not thread-safe. + *

+ * + * @author Yaniv Inbar + * @author Matthias Linder (mlinder) + * @since 1.16 + */ +@Beta +public class UnparsedNotification extends AbstractNotification { + + /** Notification content media type for the content stream or {@code null} for none or unknown. */ + private String contentType; + + /** Notification content input stream or {@code null} for none. */ + private InputStream contentStream; + + /** + * @param messageNumber message number (a monotonically increasing value starting with 1) + * @param resourceState {@link ResourceStates resource state} + * @param resourceId opaque ID for the watched resource that is stable across API versions + * @param resourceUri opaque ID (in the form of a canonicalized URI) for the watched resource that + * is sensitive to the API version + * @param channelId notification channel UUID provided by the client in the watch request + */ + public UnparsedNotification(long messageNumber, String resourceState, String resourceId, + String resourceUri, String channelId) { + super(messageNumber, resourceState, resourceId, resourceUri, channelId); + } + + /** + * Returns the notification content media type for the content stream or {@code null} for none or + * unknown. + */ + public final String getContentType() { + return contentType; + } + + /** + * Sets the notification content media type for the content stream or {@code null} for none or + * unknown. + * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + public UnparsedNotification setContentType(String contentType) { + this.contentType = contentType; + return this; + } + + /** + * Returns the notification content input stream or {@code null} for none. + */ + public final InputStream getContentStream() { + return contentStream; + } + + /** + * Sets the notification content content input stream or {@code null} for none. + * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + public UnparsedNotification setContentStream(InputStream contentStream) { + this.contentStream = contentStream; + return this; + } + + @Override + public UnparsedNotification setMessageNumber(long messageNumber) { + return (UnparsedNotification) super.setMessageNumber(messageNumber); + } + + @Override + public UnparsedNotification setResourceState(String resourceState) { + return (UnparsedNotification) super.setResourceState(resourceState); + } + + @Override + public UnparsedNotification setResourceId(String resourceId) { + return (UnparsedNotification) super.setResourceId(resourceId); + } + + @Override + public UnparsedNotification setResourceUri(String resourceUri) { + return (UnparsedNotification) super.setResourceUri(resourceUri); + } + + @Override + public UnparsedNotification setChannelId(String channelId) { + return (UnparsedNotification) super.setChannelId(channelId); + } + + @Override + public UnparsedNotification setChannelExpiration(String channelExpiration) { + return (UnparsedNotification) super.setChannelExpiration(channelExpiration); + } + + @Override + public UnparsedNotification setChannelToken(String channelToken) { + return (UnparsedNotification) super.setChannelToken(channelToken); + } + + @Override + public UnparsedNotification setChanged(String changed) { + return (UnparsedNotification) super.setChanged(changed); + } + + @Override + public String toString() { + return super.toStringHelper().add("contentType", contentType).toString(); + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/UnparsedNotificationCallback.java b/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/UnparsedNotificationCallback.java new file mode 100644 index 00000000..79fec239 --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/UnparsedNotificationCallback.java @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2013 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.api.client.googleapis.notifications; + +import com.google.api.client.util.Beta; + +import java.io.IOException; +import java.io.Serializable; + +/** + * {@link Beta}
+ * Callback to receive unparsed notifications for watched resource. + * + *

+ * Must NOT be implemented in form of an anonymous class since this would break serialization. + *

+ * + *

+ * Should be thread-safe as several notifications might be processed at the same time. + *

+ * + * Example usage: + * + *
+  static class MyNotificationCallback implements UnparsedNotificationCallback {
+
+    private static final long serialVersionUID = 1L;
+
+    {@literal @}Override
+    public void onNotification(StoredChannel storedChannel, UnparsedNotification notification) {
+      String contentType = notification.getContentType();
+      InputStream contentStream = notification.getContentStream();
+      switch (notification.getResourceState()) {
+        case ResourceStates.SYNC:
+          break;
+        case ResourceStates.EXISTS:
+          break;
+        case ResourceStates.NOT_EXISTS:
+          break;
+      }
+    }
+  }
+ * 
+ * + * @author Yaniv Inbar + * @author Matthias Linder (mlinder) + * @since 1.16 + */ +@Beta +public interface UnparsedNotificationCallback extends Serializable { + + /** + * Handles a received unparsed notification. + * + * @param storedChannel stored notification channel + * @param notification unparsed notification + */ + void onNotification(StoredChannel storedChannel, UnparsedNotification notification) + throws IOException; +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/json/JsonNotificationCallback.java b/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/json/JsonNotificationCallback.java new file mode 100644 index 00000000..b8e9e5bd --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/json/JsonNotificationCallback.java @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2013 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.api.client.googleapis.notifications.json; + +import com.google.api.client.googleapis.notifications.TypedNotificationCallback; +import com.google.api.client.json.JsonFactory; +import com.google.api.client.json.JsonObjectParser; +import com.google.api.client.util.Beta; + +import java.io.IOException; + +/** + * {@link Beta}
+ * A {@link TypedNotificationCallback} which uses an JSON content encoding. + * + *

+ * Must NOT be implemented in form of an anonymous class as this will break serialization. + *

+ * + *

+ * Implementation should be thread-safe. + *

+ * + * Example usage: + * + *
+  static class MyNotificationCallback
+      extends JsonNotificationCallback{@literal <}ListResponse{@literal >} {
+
+    private static final long serialVersionUID = 1L;
+
+    {@literal @}Override
+    protected void onNotification(
+        StoredChannel channel, TypedNotification{@literal <}ListResponse{@literal >} notification) {
+      ListResponse content = notification.getContent();
+      switch (notification.getResourceState()) {
+        case ResourceStates.SYNC:
+          break;
+        case ResourceStates.EXISTS:
+          break;
+        case ResourceStates.NOT_EXISTS:
+          break;
+      }
+    }
+
+    {@literal @}Override
+    protected JsonFactory getJsonFactory() throws IOException {
+      return new JacksonFactory();
+    }
+
+    {@literal @}Override
+    protected Class{@literal <}ListResponse{@literal >} getDataClass() throws IOException {
+      return ListResponse.class;
+    }
+  }
+ * 
+ * + * @param Type of the data contained within a notification + * @author Yaniv Inbar + * @since 1.16 + */ +@Beta +public abstract class JsonNotificationCallback extends TypedNotificationCallback { + + private static final long serialVersionUID = 1L; + + @Override + protected final JsonObjectParser getObjectParser() throws IOException { + return new JsonObjectParser(getJsonFactory()); + } + + /** Returns the JSON factory to use to parse the notification content. */ + protected abstract JsonFactory getJsonFactory() throws IOException; +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/json/package-info.java b/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/json/package-info.java new file mode 100644 index 00000000..4252b92e --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/json/package-info.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2013 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. + */ + +/** + * {@link com.google.api.client.util.Beta}
+ * JSON-based notification handling for notification channels. + * + * @author Yaniv Inbar + * @since 1.16 + */ +@com.google.api.client.util.Beta +package com.google.api.client.googleapis.notifications.json; + diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/package-info.java b/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/package-info.java new file mode 100644 index 00000000..20c06903 --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/package-info.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2013 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. + */ + +/** + * {@link com.google.api.client.util.Beta}
+ * Support for notification channels to listen for changes to watched Google API resources. + * + * @author Yaniv Inbar + * @author Matthias Linder (mlinder) + * @since 1.16 + */ +@com.google.api.client.util.Beta +package com.google.api.client.googleapis.notifications; + diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/package-info.java b/google-api-client/src/main/java/com/google/api/client/googleapis/package-info.java new file mode 100644 index 00000000..6057d481 --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/package-info.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2010 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. + */ + +/** + * Google APIs. + * + * @since 1.0 + * @author Yaniv Inbar + */ + +package com.google.api.client.googleapis; + diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/services/AbstractGoogleClient.java b/google-api-client/src/main/java/com/google/api/client/googleapis/services/AbstractGoogleClient.java new file mode 100644 index 00000000..179cba40 --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/services/AbstractGoogleClient.java @@ -0,0 +1,548 @@ +/* + * 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.api.client.googleapis.services; + +import com.google.api.client.googleapis.batch.BatchRequest; +import com.google.api.client.http.GenericUrl; +import com.google.api.client.http.HttpRequestFactory; +import com.google.api.client.http.HttpRequestInitializer; +import com.google.api.client.http.HttpTransport; +import com.google.api.client.util.ObjectParser; +import com.google.api.client.util.Preconditions; +import com.google.api.client.util.Strings; + +import java.io.IOException; +import java.util.logging.Logger; + +/** + * Abstract thread-safe Google client. + * + * @since 1.12 + * @author Yaniv Inbar + */ +public abstract class AbstractGoogleClient { + + static final Logger LOGGER = Logger.getLogger(AbstractGoogleClient.class.getName()); + + /** The request factory for connections to the server. */ + private final HttpRequestFactory requestFactory; + + /** + * Initializer to use when creating an {@link AbstractGoogleClientRequest} or {@code null} for + * none. + */ + private final GoogleClientRequestInitializer googleClientRequestInitializer; + + /** + * Root URL of the service, for example {@code "https://www.googleapis.com/"}. Must be URL-encoded + * and must end with a "/". + */ + private final String rootUrl; + + /** + * Service path, for example {@code "tasks/v1/"}. Must be URL-encoded and must end with a "/". + */ + private final String servicePath; + + /** + * Application name to be sent in the User-Agent header of each request or {@code null} for none. + */ + private final String applicationName; + + /** Object parser or {@code null} for none. */ + private final ObjectParser objectParser; + + /** Whether discovery pattern checks should be suppressed on required parameters. */ + private boolean suppressPatternChecks; + + /** Whether discovery required parameter checks should be suppressed. */ + private boolean suppressRequiredParameterChecks; + + /** + * @param builder builder + * + * @since 1.14 + */ + protected AbstractGoogleClient(Builder builder) { + googleClientRequestInitializer = builder.googleClientRequestInitializer; + rootUrl = normalizeRootUrl(builder.rootUrl); + servicePath = normalizeServicePath(builder.servicePath); + if (Strings.isNullOrEmpty(builder.applicationName)) { + LOGGER.warning("Application name is not set. Call Builder#setApplicationName."); + } + applicationName = builder.applicationName; + requestFactory = builder.httpRequestInitializer == null + ? builder.transport.createRequestFactory() + : builder.transport.createRequestFactory(builder.httpRequestInitializer); + objectParser = builder.objectParser; + suppressPatternChecks = builder.suppressPatternChecks; + suppressRequiredParameterChecks = builder.suppressRequiredParameterChecks; + } + + /** + * Returns the URL-encoded root URL of the service, for example + * {@code "https://www.googleapis.com/"}. + * + *

+ * Must end with a "/". + *

+ */ + public final String getRootUrl() { + return rootUrl; + } + + /** + * Returns the URL-encoded service path of the service, for example {@code "tasks/v1/"}. + * + *

+ * Must end with a "/" and not begin with a "/". It is allowed to be an empty string {@code ""} or + * a forward slash {@code "/"}, if it is a forward slash then it is treated as an empty string + *

+ */ + public final String getServicePath() { + return servicePath; + } + + /** + * Returns the URL-encoded base URL of the service, for example + * {@code "https://www.googleapis.com/tasks/v1/"}. + * + *

+ * Must end with a "/". It is guaranteed to be equal to {@code getRootUrl() + getServicePath()}. + *

+ */ + public final String getBaseUrl() { + return rootUrl + servicePath; + } + + /** + * Returns the application name to be sent in the User-Agent header of each request or + * {@code null} for none. + */ + public final String getApplicationName() { + return applicationName; + } + + /** Returns the HTTP request factory. */ + public final HttpRequestFactory getRequestFactory() { + return requestFactory; + } + + /** Returns the Google client request initializer or {@code null} for none. */ + public final GoogleClientRequestInitializer getGoogleClientRequestInitializer() { + return googleClientRequestInitializer; + } + + /** + * Returns the object parser or {@code null} for none. + * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + public ObjectParser getObjectParser() { + return objectParser; + } + + /** + * Initializes a {@link AbstractGoogleClientRequest} using a + * {@link GoogleClientRequestInitializer}. + * + *

+ * Must be called before the Google client request is executed, preferably right after the request + * is instantiated. Sample usage: + *

+ * + *
+    public class Get extends HttpClientRequest {
+      ...
+    }
+
+    public Get get(String userId) throws IOException {
+      Get result = new Get(userId);
+      initialize(result);
+      return result;
+    }
+   * 
+ * + *

+ * Subclasses may override by calling the super implementation. + *

+ * + * @param httpClientRequest Google client request type + */ + protected void initialize(AbstractGoogleClientRequest httpClientRequest) throws IOException { + if (getGoogleClientRequestInitializer() != null) { + getGoogleClientRequestInitializer().initialize(httpClientRequest); + } + } + + /** + * Create an {@link BatchRequest} object from this Google API client instance. + * + *

+ * Sample usage: + *

+ * + *
+     client.batch()
+         .queue(...)
+         .queue(...)
+         .execute();
+   * 
+ * + * @return newly created Batch request + */ + public final BatchRequest batch() { + return batch(null); + } + + /** + * Create an {@link BatchRequest} object from this Google API client instance. + * + *

+ * Sample usage: + *

+ * + *
+     client.batch(httpRequestInitializer)
+         .queue(...)
+         .queue(...)
+         .execute();
+   * 
+ * + * @param httpRequestInitializer The initializer to use when creating the top-level batch HTTP + * request or {@code null} for none + * @return newly created Batch request + */ + public final BatchRequest batch(HttpRequestInitializer httpRequestInitializer) { + BatchRequest batch = + new BatchRequest(getRequestFactory().getTransport(), httpRequestInitializer); + batch.setBatchUrl(new GenericUrl(getRootUrl() + "batch")); + return batch; + } + + /** Returns whether discovery pattern checks should be suppressed on required parameters. */ + public final boolean getSuppressPatternChecks() { + return suppressPatternChecks; + } + + /** + * Returns whether discovery required parameter checks should be suppressed. + * + * @since 1.14 + */ + public final boolean getSuppressRequiredParameterChecks() { + return suppressRequiredParameterChecks; + } + + /** If the specified root URL does not end with a "/" then a "/" is added to the end. */ + static String normalizeRootUrl(String rootUrl) { + Preconditions.checkNotNull(rootUrl, "root URL cannot be null."); + if (!rootUrl.endsWith("/")) { + rootUrl += "/"; + } + return rootUrl; + } + + /** + * If the specified service path does not end with a "/" then a "/" is added to the end. If the + * specified service path begins with a "/" then the "/" is removed. + */ + static String normalizeServicePath(String servicePath) { + Preconditions.checkNotNull(servicePath, "service path cannot be null"); + if (servicePath.length() == 1) { + Preconditions.checkArgument( + "/".equals(servicePath), "service path must equal \"/\" if it is of length 1."); + servicePath = ""; + } else if (servicePath.length() > 0) { + if (!servicePath.endsWith("/")) { + servicePath += "/"; + } + if (servicePath.startsWith("/")) { + servicePath = servicePath.substring(1); + } + } + return servicePath; + } + + /** + * Builder for {@link AbstractGoogleClient}. + * + *

+ * Implementation is not thread-safe. + *

+ */ + public abstract static class Builder { + + /** HTTP transport. */ + final HttpTransport transport; + + /** + * Initializer to use when creating an {@link AbstractGoogleClientRequest} or {@code null} for + * none. + */ + GoogleClientRequestInitializer googleClientRequestInitializer; + + /** HTTP request initializer or {@code null} for none. */ + HttpRequestInitializer httpRequestInitializer; + + /** Object parser to use for parsing responses. */ + final ObjectParser objectParser; + + /** The root URL of the service, for example {@code "https://www.googleapis.com/"}. */ + String rootUrl; + + /** The service path of the service, for example {@code "tasks/v1/"}. */ + String servicePath; + + /** + * Application name to be sent in the User-Agent header of each request or {@code null} for + * none. + */ + String applicationName; + + /** Whether discovery pattern checks should be suppressed on required parameters. */ + boolean suppressPatternChecks; + + /** Whether discovery required parameter checks should be suppressed. */ + boolean suppressRequiredParameterChecks; + + /** + * Returns an instance of a new builder. + * + * @param transport The transport to use for requests + * @param rootUrl root URL of the service. Must end with a "/" + * @param servicePath service path + * @param objectParser object parser or {@code null} for none + * @param httpRequestInitializer HTTP request initializer or {@code null} for none + */ + protected Builder(HttpTransport transport, String rootUrl, String servicePath, + ObjectParser objectParser, HttpRequestInitializer httpRequestInitializer) { + this.transport = Preconditions.checkNotNull(transport); + this.objectParser = objectParser; + setRootUrl(rootUrl); + setServicePath(servicePath); + this.httpRequestInitializer = httpRequestInitializer; + } + + /** Builds a new instance of {@link AbstractGoogleClient}. */ + public abstract AbstractGoogleClient build(); + + /** Returns the HTTP transport. */ + public final HttpTransport getTransport() { + return transport; + } + + /** + * Returns the object parser or {@code null} for none. + * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + public ObjectParser getObjectParser() { + return objectParser; + } + + /** + * Returns the URL-encoded root URL of the service, for example + * {@code https://www.googleapis.com/}. + * + *

+ * Must be URL-encoded and must end with a "/". + *

+ */ + public final String getRootUrl() { + return rootUrl; + } + + /** + * Sets the URL-encoded root URL of the service, for example {@code https://www.googleapis.com/} + * . + *

+ * If the specified root URL does not end with a "/" then a "/" is added to the end. + *

+ * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + public Builder setRootUrl(String rootUrl) { + this.rootUrl = normalizeRootUrl(rootUrl); + return this; + } + + /** + * Returns the URL-encoded service path of the service, for example {@code "tasks/v1/"}. + * + *

+ * Must be URL-encoded and must end with a "/" and not begin with a "/". It is allowed to be an + * empty string {@code ""}. + *

+ */ + public final String getServicePath() { + return servicePath; + } + + /** + * Sets the URL-encoded service path of the service, for example {@code "tasks/v1/"}. + * + *

+ * It is allowed to be an empty string {@code ""} or a forward slash {@code "/"}, if it is a + * forward slash then it is treated as an empty string. This is determined when the library is + * generated and normally should not be changed. + *

+ * + *

+ * If the specified service path does not end with a "/" then a "/" is added to the end. If the + * specified service path begins with a "/" then the "/" is removed. + *

+ * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + public Builder setServicePath(String servicePath) { + this.servicePath = normalizeServicePath(servicePath); + return this; + } + + /** Returns the Google client request initializer or {@code null} for none. */ + public final GoogleClientRequestInitializer getGoogleClientRequestInitializer() { + return googleClientRequestInitializer; + } + + /** + * Sets the Google client request initializer or {@code null} for none. + * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + public Builder setGoogleClientRequestInitializer( + GoogleClientRequestInitializer googleClientRequestInitializer) { + this.googleClientRequestInitializer = googleClientRequestInitializer; + return this; + } + + /** Returns the HTTP request initializer or {@code null} for none. */ + public final HttpRequestInitializer getHttpRequestInitializer() { + return httpRequestInitializer; + } + + /** + * Sets the HTTP request initializer or {@code null} for none. + * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + public Builder setHttpRequestInitializer(HttpRequestInitializer httpRequestInitializer) { + this.httpRequestInitializer = httpRequestInitializer; + return this; + } + + /** + * Returns the application name to be used in the UserAgent header of each request or + * {@code null} for none. + */ + public final String getApplicationName() { + return applicationName; + } + + /** + * Sets the application name to be used in the UserAgent header of each request or {@code null} + * for none. + * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + public Builder setApplicationName(String applicationName) { + this.applicationName = applicationName; + return this; + } + + /** Returns whether discovery pattern checks should be suppressed on required parameters. */ + public final boolean getSuppressPatternChecks() { + return suppressPatternChecks; + } + + /** + * Sets whether discovery pattern checks should be suppressed on required parameters. + * + *

+ * Default value is {@code false}. + *

+ * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + public Builder setSuppressPatternChecks(boolean suppressPatternChecks) { + this.suppressPatternChecks = suppressPatternChecks; + return this; + } + + /** + * Returns whether discovery required parameter checks should be suppressed. + * + * @since 1.14 + */ + public final boolean getSuppressRequiredParameterChecks() { + return suppressRequiredParameterChecks; + } + + /** + * Sets whether discovery required parameter checks should be suppressed. + * + *

+ * Default value is {@code false}. + *

+ * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ * + * @since 1.14 + */ + public Builder setSuppressRequiredParameterChecks(boolean suppressRequiredParameterChecks) { + this.suppressRequiredParameterChecks = suppressRequiredParameterChecks; + return this; + } + + /** + * Suppresses all discovery pattern and required parameter checks. + * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ * + * @since 1.14 + */ + public Builder setSuppressAllChecks(boolean suppressAllChecks) { + return setSuppressPatternChecks(true).setSuppressRequiredParameterChecks(true); + } + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/services/AbstractGoogleClientRequest.java b/google-api-client/src/main/java/com/google/api/client/googleapis/services/AbstractGoogleClientRequest.java new file mode 100644 index 00000000..c1b2945c --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/services/AbstractGoogleClientRequest.java @@ -0,0 +1,601 @@ +/* + * 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.api.client.googleapis.services; + +import com.google.api.client.googleapis.MethodOverride; +import com.google.api.client.googleapis.batch.BatchCallback; +import com.google.api.client.googleapis.batch.BatchRequest; +import com.google.api.client.googleapis.media.MediaHttpDownloader; +import com.google.api.client.googleapis.media.MediaHttpUploader; +import com.google.api.client.http.AbstractInputStreamContent; +import com.google.api.client.http.EmptyContent; +import com.google.api.client.http.GZipEncoding; +import com.google.api.client.http.GenericUrl; +import com.google.api.client.http.HttpContent; +import com.google.api.client.http.HttpHeaders; +import com.google.api.client.http.HttpMethods; +import com.google.api.client.http.HttpRequest; +import com.google.api.client.http.HttpRequestFactory; +import com.google.api.client.http.HttpRequestInitializer; +import com.google.api.client.http.HttpResponse; +import com.google.api.client.http.HttpResponseException; +import com.google.api.client.http.HttpResponseInterceptor; +import com.google.api.client.http.UriTemplate; +import com.google.api.client.util.GenericData; +import com.google.api.client.util.Preconditions; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; + +/** + * Abstract Google client request for a {@link AbstractGoogleClient}. + * + *

+ * Implementation is not thread-safe. + *

+ * + * @param type of the response + * + * @since 1.12 + * @author Yaniv Inbar + */ +public abstract class AbstractGoogleClientRequest extends GenericData { + + /** Google client. */ + private final AbstractGoogleClient abstractGoogleClient; + + /** HTTP method. */ + private final String requestMethod; + + /** URI template for the path relative to the base URL. */ + private final String uriTemplate; + + /** HTTP content or {@code null} for none. */ + private final HttpContent httpContent; + + /** HTTP headers used for the Google client request. */ + private HttpHeaders requestHeaders = new HttpHeaders(); + + /** HTTP headers of the last response or {@code null} before request has been executed. */ + private HttpHeaders lastResponseHeaders; + + /** Status code of the last response or {@code -1} before request has been executed. */ + private int lastStatusCode = -1; + + /** Status message of the last response or {@code null} before request has been executed. */ + private String lastStatusMessage; + + /** Whether to disable GZip compression of HTTP content. */ + private boolean disableGZipContent; + + /** Response class to parse into. */ + private Class responseClass; + + /** Media HTTP uploader or {@code null} for none. */ + private MediaHttpUploader uploader; + + /** Media HTTP downloader or {@code null} for none. */ + private MediaHttpDownloader downloader; + + /** + * @param abstractGoogleClient Google client + * @param requestMethod HTTP Method + * @param uriTemplate URI template for the path relative to the base URL. If it starts with a "/" + * the base path from the base URL will be stripped out. The URI template can also be a + * full URL. URI template expansion is done using + * {@link UriTemplate#expand(String, String, Object, boolean)} + * @param httpContent HTTP content or {@code null} for none + * @param responseClass response class to parse into + */ + protected AbstractGoogleClientRequest(AbstractGoogleClient abstractGoogleClient, + String requestMethod, String uriTemplate, HttpContent httpContent, Class responseClass) { + this.responseClass = Preconditions.checkNotNull(responseClass); + this.abstractGoogleClient = Preconditions.checkNotNull(abstractGoogleClient); + this.requestMethod = Preconditions.checkNotNull(requestMethod); + this.uriTemplate = Preconditions.checkNotNull(uriTemplate); + this.httpContent = httpContent; + // application name + String applicationName = abstractGoogleClient.getApplicationName(); + if (applicationName != null) { + requestHeaders.setUserAgent(applicationName); + } + } + + /** Returns whether to disable GZip compression of HTTP content. */ + public final boolean getDisableGZipContent() { + return disableGZipContent; + } + + /** + * Sets whether to disable GZip compression of HTTP content. + * + *

+ * By default it is {@code false}. + *

+ * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + public AbstractGoogleClientRequest setDisableGZipContent(boolean disableGZipContent) { + this.disableGZipContent = disableGZipContent; + return this; + } + + /** Returns the HTTP method. */ + public final String getRequestMethod() { + return requestMethod; + } + + /** Returns the URI template for the path relative to the base URL. */ + public final String getUriTemplate() { + return uriTemplate; + } + + /** Returns the HTTP content or {@code null} for none. */ + public final HttpContent getHttpContent() { + return httpContent; + } + + /** + * Returns the Google client. + * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + public AbstractGoogleClient getAbstractGoogleClient() { + return abstractGoogleClient; + } + + /** Returns the HTTP headers used for the Google client request. */ + public final HttpHeaders getRequestHeaders() { + return requestHeaders; + } + + /** + * Sets the HTTP headers used for the Google client request. + * + *

+ * These headers are set on the request after {@link #buildHttpRequest} is called, this means that + * {@link HttpRequestInitializer#initialize} is called first. + *

+ * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + public AbstractGoogleClientRequest setRequestHeaders(HttpHeaders headers) { + this.requestHeaders = headers; + return this; + } + + /** + * Returns the HTTP headers of the last response or {@code null} before request has been executed. + */ + public final HttpHeaders getLastResponseHeaders() { + return lastResponseHeaders; + } + + /** + * Returns the status code of the last response or {@code -1} before request has been executed. + */ + public final int getLastStatusCode() { + return lastStatusCode; + } + + /** + * Returns the status message of the last response or {@code null} before request has been + * executed. + */ + public final String getLastStatusMessage() { + return lastStatusMessage; + } + + /** Returns the response class to parse into. */ + public final Class getResponseClass() { + return responseClass; + } + + /** Returns the media HTTP Uploader or {@code null} for none. */ + public final MediaHttpUploader getMediaHttpUploader() { + return uploader; + } + + /** + * Initializes the media HTTP uploader based on the media content. + * + * @param mediaContent media content + */ + protected final void initializeMediaUpload(AbstractInputStreamContent mediaContent) { + HttpRequestFactory requestFactory = abstractGoogleClient.getRequestFactory(); + this.uploader = new MediaHttpUploader( + mediaContent, requestFactory.getTransport(), requestFactory.getInitializer()); + this.uploader.setInitiationRequestMethod(requestMethod); + if (httpContent != null) { + this.uploader.setMetadata(httpContent); + } + } + + /** Returns the media HTTP downloader or {@code null} for none. */ + public final MediaHttpDownloader getMediaHttpDownloader() { + return downloader; + } + + /** Initializes the media HTTP downloader. */ + protected final void initializeMediaDownload() { + HttpRequestFactory requestFactory = abstractGoogleClient.getRequestFactory(); + this.downloader = + new MediaHttpDownloader(requestFactory.getTransport(), requestFactory.getInitializer()); + } + + /** + * Creates a new instance of {@link GenericUrl} suitable for use against this service. + * + *

+ * Subclasses may override by calling the super implementation. + *

+ * + * @return newly created {@link GenericUrl} + */ + public GenericUrl buildHttpRequestUrl() { + return new GenericUrl( + UriTemplate.expand(abstractGoogleClient.getBaseUrl(), uriTemplate, this, true)); + } + + /** + * Create a request suitable for use against this service. + * + *

+ * Subclasses may override by calling the super implementation. + *

+ */ + public HttpRequest buildHttpRequest() throws IOException { + return buildHttpRequest(false); + } + + /** + * Create a request suitable for use against this service, but using HEAD instead of GET. + * + *

+ * Only supported when the original request method is GET. + *

+ * + *

+ * Subclasses may override by calling the super implementation. + *

+ */ + protected HttpRequest buildHttpRequestUsingHead() throws IOException { + return buildHttpRequest(true); + } + + /** Create a request suitable for use against this service. */ + private HttpRequest buildHttpRequest(boolean usingHead) throws IOException { + Preconditions.checkArgument(uploader == null); + Preconditions.checkArgument(!usingHead || requestMethod.equals(HttpMethods.GET)); + String requestMethodToUse = usingHead ? HttpMethods.HEAD : requestMethod; + final HttpRequest httpRequest = getAbstractGoogleClient() + .getRequestFactory().buildRequest(requestMethodToUse, buildHttpRequestUrl(), httpContent); + new MethodOverride().intercept(httpRequest); + httpRequest.setParser(getAbstractGoogleClient().getObjectParser()); + // custom methods may use POST with no content but require a Content-Length header + if (httpContent == null && (requestMethod.equals(HttpMethods.POST) + || requestMethod.equals(HttpMethods.PUT) || requestMethod.equals(HttpMethods.PATCH))) { + httpRequest.setContent(new EmptyContent()); + } + httpRequest.getHeaders().putAll(requestHeaders); + if (!disableGZipContent) { + httpRequest.setEncoding(new GZipEncoding()); + } + final HttpResponseInterceptor responseInterceptor = httpRequest.getResponseInterceptor(); + httpRequest.setResponseInterceptor(new HttpResponseInterceptor() { + + public void interceptResponse(HttpResponse response) throws IOException { + if (responseInterceptor != null) { + responseInterceptor.interceptResponse(response); + } + if (!response.isSuccessStatusCode() && httpRequest.getThrowExceptionOnExecuteError()) { + throw newExceptionOnError(response); + } + } + }); + return httpRequest; + } + + /** + * Sends the metadata request to the server and returns the raw metadata {@link HttpResponse}. + * + *

+ * Callers are responsible for disconnecting the HTTP response by calling + * {@link HttpResponse#disconnect}. Example usage: + *

+ * + *
+     HttpResponse response = request.executeUnparsed();
+     try {
+       // process response..
+     } finally {
+       response.disconnect();
+     }
+   * 
+ * + *

+ * Subclasses may override by calling the super implementation. + *

+ * + * @return the {@link HttpResponse} + */ + public HttpResponse executeUnparsed() throws IOException { + return executeUnparsed(false); + } + + /** + * Sends the media request to the server and returns the raw media {@link HttpResponse}. + * + *

+ * Callers are responsible for disconnecting the HTTP response by calling + * {@link HttpResponse#disconnect}. Example usage: + *

+ * + *
+     HttpResponse response = request.executeMedia();
+     try {
+       // process response..
+     } finally {
+       response.disconnect();
+     }
+   * 
+ * + *

+ * Subclasses may override by calling the super implementation. + *

+ * + * @return the {@link HttpResponse} + */ + protected HttpResponse executeMedia() throws IOException { + set("alt", "media"); + return executeUnparsed(); + } + + /** + * Sends the metadata request using HEAD to the server and returns the raw metadata + * {@link HttpResponse} for the response headers. + * + *

+ * Only supported when the original request method is GET. The response content is assumed to be + * empty and ignored. Calls {@link HttpResponse#ignore()} so there is no need to disconnect the + * response. Example usage: + *

+ * + *
+     HttpResponse response = request.executeUsingHead();
+     // look at response.getHeaders()
+   * 
+ * + *

+ * Subclasses may override by calling the super implementation. + *

+ * + * @return the {@link HttpResponse} + */ + protected HttpResponse executeUsingHead() throws IOException { + Preconditions.checkArgument(uploader == null); + HttpResponse response = executeUnparsed(true); + response.ignore(); + return response; + } + + /** + * Sends the metadata request using the given request method to the server and returns the raw + * metadata {@link HttpResponse}. + */ + private HttpResponse executeUnparsed(boolean usingHead) throws IOException { + HttpResponse response; + if (uploader == null) { + // normal request (not upload) + response = buildHttpRequest(usingHead).execute(); + } else { + // upload request + GenericUrl httpRequestUrl = buildHttpRequestUrl(); + HttpRequest httpRequest = getAbstractGoogleClient() + .getRequestFactory().buildRequest(requestMethod, httpRequestUrl, httpContent); + boolean throwExceptionOnExecuteError = httpRequest.getThrowExceptionOnExecuteError(); + + response = uploader.setInitiationHeaders(requestHeaders) + .setDisableGZipContent(disableGZipContent).upload(httpRequestUrl); + response.getRequest().setParser(getAbstractGoogleClient().getObjectParser()); + // process any error + if (throwExceptionOnExecuteError && !response.isSuccessStatusCode()) { + throw newExceptionOnError(response); + } + } + // process response + lastResponseHeaders = response.getHeaders(); + lastStatusCode = response.getStatusCode(); + lastStatusMessage = response.getStatusMessage(); + return response; + } + + /** + * Returns the exception to throw on an HTTP error response as defined by + * {@link HttpResponse#isSuccessStatusCode()}. + * + *

+ * It is guaranteed that {@link HttpResponse#isSuccessStatusCode()} is {@code false}. Default + * implementation is to call {@link HttpResponseException#HttpResponseException(HttpResponse)}, + * but subclasses may override. + *

+ * + * @param response HTTP response + * @return exception to throw + */ + protected IOException newExceptionOnError(HttpResponse response) { + return new HttpResponseException(response); + } + + /** + * Sends the metadata request to the server and returns the parsed metadata response. + * + *

+ * Subclasses may override by calling the super implementation. + *

+ * + * @return parsed HTTP response + */ + public T execute() throws IOException { + return executeUnparsed().parseAs(responseClass); + } + + /** + * Sends the metadata request to the server and returns the metadata content input stream of + * {@link HttpResponse}. + * + *

+ * Callers are responsible for closing the input stream after it is processed. Example sample: + *

+ * + *
+     InputStream is = request.executeAsInputStream();
+     try {
+       // Process input stream..
+     } finally {
+       is.close();
+     }
+   * 
+ * + *

+ * Subclasses may override by calling the super implementation. + *

+ * + * @return input stream of the response content + */ + public InputStream executeAsInputStream() throws IOException { + return executeUnparsed().getContent(); + } + + /** + * Sends the media request to the server and returns the media content input stream of + * {@link HttpResponse}. + * + *

+ * Callers are responsible for closing the input stream after it is processed. Example sample: + *

+ * + *
+     InputStream is = request.executeMediaAsInputStream();
+     try {
+       // Process input stream..
+     } finally {
+       is.close();
+     }
+   * 
+ * + *

+ * Subclasses may override by calling the super implementation. + *

+ * + * @return input stream of the response content + */ + protected InputStream executeMediaAsInputStream() throws IOException { + return executeMedia().getContent(); + } + + /** + * Sends the metadata request to the server and writes the metadata content input stream of + * {@link HttpResponse} into the given destination output stream. + * + *

+ * This method closes the content of the HTTP response from {@link HttpResponse#getContent()}. + *

+ * + *

+ * Subclasses may override by calling the super implementation. + *

+ * + * @param outputStream destination output stream + */ + public void executeAndDownloadTo(OutputStream outputStream) throws IOException { + executeUnparsed().download(outputStream); + } + + /** + * Sends the media request to the server and writes the media content input stream of + * {@link HttpResponse} into the given destination output stream. + * + *

+ * This method closes the content of the HTTP response from {@link HttpResponse#getContent()}. + *

+ * + *

+ * Subclasses may override by calling the super implementation. + *

+ * + * @param outputStream destination output stream + */ + protected void executeMediaAndDownloadTo(OutputStream outputStream) throws IOException { + if (downloader == null) { + executeMedia().download(outputStream); + } else { + downloader.download(buildHttpRequestUrl(), requestHeaders, outputStream); + } + } + + /** + * Queues the request into the specified batch request container using the specified error class. + * + *

+ * Batched requests are then executed when {@link BatchRequest#execute()} is called. + *

+ * + * @param batchRequest batch request container + * @param errorClass data class the unsuccessful response will be parsed into or + * {@code Void.class} to ignore the content + * @param callback batch callback + */ + public final void queue( + BatchRequest batchRequest, Class errorClass, BatchCallback callback) + throws IOException { + Preconditions.checkArgument(uploader == null, "Batching media requests is not supported"); + batchRequest.queue(buildHttpRequest(), getResponseClass(), errorClass, callback); + } + + // @SuppressWarnings was added here because this is generic class. + // see: http://stackoverflow.com/questions/4169806/java-casting-object-to-a-generic-type and + // http://www.angelikalanger.com/GenericsFAQ/FAQSections/TechnicalDetails.html#Type%20Erasure + // for more details + @SuppressWarnings("unchecked") + @Override + public AbstractGoogleClientRequest set(String fieldName, Object value) { + return (AbstractGoogleClientRequest) super.set(fieldName, value); + } + + /** + * Ensures that the specified required parameter is not null or + * {@link AbstractGoogleClient#getSuppressRequiredParameterChecks()} is true. + * + * @param value the value of the required parameter + * @param name the name of the required parameter + * @throws IllegalArgumentException if the specified required parameter is null and + * {@link AbstractGoogleClient#getSuppressRequiredParameterChecks()} is false + * @since 1.14 + */ + protected final void checkRequiredParameter(Object value, String name) { + Preconditions.checkArgument( + abstractGoogleClient.getSuppressRequiredParameterChecks() || value != null, + "Required parameter %s must be specified", name); + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/services/CommonGoogleClientRequestInitializer.java b/google-api-client/src/main/java/com/google/api/client/googleapis/services/CommonGoogleClientRequestInitializer.java new file mode 100644 index 00000000..e14fa4e8 --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/services/CommonGoogleClientRequestInitializer.java @@ -0,0 +1,133 @@ +/* + * 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.api.client.googleapis.services; + +import java.io.IOException; + + +/** + * Google common client request initializer implementation for setting properties like key and + * userIp. + * + *

+ * The simplest usage is to use it to set the key parameter: + *

+ * + *
+  public static final GoogleClientRequestInitializer KEY_INITIALIZER =
+      new CommonGoogleClientRequestInitializer(KEY);
+ * 
+ * + *

+ * There is also a constructor to set both the key and userIp parameters: + *

+ * + *
+  public static final GoogleClientRequestInitializer INITIALIZER =
+      new CommonGoogleClientRequestInitializer(KEY, USER_IP);
+ * 
+ * + *

+ * If you want to implement custom logic, extend it like this: + *

+ * + *
+  public static class MyRequestInitializer extends CommonGoogleClientRequestInitializer {
+
+    {@literal @}Override
+    public void initialize(AbstractGoogleClientRequest{@literal <}?{@literal >} request)
+        throws IOException {
+      // custom logic
+    }
+  }
+ * 
+ * + *

+ * Finally, to set the key and userIp parameters and insert custom logic, extend it like this: + *

+ * + *
+  public static class MyRequestInitializer2 extends CommonGoogleClientRequestInitializer {
+
+    public MyRequestInitializer2() {
+      super(KEY, USER_IP);
+    }
+
+    {@literal @}Override
+    public void initialize(AbstractGoogleClientRequest{@literal <}?{@literal >} request)
+        throws IOException {
+      super.initialize(request); // must be called to set the key and userIp parameters
+      // insert some additional logic
+    }
+  }
+ * 
+ * + *

+ * Subclasses should be thread-safe. + *

+ * + * @since 1.12 + * @author Yaniv Inbar + */ +public class CommonGoogleClientRequestInitializer implements GoogleClientRequestInitializer { + + /** API key or {@code null} to leave it unchanged. */ + private final String key; + + /** User IP or {@code null} to leave it unchanged. */ + private final String userIp; + + public CommonGoogleClientRequestInitializer() { + this(null); + } + + /** + * @param key API key or {@code null} to leave it unchanged + */ + public CommonGoogleClientRequestInitializer(String key) { + this(key, null); + } + + /** + * @param key API key or {@code null} to leave it unchanged + * @param userIp user IP or {@code null} to leave it unchanged + */ + public CommonGoogleClientRequestInitializer(String key, String userIp) { + this.key = key; + this.userIp = userIp; + } + + /** + * Subclasses should call super implementation in order to set the key and userIp. + * + * @throws IOException I/O exception + */ + public void initialize(AbstractGoogleClientRequest request) throws IOException { + if (key != null) { + request.put("key", key); + } + if (userIp != null) { + request.put("userIp", userIp); + } + } + + /** Returns the API key or {@code null} to leave it unchanged. */ + public final String getKey() { + return key; + } + + /** Returns the user IP or {@code null} to leave it unchanged. */ + public final String getUserIp() { + return userIp; + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/services/GoogleClientRequestInitializer.java b/google-api-client/src/main/java/com/google/api/client/googleapis/services/GoogleClientRequestInitializer.java new file mode 100644 index 00000000..c1a76cea --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/services/GoogleClientRequestInitializer.java @@ -0,0 +1,43 @@ +/* + * 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.api.client.googleapis.services; + +import java.io.IOException; + +/** + * Google client request initializer. + * + *

+ * For example, this might be used to set a key URL query parameter on all requests: + *

+ * + *
+  public class KeyRequestInitializer implements GoogleClientRequestInitializer {
+    public void initialize(GoogleClientRequest request) {
+      request.put("key", KEY);
+    }
+  }
+ * 
+ * + *

+ * Implementations should be thread-safe. + *

+ * + * @since 1.12 + * @author Yaniv Inbar + */ +public interface GoogleClientRequestInitializer { + + /** Initializes a Google client request. */ + void initialize(AbstractGoogleClientRequest request) throws IOException; +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/services/json/AbstractGoogleJsonClient.java b/google-api-client/src/main/java/com/google/api/client/googleapis/services/json/AbstractGoogleJsonClient.java new file mode 100644 index 00000000..65faf653 --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/services/json/AbstractGoogleJsonClient.java @@ -0,0 +1,134 @@ +/* + * Copyright (c) 2012 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.api.client.googleapis.services.json; + +import com.google.api.client.googleapis.services.AbstractGoogleClient; +import com.google.api.client.googleapis.services.GoogleClientRequestInitializer; +import com.google.api.client.http.HttpRequestInitializer; +import com.google.api.client.http.HttpTransport; +import com.google.api.client.json.JsonFactory; +import com.google.api.client.json.JsonObjectParser; + +import java.util.Arrays; +import java.util.Collections; + +/** + * Thread-safe Google JSON client. + * + * @since 1.12 + * @author Yaniv Inbar + */ +public abstract class AbstractGoogleJsonClient extends AbstractGoogleClient { + + /** + * @param builder builder + * + * @since 1.14 + */ + protected AbstractGoogleJsonClient(Builder builder) { + super(builder); + } + + @Override + public JsonObjectParser getObjectParser() { + return (JsonObjectParser) super.getObjectParser(); + } + + /** Returns the JSON Factory. */ + public final JsonFactory getJsonFactory() { + return getObjectParser().getJsonFactory(); + } + + /** + * Builder for {@link AbstractGoogleJsonClient}. + * + *

+ * Implementation is not thread-safe. + *

+ */ + public abstract static class Builder extends AbstractGoogleClient.Builder { + + /** + * @param transport HTTP transport + * @param jsonFactory JSON factory + * @param rootUrl root URL of the service + * @param servicePath service path + * @param httpRequestInitializer HTTP request initializer or {@code null} for none + * @param legacyDataWrapper whether using the legacy data wrapper in responses + */ + protected Builder(HttpTransport transport, JsonFactory jsonFactory, String rootUrl, + String servicePath, HttpRequestInitializer httpRequestInitializer, + boolean legacyDataWrapper) { + super(transport, rootUrl, servicePath, new JsonObjectParser.Builder( + jsonFactory).setWrapperKeys( + legacyDataWrapper ? Arrays.asList("data", "error") : Collections.emptySet()) + .build(), httpRequestInitializer); + } + + @Override + public final JsonObjectParser getObjectParser() { + return (JsonObjectParser) super.getObjectParser(); + } + + /** Returns the JSON Factory. */ + public final JsonFactory getJsonFactory() { + return getObjectParser().getJsonFactory(); + } + + @Override + public abstract AbstractGoogleJsonClient build(); + + @Override + public Builder setRootUrl(String rootUrl) { + return (Builder) super.setRootUrl(rootUrl); + } + + @Override + public Builder setServicePath(String servicePath) { + return (Builder) super.setServicePath(servicePath); + } + + @Override + public Builder setGoogleClientRequestInitializer( + GoogleClientRequestInitializer googleClientRequestInitializer) { + return (Builder) super.setGoogleClientRequestInitializer(googleClientRequestInitializer); + } + + @Override + public Builder setHttpRequestInitializer(HttpRequestInitializer httpRequestInitializer) { + return (Builder) super.setHttpRequestInitializer(httpRequestInitializer); + } + + @Override + public Builder setApplicationName(String applicationName) { + return (Builder) super.setApplicationName(applicationName); + } + + @Override + public Builder setSuppressPatternChecks(boolean suppressPatternChecks) { + return (Builder) super.setSuppressPatternChecks(suppressPatternChecks); + } + + @Override + public Builder setSuppressRequiredParameterChecks(boolean suppressRequiredParameterChecks) { + return (Builder) super.setSuppressRequiredParameterChecks(suppressRequiredParameterChecks); + } + + @Override + public Builder setSuppressAllChecks(boolean suppressAllChecks) { + return (Builder) super.setSuppressAllChecks(suppressAllChecks); + } + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/services/json/AbstractGoogleJsonClientRequest.java b/google-api-client/src/main/java/com/google/api/client/googleapis/services/json/AbstractGoogleJsonClientRequest.java new file mode 100644 index 00000000..6a263454 --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/services/json/AbstractGoogleJsonClientRequest.java @@ -0,0 +1,125 @@ +/* + * Copyright (c) 2012 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.api.client.googleapis.services.json; + +import com.google.api.client.googleapis.batch.BatchRequest; +import com.google.api.client.googleapis.batch.json.JsonBatchCallback; +import com.google.api.client.googleapis.json.GoogleJsonErrorContainer; +import com.google.api.client.googleapis.json.GoogleJsonResponseException; +import com.google.api.client.googleapis.services.AbstractGoogleClientRequest; +import com.google.api.client.http.HttpHeaders; +import com.google.api.client.http.HttpResponse; +import com.google.api.client.http.UriTemplate; +import com.google.api.client.http.json.JsonHttpContent; + +import java.io.IOException; + +/** + * Google JSON request for a {@link AbstractGoogleJsonClient}. + * + *

+ * Implementation is not thread-safe. + *

+ * + * @param type of the response + * @since 1.12 + * @author Yaniv Inbar + */ +public abstract class AbstractGoogleJsonClientRequest extends AbstractGoogleClientRequest { + + /** POJO that can be serialized into JSON content or {@code null} for none. */ + private final Object jsonContent; + + /** + * @param abstractGoogleJsonClient Google JSON client + * @param requestMethod HTTP Method + * @param uriTemplate URI template for the path relative to the base URL. If it starts with a "/" + * the base path from the base URL will be stripped out. The URI template can also be a + * full URL. URI template expansion is done using + * {@link UriTemplate#expand(String, String, Object, boolean)} + * @param jsonContent POJO that can be serialized into JSON content or {@code null} for none + * @param responseClass response class to parse into + */ + protected AbstractGoogleJsonClientRequest(AbstractGoogleJsonClient abstractGoogleJsonClient, + String requestMethod, String uriTemplate, Object jsonContent, Class responseClass) { + super(abstractGoogleJsonClient, requestMethod, uriTemplate, jsonContent == null ? null + : new JsonHttpContent(abstractGoogleJsonClient.getJsonFactory(), jsonContent) + .setWrapperKey(abstractGoogleJsonClient.getObjectParser().getWrapperKeys().isEmpty() + ? null : "data"), responseClass); + this.jsonContent = jsonContent; + } + + @Override + public AbstractGoogleJsonClient getAbstractGoogleClient() { + return (AbstractGoogleJsonClient) super.getAbstractGoogleClient(); + } + + @Override + public AbstractGoogleJsonClientRequest setDisableGZipContent(boolean disableGZipContent) { + return (AbstractGoogleJsonClientRequest) super.setDisableGZipContent(disableGZipContent); + } + + @Override + public AbstractGoogleJsonClientRequest setRequestHeaders(HttpHeaders headers) { + return (AbstractGoogleJsonClientRequest) super.setRequestHeaders(headers); + } + + /** + * Queues the request into the specified batch request container. + * + *

+ * Batched requests are then executed when {@link BatchRequest#execute()} is called. + *

+ *

+ * Example usage: + *

+ * + *
+     request.queue(batchRequest, new JsonBatchCallback<SomeResponseType>() {
+
+       public void onSuccess(SomeResponseType content, HttpHeaders responseHeaders) {
+         log("Success");
+       }
+
+       public void onFailure(GoogleJsonError e, HttpHeaders responseHeaders) {
+         log(e.getMessage());
+       }
+     });
+   * 
+ * + * + * @param batchRequest batch request container + * @param callback batch callback + */ + public final void queue(BatchRequest batchRequest, JsonBatchCallback callback) + throws IOException { + super.queue(batchRequest, GoogleJsonErrorContainer.class, callback); + } + + @Override + protected GoogleJsonResponseException newExceptionOnError(HttpResponse response) { + return GoogleJsonResponseException.from(getAbstractGoogleClient().getJsonFactory(), response); + } + + /** Returns POJO that can be serialized into JSON content or {@code null} for none. */ + public Object getJsonContent() { + return jsonContent; + } + + @Override + public AbstractGoogleJsonClientRequest set(String fieldName, Object value) { + return (AbstractGoogleJsonClientRequest) super.set(fieldName, value); + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/services/json/CommonGoogleJsonClientRequestInitializer.java b/google-api-client/src/main/java/com/google/api/client/googleapis/services/json/CommonGoogleJsonClientRequestInitializer.java new file mode 100644 index 00000000..45784c31 --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/services/json/CommonGoogleJsonClientRequestInitializer.java @@ -0,0 +1,124 @@ +/* + * Copyright (c) 2012 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.api.client.googleapis.services.json; + +import com.google.api.client.googleapis.services.AbstractGoogleClientRequest; +import com.google.api.client.googleapis.services.CommonGoogleClientRequestInitializer; + +import java.io.IOException; + +/** + * Google JSON client request initializer implementation for setting properties like key and userIp. + * + *

+ * The simplest usage is to use it to set the key parameter: + *

+ * + *
+  public static final GoogleClientRequestInitializer KEY_INITIALIZER =
+      new CommonGoogleJsonClientRequestInitializer(KEY);
+ * 
+ * + *

+ * There is also a constructor to set both the key and userIp parameters: + *

+ * + *
+  public static final GoogleClientRequestInitializer INITIALIZER =
+      new CommonGoogleJsonClientRequestInitializer(KEY, USER_IP);
+ * 
+ * + *

+ * If you want to implement custom logic, extend it like this: + *

+ * + *
+  public static class MyRequestInitializer extends CommonGoogleJsonClientRequestInitializer {
+
+    {@literal @}Override
+    public void initialize(AbstractGoogleJsonClientRequest{@literal <}?{@literal >} request)
+        throws IOException {
+      // custom logic
+    }
+  }
+ * 
+ * + *

+ * Finally, to set the key and userIp parameters and insert custom logic, extend it like this: + *

+ * + *
+  public static class MyKeyRequestInitializer extends CommonGoogleJsonClientRequestInitializer {
+
+    public MyKeyRequestInitializer() {
+      super(KEY, USER_IP);
+    }
+
+    {@literal @}Override
+    public void initializeJsonRequest(
+        AbstractGoogleJsonClientRequest{@literal <}?{@literal >} request) throws IOException {
+      // custom logic
+    }
+  }
+ * 
+ * + *

+ * Subclasses should be thread-safe. + *

+ * + * @since 1.12 + * @author Yaniv Inbar + */ +public class CommonGoogleJsonClientRequestInitializer extends CommonGoogleClientRequestInitializer { + + public CommonGoogleJsonClientRequestInitializer() { + super(); + } + + /** + * @param key API key or {@code null} to leave it unchanged + */ + public CommonGoogleJsonClientRequestInitializer(String key) { + super(key); + } + + /** + * @param key API key or {@code null} to leave it unchanged + * @param userIp user IP or {@code null} to leave it unchanged + */ + public CommonGoogleJsonClientRequestInitializer(String key, String userIp) { + super(key, userIp); + } + + @Override + public final void initialize(AbstractGoogleClientRequest request) throws IOException { + super.initialize(request); + initializeJsonRequest((AbstractGoogleJsonClientRequest) request); + } + + /** + * Initializes a Google JSON client request. + * + *

+ * Default implementation does nothing. Called from + * {@link #initialize(AbstractGoogleClientRequest)}. + *

+ * + * @throws IOException I/O exception + */ + protected void initializeJsonRequest(AbstractGoogleJsonClientRequest request) + throws IOException { + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/services/json/package-info.java b/google-api-client/src/main/java/com/google/api/client/googleapis/services/json/package-info.java new file mode 100644 index 00000000..14cbf0f6 --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/services/json/package-info.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2012 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. + */ + +/** + * Contains the basis for the generated service-specific libraries based on the JSON format. + * + * @since 1.12 + * @author Yaniv Inbar + */ + +package com.google.api.client.googleapis.services.json; + diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/services/package-info.java b/google-api-client/src/main/java/com/google/api/client/googleapis/services/package-info.java new file mode 100644 index 00000000..f35dce21 --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/services/package-info.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2010 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. + */ + +/** + * Contains the basis for the generated service-specific libraries. + * + * @since 1.6 + * @author Ravi Mistry + */ + +package com.google.api.client.googleapis.services; + diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/testing/notifications/MockUnparsedNotificationCallback.java b/google-api-client/src/main/java/com/google/api/client/googleapis/testing/notifications/MockUnparsedNotificationCallback.java new file mode 100644 index 00000000..583afae4 --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/testing/notifications/MockUnparsedNotificationCallback.java @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2013 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.api.client.googleapis.testing.notifications; + +import com.google.api.client.googleapis.notifications.StoredChannel; +import com.google.api.client.googleapis.notifications.UnparsedNotification; +import com.google.api.client.googleapis.notifications.UnparsedNotificationCallback; +import com.google.api.client.util.Beta; + +import java.io.IOException; + +/** + * {@link Beta}
+ * Mock for the {@link UnparsedNotificationCallback} class. + * + * @author Yaniv Inbar + * @author Matthias Linder (mlinder) + * @since 1.16 + */ +@SuppressWarnings("rawtypes") +@Beta +public class MockUnparsedNotificationCallback implements UnparsedNotificationCallback { + + private static final long serialVersionUID = 0L; + + /** Whether this handler was called. */ + private boolean wasCalled; + + /** Returns whether this handler was called. */ + public boolean wasCalled() { + return wasCalled; + } + + public MockUnparsedNotificationCallback() { + } + + @SuppressWarnings("unused") + public void onNotification(StoredChannel storedChannel, UnparsedNotification notification) + throws IOException { + wasCalled = true; + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/testing/notifications/package-info.java b/google-api-client/src/main/java/com/google/api/client/googleapis/testing/notifications/package-info.java new file mode 100644 index 00000000..f1394963 --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/testing/notifications/package-info.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2013 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. + */ + +/** + * {@link com.google.api.client.util.Beta}
+ * Test utilities for the notifications extension package. + * + * @author Yaniv Inbar + * @author Matthias Linder (mlinder) + * @since 1.16 + */ +@com.google.api.client.util.Beta +package com.google.api.client.googleapis.testing.notifications; + diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/testing/services/MockGoogleClient.java b/google-api-client/src/main/java/com/google/api/client/googleapis/testing/services/MockGoogleClient.java new file mode 100644 index 00000000..05587a32 --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/testing/services/MockGoogleClient.java @@ -0,0 +1,123 @@ +/* + * 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.api.client.googleapis.testing.services; + +import com.google.api.client.googleapis.services.AbstractGoogleClient; +import com.google.api.client.googleapis.services.GoogleClientRequestInitializer; +import com.google.api.client.http.HttpRequestInitializer; +import com.google.api.client.http.HttpTransport; +import com.google.api.client.util.Beta; +import com.google.api.client.util.ObjectParser; + +/** + * {@link Beta}
+ * Thread-safe mock Google client. + * + * @since 1.12 + * @author Yaniv Inbar + */ +@Beta +public class MockGoogleClient extends AbstractGoogleClient { + + /** + * @param transport The transport to use for requests + * @param rootUrl root URL of the service. Must end with a "/" + * @param servicePath service path + * @param objectParser object parser or {@code null} for none + * @param httpRequestInitializer HTTP request initializer or {@code null} for none + * + * @since 1.14 + */ + public MockGoogleClient(HttpTransport transport, String rootUrl, String servicePath, + ObjectParser objectParser, HttpRequestInitializer httpRequestInitializer) { + this(new Builder(transport, rootUrl, servicePath, objectParser, httpRequestInitializer)); + } + + /** + * @param builder builder + * + * @since 1.14 + */ + protected MockGoogleClient(Builder builder) { + super(builder); + } + + /** + * Builder for {@link MockGoogleClient}. + * + *

+ * Implementation is not thread-safe. + *

+ */ + @Beta + public static class Builder extends AbstractGoogleClient.Builder { + + /** + * @param transport The transport to use for requests + * @param rootUrl root URL of the service. Must end with a "/" + * @param servicePath service path + * @param objectParser object parser or {@code null} for none + * @param httpRequestInitializer HTTP request initializer or {@code null} for none + */ + public Builder(HttpTransport transport, String rootUrl, String servicePath, + ObjectParser objectParser, HttpRequestInitializer httpRequestInitializer) { + super(transport, rootUrl, servicePath, objectParser, httpRequestInitializer); + } + + @Override + public MockGoogleClient build() { + return new MockGoogleClient(this); + } + + @Override + public Builder setRootUrl(String rootUrl) { + return (Builder) super.setRootUrl(rootUrl); + } + + @Override + public Builder setServicePath(String servicePath) { + return (Builder) super.setServicePath(servicePath); + } + + @Override + public Builder setGoogleClientRequestInitializer( + GoogleClientRequestInitializer googleClientRequestInitializer) { + return (Builder) super.setGoogleClientRequestInitializer(googleClientRequestInitializer); + } + + @Override + public Builder setHttpRequestInitializer(HttpRequestInitializer httpRequestInitializer) { + return (Builder) super.setHttpRequestInitializer(httpRequestInitializer); + } + + @Override + public Builder setApplicationName(String applicationName) { + return (Builder) super.setApplicationName(applicationName); + } + + @Override + public Builder setSuppressPatternChecks(boolean suppressPatternChecks) { + return (Builder) super.setSuppressPatternChecks(suppressPatternChecks); + } + + @Override + public Builder setSuppressRequiredParameterChecks(boolean suppressRequiredParameterChecks) { + return (Builder) super.setSuppressRequiredParameterChecks(suppressRequiredParameterChecks); + } + + @Override + public Builder setSuppressAllChecks(boolean suppressAllChecks) { + return (Builder) super.setSuppressAllChecks(suppressAllChecks); + } + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/testing/services/MockGoogleClientRequest.java b/google-api-client/src/main/java/com/google/api/client/googleapis/testing/services/MockGoogleClientRequest.java new file mode 100644 index 00000000..c82e2f6f --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/testing/services/MockGoogleClientRequest.java @@ -0,0 +1,62 @@ +/* + * 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.api.client.googleapis.testing.services; + +import com.google.api.client.googleapis.services.AbstractGoogleClient; +import com.google.api.client.googleapis.services.AbstractGoogleClientRequest; +import com.google.api.client.http.HttpContent; +import com.google.api.client.http.HttpHeaders; +import com.google.api.client.http.UriTemplate; +import com.google.api.client.util.Beta; + +/** + * {@link Beta}
+ * Thread-safe mock Google request. + * + * @param type of the response + * @since 1.12 + * @author Yaniv Inbar + */ +@Beta +public class MockGoogleClientRequest extends AbstractGoogleClientRequest { + + /** + * @param client Google client + * @param method HTTP Method + * @param uriTemplate URI template for the path relative to the base URL. If it starts with a "/" + * the base path from the base URL will be stripped out. The URI template can also be a + * full URL. URI template expansion is done using + * {@link UriTemplate#expand(String, String, Object, boolean)} + * @param content HTTP content or {@code null} for none + * @param responseClass response class to parse into + */ + public MockGoogleClientRequest(AbstractGoogleClient client, String method, String uriTemplate, + HttpContent content, Class responseClass) { + super(client, method, uriTemplate, content, responseClass); + } + + @Override + public MockGoogleClientRequest setDisableGZipContent(boolean disableGZipContent) { + return (MockGoogleClientRequest) super.setDisableGZipContent(disableGZipContent); + } + + @Override + public MockGoogleClientRequest setRequestHeaders(HttpHeaders headers) { + return (MockGoogleClientRequest) super.setRequestHeaders(headers); + } + + @Override + public MockGoogleClientRequest set(String fieldName, Object value) { + return (MockGoogleClientRequest) super.set(fieldName, value); + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/testing/services/json/MockGoogleJsonClient.java b/google-api-client/src/main/java/com/google/api/client/googleapis/testing/services/json/MockGoogleJsonClient.java new file mode 100644 index 00000000..20a36abf --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/testing/services/json/MockGoogleJsonClient.java @@ -0,0 +1,128 @@ +/* + * 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.api.client.googleapis.testing.services.json; + +import com.google.api.client.googleapis.services.GoogleClientRequestInitializer; +import com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient; +import com.google.api.client.http.HttpRequestInitializer; +import com.google.api.client.http.HttpTransport; +import com.google.api.client.json.JsonFactory; +import com.google.api.client.util.Beta; + +/** + * {@link Beta}
+ * Thread-safe mock Google JSON client. + * + * @since 1.12 + * @author Yaniv Inbar + */ +@Beta +public class MockGoogleJsonClient extends AbstractGoogleJsonClient { + + /** + * @param builder builder + * + * @since 1.14 + */ + protected MockGoogleJsonClient(Builder builder) { + super(builder); + } + + /** + * @param transport HTTP transport + * @param jsonFactory JSON factory + * @param rootUrl root URL of the service + * @param servicePath service path + * @param httpRequestInitializer HTTP request initializer or {@code null} for none + * @param legacyDataWrapper whether using the legacy data wrapper in responses + */ + public MockGoogleJsonClient(HttpTransport transport, JsonFactory jsonFactory, String rootUrl, + String servicePath, HttpRequestInitializer httpRequestInitializer, + boolean legacyDataWrapper) { + this(new Builder( + transport, jsonFactory, rootUrl, servicePath, httpRequestInitializer, legacyDataWrapper)); + } + + /** + * {@link Beta}
+ * Builder for {@link MockGoogleJsonClient}. + * + *

+ * Implementation is not thread-safe. + *

+ */ + @Beta + public static class Builder extends AbstractGoogleJsonClient.Builder { + + /** + * @param transport HTTP transport + * @param jsonFactory JSON factory + * @param rootUrl root URL of the service + * @param servicePath service path + * @param httpRequestInitializer HTTP request initializer or {@code null} for none + * @param legacyDataWrapper whether using the legacy data wrapper in responses + */ + public Builder(HttpTransport transport, JsonFactory jsonFactory, String rootUrl, + String servicePath, HttpRequestInitializer httpRequestInitializer, + boolean legacyDataWrapper) { + super( + transport, jsonFactory, rootUrl, servicePath, httpRequestInitializer, legacyDataWrapper); + } + + @Override + public MockGoogleJsonClient build() { + return new MockGoogleJsonClient(this); + } + + @Override + public Builder setRootUrl(String rootUrl) { + return (Builder) super.setRootUrl(rootUrl); + } + + @Override + public Builder setServicePath(String servicePath) { + return (Builder) super.setServicePath(servicePath); + } + + @Override + public Builder setGoogleClientRequestInitializer( + GoogleClientRequestInitializer googleClientRequestInitializer) { + return (Builder) super.setGoogleClientRequestInitializer(googleClientRequestInitializer); + } + + @Override + public Builder setHttpRequestInitializer(HttpRequestInitializer httpRequestInitializer) { + return (Builder) super.setHttpRequestInitializer(httpRequestInitializer); + } + + @Override + public Builder setApplicationName(String applicationName) { + return (Builder) super.setApplicationName(applicationName); + } + + @Override + public Builder setSuppressPatternChecks(boolean suppressPatternChecks) { + return (Builder) super.setSuppressPatternChecks(suppressPatternChecks); + } + + @Override + public Builder setSuppressRequiredParameterChecks(boolean suppressRequiredParameterChecks) { + return (Builder) super.setSuppressRequiredParameterChecks(suppressRequiredParameterChecks); + } + + @Override + public Builder setSuppressAllChecks(boolean suppressAllChecks) { + return (Builder) super.setSuppressAllChecks(suppressAllChecks); + } + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/testing/services/json/MockGoogleJsonClientRequest.java b/google-api-client/src/main/java/com/google/api/client/googleapis/testing/services/json/MockGoogleJsonClientRequest.java new file mode 100644 index 00000000..a98e47fc --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/testing/services/json/MockGoogleJsonClientRequest.java @@ -0,0 +1,60 @@ +/* + * 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.api.client.googleapis.testing.services.json; + +import com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient; +import com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest; +import com.google.api.client.http.HttpHeaders; +import com.google.api.client.http.UriTemplate; +import com.google.api.client.util.Beta; + +/** + * {@link Beta}
+ * Thread-safe mock Google JSON request. + * + * @param type of the response + * @since 1.12 + * @author Yaniv Inbar + */ +@Beta +public class MockGoogleJsonClientRequest extends AbstractGoogleJsonClientRequest { + + /** + * @param client Google client + * @param method HTTP Method + * @param uriTemplate URI template for the path relative to the base URL. If it starts with a "/" + * the base path from the base URL will be stripped out. The URI template can also be a + * full URL. URI template expansion is done using + * {@link UriTemplate#expand(String, String, Object, boolean)} + * @param content A POJO that can be serialized into JSON or {@code null} for none + */ + public MockGoogleJsonClientRequest(AbstractGoogleJsonClient client, String method, + String uriTemplate, Object content, Class responseClass) { + super(client, method, uriTemplate, content, responseClass); + } + + @Override + public MockGoogleJsonClient getAbstractGoogleClient() { + return (MockGoogleJsonClient) super.getAbstractGoogleClient(); + } + + @Override + public MockGoogleJsonClientRequest setDisableGZipContent(boolean disableGZipContent) { + return (MockGoogleJsonClientRequest) super.setDisableGZipContent(disableGZipContent); + } + + @Override + public MockGoogleJsonClientRequest setRequestHeaders(HttpHeaders headers) { + return (MockGoogleJsonClientRequest) super.setRequestHeaders(headers); + } +} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/testing/services/json/package-info.java b/google-api-client/src/main/java/com/google/api/client/googleapis/testing/services/json/package-info.java new file mode 100644 index 00000000..f7366514 --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/testing/services/json/package-info.java @@ -0,0 +1,22 @@ +/* + * 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. + */ + +/** + * {@link com.google.api.client.util.Beta}
+ * Test utilities for the {@code com.google.api.client.googleapis.json} package. + * + * @since 1.12 + * @author Yaniv Inbar + */ +@com.google.api.client.util.Beta +package com.google.api.client.googleapis.testing.services.json; + diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/testing/services/package-info.java b/google-api-client/src/main/java/com/google/api/client/googleapis/testing/services/package-info.java new file mode 100644 index 00000000..1654018f --- /dev/null +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/testing/services/package-info.java @@ -0,0 +1,22 @@ +/* + * 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. + */ + +/** + * {@link com.google.api.client.util.Beta}
+ * Test utilities for the {@code com.google.api.client.googleapis} package. + * + * @since 1.12 + * @author Yaniv Inbar + */ +@com.google.api.client.util.Beta +package com.google.api.client.googleapis.testing.services; + diff --git a/google-api-client/src/main/resources/com/google/api/client/googleapis/google.jks b/google-api-client/src/main/resources/com/google/api/client/googleapis/google.jks new file mode 100644 index 0000000000000000000000000000000000000000..8fa9bc45f12b1a941f3d2b4a248bfbd8b378abc6 GIT binary patch literal 71764 zcmdqK1zc6z);>&kcQ;70Hx1G)(%s$Njg%lLh#&|O64E6lNJ*D~fJk>pBaKLYoA4Zr zbG-Nc?!E7Q|NPv-TyyTV=GtqH@jN5u*k>DO8(?5y5TKXD3gvuMggmk{#Obw|wFipCv651ryD$P@mHLt1q3BTN>qa2z?2Pbnb7J3GwNb^xTn}r5Z z)<^8hk(A*H$NYN<^@)$!P$^DHnU`QWH;s5&C%dYtu_&jI+W7h22f{6y35+S;#^HSl z?Uy?7U@+;#DL2*EW1$kLN@7~`(Xg1@U;~ZSsWqCKZ0Jph-00^vB(fOSHM zGHmf?0gT7t{pV-o5iwIgj5b;z40(2|uu8v+s>4E&`rzz~26ddS3>;Na&_&;Ur#F97ky0Td`4C@iqT z(U%9F2X-#Ger)^!xWh8NY*PTzi*8CNJOGaWuLq!93_!g&ArxpChTMD%pfw134B%is z5Bo{+xB_S16u;b1i|sHnOoC4DX)>ZQ>_NjB?k+cF??ZoBn3D@_w&}8KtDpS*)xo3V zHKkJM_;h>vR+T#HI{l)KkW~rB#jCW>y3ErN}Ob@qb+Z2B-s^&X&DMw${K=!X4$nocWzTw&};e9Q_ z+&_shv;!az+6E-XDt{%ylHZFk4gd@Eaf3t{S<=*A#mUv#1OKWY-mF!DoncIHUK+-<62Bvd2TcT|FR1OLi{X>5Er5d0TM+BaIi8JrN&Ny zozaOBWdcpQrIKcG+E2s%8?CK()AC%r)n7@|oQ&-2W!vG8yCBJPXtN@M&yTNpxpS=M zY0V5Rr>VzmJ$dP(79$3LB+-#$2&Qof^g?n=wU>P_%#?}^gQZ_7(&HVeVaPr~5BHV1 z89a+Zj7SDHa8dhxpR^Cu0KW6Bt-N?Y=2voS4@juot#m7vwZ*F^n$w`|)gDKp(PZ9f zW*!!PKrtg9^3LG(YMOBacpRE%9T*>mEdzE*!QGP2cvW)GCMMj@Z@=x;hio{xz5G^! z@O(_DN$JbkJnt7PcaFZXh&4StD_}cGH6J1EkhMx%p7wA$BO!iwI>bSuW*wJx$ZOlc z>XFq>wc1=xjZ*>q-3=s~+^5`!@{PI_Fnw{WvxRM{GXV^=LA*zM-sFm4Z;Z8|F#PqR}+2dKHcdXIA-eC=#~PPKoUioeounPK&ynYEJlnNENy5s?Hu| za2{`^=omR}@a;)*qcMD^iheoZcd7`q`pg>JD0fF^nCTBrFLU)|OJlKhz-5m*Grt$Pp7=>GFjtk7W#XeEEXG*@jsPP^oAJp6+8Xl9ygr}q z{yr8(<`yiisb&0Gfwt}px+UiOc`yJEHx*~vcunpZFl3_v5nu9@B7WZR!6SEMJO&&T zea_hv`qu!e-Wg*gZw-R8=hY$@B~g1m7IPiTuNYT5?-kY1^CM$Vu*X*5x#U=(wwLc= zwk&9GAbiM(lcC>WvB3!A-@fILX9cN5o+6ZEuCTMKMLIoAc`)H2w-_(4%BwuTxwDtj z?lYqCijE@g%}iYsbFtgHI(qLWo!IV5u$O`Hf-YMa?kF&CY-ksc!>RWH1B)@`eck)v zg6gTEC(om3X)K?AjEoa|`*={QB!iZ28@qh=(~HT&$SixBVR$}XB6O528?G;fVhY35dP^u;m76v~(QXpUT-nA^hvvSlt5(H5 z1GQY)!sA4exLxGY4{<8)WBeGEGbEdEFa=+OAFQNLyt;>n5p=4CE6hAd7wG$Z4|w31 z+sg=kD-*gZuT)Boelz8%l42~MlJjFV8C;piNf+iiy{>5MX2{WSXb zUTMjUk!I}>G2SbJ!1Y@|D{}!jE;(tSFu|xO}9IG5{8cJw& z1hOvW%-|*dx4sEyRN`zCZrB^B>5e8crpy5r;#XYe=JYOT254SrPD;7ZSoo}P!dtD@ z2;KKk$?N4(~&sT%$bK&nOQaTp|BEj3 zJA}`|R!x1`HbWYoOs+88_?AKYb;gUdQ74T$FhZGn!%i$>@xc5xV*erjHMAt&SGH7# zwT|E~VD^3VNg7d9-vuRT0*dgv08+6V6kHK|(g{vx0)?>+GdN%~Xrv54l;Iea0TH%T zc4887w@LYTcwFnj*k1T>Cxh)tTRXYTXt~jg{2KhZI2L>?uH<-rwCu` zFQ*(g{2E@2%mfD)5<*59*g!a2-lqQUY?Hk ze6>_Qi$?Ee>wL58)J+i=&ZsvkEYT)t2_)*kiTmPS&&J}kDaY*Z3CGQc(eA0*5S+|3GZCCqo~>v6VwdN3^Fk2F3~;zTdt*wGqm0;UzflZ?X%QpRy( z0v))Tsa_;V4r#rU%dre|B8{>czxRT$u$|O-l2IPt^wjUE5E}D`tqr~x%(McQG;FQj z{}95D)iCE3BfSZwQFPI*+T!LYGABh$oLrc_PJB^G)vSSmyR6aPu8~BIWobHt+8lW06tQlEOdB-UE<$q{0xJx%ox# z`TbLl#a>|BgjId^FeThO&x7>tTN`I)J}?P=90c!U&M&hb8X$o4owTiyMal)_U(?)JeSgNYPoiWDDK zM+mshRlU2lqo1;Ar-=+R!hoCc!NN%+TjIb%W* z(KP7FhR(WcbxSR>bX?1NwNC18sV@Dl2>2y)2bnEUd zGqaEai>UL_MP(w?M>>|K2s9le?9IB0-ov>`Fln5VgJChXqYF$(dhj-IaXv5keV(2R zreS6GzSdnEA17*Yn+~n26Nio^EIN^}l6fUH|Go(I!@addn$8H7_?Cj3d#ToFmNFE$$Ne%NJv1yyYF@KUxGa8r3DQFd7N+PPj+RP$(g#i+dEkU zc>&y4EC5JrOb4>W09<6>Mqcp*GA1$!dnYo(E2oN=sR@~@vniRqosB0@93Xn7@%g^J zh3ucB5}I1DsH02CMnq!AcY zwwjlZ(wIpi3X{%=UO_bf8TcZ;G(Q&P-6MlrWTQc0mPaaW33z&{^d?g<2NBY@3(@#Y z`JaSBh0OpA%ZhZtv%RN$O5eUSH3SPO8jJMq3oDc*)=UsCsg?AfcwyB1^<_XQAmG){ z{*~`l77V}^295y+Ht+7cn~QxH)S!mGy{+WNCB{*$)i9* z5I|u?ei|SMDTsJ%-Q4SM^-&6s(Hox`K#fCb;o{=J%fez~Z*I@*2BMzMAnM6%Y;Vir z=6reV;!JQy$?Ka-9?}8~U&k(}eVf-j4lKyA7X^d8PB1vPVMbCz;W%nG)wuObOBoB%Wp$nvi8#22JEbYDcN+0=gLq*A9{$IeC7!RH?U?O`mjy5cWc;5|2ateHSjN1cd!;8sReE-2+951?3`ElZp zh`VN7bt4DrHF{KDZ}=Wn9Yqrm+PqNHPRxjfQ2Z?R z&Cu$O=`mfk{A$!w7t4yB^I3vEq<**Hu7}ihae9pQ*w1N}D(KEB);l5E)xdi0RF&Cy zD?<^?<#gs@KvOooU#fwE=x&fqUudCY(H2(^Q~b=grUZ8m%R!RDVI?W87T>QGOd7sV zQJ?=lXm^f+uE;k?D5u)y8Yh1?SD@+uflyT-K}@^GNg;w36Y?@la!8b#1q^~#;+wV? zA}GudQ1`u1{tKa!`yYo&Q2gOa7jN*F1-?P_Hmvxb>U!5nK z@AmwxF@n-mCjPX6aVY_p!5fUrOPI}LmThhqjlk~#K_<|>4V*!Zk=3k z6=N0VC2_Q~>_T*vfa`zvfg!f9_qa;P+9X_E_5>5%^ZtgO$^m-{9QZC8H4Luw*fz13 znRUE@S;pw*2j;--txfnLUfr1oOu=WEutC%YNi5a%-`vzaNZ=si;;Ox|> zS@}~(Te05`ujVf`kEl7AQ9H0CYzBR~N9JHuD7g_%{Ew7%R z`1MEb)!||tUU@6Q$ObbT&@_v+#eN5mh*KWSYH z0km<{Z=E-*h6df;gpP)B+<6oKv~s;C&~Tf3Q9dr7UMu37TyXqME;K+oP36MNccs@L zA=uS!et;JdQ<3jA*$6_6{kf_m!T`I?m1>G zwisj;Z~8BU(W1Vf9@+@nEzF8)kM9)0RA7v z$F2NHM?ReCOo5W~#B8zaaRv`QSY<2(PZT1`88>r3F?7O#tbjc#Eb%Kwl1Kxdxg$GlU^4a)jxocoK?;9m~uHpdp^cxtK9jzC>UWv3aK=Efj z{wE=B@QSyH2s_S)HbFx7&GR*V^R8R&J8JRE0pG{iFGY@Hp3dqMi>}IJI)#{&=LA>_ zkskC$G3mF=U-b17=t-_LmS*%$3KKxfCEookZLg|SMwP~eux8>$&&;@cdfW9${gLBH zJ3rTl*U+&>RasME{G8t0?ox3DS!9vSS)E8trO(B|+TWuqQc%ofu2x`6!JDk=$-8`k z7HEH{gfxy_UT2&5sjWoCB6r^MNku{?>YFM-GT$QU*Kd**h%53JV=^1tg9^v@Z#_VP zvKc&|Ox4|Zpj63#4N=6CW#zIm*0NM9%TAK3Bg>{A4bKv4rt2QpPV9!6JNRiE2Ogbc zuwb0Z(Sb2u4RI8=ynkMiLCznn{V&X6?2_eENNmwh1#1tu(2X`f1aT_)imM|^M|i8;=C#wuhGZNA!eJAy%UBQ@$o*d36fpY}$te>V;0|=m{-qqE8`KBVXJbJ^1F=cI1G%TI(u2dAU z!aB|LkO6ZY`AZRi(9gp6Juip3VVz>@bEqq-9#fYVLRy}HzdU-2t~z*gbwHYf0ZbqO zCeJjpmf@!!RUc`EhHjBY4M^ndNXtMNAKU12k24ED%|%&Eo&XY+re@<2dCs3aEdl6`+}CIG_~I#FF8C;Kh^ zR|a_tklokYC{?4)KAfo%a^!05 zl0=E4w`ibSqSq;|ms5rj!^74B!=}YWC8c?H2(}aGu_;l`z|AOf;I~NL_zk}>6?hxh| ze(JAY;1;bBb0)h*`$=m%F0J_v>tLNc>-PUuLi!_`(Wru{Rk)?h9sl!`)a%#g#=BOtB?QA+ez+Y$#~zhV-+oYMkKf| zrM1C1$$qxCmCESHmp?`Ypkryl53!)Ko=wiI}uj+zCoRuEs)nwE4 z?wb%H$oALf6{OJjo%{KX`L3310H_=9kFkHy_6Sm2PvUH*nL|G?ze60IAAY=c?)5oX zI$ObiD_ci8hFKr_IiHg7Oi#ISFSuxRQqV-C!R=kG@^bH@F~ld_uA2eGW*@$&J8+iO zpU}Q?qz=}`JR|YbD(AZf-=Fy|6f;O)(S!6A#x?jFfX7uzWUrQ&Ck)+X`SRrW=BIgS z#}|FCyRZS67kUH%6UoKG(A~xKT6NI^Xs+Ow^!ubhWm6|NOJh@KGBHaxkSo&O4tQ;n zBVw{#YbtKCn`inPoCYnnD-}j~^@cwp=2x0b_yU#Les8${U%R2->8;ZGTa3r!BifT5 z-h?mQ%>udvYJG}!vu-7@zq9~4a^hoxmgJhg%zQK$X}}~X(w%3`+CbUGC_K3^ zePWn2=Uhq=i!O?%-%>%UZi4`=LD9h}!|RjT-y8BOG+PV;)5XylK|~YckPypSWZGW8 z+Bz^jS$j#kjs)Ck{I1LLZ9hL>QmAs8#F=uf0!e<=H^ap=O0?iWA+wQDs=5REk#+Jr zI*A8fD}JgR_nuitJbikrE4pU2K&T<5>CnGdcTa2Ly-P@zfDNMZySnK2_%Ke3NIKk> z?NCFtHt)3$zE~tpP-9Dlrmf^2#wX3}4gzTn(QVA1MescDY7(d7xzbzzB(o^A$%`>a z+E_S05(lr`vGY z5jL&F6jvEwA3}OHuL&YBD&eFuh*nWQ5p>99qqY?%puK&oH?NsagmC({OamLcws2^@ zHG}CZ+Rf7a<~+0a-fEvKJG#spJCg|T-n2B|0VQXlDD+6Q?z($^slcA$9&cx%O+^xP zr*Rpj#ux*R5s*yK2}e=zS!UNj>{RI7f(+Y(SxsDU3Y<@aZ(ISx9}xKHU|sE)m8Vg( zSF>VMvH74ovF4m-QO$4wA-hFK#=sleoyMzv1XhXB=!=8#C{L|DQIqF{8{Mn-t&Ap6 zdZCh)%M(mt|9N52YJ`{JUuE`0I%1P zi0E5z&S%yg*BETUTPY z*dy}*MZ{~~kFdLMtCIGVe)UCJaTQeF=|OvW$s79AV~uV6RC@>Ndjgiyey9{9n}u-b z33ShA^TfmxF!ThHZIw=zQu!@dw(dIkU~(7MVpDGqz0Xf?01mOF%$#Fsp4@*r`oKp< z1#>N>p9%dCkC%6fdi2YH&_)IfM$7Hls75u8EvyMsPI$Zg4A^##{w7E^PHk5jTaj%H zYf<~Vjxk5<#2c7)@BIDZS!}9IM^>&G#z#Ov{|(6JiG5`BNT>6of3*f`oFF!wXm@-z z01@=qiBT`JhhcuU7y_a$x+$Ro!TygSfHsSni_#_Bc@kFQH zy1$x*Br#g-uizd6%kWx;q7!A4o-*`sw_Nfxh})O?F81yf64 zhgRe#roL+o0N=gNA`9zX4#dnL#FR18+d+!#YDBS9!JQDlhlw46n*b~e8KD0`mb z^;UA$%L5bg(|(o}ywk|r?P3wldSM9j&A@`s6J4;)f#HcDlsc`cxB z^1GrsOgb^-TiQ8G7D*UiGz6KQAk<$*reQH(V;t+x7>5tSIBd`|J^d?;Gr6%c|EC!D zXPW*W7BR=^>7D^)i-lHfRvlUF-< z94zkFVLV2FFNzn55lP$KhErc7_W?1ITL*%7#mXwVM|nsM1{I^7AKKD<+ z_qwx7C=?%}@0@Xaeu3pVQ;d#7)P~b%4*@R>jaxJ8(d$2-@ZGsTR_$Im;SblI{a{En zCC+NO1Kp&037<|7z0BjueKI9&^i7Yxpo2lFCw%~-UjMHKXPyh8JCk5*G2&~cF_uEr z4TI%xs(qo*bJl>+&tl{>$RDTl8Ju3DTR$M+{S9;r5a1e#E+%zP(J9Y&&RaTQH()vX z9lAZfMz;_^K#)Jyug;KWkzw|qdF+1yZIEBEr4OmbDAjPDx=nJ@RuvJxY2G%eCd2cH zrMsmLUF$=?SEZ;r_5flE6$cl1nCHn1k6H7olnfu^)6=hazXmOf4VDU1*N3{=pQD{f ztMut_9c^+t`x0`Bw~^bHW51E>P14Ea*8+PCGtXzu>b;Y)RdG7KMT;l3)mGbA&+h-M zNxH=Lar+bTDHihraj2JG6ROdjl4c_W;q4nqatSjSHLtB??$6FrAU^;zIScnS;xWzI z6shp1#xMlWp~7?kL#NR{;!tRn>V}bAzBS?yp>ML7CPt%2u^!!XE|MTdZmZKePeH6N ziLvxvU-xJvuY`?h)NMzOmko)bjOhu?HMISL7ejzJ@fk>GEM7w!c7a_CeyQhO;e%Vb z&3LG!H;KZff&D-A5_6ON;jaF-IJo}-Q~JMm>c3M~6LWe-8pLesJgjU-Yh4e*vp-5t z!i27xJO;*Raz7!7?`1Y-*pjFfD-BC)phddlKpvZ7(vbBO1HzOhq%AXS>uC6Xs>3UJ zf;d4KvBAzYCp6y$Anh@c;UX=pm~%9RWj17}O|o%^(pdbhB{&%ef$~m_##ZwnUAA3F z^mVH~<+=W9PJQagrpD%5WO~>fLTV^lWS%lX)y_L*GiNkm!y=^kUGfmC@ zv9U)kU<(zhg{qAGSzA^fVA{gadHCz&;IK^;y;xdl`dg7`kC}Z!S|DDGA-S8Ph#^Ox zo|fTo9-$)>hoiuTS<$I|aoU^2PIBikQ_sg#9(mj-)H;lbqvh0IX$juqRT2bl;Ts{G z7K7JFt#h(<76kFY2N}7S8BRx92w7k~z;Kaj{M`%+6Ktt~+C;>@a4@V?A`)WP9YNpq z%G0h0^Du(^jT(}dU~q7_^np4+U5STGs3D0iqvFROg-X2gESN${pHs{>GPEZh?&{|R zVyxk#GhGu3;Ln7D7epvHK?;K8uLyWKMcamHAg@A2w2MmgdXGTtYgS6HLwdeH_WySlc zM0B>e3_2O#rzv&PwNE!73FaevKiMj14aL#LX!#f4@fv52J$>`8o{O7_L?BAI&_S(z zOI~o9^@Yp3jwdQBZThGl$q7PyCwa*RoGEK@K*Xva+E zh7EzpS;?`a!F!S~Q!G!J&ntg_Wcq!|tfhU;u*k5r*g|{ZXIo)?CoM-ft};*449(OS zt}kFL$W75sV}0CC<5)T3ExPo+mE}V%p9^|0#VR`)CPl%hj|{6Utu!dnE3?@m)m%0A zd+3HGDiIh=D+WaDu}j~0A8)ScDi5-2-MXe36M%rx8#JS^F5Zj1oaW0>3ysPqWZeu^ zmkPn}XvXtvnh^yEcBh3k7F<-t!K(9EloVK}7m1{l1$6-Cm# zjQbaB(pnjsINxF-FV-2~^YqS!M;6Mrnv8tdd~gs>AOfxUQG7oo+lbr(n@p7N`I1i^ z)ktm>u5+lM8X=GyuiOzep{E1o#bai|+3@(FE>hsOm`od#^Bp$>)b_(VTz_lkm2Mdn ztprb0G6d$q7sfOss?jkcfw)@UeYNe8av@OHjN@l31u_$)P|`q*BkW44AYKdw14j+c zW0Jb5oi9>ZZUaGkwl8!70w$`crx9rX{vYATZy`iTOq@S^$gUG)|M0VM0$D*O2luxe z7EpxnkLLfslmAZa4?Ak>uoTQN&$k9V*C}@@3ECeAZ(}%T;pd@^C#9RZXt@h0`l=mF zP*!~0(AOy8k{!H*Vz+PgVCX~mhg)rP=bS0=rm2{6ZS*FIgHJGev0(OY&wr$SyNq&} zFDDga`#2Vern8aGR5!?LTS`=8&>(RaeE&|-J&A{XE)i)+5br;qEJePtHrw?R1FJWq z#$uR60}#VL6O=u$eiK>gjg-l~HYGVesLOK_n!P(r@3OtDm3})#p*kyEoTEv>Gd z8Q4=u!dz5pl}5HA=7+kPk`2;Go@Cx5A^OS#ch;+ zn3i!)8E2@+pNc6KT6dWyyT3sRiX7&P-y4`Nt6zCo(UX&I&Y(0{X}ZNDW1Jf0`BVv2 zWiqHHr9U!T*}1vv9I);K^=3qj^r^lhJVm9Qz$y`>TrvTf;c)=hy50$bc>eGbu4-TE zszGAb!F;$jT@#D}Rx(qZOzu3DfoDEE8SYf=FC znG_I#NC6&5hQa=d6qx=aq~JH6bkOF3D=vWd2N$^7Gy?pUADxYx4S0hJTs8s!p=tb1 z6FhtNk^GLqob|FWEYeiV%mgN7Pa{YB@sJ!kg1O#4jJ9F3#>SfoZp3<(v+Q{#zXVv(5xFzLdKoP;V!T2G7?^n zCVt@7NleGd|ni{aq5JVG)5KXfeKO&2DnTQ9-Gzx=sY zRwaal*k&I0mgsDl8bhwVliVG)c_$xw%7j{hb6Wb1m*+&3)uQU~=CXHeX^*7|wKrl9XG9_u^rw)uP$iP%FL%Td)JZ^mb^=bDUS zFWWw??R>36N78;st`JDS>Tu@#v$sfWq3T~ zIC>5HKid+Jvmli*34;CBE46__oDK#K2C-gg;O`Mp0rMmBd*09?V&XT-{-}svZA}ve zW93_c_@nh!%P){^|s82ynHyH!$(;l>(+J}(-;9|a`)sqAJdCl?7FB; zoSwCv(nd@h)}y|{qCORQ?=}oexB{`^2_E7AM%FurB%M6&qDf#q)<=1@-p-PbHe9i7 zw;od3w2U0>JdwVK%3E(pi58Y5C1mFSRyI)0C8mMy1z{Ds#l^mbzf$ng)cL?N+$4tA zGnlRzhXE;25GJYp6pi5pDr3cqdF=X8PNHgR0wsQebqXY+nT&M)t!19xfCldkT~hnj zKE&bpYuWz=WdNnmLgj(vKl)nsr6n(9|5K{&kRX`icZm!atl#aQk^O6@0U{>;4^sVY zk10sN>C)eN@>EJ7Az-|HhTM5%38RFb4>jP7Rny4HymK_|xWKzO*%rF9C?z z#FXX2;BaGQaWU36z9^BR&!%r|sDJ0qh3OFzkYZzEc(K9tB1QIx_le5!tB6vw0#q)H z+ABN*wJz5!=r`NN-@>5(?%ZLN|JA??=wp;u<-ag<**iB~CgC)wNeU2yP1&E5`G|jxlP2k3AAwo^?6RwwP3@4w6{!ka&IgDz4!+JW=F( zr)T_ZY7Vu}x<&?l$r6H62qt*8Tb*8_L!RCiQKB1P2LF<%7d{jbB8PueOZ2vtJoCW| z4`$ABc*mDc?1wh*$c-}nQALR>y zf0{}+mZ%%()E7_w(jo?4#B9G+RfGq}LASIsvlqHKW4`?^> zpUwZ{clURtfJQU}y~5r+tIlGvu-9PDRw071+gpv0ss+a2Ztcp|mcHSLb}R17%mg0> zgT$b~hdVq+r%ZegyI*ffKyxOy((jkdC`7DjVV8BNQJhQ=IUu+_fe#aqgEGTA*`X{B z53`8s(0nA6g)*lGjfy9GLKfKXtm+cs=9EgDOx!Rj=y<8Uew0E`DIf(4{yTe&L@+Va zu?Bw6ym8Ou9Sco5Cfz@5YN{>^Evsx=ohOV0TbcR5#J6%-aL3k%x`$`K=}NfL+@XEwcnv`RxcIGTV{LO z=i(wQ`2yrBiHHM!_Z^Nf%DU9?2dTa}plldj-$f?igZ*>ZHs( zMNo`;sP+C;{@|B9_&kHUiBbJ&r(6R}JuvW2=_A36Rai)Jh{u8NAe#~+ukHFIK)~~V z#>1C52di#QMABddGo@Lcz%)I9AHsaO>lx(XV*!A+eWcQ*-U^|7+?vHs-P`{jv$!P1`xC_f;whzp5YpOJnehL|5va7%uu@ePrvM;TJW$tokC zogty@UAp}gXkwbiH!DG4M&cE@a8Ijp+3w;cG#x$&l^dUQWG84;8Ius48KBR%RiW7D zHR>U=uciwdo{aiDpp!0;rY*cb{mDd>X=RWn|3mt8<)gj^e|#eG2Bz@kL#7NDwL7iQ zujR3)?8H2H9^~As+4aPWs@bzoZrlpz2-gKaZnmx36tne|0Nz75%MENi-^{loYfHY*j_S^CIgId zYN2qelY1iELM9krUIffOy-ptj{)}#rR3O170}1xEV;+jjq4)KV5-oRwn}c%O{=_nI zM^{TTLk}`#Q)5>r({IK$DCYNl2brmet23xxFQ}57s4&xImf9umfXr(U>*n}|JKvgs zfA#hL4ha@`c%G6d!4T4N9+tkOYu$KUie7iNwp8xY6nPH4G@1-kkI^BBvNP0ARf;~< z?+pL&V+mtCJTi%bL}^f#c!ZHfO)w#u18bg8Pu4U27Dp~YsNG6oDjrw@5@th*kbRdGt$1+7+8F>*=Xy$x1F)8uvEcq}}K$3g=fu4pJID->XwYMg4A zp%2jg*M9gw))}y(%)P zECs8s(-AVS>_E30w(~E$kuGix^IP#=f-7orwOs}@B|>O5HfDe^Bm_*u53BE@LLO2` zVBxYH!T#g0TXP&5{B-58k(>&#^>&Rf)>@vF2ItgNip-$G@=PDUcv9NmD4?7IDOP;% z?w6@JTp$+cNs99pxz#ig6D~S$rPx{^h*5Hpk(V^l^N#S!pw)b77_S-+w>=DBsHHZ&Y-_g48=J81#IJnsKAnc`WAH_L zJR6#Dv3n|J*dNg@QR<2kvW)+5(AH+q11C0pr2~O`ZHEd|-dW`-W-u>dEeZSUN6_I_ z?vF~wNy(z};g#*4y!YmEsdA8vqEIx(@hmDS5~hLcz-Q=}$dei}p&t%nKWC(Gw80mZ zh7DdC@Hrs2*j(LFO7VO8r1wg+FE)LA?`HZ%viP6DFavKh0&(QHcVP-FzEC~vIp-&* zcYjz)m*(1#^OBFeTVF)|dUg6+_EuWf*FGmUNsJ72@Gq3>t@ZNIr7Awby)1jjZzww; z0beH2oH}o;O1M+KS;#XhTE+cxk>w%H?afpLwXbamr`$a)hz^P|aq&>o&H6Ee*qvCy zNiDjrCfLa5s(|&7$aCaP#wufpgS?aJTFX;r3@MX@nb@tYO}a?%671JV#F=N7jFwa$ zBxTt|jz*u~b;K3m>OO2blnk+>Z&3rr_L+wTGkmql(v?U?$_re0t~lvXIj+WUxL`G_ zGjwpqKPB7^TV$+MudKYsu+n~7@g-0{_=7Osct9BxQ7dVNzdbft=M+*X0`ZWU>fDJ` zCmoID%%w;|0Dq>c5FsFW3%{Ch6?cfj_Z1-}-z(tYY_uD%vBt~@&dQv4ppsOHBO3yH0A zj@DpEvbI;^ndFM%!fQAhoUHb93PvVhPZg8$s7CjagXkY1kPl#Rv)e>~*=ePYihL#@ zkNv77qpH=4$}KN(WP8ZWF+}XMHn&ym>fe!zS@1S=lh-a^pPt(Yq8P*bEHVr7YW0IM zKtWU=-XKH@JmgRW9QKpjh{Y*nCFvuRb^~30*?oia zfgbS%X1HqSBtoJuuBgfMe9e_IM+}Bug!Tpc-G)N>Ls0e7Jy?%X2zv;MC+k8-RM`CU`)%uf~SHi7$9|-?fMd$i~SOSwF+7AX7Alnd%d$0)Pag=3U-Sc#kw zUFY`A)%ve?jIv&U$!{E^7h`^KjIwdFv;A8gqyNmjeup~w{tpr#Z#DZo7+$6dL@(o; z6gB#M*epJ_Je#WDPhYzF)MC24V@PzR#Z}YqWS004=s-yr`r=lV_bKm(&fFC&mM3o^ zl^XB#9Got|nIWn_OczOgGw5fj^MtiD4*8w*goFTuYMAmofmRo18?4%w@Lu#inHqot zRBYw}Pxz^G0Gw}_9xDk&E`|8rVl!qycZ%uhNmoGb_RQ^9FGKpnR$Ih96?BVM$X%jk zA87_g#>}rsZ!g^`#+u(Z>Kb&aBdz+7lG>AV1l}=_anPwunS zNBo*i--Ws4F6|1t^Z6dFC6_?xYJY0(t_8~%uY~gm?(csil>fA2bUt52#y@RbO|&vf zx@$Mk3sVO!|6kx3W&M{pMp^&&9HZgG)Av3T`lFQv?T@3cTHnoy#v27C?(Z|cg>m(= zP{t-&mEO=hp)AEr9e_VSIAFFGcJ%C-vpp@+v<@bIBS(?2Va8*3H)c`w1d;HOd!sU@ zS=cD;(4$>(Y2(UMZ$v}gH@0t^C$v33Y=nGDmwl_};$yXe!%ga^5uin|#v000y36D4 z|4OgI(3NhSQa1FR0&Q3DhXJ&7O}l}oDqvpe60srBNxAs(pMXwCU~}f9LNios-u8@D zI{Bu_j0JA19MAXTs!*xc+ug`%O^ei*VMAS|)lxq|^JXkYM29l&?#wo}8IB9LwkLi; zAy5==GPIsBxrH09RXOHD+Y`4?cSU}Gu8{%>10uhmOmYZo2sGc(GuYl7l1emB^W*F= z_O>6DSU}_VnER&*`K{*JwL6p#zEWzpzgWkMwG-acZt zA4|ulu*^Q}L7G!-D;gCWDXy+}ul4v{2GrVW9G42fz6M;9m91w&J<-I{@Gy~>C`?|* z{8F*~u&^$GUQxE^txi`weiC*mIFARjEULMK!}B&Yt(XjDSruD`SID|Tk4y%JKToL{ zM(by_5ThA#4lv&0Tc(4rLN{^ge(jt>B$Zoh2>y8vHw$TA2<|q@(wdkveZsb7^rjwWd0aC)mLuaylD;_G6w#YI3q=)af-7{nS=m)NO$wY5dNBPd}@-6@IpCqLJ&TIeOGOAv}eF9-x!mi49r%7>e zI=i1MvVSSSSy;&+F*yyF#-p&kWSJ(0_4O261TV|@PJ)+~bNox4mE(ubggQ&j_5LtHtDA=lHSz!f=WJE!Qy63-xNbqLE6z$}<9UP*9Npf01bXoc`w4 zM?gUEjkPN&^36p7hlwHSWD2VN<3uKFXlHC;>J0kxn@0l{6IR*K#?0Qy1V{kDyK;Y^ zi^|K&i^*S*P8myEOHk1uAOnEzq7M?2;<`^{2wCV4?5h>yX6XRT%H@{VKfMdC zj@kH9__fK&tHP4gF)dQ=&j&nz@13|&Ui_-oG7xMNQroMb(gVS%GIaX8pQrTdpaN#!VgXkn09boZ`R-)1c|DPkEHn1SOq8p%$K&!> zKAR+);Yi@@ZwIehoS57_CuZcuQ6G)w8M>k!KUasj`F$r2)eFREqjc;Q-0!?0yQ{xT zDuDp$*Z-~WJNbhX{M#q+cbfLU?)y$akK_WdYh*AOdKqcJ%u(h`|R zv-niB9!+m8$JP=@+A!uQb~}$`G$?P$4be2XfvX2Z>ydBwmz*#4k!$o=;?9c^CE<(l zgy~EqfuX8JKs?__e5qYAe|CRYB?J@};bsSYDdDBf4FIJhT~JI=^WS>y-`UkKp=v1d zX`B*Xdw!&wn_Z6eFDahae#}6ZU^1PiyHN}eZ97iO{N5Xbf`g`z}L&TZw&|ke9jL2t-sR$f8q8yH$7@WZ z+rvosoGI=*&#%3ooKoJA;>pyJl_C#^C1dr~*2;pwpx$taq_TT^CzYv|uyRKs&>`ye z+&oTbA}d5e7~bS68v3ReM?plfASlMYmrdZg5$gU)Sc-m+q!));`HTZl>N- zp9xlT;_^-Y!INd58~800B5MXbd6&DA{Z|+bxd!aYC16)}U*QtfcWgGVHF1_Cad77& zSWIVr-l6)}kO`3Ay`st>VB%eoaY&VHES=8BfjW@NGRZQDGO>U_OqYm*`qxv=89i52 zsz1huexoG-az5XKL7oe~@KrGQcih8Y?bwAnuPBh!n~^Yj#5#%Y8S1A~Q%A=b{rqeW zWl+p@c25>lE68;Pb+o$S&wP;x6BQK*sDdU3^|bIOFi;s0GDNj-d)cE%*BpAd8DOa3 z-R(agE3h8Ej_x`31m1C@4|bT5UYst@kUkPS%3nO@9X&))`yL0h>{&GEL#aCtPk(tlDQ$7 zX-;Xgzkn#GT2q+z#xr8*+%cHVgFW@MBe7tkFeiro3~kzEj`5C3TkqWqntrd>uZ$z9 zboiMlbl$0&2k( ze9MB|aMA1p+%s_G_rc$1SsIz9OFL_dc8=6>npkGXln-=O*PC+(=GcA#k1kNfF%QPN=_;d`)2J^8# zS<45{?o{ZRD)4Q2_K$PHu~3GEpDdJgpv&HwJZuz!2s@nwhyOSWhIQxU%Qn)aXpIK_ zEXhOL1Z>r4oKL86=9RBaZxVIMse=j?iTR4@hc*qwJ=#Wf6#C{BP_t3vlr@0XHgk1#Gzus*Qi%K0dFm z>EB%m@SY3%vfKg*o_j|`EUw>3{^|hZvbnEBf0?fIewj#VEYD+k2U1HjJ$)wHZzU&0 zOrmo=O&~AJ^G*5p`~u$te?T4Y(hbvHyZoO;{-iYLSEjv4%L1;Km7Rr)1Hj7XyY%vq z8xXH&0aSqh?|iJka_&WPGI<#OrE8g_u-G_;bo4SG8WC^Hg>5`^&NiuZz18F((qY;( zu0%hnUF96l5gkI1?1{;XLZVSg+_Ol5MO@;O7y6*8%R&b769m#kLG~>QFmK10^kg{N zvOvWB0GDKy_X{mv!{&wsepvpo8gZ-&HUb?r#z^xg^;Oc%&Oy@nUz>94gECE+-=x;r z;pbxZb&` z(MG!BssMj7eyF#VF{a)<{HyW9+-Dz~MisW1WYk_r*z_{B=#JT|*w@R7r|8u*KK6-% z{Lp9S*>;8Ae~qc3$Nf4T zVm)JAu_9*tpjNxGyW3=P=_55fojYgE1f=1vdjQ{hP@3avLE zeTquYNJH5?-z2sb?M4hxk;ID`3r)G{-#G zpFtJ!rby}T-mMW~J`h11{!$3YE*S0&N+G5BXS!}MXTX~>7 zvIa@c`}fZN8vRROqW^O$mtY!y8m~Y1HS`b6t+O!%T5K-B|K-B^15X0$>MudRV0_B6 z1H#o|o=VpjH|+7G`vVq4eb`YIFBc`T3fOqB%yn?-p)$d}IR2$8fx&Adzu38{2{4 z?uxw|y=_aWo4&3Mx^#3YT z21yT?4Qe3pkGM1)KepeT*Ux;qui1+G!rxRk;V_X@FA5LVq@sGZM&ELDu$b`Yhos6j zF4o^feGxFRlrJ>GNkxHtfD@3xvo;|$Fkt!TwZi}C#JT!I3id`;W=>WBDcT;GZFtVO zIsaqVI&tuAFVA3fxH#k1rBe9$^0@#roIpL}n&CMwFn`Y{|F3)Ce-!idadMi648PV$ z8S@d=59i*LhEf^o-6A54#gW{?lj7jLyGL&h6VAuHc5lAeKQsmRbIL0tCkVN%ckmfx ziX+c@O?qpPqhPQc2BP1^(Sapt$|KbsW8Xd55wjjczikbd%FH-_l+Ww$P$8kD))53< z{|LRxK`0+KbWcQX`BpN~Rf{2z%>9+Fb}e+jqMK1kG2pybJ6^$YM9RdX(T#ZT16hz9T%uu z4^}D$qR(gf;am91W+7n|t!BLt`qUzAl=!5rLy)pECZRTp)ed&sUwcD=ItMxD=27jt z99S%oEA0Pk=nORhIN%ZBNB9c+bKUL}{l)3FT-!)M&g>5%>}yDzg%8AY5eQ(i{w5Ik zZ;An~hR#A_vRu3JRfECzE%oPa8{lAa01dpHARhMf^f|z1zc^$&KLq*wuXswIn zYJ49mBxQT#K*mv$M2ytBGQ0kV_(GD#9#1%E`l=D8DaMk96x@8=@Aq?ketmm{Hj2vd z!$Q0zFIezC`!l1%jd`@QuT|1&6KPYvJQhABIQV+i$`wnZK(0H}7kn7tJoNt#m-~XB zj~@f_XujZRz&S`DpQ$vT@id>2ET2J;Pv8H7HTZMh0_bZ>qxAna@b;H&b61x6Ji@+6 z2VNgnavmaITgX?f8Go$oA5~MXhdbN2`j{#LWoHOr7GD$|$L((D_Yz#gKfitX$D9ZL z_0|j|5CS38y+4^^0xYWFV<2g5D}%bqz>UcEB&!gg&|}XvHXw_!%L3Z3E`$GGPe8{+pBsun3|0 z0RT~Z6?fo`eMq5tuu^*)C?9rN@ZG+?iOzYp|He_$od5hV(EpaX*&J8p36@I{v`bb5 zCy0xM^E+4V-!~-u?|<08iiC1R%9A&ykxG7bH( zsrNq>b+80!k+0C@=ZKVrA6BbWmQ>1=orZhCs(#!O9XHm;*6Yzl&Kj9IoN3XA69DE7 zNWWEA_M=*)4<}4r-%pQx%_cn}YG8g>rZ0TOR#EOlkeNrj?LpZDhU2)0mdw5Wr;XSy z=`Z&(D0hm9qD=4>_h6v5BB~d_7AASi@y{S?_V_nvLe{xLKJE<{?i_3j6i+%uvfzf2$kroEFp;+Th-nix zjx(1j&~<3YSUDt`1NaSWj_$VWgk|FVu1qlg^feX zt}2;2q}50V+21)y%>5u%^FWIgjx9^M0#C?Pb4TR1AGh)&oewJvJB8>&xf=%Nm(kL1 zBo=W2V}}VuOP+rkEwx^Au>YZG>8kAw5)`LD+wQ=a7RNh*%{m6JNg_!FZ#b*{qc?Za4s ztg-PSR_`|HkIN;b%$XyJalb!pm^XyCZ96Topsiq*?%*4shN47^V_uH1YN8QI7?u^C zYS|~VQcl%sQJZaA7}a=LHSx-0nv?f+xiLA$Pyq6!MfoQqBiLhEGtDotT@ssqkL1We zVQ)usZKMg7#uVpuZ7m<`p{EmcNC~QoKDZMrkRDQrs2}g{6g(LyFQ0O2JhzM0vDyat z&3u^{;%KlNlVwoP8>=pLB0Lb;*=pax zI|{1HJPW?bWGi_U8U31HI3EoJMF8v?2nckrk7>_Ctewokds;oam}9hue=ix9bFFbAdF{Q;FjfE_EYLx?BexyhEtF^F*Uf28@q{&Ns)4({I9y-vq3Df$#22?z$HC(HpDn zq8liFm3fH{Sobx;g=v}wR~Y58wBP5CZgfwK4DyTIz-`9R66bE=-aYYSdL$uLI!vk) z#TmZrh8nM(u(I8oRlBcLPuH#fve??&vbK*H>?PU8p|HMh^+;)Jt%SlZOItX2uH*W? zEA`m&XJgUblt+T3`7Io}k=>VugZ(!t6+kor3J^_zgu99@*yRURNe4GRO7AgubB)tm z{q$*qeDbb&ULd{lC)0uc`K047bA&km**QX2Z7zU<@@3lb=K+P^LI)PE@3oJgY{UOW z&+=DWzc6k4%R}{nr1q?yn!1j$H3(%xun`HaDm&wtfRP z6}HA^bM>n{BJIB5<23M3Nd<>QUO`za=_7VV$eD^Bn{|EUy2#ZU$i;t`-AHYjLKYxadlnu-`c`=Q4z#`P6yzs^&=uU<=@ zaW@8&Fa7wxIF`^uL%gTB`xLBC7^8f7L-idouXCF0M+N5Gy&3R|^CL zc=q*A?!2Vo^rNNtLke9|SsbWQTuxR7s!A+Z#Y{v@;)_?#h0-sG#(%IIuUhK6?-#BrXcm%a~q5 z0hEK7rr?-%n2w0Jjw(X}cP~qRrCBZ-2VL*dI3?Irr6Vh~n7-mrt3Z>7OB0O}3qwWnDZqJ_l7zthRFTyJ#1H%Z@}teD{A{Hj3SnTkyS*ZT zX6DmRxY#^DeSPQjcB^$l_*Lyu#c>mIy(~I@DVO;)&zvcT3@k`LfiDFppteUiY(AK9 zDIV^ZAEcxIrCx4ONyt64G{B0^l<6f0kIJUHjMZ>rZA_7OTxN8{yi zrXPDN#dBoT*yycyF(WA?$(nvv?fEb6kdT+Zk1eWs-gQ)f=t7v=XB+^$f~OZEv+bN60Id~>*F9k@65(cPdw zMW1WX&nN|DNr}RdQ2Pdkl14kj@*`=(hN)v9s7?Avb)d~~d*%>_|#pM{t^OHUW> zry5R;lil%8V0Y$Jo$SSCZY%P}CgIX|5FA+6>BfZ|=QySxf1wMnL#z{SU5hBNb{~@% zN!O;lsr)866D;DpJjZvEwKtlFvn{%q`$WDi*yw>}Qu?V_a$Ma!vT{dMqOVv1Aua0~(r)2c7V30PR-nlF}LnBn@+-{;HFPyEJb&SX73~wqar1L zc10f9W|L+wW=h6BPnuNxv@BL6TAjD-cneExe#Oq%b%SFks; z(zAE_Gt%ETbjtc?==9%r<-gii4OQ44X9J!OOo|>EdUS{=F-{*mh9lJ*0#`Rr5<@TE za{e0Y)vX7rb$_G-Q4enXb`v|)CLNSipYE3u!@GMg5R9c~WYhd9#OMa(lP^wI%WG9C zIM6tWdo$W4flY>fn%HuI?Ugk%POC-G0?F+`QZuzQ9e}=iw4wIhCUskK4%NWmPq7G( zhU-`yz}YvpB_k?5a;uh0Vz@%GeD1OJo9<<$1XH zEw$sM$CaGLucr(9_RwH#?Ku9Auq4Bvf^Zym$aXlVp2qDj7NZHBY*9ZgrVA{2-`1O9 zvXcGIzQ1A~Rf9}b{wF)+3BC5THFjcm7gQ*Y73y%yh{i}93JJm6^4;_}gNS!;oRFAg zK!~&4>E1nteD0R4WIj4(zmAu7%OE{_ZQPVS5V1s++S6{^69?; zlm8)gTEHd!UFx(zBOK5GcP>B!RP#Amza9QN)oK5Rr~609c0OM5DbdPc35<`qYKy&7 zbU{x_&dDy$-62M~R1UFRCMY>r>0oZ!eHX6f$^xxvPCKlG@QK$^pO$r_;y#W@O*A$` zkiMbFqLBsNceX0g+?||CL9P2i-Tt{=6`|jHNC4U1tA$W|Yy!tHO)~Bw&9>iflDzi{0j;dFjbSdz+|HGH$M%s( zzhF9Tc#-LK#)%?dSetsE(LR zjn1SqvWLz`aN`Znbdw-{5`Gt^oUd^Clc^a2T{u!yaW9Ju@60FIn^z9%S7Zy>2{@=W zz(EyVIVgxiO)7K5ThGD~-F99`P`dnNQ$UtKI;cPLF=A#Wmm1E1IEPj;>`ehTS9sf#{`cG-uSFM zVRhdAiI^e&aYyc~+g);$zMpSrD`9YN?n+zPMS2-j6y)f%WIaB-qp#R-*!FRpJ8B+g z5iSy`l}1?Q%e(tQ*j{!k9F21J@B$6I+zJ{lEQFzD?G)mP&kL=~PkB*o|wuC+!~ zJFJ5pT9>1{>lRU}#T@VC_3 z{FvoI2Wc!gH#?T+jBwcAH4+e}2^_xF4q*w=g$rUtg3-KN*?NQ!{{dSk6{EqE(}25P zEX#X=iXNdg&J20=$y^hfYE_3bMx@G)l-Wof9fSs|*Z?WZ_+E`Il~#mqN}UWYJoBq} z#G&q_P9ADLGkE_|GM|##B#mnq%=dxvaNgl66K1B%3d!v& zPxtFQ35frYr(^wFJsk@V2m3WocX9ad^mKp2)BPh)*UfA9cCnyCJxXP`V8jvSXmj*H zMN-{J5(QdiVm+RdUsFk|AJoJBv0gZ6gHi;Z!U93N%yaTCqwLba(1ZKxc}4@$n2Z#1 zL<%*=@2Xi{(hH zf@q~(mgy6T@v;yayWQ0(+4d;6D~0%%a7+&yHXLQ^GzRraL?^F2-LH5LvJCKa#ek=a zyYh5!d^7hVL?lYmoy4Ip-@kjhYl%aE-u##D?Qgh+zw&8we6#5G zQ@L6FnX35;8R3X75uF*?n;6|sHNfFXyTGHL%Y!PFK8v=RfvG0Xg_2JOz}y1!f$#1n zeAGDop3hEVZpgSDy3CmxC)^{2IQGG2rBo)|*if-M5)X`#_iZhbI^4s8hE1AbM{jr6 z1a&`CYt5UiGL7<0EBCGDZ5v(C8c)Cv{6=%d(9~G-obU!eWHd<5QJe22vK>mp>4psG zyyAV_n4W)I_JLr}9UV(&?KBy#$dn24C97^Mf-v)Ur|-+K3~}2vXj51lcQ%jv5k&?H zDur3ckOsC6eFkeo)r86kSEOk&Y{yujCO?!{%<>7SJyD&Wva&z8c8-FZwjd zDFu#uA7pEdw=?Gm30vYy1wN?!;M0D4!f$-qyCklBDNGE6<4LikJ9l61O}~KJcXNZw zq`*6op?}=OSUuQ&y4Osi_O8k*$=z`|p0)tJeBL%K{k?2pLiCeJ+qnW%qK4?aGlRhe zSl#~2#$*lnPlI9eN_$}j$3oA?Ul~v98xMW377pEEEMIfEotmsRN3Y&=>*fX{jjy<% zn{pIY{LDkCT&}I{Avax|slpYM_tu4CxZKRrW3%Fdbk&?nJ-iAqpP5!#Ri!QU$nXZC zid^{_cpq9kUoXbSS{(^$uI9F!i?j?rGpu%@R0TB=Qe@6ftWHaMmcOEag9d$MtVe7V zZ&awx+g*AZvl$TnX&v)T`Z$v^=wjJ0fu! zzNmXbxDALp|M+SCFy`)uI^y@e`4_nLYHAuJCgJyYTtHTUWFRf}PXpHLQx^Y?xA9lI zx(EfkdqMP}W=X(qrS6d(M)r#ds+hq1z3zQd9vU@Wq{D|}dDyY6di>=jG>?OWCsGlR z9^tx&M-&DxyD4e1Jf=H9jc4U_?wXq9&&}8}|3bENS8qC%beLqWWb_ozun$8+=SU5Y zqfYXDI_Hsv_rObT!DhmiCv2l5%y_3XsAbO|4YgQ{HR*9Y#W__^3URg?{*)nuOn-)G zKbE4~8y3Ow##JSNG#!}mjL;$N$r8_INxmA;%X&Yf2GbXPg9kS`f!98L={Re25SPX2 zh2I167ee3?{s%N}9VKH6s<^FQL?|y`MdjQpt1pe)$bY_F*_JC5i_?3S{&XEq2hZis z{}ECZU(YDsi+bnF!l)SX{5e_ju2l!>54-xeC;Ye$FLE*&D0S0w8{6~t4(^6Aji2p} zM_3m`ob+D=tnUntPTea@?dry&sYZ^|)x?lhTj&>fBrUEM$6-d0E4g;>javc6h>6eR zX>WM`n58Nz2GV+gGMb>zI%ni_agRw>jkW@2rkhQq%e2-@;px_?He4GX2+{9WQgK-6 z1c6sbYovlhKPwQRZ0@S?e*MYD|IM+X>ADYN%(_VB@e|@n{Z9=FCY6@;yPrrbkT_v+ zytzE{G_2e|VMypc8m5M7km-(VXfdHPMW24SjKpT#h>474z3WY4fJS^AN=RvC8J=CK z2VT;bNtKRfms~X0a@3NbSV<2H*Uhw~Q2P8BL7X{bd*^ajbN#xjp-n)(&<4QHmbu*3 z;6G^kA_7Ie>k8D;vMhh(N0l7)>>WjItVm@Y4VhRNKy;V+(VO3Y|3hclA03N;_~p49 zzM%B5T+n*X8==|0OOk+qM(BUbMSUU2uiL2eZUjI;4h%492oSyy;9wO&oEor|q@4A> zwX-;+kg@K?D48mqlnJ-ndhZDbM97ipW?=>Jz5iM&_{s#*d}9_>rYX|TR(wVzWs3IZ z0620Qnp@R4Wc_X)^M^MxsP9sOu@I{25ANv$lc6eDDMw3p>y6rglKo(m4PFSCFqW^) zEmA6X8q|GaZ|cu6C0qiP?UA47z(0PC37YM)?&lmrz;}Bw%Mbe_6Y@l~>fX+%H<>8z+H^UM*`-1c9?}!sgjf$I;&rC; zxQ9bzPgj;dubT~)3iWKxh8RmtBik}WjlZQvo>%kp>{EKdE!euOMXfHmROH!-{MuP- zf{)>|6|!<}_FA|ch&P6tCC8pp%=Fsl-q$f^M4Moy!+b$?ia>A)?-+>)aV8!3xm&KskBaHH6fx0Jf6nOM*%6DP0Oom?vw zlc48$+WNddLjTvLr?JB~JGdrWJ@YvW;|VZIX5?2&`1XfvK7ocWP1L{0Fpz0`b<3iN zs4Sbv$XbFkC;%D>rQ-T31GW&b%D}-KRD~D@V_Chp#-B#5<7;~Q;2aPO7*_m5YcS;W9%q3%=*Hn|R;jP!3BBPu%8p%yChX|?qeuu`0Ut7PrNa7f zZyXGN9XDG4nme#RbSF#0X{D`Cw{#rdi!#Kc=5ADq;7XfII{(aV2MfI({|V8vGqTg0 zS`@eU`>jy*p`cZL$E>s1DBWb3l<`Bl7z9A8A7IW_SS1?D*_>T+!L^C479R>ZuFSuNLn^jIGx@cb>DIAHFJ0;!1Ej|6}re&?BrUNfj;u1xdGKi(12@~BQf-$#px4sXCB%YMmI5H;mC>Nx;0=n zk>+aaNW`KKM!3bH$u<^>3NR`lvqYE}Tj6;jP0SuA&ZZnf=lr zXTwACtGEg%Ycp|RX)a(ZzLV7#otC@~41qgWlO;sY?sY_N&A??0b+eERYj~F1fP6KPa!Bm$x5W3yc1N z1-_D^M8qV&9C1T>j+z|xEU(q4j7ZO?aR6`u6_Hsy7FY!`E3#c)F&>dX%$8?AYrMHFJ`ZQ)qXuy6lJ|WWX3^b%k*r zaxdN7wzewapR~{PBTDZVc*REF&s==E_EK2gq@oq(0YZwS-;kT^LoWAe9_YL3pZ5qQ zM6>$*{Q6q#cAfOuYZ!vPiNiNH*n832pT55$JC+#2q|2?&DR?A(V{vC|asfOH z40{yJB;47<<1F=~LeGE$hKb$@^dW-lwWC5x_4%DhT!DXGI-%?L(8dI zW847W#6UxS!|IK9cCvT;-a2xHQ@Vjb$}HsdQ#k^RQZw9UgovSIH*%@Q8V|EW+xBC3 zu8|SsKIc2CXAzb2k$sa}uXQU;cqdQulePy!yzR-m-=xM>92N(sq2-Q#!Fy9tu6dU~ zr~;qP0UQApvJ69a$DP>+C?20tf#UWDwxuA-1!J=o9_1=@ z%V18|K5@jnD|2bpeIf1weqJ8*WBb@OHJ%sO8qeerw+OOsX=LM?1%TeNn~L@dzt{m8 z0{aE%2Gjy+fEd!~(rEmtzV+3g=h+?3!4QyaXR@(3VRkTfFwkQ>9}Ncl{AOU-KRDSJ zT90xxj(8a$f+VF~h(Czk-H_g#gF-)~|Pw?*HL0 z+g?MfnZFWAf+R6yfv34}Nc$-h}_xC{n9jPE{oJ(^7kh`p`jO-1} z0P8~Y&4AEe06`EW1UNW>Pu!J2E})mAr*CFy=IF*i3TW*b0@P0vOCwS}N76riuxp>hZw7pD z|1t9e8Hyf<_WQLZ?2Q16sU-VnH*ww1U*yCAKaXRXuxE_KzTfMo{Q%+P7@9mck@j>B zCA3T=Yx4@ngPhb+oad5a1v{euE+ub3cm+FYicT)E9XdfMxV$ECA z1c@sN@T05}tVpP?Yp)WiL_fbsb3k}+n zi#GP)hur8-ypgzTq_CgX>y*k|yuIct8h>b(6y(+_8YW>sZ^(&J{F#!NJ1D}%tHr{+ zy5*giOrdK;$Z|Uau?)Ic2m4*>_Xt|4e$7FH1g<-=XiBV;4<8#ljh36ze9>cSc$~}K zlz`!%O>AOV1jEFfXY1Gg6xB1xXg^F;8Kqz{`yo$^ZWDXwQ(J~ijC~R*k9s06i^}AP zJ#xMmhbMGzkA3f^Z57L?M6WlOZ8t3tWko!85Dse{1PhoJ&G?RjVNw;YE0Fw@Zest zHCA9Sf~9M>(RfCB>GvByIyJ^Yw80a?O{j3q`F!DeEUHiXcKM!+(b}nHGetB-I{P~G zSt9w1XAguv87U&KO$i;AOzEzw8Yf1eaWp!q6_q&o;z8Z$&K4i1jzO9weNgVJh znV@OV8k6Iu_VhCyfvus>&ac-5Yh96vL`*E8Mh=I@Y(jR#(!dMOo78>UKt8Xpxu-^* z$`9R>B>sCEDuolnXs=Q70+&HPQRjZ+CX`Pw&|d!#>v!j*TV|R6eP69FIM`3#_BVMM z=wzY5 zrdEYuBJ{CrlFXQ-Q~B7wOF;J4h)=Og$|LvMjP`wY+^|vfTYD!AbaL3<&-JyKDEq+> zNeOP49^qE))rV}*s87n_gy25vC^c$lbkEMOQ}VZ(RLy#ONGgnIy1nK9dlTU=rjbL&Y$?}C?#gfHVKls32 zfH_oDH!&x`^S)lt$u=EN9kP@BRd~{%Hr;S`#Q=iUVdX7!i9`}N6#YijxQ{c;B)Bn` z)`IglQ9%e06$AiLfz6e*V7$If&hs+=qoRWIS@i!eD)@gS`=5aU=F1|_jUc<8N z*UqQ;v-5ui^*!I;27vn4{{pCg`X2=K|LAl0cVYT(xx29N<%t+K&rg2dsnRwUZ?(QW zIfZI#*8lK8B)CqgG6vEZBvi7D@LYjZh0@#E9SeCK3gy<4;7DKrEcK&2ryMSa_OCL1 zaz(heIwTtSycJJcDxg^=-uscu+g0w^X}=_RQxhHH8g<+6&=vL3DRU9S=Y_0V#@=OQ z-YUWF1J{EWk`!+uef+Xo+D-i|umvjp08!nvxN{s0RqnvhKr@=4|2p5AUBmTi3mT|MBzU%dsOjylinHX;Ia_Ns2*+%&(E5 z)a8roSTKpQ9%Qw=MIacwrjcd~25)sut;iBva@F-<3#r?KsI(v7+-hPDlr;s%b=jl9 zzf*raTS`hMGf6N)`yjt+O8Fz1%0o-yeNaax+G6Pv9TrQAALEnw694;mg47wS+dmU^ z1ba6nL*HH!xuc(HMVm$9S1`Wl(@{hxAgiVEn98ozPuq^-Z8o9hh+aRzjPiJQO&)7G z`GJElyjB&i77A)Y#E|5e4Faz|4VH=T=%?O?>d)S>j66eq;v!#e8oXn9K!L(&Y1`)T zVG66)F1(`O1L9!5Y5?BaBE{)3&yqJ~_Kp--Qx^D`&=sctRqh=M3c&Q|1%#D9!}JC} zV){Sy-IakjSki`6OwZ8Jja1U!#>w^y&tDPE5dot4x0n9~I1hmO3(npZoWD2({Vg}~ zS4e&;d3a3~PdZ&=eOO1zf30EiY+=iUXwS&BOw}$;+og8nne?jdLxFpE25>fGJ6*j( z-Vn;<%4j2{J_Aio0y5t1E-iwt1q6`gq!!HP^d)V9UahsnFPlfiscrJP)IJAL4UaG$ zCFNR{zuD|0QoWsb#WE=@A*1-@+gM)^v(9AaC zh7wO8&eYX)Y!lA5*C*6(BeBsT5NUu=G|GK(6VLp_6*5oG`(ev*!Tpo;TUl@MaZXD+ zwzM6PH(lxz58UGGN?=Vgu#qRz)ZU1BAPDNy=+p?qDyj9LdvQCq9iEk&MT9?gT#F+t zzCiL#AfNhc&ZMvPWnbigEV^Bp-aCQx)5%=(fq9Tm=oOOp1Nrzq#QNPi=_Xl5f6KS} zPl0$=ncdR2f{`Z}Z_;6(gt?@#!C+}d5aWG@%Mn1pKMHt=Zf&;k6c=>H9%*3Dz1c+s zo_QmNCX403y;XVmV39=)GNY?oe>_Iqp}bMNlcIbOpvK;GGYhS%kn8S|eam)pg(xsT zIYihRr;~IsDCIrhnC)k;1S(Q2Wy%6;2fw9fWXTAYz9_keuaSV*_- zKBA9342ybf&$CXt_GshL`#5X3x^;P~3J3ay{sY-lD!Vy7bjRCgsssV3PEt%gie|WJ z5Ey!~gCA~{qRDQy7NUvfWTzku#_A^`_XPU3u_7(dr;0Bjr_v;qRMXv8E#g8gzTrJy zpLzx2e+~H|fQf_Pr@)WjrFnpJjH3*07jjqrVLFxgk0#=qoE;LPu(7e3z18JJmT$}^ zB;0Gi1^S^cASUHCt}%%9AL zLI!CQVkblPrn_-e^72Qyzr`kcufLl_r3ovrsC=9`)P=FOho!R;hF`$UB(+qCC+b?* z%hgg}`krA)a*klhph|#=*|qh~_#SGOsjP~~ zH=%QIP$`1ITFg&x4ZaxS|7#R?eKwQ{7|0L;gbTkL5U6m!xT8s=QBr5$(%gThmD+KE zTWJ{Dn~;6}4RhIBcz&+r;pHlcPhZpL>>xlQ>H(qyiqkdy@T~W{1HDuQl5|8Y_F);z zw|%3J)NNiE9s{ba#PbFX52T;Rj0dcSa^&vpE z@PEQh{uLJ|o`Sd@`&G?!`;%X-LA|jB6%?b zgERL`W7NdaLhE5TZL&Y%XcBU~l`|TR+Jezb@7wWisWUAsUJvQZpETX#L-+4}m*LN; zn>7gXwHmeVMa6((i_^KIcYk}~D6(Mr24CGu&z=P%yXTyg9#Pn?o>-Sn+U>lUmvUpv zdF<}?+_}PC{4wYc);n^ZRQkVr%f>eIdeDt27$JI^O@C;A8~6%2u<=SH^d*2oiulP4(baY z@3b-Ye;qKoEQtVISDz#hCJg*Vb-|Yl3jzv;7z#`jO!&HD-#=uMzqykk0AuhNKB-%O z0je-mvwXFJ5X5=zzDS^$LBP^V12hHwDZl0Afr7{{%amD7QdIb&PJ;IRPO!m&$=g3F z=w77PfqY;jHV-5?p~;uqL`Mj^8tG$lar#FTO4P%?hVl_iEz*Sai4!Net|lCxZfv91 zS4z#J9UxB&^>tR{t7J*lK#WhRGhu7+CF4Ah9Ohcnk#ol2tR)#v_kofi&1A63O9A&1 zqU{EYo(8lE9D;%jQ8D`=m4-%PqebJ}9H%-WMT=Q6+Yl)??T4gP@ z9<6s@mf9wjTxWi+N8;!)_mr3__Tu4_j!~&OWE|=n#2t_PC@X97RfM}B$z>QLLqnE= zijCV>&*)eA3&;A(T4qg?f)3rm?oI8f#9Dr-F`U#7nMQPBUDxlTN_2DGRi;Ei#pfT$TM?dfOIem3ojoY< zSDmjJ@^f{m5nYq=J{W1ZX+_-lfzwh=^V4P)zB0i+WS{fW?2~%_vVJL zBoQOQEaGNZ$omqERdKtOgQY5DTQw81U~yltVyW30S41Tx`rs09bomm!`j$4h*FJ(1 z^Gn^6hHsbU0!s-*X>ypgFhegsVIw!B-y}v0*-N$EPAQU~^0sYi*nM zg|&^RYx%i{69=Vk!4;PSc7Fl|$xS9XNaUkb`{D&TMt9MvN5l&a{u&fq%Sr>=3}%zCq3C*V!mu5D~xKN?>*5Msu6jagrw=kWJIN@bO)@|)hiu2 zfibk|Mp#Dc%dfh3Z3qOc-e%#qU!HJ~J@Dn;$y1KR=ZKE6 zGUsh8?X3;+k6wA!iOT!jy()d%RpR)Bi+M5l@$U2~)M&bC8Z*Tld@Rgh?Auw2r|X^v z(a^OU4y%kGoOp(pDaJ?SbwtBcda-yKRcxgaR9RjnZQhQDd`+A;Em=wue;FAo!?BMV@{18l!P}Y1M)Nf9aO&leKl&#sZE+75_TCobp`l zSC1?$%x?9kPJC)Hv#6f6g5Ud;ui%W}{=gkKUFE4r0t@`4E_x_5$ZIJ~;zKglSUc_l z^wTG;6y=0HSg@tH4l`4P{p+B5EuMDJJ!JpdxCN6r2{af92!@}g(9Tp;!JFa};fY>h zw%-V~x&oNZ5iqivSC~z#0VzZQjN%n~KPTO(5yIE&#`XfU#rF7nmYmK^9-4r)azP3 zM~tU8_|5GH`O!>xc{b=V-y5&T!n0*r#+9tR`Pl5_mL#DaTF`6$wVF-^7frbge>?Hu zQ;Al^bE_{icDNQ9fnUI;PYGCDkP^Y&OIYXW!C|?rTe7up)`>s!P-yN1g^w@NyZ38+ zVY@|~HW-gv7ZT7C)UTBmR+^uG5M~w#({>z0whNbR#stsyj22k}^+}gB`%5#$`XiY4 zrbWiGb%KR@^$39|9n%7vo=~#M2-+5rL!0dzG@%7@0YMJE)>*y8I3ZZG&SH?>289dn zrIXsC_6k_jr8KV4T{Xz3;yRFf^Q$TRqa`riUWba1CSEjF3l`9$c$zHJ*CGxQy99Cq zAV5n!jVq1ApY0lu`(e2;|9+8Oz`FA>NjE5==s+~z($0|J-~R{w{eLju{|EciCb}SS zOX8zWIlf7VD?TZr(RK=3XEfQA_n;p}Iy;zpr;>p%E30f2t!t5rkyNDph++Nyi>3v} zJurhCRZW&VJ<_#u(KawS2;`;G`f&1R9UWMufjC;r;0qYBi{k8MA!hYGul&ND6jL7X za`R$IVZ8bBoR1(B+4mOg3KU#KdeA$3h3U6M;B_~k@IBC+NTa^SlGaLo|@^L%s0a6p8(4iGGj!zL^aqoa?yn%I*NX!Rycu z7%z7b|6OGnE)M^juJTt~{MF+wHe4o)7)uMiyJ_p0J#I0wi!l!q-l-Uh8HJk|&cV!U za!DUBKYRR`m~lrp86@BJ*l&)ZhdAYwvw+QoLu`cODS-gziaW~4pk%taS;*)~E$<7r z`-6K!cD0ESH!Tt?104g9h;^z{7>^5-=qGBO1*2u*;GPg?+$0(>FCwo=0B5o?de=Z< ztU@7kORR)&c=okl(-fMJz(&={r%yMPCK`?6Y(|f6*@Zr+j~(c4NYkdiIrTNCmkI@p zcAZ~hTR^u_NTF|nN?0)ki%SG5(^fT?Fkpl6*kkhv!hD`_5dJ&iqe(GNy`DK2iH-*c zdr>}|U&q-$*?a9G;ncsnQb|5%D*v&CVM+Rylg3_KXWV-A(p>>f!LhZY{?{%4b7AWm z`uP@O1*w+exaYq9IyCz18T;#`SFBia&$FgKHau@Q6djM`>VCz_q@Y5;A@3||N4gd5 zB9Cp$6!8Bw_tjxlciYxn+7E$HX)&ONFyNK(j_1bf*=h70@5AQ-AE`PUDDkp z-v;rD^1jFO-FxmmhktnXX8)eO9-cMF7;DWr$82gKHXH9Mr5<8X>VGWHD>7iy-b@H> zpr-pOenTjjb!?G+MV0&$xYMwHg+5PD$9n#{6r^}Yatye~xIrpso`I^ktd~@~!L~B- zf+`b&fays8{sMf7sR9_nG`6&#omsg`l-h*Z09f)~oOo>$S6UV4w2PllGy(S8Nv5~z zHTihQVRAi|sz=m@z^=ArSYFqDh9{=@yiZGA&%-Ue3Txpa#;}0fZ@Jn;6YsS-{q;c{tw{Gm3{r|#BQ5VGiAVV}rv0vDq9K`-~Mle~q z#=ijaQGFj*c=nx85?z)ob+*t|1IUI}eajgKn(xhcM+HWFWN=N&r2s=Ro7 z?G7y;&JscL!*?Bfc&bMAmOJub^_p^C=}H!y$CA?`zRA)upMmBQl3j+w@0y`2LrC_{ zE_xO@r{kebi`XczKbA~)Le|stI&D?jkqSp(r=B}xvXTizd7~1R;Q{cJrC+(b!Lt+c680=YDrKX$I(zz zKMjfoZ;~Y*8<|7%+x%i0EZ*m7*pui6J#`P47uDa^QMR|2&Wh&8R?B&Ttt>7d^Y9;pvr4|jS97HaMO zgmH9ci_$|>q=O`&=LB)lhitbHS!d~~p2a;>&dVX=uM%~F-mQr<#?Et< zA=7K-u;+z^=-@hU18yvB+Y{Sh??k7SwmUhFK6p>>uJNsxN;dVWCr7?Wl>!M73&0@Z z>%9m~IT@!p-XZgDg45#xuDrW+*~*XpE=(-?Ap6ta#7UKpWQ zQ+=f45t~@p`@nKG%N2&wl{)2{#ac1R-7j-eiUeSM93_0C!%tYwJu&@v8e!B#bb zRO1e+p(m3D+3FZwjdf$ao-PcF1PeOlKee#dXC+|4yJTksBy>=~fyVKX2@8F%fj7|q zQS=LmM0Az+1GPH;%*23d(LqDlE;Bcm;R(X$%e>3g59ss`;J!I~?cct@KSlPGl?A7Y zyxI<@g0e@mEgac8o;w}!SB_W`%AELxC^zfJ$=DCZR44SE2tHOgPw-$@D~dO-^Mb9g zqF3!$*%BC5^s#kkvgW7G4ZGK|F+O~DZ!NIt)quRiUE6qAbIY?DM0NWrt(}WuE-6Xv z=Z9M-ot7mls_#>K#hJ63iV)p!t#Odv!6FfI_jTx&3nWLR`w8uoTM9ai)MB~JW!5`| zEbBe%M~!VA*bC&vf>IhVzsd1Mzp+D5Vt8%xOYLh*j_tTu`$D%DLh+*|| z{#Q9B7y-xg&;@+q5*kIT@+(J4K;MnJ*Y))9ltJieh!Q$C^ zL&LW?tJHuzhm8jgRdF(l0rk$*>U+OA`@r0ebx-f_lH7Mc$xilR16aZ#{iE`Iz|+&;G?pqCLWs&%Y$U;swUT;DN0%%PM7GY<9Ft zW_OZ;On>c^fJO%-ImtM%z>&Z`q1lh#0g^;mFa@bb(3Y$$8S-%`%aX||#)c?)2?yy6 zLUs3GOy*U)&Cs@^EJ&yJpdiwcMEToCPB_IxW?*$^HDTDOPI&$z(xK zdHqX5hDHjdDS;czFWXCJphfFzv8*PY&O@ACrQxE|F>JONJGrQBF{mGQl|?U)=E0e% z@d!>p1MQxvkr$`p^~oGEDVM*o)NF5lUZ8tT=C@B0kh>ss*#sThhp!RlmtKHN7WaH} z17bkw`fC({!-N$AjajfT*I@-sw75hOSWEPsTSG^6EhM|Hh-XkyQ;H_EA<8KVDvNOeyTUXiWGxHf+XfZiEq8 z#^Rt|Vzg|RKq-&D%oc04@04nepo%z(=^39&q(4yUf-*V6Qr`Q^3tOxv!$c?}-l-5l zHDXDbKH+e_MWxSRmR*lGoL%#H7pqy1MGqRa`!H1@=smjGfm4-}VFqRpeGK96-Yri0 z;7PbVl}Y6_%PQSqXR1PmtYDi0t`?dEQ;x> z3@J?cF}G0^QFSM&Di|f5)zUFHD-ziWYUBDqDDnilL;utpsF#p}2@ZY%1TH&J>e?WH*1y>Kv|;KNTcyaQ)}qSJByVq9y4 z)3axUP>3-}d!miNXtdwlcjo1tKFmqszFGESs032lPjyF{?VlQIHeOi(Yy6uvfR|bWN&tii)PJWp+-`uuzgBPj z@K`}2l)tPU0VN=A1pW_5_@mtTcdzeHab0i4<`wYKa@EGqOYjr%d{+m`gRtXC_R5qh z^gT+S-EM2M9p`A1V%TkmyWv`tp$E42=RF#a?ji5i39cNrKkm1-*lf=hsxW85rF(6R z)H6U5>C6~O{N8T3_)S+%wZ6Pyb!biwXO~9qhl%M(+_ipfg{Pe0 zo|ISY2olm$C(89|8hE`7(j1gQa$124FXMbq|KN0`F_mXwjEXxq5McvfuZ`&L6y)A2YEHJ>svV&_HJmS2XPtv_0g zu#(9IUla++X6(xR1}-7KRX@>YH1g`({cE++#^Tw0Lv7p}iFnyq?*-ot9s?6Www!1Q zuP1ve&Tj#Mr{{OI;l%Qsg)bSD81Ut|r5COTOn=`}H+IyI4Rs|pZs!!fOO-3J@sA(< z3$5V?Zgz**O&!;@K?l$my0{wwBJ}Xq*-=3qaa(&|?1iX5&(& z)ce%EuU~=<$WN<0R;g%w2)^+IO{zmdl_(si8YT*zz(4MW7SHSuAcrF96*oEaS!#67 zcQ5Zg(&9bmXhq(P9)FmPK4a3w+HZO)?vXtn&s9N=C53Etf6bfCyx$yvv-YM9Cs6er zdp5K(W5nTm%&q~<*>Wbn9uqlScq9H&D&>u`>9UDRS`SCp(A2Fonl$WYpFQd!lez_s zc>@T0g_1e0r*{YOb=n`JEd+AKR%RU&*R907(uukN?@7@@uC}U1$w4FriV`=hxvZVj zUTclpry0l@5VA~wv_{L{YK_nv@bWL$8rS`akT?4iA6r=1{(>|=`+EO5iSZw|;y)o! z&3Xgm*+J+TM4^RxlK5zXR0Ikw_ zt={{p7|4=u-hZIro18>6VnIqU69os%C zFG0QCBI{@P$T6KmD0bakr-A+rs@uBmTE$uhEJqpT()Ma3_L}VVOHoQO0mWPHX+1UL z09KdqzG*G=Ba`=)Zy(*m2_vMY>A_WsD|L6R6o8!LHRm)*0e?%w*B8y z7A{Bt(u`3S_hwh4RNc&!-fUQP>c3JJ=&C1_vXB;$F?_M4UOqfS_Rx`(_SJ_4H}-Bb+BDSR^p5+` zdxVPz#9Zr<3;L=UWDeYe0Df*yyC|CzqtL>xUecDelX$m2x58~$#zVKoZR;mNHA`(24gaSF0@?ter8qd04G?t<4BMdTCoJalyd?7!($32~*{2vfDu zKjyU6q)gd=3eDusgPlcpDi;{yW4w2*EN(k6LUDqW1ppNP1b?S2oNt8wzgAiNm^F`t zCnO~FOR)c7fj`QMf9vA@6w$SU347)>*l&S7y>n6^$oo0#S1dSk9Csl$>cJ_+n$!LKG%g* z+6o}RTwzTmNsc+^J~*HTs93=6n^c@)(dU=H@BXZ(WfSxTIwq4lvkUh*=cAnE#J%Ud z!F{Ns4`$yWWiuzCfKP5F#Yk*3PUYB26TT@0wk**0ABW+!>BiT3w^2Fs2T-=vPb7Th zFhV0s2pyRmXnGNkthvP8ajhwS>u5+u2VKrbZNsk3=F@I^rMrWwluG`rDV)Dc3R@Oy z7SIJmGP^I}?<56iFa4dK06mus@MXF65&x=1_u?A$8i(JR~B zasZ~%{jRJUOTq}se(CGRlQjrb?a#q-c(PP7;B#LK(l_d=Z54#-&d)F^+GN%C{I#Lo zwacL;cMrB3>zXTVeajeKO}Ynm#U_|rr=K-7u|qPrMop+SqGTY%G(ZPtBQfu4@b;N< zDZ=|r$_tvRY@U^68<;~K5RTuQR>N*h9NktGXCXI$G+kRJw^@sWOqu4&O~%FxJ*k4| z&0xqv!(=VGf8W)`h4&3a z`RB#Nk2_IJbfCpmPt;`z`>!2Qm!mg+bVU7+1;l^ED*psAbym7?+b62*hlCw?sfQjC zD$5k!nD1K1gu(eGv$1y~%dE;mv6zjoWHRdk z3-aQ(^Wb^pyl~7>W-F5w?1edBCXfZ`ee$+80Q;HyBw|w;J{EN6N>e6OB%hcI0C^Ye zDMfp*u^DF&I$rr;5s`KY_X$K$@8E?8vJ>JyiCm(v1z`LtKM#*ZkWbqGW}gBY@e zqwY-Q@Os9g(6$g|Ek7YCOH5=z;OX6d>2WIcq#Lm2qbp3w4xvO19$vy{Nhe@lxD@{q z+%;+Fcud|*JE4wYQ6;-VOYE$-nGo_G{Hg@2hOt=jH1NMA8hB%UV9^X|$~F&bpoPrI z8X~`-PX4w@udX9v#-2ESI*wK~gw)w~l6o#+jc~^(!nhfog8LP=jpwx3I-Tx2Bg}QWYw;}1+EumK zf`dQEOl5vPJ8PDC}3>T|v zJH6y5bFfI_Yn089WP2AVd>9vT!85I&2usW;<_gE$$@TMntCcC}J_9|KMZA>cYkaZ5 z5zpLh)70{|tI$j1RMb35xSqqaxd4EW8qMk6;(N+U=AN9?c(QA8G>t+RTFSw{soKJq2oDyr>z`RG>?rLsv47A(@1QxnZet ze~7$`xd1Aeof`C#7TfaRc?>|Edr{;hyrVg(B|tneS45bcLU#w!oCzG;Pvf1PU0bwH z?WFJckoZ^)U7e)jmnB!Z(-IHdipVUQ^6NJ7z9noGDP)W5`xGg6u!a+Vak2f&5ByrG<$Dvtt}3-aUQ>o9 zFqK-Od~{N5#a{_cRAnf-E6dX;J2INL6rvFIcMDZyH6NW7MLSa)G%j>5A|p{c>&~4d zmH3s5isgH!M~erg*KFg^$JsMDacG;Odqj6Wh@+OU2dfJFm3e$ZqF@i@L=dKF^@zel1K0~Ohn^&IaUKikcGZ7` zvZ_pF&pSs#aj)?m=LG&{#u>&gRlO>!&%^kUzNxhCZrX^8NHcp4Ot|Qs^>jq(iKPxB zl&6DWC~O$&)vp%-VVT9Prrx;@8-Z?ag<08yGuvhLg)1-X7YD*bkObM9e;fZXuR$81L;_JU3c*E8jpVF0aLT z9%aqGwW@xhEgiQO-ovRrD=0P2p*rT6_@&XR!q;CRq{vg$KQ+jP<{6vGkAX*&YLMVf z=&N<&(eUd*p`Q~4gP~S%O&JCxJk5f57Jh-*$^68-+AqR%{O%(hkR{Pc@n~ZeZEdVL zw^z(w9iJpC{&8IhIU81|tb*2Q?`f!&`?)55GOAQ~MYBRROo3=9RruSGZ&}we?e@73 zasdS2pnD&Pj_(kTqDKh^4hDf0%!UmyZ@Tx}UShd<&Jq!2{RyQC!em!jKVgGQXE-vT znXWkN^^GwiCgE>?RWvuYH?X$3G@KM-y&ew?iAnkoK1C)WA#rsGyi6zYfF^o!04|MW zKp1}`o%C;A+@BO$pL#<)S=qte9eUskpGWEsKlH5XsVvX(v8k;wXI> z1!>64R;FtT#l0zLMUrH^H#i<)+Sq=o-eGwfDPJ$h$&B>EpcmD=Q6*xD0g-pPA>?$& zr1RcvyiCaavFjjp65%Jq=YEXth`{2ur4DhIeCBS1QK8MGZ?Q8)dB^gl3(I0j+H+IE zgYKtMZpEe6M^d?Pjy=Zyg4FwT4Y|T=Y4YtlWrqWfbcT5L;%4fU;QdrB<;uo)u+?<} za<>Q>NAoqdsltr2J|PM2vv~-I#;4lTiI(Kox%2x8*thi1O_H_XsB|3@?xS`gqd(TK z7_irM@ZMHQy7;cpF7fZC1&Y$*j5?*T$Miwaj8%2Wf(LW6`0Q7sD^&DF^$+;_li%ki$f63$tL$ZIRHXH(B^X3LTMP}ne^2?yUwckk2S@EfV&Sj+-B{eq$K1=c9s>` z&K9gl?_+61Np17)fPFA6If+t)dkNpr9ga_1K*o5{#hoTNgInvU<8c8C>HAQ|872wc zH`srJx_NB28b1WFsR^@<5mJwDaB2Q6U85IVB#y$?CMk6oWd$+{4I$70SVNRaxgA;Z z^g8};OE}0&M{g}q`~$zoKOz+9qhR3VD)Mk|ZwCM6f$bsdb#FN$Chqs<-%F3!ANKm7 z;?c)!KXT0omKxy6WVv?HC_7aoOv^1U2?_b?#NJaI!k3^pr zJzR$6i{|)&57WaT2yRAV;F&Hnspd(P(Ud>+YwjeNVg8OTDph2g$%6J}Dim+*)=l-m z0VwTGiFY&y#(W1|?KI&F2?09FTsgK_iflTqV2qOm`Ne$MJHpDo)!4@i_vZoX_h9=6awT+2$~}`w z^lqNC+=*Un;NTC=pz1u{bpHJtTn_589hOqI7HigVrDx1DP!-!gwZ)KdnYg!qp zcRDU_WT?dNUD3xu-qd0At@lf#{QK^(faR?xVnMGboK$ECn29HQz_^4$*G0^R5 literal 0 HcmV?d00001 diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/GoogleUtilsTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/GoogleUtilsTest.java new file mode 100644 index 00000000..ba894ff0 --- /dev/null +++ b/google-api-client/src/test/java/com/google/api/client/googleapis/GoogleUtilsTest.java @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2013 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.api.client.googleapis; + +import junit.framework.TestCase; + +import java.security.KeyStore; +import java.util.Enumeration; + +/** + * Tests {@link GoogleUtils}. + * + * @author Yaniv Inbar + */ +public class GoogleUtilsTest extends TestCase { + + public void testGetCertificateTrustStore() throws Exception { + KeyStore trustStore = GoogleUtils.getCertificateTrustStore(); + Enumeration aliases = trustStore.aliases(); + while (aliases.hasMoreElements()) { + String alias = aliases.nextElement(); + assertTrue(trustStore.isCertificateEntry(alias)); + } + // intentionally check the count of certificates, so it can help us detect if a new certificate + // has been added or removed + assertEquals(70, trustStore.size()); + } +} diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/MethodOverrideTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/MethodOverrideTest.java new file mode 100644 index 00000000..38cc54c1 --- /dev/null +++ b/google-api-client/src/test/java/com/google/api/client/googleapis/MethodOverrideTest.java @@ -0,0 +1,108 @@ +/* + * Copyright (c) 2010 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.api.client.googleapis; + +import com.google.api.client.http.GenericUrl; +import com.google.api.client.http.HttpMethods; +import com.google.api.client.http.HttpRequest; +import com.google.api.client.http.HttpTransport; +import com.google.api.client.http.UrlEncodedContent; +import com.google.api.client.testing.http.HttpTesting; +import com.google.api.client.testing.http.MockHttpTransport; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableSet; + +import junit.framework.TestCase; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.util.Arrays; +import java.util.Collection; +import java.util.List; + +/** + * Tests {@link MethodOverride}. + * + * @author Yaniv Inbar + */ +public class MethodOverrideTest extends TestCase { + + private static final List OVERRIDDEN_METHODS = ImmutableList.of( + "FOO", HttpMethods.DELETE, HttpMethods.HEAD, HttpMethods.OPTIONS, HttpMethods.PATCH, + HttpMethods.PUT, HttpMethods.TRACE); + + private static final List SUPPORTED_METHODS = ImmutableList.builder() + .addAll(OVERRIDDEN_METHODS).add(HttpMethods.GET, HttpMethods.POST).build(); + + public MethodOverrideTest(String name) { + super(name); + } + + public void testIntercept() throws Exception { + subtestIntercept(ImmutableSet.of(), new MockHttpTransport(), new MethodOverride()); + subtestIntercept(OVERRIDDEN_METHODS, new MockHttpTransport(), + new MethodOverride.Builder().setOverrideAllMethods(true).build()); + subtestIntercept(OVERRIDDEN_METHODS, MockHttpTransport.builder() + .setSupportedMethods(ImmutableSet.of(HttpMethods.GET, HttpMethods.POST)).build(), + new MethodOverride()); + } + + private void subtestIntercept(Collection methodsThatShouldOverride, + HttpTransport transport, MethodOverride interceptor) throws Exception { + for (String requestMethod : SUPPORTED_METHODS) { + subtestIntercept( + methodsThatShouldOverride.contains(requestMethod), transport, interceptor, requestMethod); + } + } + + private void subtestIntercept(boolean shouldOverride, HttpTransport transport, + MethodOverride interceptor, String requestMethod) throws Exception { + HttpRequest request = transport.createRequestFactory() + .buildRequest(requestMethod, HttpTesting.SIMPLE_GENERIC_URL, null); + interceptor.intercept(request); + assertEquals(requestMethod, shouldOverride ? HttpMethods.POST : requestMethod, + request.getRequestMethod()); + assertEquals(requestMethod, shouldOverride ? requestMethod : null, + request.getHeaders().get(MethodOverride.HEADER)); + } + + public void testInterceptMaxLength() throws IOException { + HttpTransport transport = new MockHttpTransport(); + GenericUrl url = new GenericUrl(HttpTesting.SIMPLE_URL); + url.set("a", "foo"); + HttpRequest request = + transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); + new MethodOverride().intercept(request); + assertEquals(HttpMethods.GET, request.getRequestMethod()); + assertNull(request.getHeaders().get(MethodOverride.HEADER)); + assertNull(request.getContent()); + char[] arr = new char[MethodOverride.MAX_URL_LENGTH]; + Arrays.fill(arr, 'x'); + url.set("a", new String(arr)); + request.setUrl(url); + new MethodOverride().intercept(request); + assertEquals(HttpMethods.POST, request.getRequestMethod()); + assertEquals(HttpMethods.GET, request.getHeaders().get(MethodOverride.HEADER)); + assertEquals(HttpTesting.SIMPLE_GENERIC_URL, request.getUrl()); + char[] arr2 = new char[arr.length + 2]; + Arrays.fill(arr2, 'x'); + arr2[0] = 'a'; + arr2[1] = '='; + UrlEncodedContent content = (UrlEncodedContent) request.getContent(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + content.writeTo(out); + assertEquals(new String(arr2), out.toString()); + } +} diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleAuthorizationCodeFlowTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleAuthorizationCodeFlowTest.java new file mode 100644 index 00000000..1107713a --- /dev/null +++ b/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleAuthorizationCodeFlowTest.java @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2012 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.api.client.googleapis.auth.oauth2; + +import com.google.api.client.json.jackson.JacksonFactory; +import com.google.api.client.testing.http.MockHttpTransport; +import com.google.common.collect.ImmutableList; + +import junit.framework.TestCase; + +/** + * Tests {@link GoogleAuthorizationCodeFlow}. + * + * @author Yaniv Inbar + */ +public class GoogleAuthorizationCodeFlowTest extends TestCase { + + private static final String CLIENT_ID = "812741506391.apps.googleusercontent.com"; + private static final String CLIENT_SECRET = "{client_secret}"; + + public void testBuilder() { + GoogleAuthorizationCodeFlow.Builder builder = new GoogleAuthorizationCodeFlow.Builder( + new MockHttpTransport(), new JacksonFactory(), CLIENT_ID, CLIENT_SECRET, + ImmutableList.of("https://www.googleapis.com/auth/userinfo.email")); + assertNull(builder.getApprovalPrompt()); + assertNull(builder.getAccessType()); + } +} diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleAuthorizationCodeRequestUrlTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleAuthorizationCodeRequestUrlTest.java new file mode 100644 index 00000000..01cecf3f --- /dev/null +++ b/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleAuthorizationCodeRequestUrlTest.java @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2011 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.api.client.googleapis.auth.oauth2; + +import junit.framework.TestCase; + +import java.util.Arrays; + +/** + * Tests {@link GoogleAuthorizationCodeRequestUrl}. + * + * @author Yaniv Inbar + */ +public class GoogleAuthorizationCodeRequestUrlTest extends TestCase { + + private static final String EXPECTED = + "https://accounts.google.com/o/oauth2/auth?client_id=812741506391.apps.googleusercontent.com&" + + "redirect_uri=https://oauth2-login-demo.appspot.com/code&response_type=code" + + "&scope=https://www.googleapis.com/auth/userinfo.email%20" + + "https://www.googleapis.com/auth/userinfo.profile&state=/profile"; + + public void testBuild() { + assertEquals(EXPECTED, new GoogleAuthorizationCodeRequestUrl( + "812741506391.apps.googleusercontent.com", "https://oauth2-login-demo.appspot.com/code", + Arrays.asList("https://www.googleapis.com/auth/userinfo.email", + "https://www.googleapis.com/auth/userinfo.profile")).setState("/profile").build()); + } +} diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleAuthorizationCodeTokenRequestTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleAuthorizationCodeTokenRequestTest.java new file mode 100644 index 00000000..e0ada1f4 --- /dev/null +++ b/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleAuthorizationCodeTokenRequestTest.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2011 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.api.client.googleapis.auth.oauth2; + +import com.google.api.client.auth.oauth2.ClientParametersAuthentication; +import com.google.api.client.json.jackson.JacksonFactory; +import com.google.api.client.testing.http.MockHttpTransport; + +import junit.framework.TestCase; + +/** + * Tests {@link GoogleAuthorizationCodeTokenRequest}. + * + * @author Yaniv Inbar + */ +public class GoogleAuthorizationCodeTokenRequestTest extends TestCase { + + private static final String CLIENT_ID = "812741506391.apps.googleusercontent.com"; + private static final String CLIENT_SECRET = "{client_secret}"; + private static final String CODE = "4/P7q7W91a-oMsCeLvIaQm6bTrgtp7"; + private static final String REDIRECT_URI = "https://oauth2-login-demo.appspot.com/code"; + + public void test() { + GoogleAuthorizationCodeTokenRequest request = + new GoogleAuthorizationCodeTokenRequest(new MockHttpTransport(), + new JacksonFactory(), + CLIENT_ID, + CLIENT_SECRET, + CODE, + REDIRECT_URI); + ClientParametersAuthentication clientAuthentication = + (ClientParametersAuthentication) request.getClientAuthentication(); + assertEquals(CLIENT_ID, clientAuthentication.getClientId()); + assertEquals(CLIENT_SECRET, clientAuthentication.getClientSecret()); + assertEquals(CODE, request.getCode()); + assertEquals(REDIRECT_URI, request.getRedirectUri()); + assertEquals("authorization_code", request.getGrantType()); + assertNull(request.getScopes()); + assertNotNull(request.getTokenServerUrl()); + } +} diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleBrowserClientRequestUrlTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleBrowserClientRequestUrlTest.java new file mode 100644 index 00000000..e9f56c79 --- /dev/null +++ b/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleBrowserClientRequestUrlTest.java @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2011 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.api.client.googleapis.auth.oauth2; + +import junit.framework.TestCase; + +import java.util.Arrays; + +/** + * Tests {@link GoogleBrowserClientRequestUrl}. + * + * @author Yaniv Inbar + */ +public class GoogleBrowserClientRequestUrlTest extends TestCase { + + private static final String EXPECTED = + "https://accounts.google.com/o/oauth2/auth?client_id=812741506391.apps.googleusercontent.com&" + + "redirect_uri=https://oauth2-login-demo.appspot.com/oauthcallback&response_type=token" + + "&scope=https://www.googleapis.com/auth/userinfo.email%20" + + "https://www.googleapis.com/auth/userinfo.profile&state=/profile"; + + public void testBuild() { + assertEquals(EXPECTED, new GoogleBrowserClientRequestUrl( + "812741506391.apps.googleusercontent.com", + "https://oauth2-login-demo.appspot.com/oauthcallback", Arrays.asList( + "https://www.googleapis.com/auth/userinfo.email", + "https://www.googleapis.com/auth/userinfo.profile")).setState("/profile").build()); + } +} diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleClientSecretsTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleClientSecretsTest.java new file mode 100644 index 00000000..cd06d63f --- /dev/null +++ b/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleClientSecretsTest.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2012 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.api.client.googleapis.auth.oauth2; + +import com.google.api.client.googleapis.auth.oauth2.GoogleClientSecrets.Details; +import com.google.api.client.json.gson.GsonFactory; + +import junit.framework.TestCase; + +import java.io.StringReader; + +/** + * Tests {@link GoogleClientSecrets}. + * + * @author Yaniv Inbar + */ +public class GoogleClientSecretsTest extends TestCase { + + private static final String CLIENT_ID = "812741506391.apps.googleusercontent.com"; + + private static final String CLIENT_SECRET = "{client_secret}"; + + private final static String CLIENT_SECRETS = "{\"installed\": {\"client_id\": \"" + CLIENT_ID + + "\",\"client_secret\": \"" + CLIENT_SECRET + "\"}}"; + + public void testLoad() throws Exception { + GoogleClientSecrets clientSecrets = + GoogleClientSecrets.load(new GsonFactory(), new StringReader(CLIENT_SECRETS)); + Details installed = clientSecrets.getInstalled(); + assertNotNull(installed); + assertEquals(CLIENT_ID, installed.getClientId()); + assertEquals(CLIENT_SECRET, installed.getClientSecret()); + } +} diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleCredentialTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleCredentialTest.java new file mode 100644 index 00000000..bebd9977 --- /dev/null +++ b/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleCredentialTest.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2013 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.api.client.googleapis.auth.oauth2; + +import com.google.api.client.http.LowLevelHttpRequest; +import com.google.api.client.json.Json; +import com.google.api.client.json.jackson.JacksonFactory; +import com.google.api.client.testing.http.MockHttpTransport; +import com.google.api.client.testing.http.MockLowLevelHttpRequest; +import com.google.api.client.testing.http.MockLowLevelHttpResponse; +import com.google.api.client.testing.util.SecurityTestUtils; + +import junit.framework.TestCase; + +import java.util.Collections; + +/** + * Tests {@link GoogleCredential}. + * + * @author Yaniv Inbar + */ +public class GoogleCredentialTest extends TestCase { + + public void testRefreshToken_ServiceAccounts() throws Exception { + GoogleCredential credential = new GoogleCredential.Builder().setServiceAccountId("id") + .setServiceAccountScopes(Collections.singleton("scope")) + .setServiceAccountPrivateKey(SecurityTestUtils.newRsaPrivateKey()) + .setTransport(new MockHttpTransport() { + + @Override + public LowLevelHttpRequest buildRequest(String method, String url) { + MockLowLevelHttpResponse response = new MockLowLevelHttpResponse().setContentType( + Json.MEDIA_TYPE).setContent("{\"refresh_token\":\"abc\"}"); + return new MockLowLevelHttpRequest(url).setResponse(response); + } + }).setJsonFactory(new JacksonFactory()).setClientSecrets("clientId", "clientSecret") + .build(); + assertTrue(credential.refreshToken()); + assertEquals("abc", credential.getRefreshToken()); + } +} diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleIdTokenTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleIdTokenTest.java new file mode 100644 index 00000000..aaf0b0cb --- /dev/null +++ b/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleIdTokenTest.java @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2013 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.api.client.googleapis.auth.oauth2; + +import com.google.api.client.googleapis.auth.oauth2.GoogleIdToken.Payload; + +import junit.framework.TestCase; + +/** Tests for {@link GoogleIdToken}.*/ + +public class GoogleIdTokenTest extends TestCase { + private static final String USER_ID = "1234567890"; + private static final String ANOTHER_USER_ID = "2345678901"; + private static final String CLIENT_ID = "myClientId"; + private static final String ANOTHER_CLIENT_ID = "anotherClientId"; + private static final String EMAIL_VERIFIED_KEY = "email_verified"; + + private static Payload newPayload(String userId, String clientId) { + Payload payload = new Payload(); + payload.setIssuer("accounts.google.com"); + payload.setAudience(clientId); + payload.setAuthorizedParty(clientId); + payload.setSubject(userId); + payload.setExpirationTimeSeconds(100L); + payload.setIssuedAtTimeSeconds(0L); + return payload; + } + + public void testDeprecatedMethods() { + Payload payload = newPayload(USER_ID, CLIENT_ID); + assertEquals(USER_ID, payload.getUserId()); + assertEquals(CLIENT_ID, payload.getIssuee()); + + payload.setUserId(ANOTHER_USER_ID); + payload.setIssuee(ANOTHER_CLIENT_ID); + assertEquals(ANOTHER_USER_ID, payload.getUserId()); + assertEquals(ANOTHER_CLIENT_ID, payload.getIssuee()); + assertEquals(ANOTHER_USER_ID, payload.getSubject()); + assertEquals(ANOTHER_CLIENT_ID, payload.getAuthorizedParty()); + } + + public void testEmailVerified() { + Payload payload = newPayload(USER_ID, CLIENT_ID); + assertNull(payload.getEmailVerified()); + + payload.setEmailVerified(true); + assertTrue(payload.getEmailVerified()); + + payload.setEmailVerified(false); + assertFalse(payload.getEmailVerified()); + + payload.setEmailVerified(null); + assertNull(payload.getEmailVerified()); + + payload.set(EMAIL_VERIFIED_KEY, "true"); + assertTrue(payload.getEmailVerified()); + + payload.set(EMAIL_VERIFIED_KEY, true); + assertTrue(payload.getEmailVerified()); + + payload.set(EMAIL_VERIFIED_KEY, "false"); + assertFalse(payload.getEmailVerified()); + + payload.set(EMAIL_VERIFIED_KEY, false); + assertFalse(payload.getEmailVerified()); + + payload.set(EMAIL_VERIFIED_KEY, "RandomString"); + assertFalse(payload.getEmailVerified()); + + payload.set(EMAIL_VERIFIED_KEY, ""); + assertFalse(payload.getEmailVerified()); + + payload.set(EMAIL_VERIFIED_KEY, null); + assertNull(payload.getEmailVerified()); + + // Wrong type. + payload.set(EMAIL_VERIFIED_KEY, new Integer(5)); + try { + payload.getEmailVerified(); + fail(); + } catch (ClassCastException e) { + // Expected. + } + } +} diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleIdTokenVerifierTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleIdTokenVerifierTest.java new file mode 100644 index 00000000..13954583 --- /dev/null +++ b/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleIdTokenVerifierTest.java @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2012 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.api.client.googleapis.auth.oauth2; + +import com.google.api.client.auth.openidconnect.IdTokenVerifier; +import com.google.api.client.googleapis.auth.oauth2.GoogleIdToken.Payload; +import com.google.api.client.json.jackson.JacksonFactory; +import com.google.api.client.json.webtoken.JsonWebSignature.Header; +import com.google.api.client.testing.http.FixedClock; +import com.google.api.client.util.Clock; +import com.google.api.client.util.Lists; + +import junit.framework.TestCase; + +import java.util.Arrays; +import java.util.List; + +/** + * Tests {@link GoogleIdTokenVerifier}. + * + * @author Yaniv Inbar + */ +public class GoogleIdTokenVerifierTest extends TestCase { + + private static final String ISSUER = "issuer.example.com"; + + private static final String CLIENT_ID = "myclientid"; + + private static final List TRUSTED_CLIENT_IDS = Arrays.asList(CLIENT_ID); + + private static Payload newPayload(String clientId) { + Payload payload = new Payload(); + payload.setIssuer("accounts.google.com"); + payload.setAudience(clientId); + payload.setAuthorizedParty(clientId); + payload.setExpirationTimeSeconds(100L); + payload.setIssuedAtTimeSeconds(0L); + return payload; + } + + public void testBuilder() throws Exception { + GoogleIdTokenVerifier.Builder builder = new GoogleIdTokenVerifier.Builder( + new GooglePublicKeysManagerTest.PublicCertsMockHttpTransport(), new JacksonFactory()).setIssuer( + ISSUER).setAudience(TRUSTED_CLIENT_IDS); + assertEquals(Clock.SYSTEM, builder.getClock()); + assertEquals(ISSUER, builder.getIssuer()); + assertTrue(TRUSTED_CLIENT_IDS.equals(builder.getAudience())); + Clock clock = new FixedClock(4); + builder.setClock(clock); + assertEquals(clock, builder.getClock()); + IdTokenVerifier verifier = builder.build(); + assertEquals(clock, verifier.getClock()); + assertEquals(ISSUER, verifier.getIssuer()); + assertEquals(TRUSTED_CLIENT_IDS, Lists.newArrayList(verifier.getAudience())); + } + + public void testVerify() throws Exception { + GoogleIdTokenVerifier verifier = new GoogleIdTokenVerifier.Builder( + new GooglePublicKeysManagerTest.PublicCertsMockHttpTransport(), new JacksonFactory()).build(); + Header header = new Header(); + header.setAlgorithm("RS25"); + Payload payload = newPayload(CLIENT_ID); + Payload payload2 = newPayload(CLIENT_ID + "2"); + GoogleIdToken idToken = new GoogleIdToken(header, payload, new byte[0], new byte[0]); + GoogleIdToken idToken2 = new GoogleIdToken(header, payload2, new byte[0], new byte[0]); + assertFalse(verifier.verify(idToken)); + assertFalse(verifier.verify(idToken2)); + verifier = new GoogleIdTokenVerifier( + new GooglePublicKeysManagerTest.PublicCertsMockHttpTransport(), new JacksonFactory()); + assertFalse(verifier.verify(idToken)); + assertFalse(verifier.verify(idToken2)); + // TODO(yanivi): add a unit test that returns true + } +} diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GooglePublicKeysManagerTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GooglePublicKeysManagerTest.java new file mode 100644 index 00000000..f9f259fa --- /dev/null +++ b/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GooglePublicKeysManagerTest.java @@ -0,0 +1,130 @@ +/* + * Copyright (c) 2013 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.api.client.googleapis.auth.oauth2; + +import com.google.api.client.http.HttpHeaders; +import com.google.api.client.http.HttpTransport; +import com.google.api.client.http.LowLevelHttpRequest; +import com.google.api.client.http.LowLevelHttpResponse; +import com.google.api.client.json.Json; +import com.google.api.client.json.JsonFactory; +import com.google.api.client.json.jackson.JacksonFactory; +import com.google.api.client.testing.http.FixedClock; +import com.google.api.client.testing.http.MockHttpTransport; +import com.google.api.client.testing.http.MockLowLevelHttpRequest; +import com.google.api.client.testing.http.MockLowLevelHttpResponse; + +import junit.framework.TestCase; + +/** + * Tests {@link GooglePublicKeysManager}. + * + * @author Yaniv Inbar + */ +public class GooglePublicKeysManagerTest extends TestCase { + + private static final String TEST_CERTIFICATES = + "{\r\n \"69d93af12d09b07b1f55680ac7e7fb2513b823e7\": \"-----BEGIN CERTIFICATE-----" + + "\\nMIICITCCAYqgAwIBAgIIA9YgrgKJ4cowDQYJKoZIhvcNAQEFBQAwNjE0MDIGA1UE" + + "\\nAxMrZmVkZXJhdGVkLXNpZ25vbi5zeXN0ZW0uZ3NlcnZpY2VhY2NvdW50LmNvbTAe" + + "\\nFw0xMjA2MTIyMjQzMzRaFw0xMjA2MTQxMTQzMzRaMDYxNDAyBgNVBAMTK2ZlZGVy" + + "\\nYXRlZC1zaWdub24uc3lzdGVtLmdzZXJ2aWNlYWNjb3VudC5jb20wgZ8wDQYJKoZI" + + "\\nhvcNAQEBBQADgY0AMIGJAoGBAJ6TDzmLxYD67aoTrzA3b8ouMXMeFxQOmsHn0SIA" + + "\\nGjJypTQd0hXr3jGKqP53a4qtzm7YxyPyPOsvG8IMsB0RtB8gxh82KDQUqJ+mww8n" + + "\\ney7WxW1qSmzyYog1z80MDYojODZ3j7wv1r8ajeJQSxQjBMehMEQkfjPuzERuzkCk" + + "\\niBzzAgMBAAGjODA2MAwGA1UdEwEB/wQCMAAwDgYDVR0PAQH/BAQDAgeAMBYGA1Ud" + + "\\nJQEB/wQMMAoGCCsGAQUFBwMCMA0GCSqGSIb3DQEBBQUAA4GBAIx9j1gXCEm2Vr9r" + + "\\nck6VK3ayG29+5ehNvzfYob+l731yU0yylEDEfN9OqqdW0dAqaauca+Ol8mGDIszx" + + "\\nxudWD0NzNyvm39jwypvYz9qMYwbwVnQdfbpY5O0qbcb30eIDKZRHXzpZUj0zWHPM" + + "\\nfwdrgc6XqQ48rjOsn22sWKQcB4/u\\n-----END CERTIFICATE-----\\n\",\r\n " + + "\"67aec7b8e284bb03f489a5828d0eba52cc84cc23\": \"-----BEGIN CERTIFICATE-----" + + "\\nMIICITCCAYqgAwIBAgIIcAqoF0CS2WgwDQYJKoZIhvcNAQEFBQAwNjE0MDIGA1UE" + + "\\nAxMrZmVkZXJhdGVkLXNpZ25vbi5zeXN0ZW0uZ3NlcnZpY2VhY2NvdW50LmNvbTAe" + + "\\nFw0xMjA2MTMyMjI4MzRaFw0xMjA2MTUxMTI4MzRaMDYxNDAyBgNVBAMTK2ZlZGVy" + + "\\nYXRlZC1zaWdub24uc3lzdGVtLmdzZXJ2aWNlYWNjb3VudC5jb20wgZ8wDQYJKoZI" + + "\\nhvcNAQEBBQADgY0AMIGJAoGBAMVlf20FzpqZHR7lzNWbbXq5Ol+j+/2gwTtYlgNz" + + "\\ns6njxEP4oTmViZQsuQABmvYzg7BHOOW2IRE0U2osrfAw97Gg8L/84D0Sdf9sAjr2" + + "\\nb3F6reVPUYJNDvpvKr6351+N+VRskOVnpqp/rS8k69jHlUYiGTpeQ5MA5n1BUCoF" + + "\\nJb/vAgMBAAGjODA2MAwGA1UdEwEB/wQCMAAwDgYDVR0PAQH/BAQDAgeAMBYGA1Ud" + + "\\nJQEB/wQMMAoGCCsGAQUFBwMCMA0GCSqGSIb3DQEBBQUAA4GBAHoD+K9ffsDR+XWn" + + "\\nBODExaCtMTie0l2yRds1wsgc7645PeSYsLB8p4NABI/z28VMD2e7CFzoO2kzNj5I" + + "\\nKLO2FYliXRw35P3ZJxvxs8aSP0S/U2vlhfDM/W0a4KMF9ATfoWqTaoHG1rWmYOuj" + + "\\nncTIM79cE3iBrhFqq8HpetXj77Qf\\n-----END CERTIFICATE-----\\n\"\r\n}"; + + private static final int MAX_AGE = 12345; + + private static final int AGE = 42; + + public void testBuilder() throws Exception { + HttpTransport transport = new MockHttpTransport(); + JsonFactory jsonFactory = new JacksonFactory(); + GooglePublicKeysManager.Builder builder = new GooglePublicKeysManager.Builder(transport, jsonFactory); + + GooglePublicKeysManager certs = builder.build(); + assertEquals(transport, certs.getTransport()); + assertEquals(jsonFactory, certs.getJsonFactory()); + } + + static class PublicCertsMockHttpTransport extends MockHttpTransport { + boolean useAgeHeader; + + @Override + public LowLevelHttpRequest buildRequest(String name, String url) { + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() { + MockLowLevelHttpResponse r = new MockLowLevelHttpResponse(); + r.setStatusCode(200); + r.addHeader("Cache-Control", "max-age=" + MAX_AGE); + if (useAgeHeader) { + r.addHeader("Age", String.valueOf(AGE)); + } + r.setContentType(Json.MEDIA_TYPE); + r.setContent(TEST_CERTIFICATES); + return r; + } + }; + } + } + + public void testRefresh() throws Exception { + GooglePublicKeysManager certs = new GooglePublicKeysManager.Builder( + new PublicCertsMockHttpTransport(), new JacksonFactory()).build(); + certs.refresh(); + assertEquals(2, certs.getPublicKeys().size()); + } + + public void testLoadCerts_cache() throws Exception { + PublicCertsMockHttpTransport transport = new PublicCertsMockHttpTransport(); + transport.useAgeHeader = true; + GooglePublicKeysManager certs = new GooglePublicKeysManager.Builder( + transport, new JacksonFactory()).setClock(new FixedClock(100)).build(); + + certs.refresh(); + assertEquals(2, certs.getPublicKeys().size()); + assertEquals(100 + (MAX_AGE - AGE) * 1000, certs.getExpirationTimeMilliseconds()); + } + + public void testGetCacheTimeInSec() throws Exception { + GooglePublicKeysManager certs = + new GooglePublicKeysManager.Builder(new MockHttpTransport(), new JacksonFactory()).build(); + assertEquals(12000, certs.getCacheTimeInSec( + new HttpHeaders().setAge(345L).setCacheControl("max-age=" + MAX_AGE))); + assertEquals(0, certs.getCacheTimeInSec(new HttpHeaders())); + assertEquals(0, certs.getCacheTimeInSec(new HttpHeaders().setAge(345L))); + assertEquals( + 0, certs.getCacheTimeInSec(new HttpHeaders().setAge(345L).setCacheControl("max-age=300"))); + } +} diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/batch/BatchRequestTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/batch/BatchRequestTest.java new file mode 100644 index 00000000..1dc2bba8 --- /dev/null +++ b/google-api-client/src/test/java/com/google/api/client/googleapis/batch/BatchRequestTest.java @@ -0,0 +1,634 @@ +// Copyright 2012 Google Inc. All Rights Reserved. + +package com.google.api.client.googleapis.batch; + +import com.google.api.client.googleapis.batch.BatchRequest.RequestInfo; +import com.google.api.client.googleapis.json.GoogleJsonError; +import com.google.api.client.googleapis.json.GoogleJsonError.ErrorInfo; +import com.google.api.client.googleapis.json.GoogleJsonErrorContainer; +import com.google.api.client.googleapis.testing.services.MockGoogleClient; +import com.google.api.client.googleapis.testing.services.MockGoogleClientRequest; +import com.google.api.client.http.ByteArrayContent; +import com.google.api.client.http.ExponentialBackOffPolicy; +import com.google.api.client.http.GenericUrl; +import com.google.api.client.http.HttpContent; +import com.google.api.client.http.HttpExecuteInterceptor; +import com.google.api.client.http.HttpHeaders; +import com.google.api.client.http.HttpMethods; +import com.google.api.client.http.HttpRequest; +import com.google.api.client.http.HttpRequestInitializer; +import com.google.api.client.http.HttpResponse; +import com.google.api.client.http.HttpUnsuccessfulResponseHandler; +import com.google.api.client.http.LowLevelHttpRequest; +import com.google.api.client.http.LowLevelHttpResponse; +import com.google.api.client.json.GenericJson; +import com.google.api.client.json.JsonObjectParser; +import com.google.api.client.json.jackson.JacksonFactory; +import com.google.api.client.testing.http.HttpTesting; +import com.google.api.client.testing.http.MockHttpTransport; +import com.google.api.client.testing.http.MockLowLevelHttpRequest; +import com.google.api.client.testing.http.MockLowLevelHttpResponse; +import com.google.api.client.util.Key; +import com.google.api.client.util.ObjectParser; + +import junit.framework.TestCase; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.OutputStream; +import java.util.List; + +/** + * Tests {@link BatchRequest}. + * + * @author rmistry@google.com (Ravi Mistry) + */ +@SuppressWarnings("deprecation") +public class BatchRequestTest extends TestCase { + + private static final String ROOT_URL = "http://www.test.com/"; + private static final String SERVICE_PATH = "test/"; + private static final String TEST_BATCH_URL = "http://www.testgoogleapis.com/batch"; + private static final String URI_TEMPLATE1 = "uri/template/1"; + private static final String URI_TEMPLATE2 = "uri/template/2"; + private static final String METHOD1 = HttpMethods.GET; + private static final String METHOD2 = HttpMethods.POST; + private static final String ERROR_MSG = "Error message"; + private static final String ERROR_REASON = "notFound"; + private static final int ERROR_CODE = 503; + private static final String ERROR_DOMAIN = "global"; + private static final String RESPONSE_BOUNDARY = "ABC=DE=F"; + private static final String TEST_ID = "Humpty Dumpty"; + private static final String TEST_KIND = "Big Egg"; + private static final String TEST_NAME = "James Bond"; + private static final String TEST_NUM = "007"; + + private TestCallback1 callback1; + private TestCallback2 callback2; + private TestCallback3 callback3; + + private MockTransport transport; + + private MockCredential credential; + + @Override + protected void setUp() { + callback1 = new TestCallback1(); + callback2 = new TestCallback2(); + callback3 = new TestCallback3(); + } + + public static class MockDataClass1 extends GenericJson { + @Key + String id; + + @Key + String kind; + } + + public static class MockDataClass2 extends GenericJson { + @Key + String name; + + @Key + String number; + } + + private static class TestCallback1 + implements + BatchCallback { + + int successCalls; + + TestCallback1() { + } + + public void onSuccess(MockDataClass1 dataClass, HttpHeaders responseHeaders) { + successCalls++; + assertEquals(TEST_ID, dataClass.id); + assertEquals(TEST_KIND, dataClass.kind); + } + + public void onFailure(GoogleJsonErrorContainer e, HttpHeaders responseHeaders) { + fail("Should not be invoked in this test"); + } + } + + private static class TestCallback2 + implements + BatchCallback { + + int successCalls; + int failureCalls; + + TestCallback2() { + } + + public void onSuccess(MockDataClass2 dataClass, HttpHeaders responseHeaders) { + successCalls++; + assertEquals(TEST_NAME, dataClass.name); + assertEquals(TEST_NUM, dataClass.number); + } + + public void onFailure(GoogleJsonErrorContainer e, HttpHeaders responseHeaders) { + failureCalls++; + GoogleJsonError error = e.getError(); + ErrorInfo errorInfo = error.getErrors().get(0); + assertEquals(ERROR_DOMAIN, errorInfo.getDomain()); + assertEquals(ERROR_REASON, errorInfo.getReason()); + assertEquals(ERROR_MSG, errorInfo.getMessage()); + assertEquals(ERROR_CODE, error.getCode()); + assertEquals(ERROR_MSG, error.getMessage()); + } + } + + private static class TestCallback3 implements BatchCallback { + + int successCalls; + int failureCalls; + + TestCallback3() { + } + + public void onSuccess(Void dataClass, HttpHeaders responseHeaders) { + successCalls++; + assertNull(dataClass); + } + + public void onFailure(Void e, HttpHeaders responseHeaders) { + failureCalls++; + assertNull(e); + } + } + + private static class MockUnsuccessfulResponseHandler implements HttpUnsuccessfulResponseHandler { + + MockTransport transport; + boolean returnSuccessAuthenticatedContent; + + MockUnsuccessfulResponseHandler( + MockTransport transport, boolean returnSuccessAuthenticatedContent) { + this.transport = transport; + this.returnSuccessAuthenticatedContent = returnSuccessAuthenticatedContent; + } + + public boolean handleResponse( + HttpRequest request, HttpResponse response, boolean supportsRetry) { + if (transport.returnErrorAuthenticatedContent) { + // If transport has already been set to return error content do not handle response. + return false; + } + if (returnSuccessAuthenticatedContent) { + transport.returnSuccessAuthenticatedContent = true; + } else { + transport.returnErrorAuthenticatedContent = true; + } + return true; + } + + } + + @Deprecated + private static class MockExponentialBackOffPolicy extends ExponentialBackOffPolicy { + public MockExponentialBackOffPolicy() { + } + + @Override + public long getNextBackOffMillis() { + return 0; + } + } + + private static class MockTransport extends MockHttpTransport { + + boolean testServerError; + boolean testAuthenticationError; + boolean returnSuccessAuthenticatedContent; + boolean returnErrorAuthenticatedContent; + boolean testExponentialBackOff; + boolean testRedirect; + int actualCalls; + int callsBeforeSuccess; + + MockTransport(boolean testServerError, boolean testAuthenticationError, + boolean testExponentialBackOff, boolean testRedirect) { + this.testServerError = testServerError; + this.testAuthenticationError = testAuthenticationError; + this.testExponentialBackOff = testExponentialBackOff; + this.testRedirect = testRedirect; + } + + @Override + public LowLevelHttpRequest buildRequest(String name, String url) { + actualCalls++; + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() { + MockLowLevelHttpResponse response = new MockLowLevelHttpResponse(); + response.setStatusCode(200); + response.addHeader("Content-Type", "multipart/mixed; boundary=" + RESPONSE_BOUNDARY); + String content1 = "{\n \"id\": \"" + TEST_ID + "\",\n \"kind\": \"" + TEST_KIND + "\"\n}"; + String content2 = "{\"name\": \"" + TEST_NAME + "\", \"number\": \"" + TEST_NUM + "\"}"; + + StringBuilder responseContent = new StringBuilder(); + if (returnSuccessAuthenticatedContent || (testExponentialBackOff && actualCalls > 1) + || (testRedirect && actualCalls > 1)) { + if (returnSuccessAuthenticatedContent || actualCalls == callsBeforeSuccess) { + responseContent.append("--" + RESPONSE_BOUNDARY + "\n") + .append("Content-Type: application/http\n") + .append("Content-Transfer-Encoding: binary\n") + .append("Content-ID: response-1\n\n").append("HTTP/1.1 200 OK\n") + .append("Content-Type: application/json; charset=UTF-8\n") + .append("Content-Length: " + content2.length() + "\n\n").append(content2 + "\n\n") + .append("--" + RESPONSE_BOUNDARY + "--\n\n"); + } else { + String errorContent = new StringBuilder().append( + "{\"error\": { \"errors\": [{\"domain\": \"" + ERROR_DOMAIN + "\",").append( + "\"reason\": \"" + ERROR_REASON + "\", \"message\": \"" + ERROR_MSG + "\"}],") + .append("\"code\": " + ERROR_CODE + ", \"message\": \"" + ERROR_MSG + "\"}}") + .toString(); + responseContent.append("--" + RESPONSE_BOUNDARY + "\n") + .append("Content-Type: application/http\n") + .append("Content-Transfer-Encoding: binary\n") + .append("Content-ID: response-1\n\n") + .append("HTTP/1.1 " + ERROR_CODE + " Not Found\n") + .append("Content-Type: application/json; charset=UTF-8\n") + .append("Content-Length: " + errorContent.length() + "\n\n") + .append(errorContent + "\n\n").append("--" + RESPONSE_BOUNDARY + "--\n\n"); + } + } else if (returnErrorAuthenticatedContent) { + responseContent.append("Content-Type: application/http\n") + .append("Content-Transfer-Encoding: binary\n").append("Content-ID: response-1\n\n"); + String errorContent = new StringBuilder().append( + "{\"error\": { \"errors\": [{\"domain\": \"" + ERROR_DOMAIN + "\",").append( + "\"reason\": \"" + ERROR_REASON + "\", \"message\": \"" + ERROR_MSG + "\"}],") + .append("\"code\": " + ERROR_CODE + ", \"message\": \"" + ERROR_MSG + "\"}}") + .toString(); + responseContent.append("HTTP/1.1 " + ERROR_CODE + " Not Found\n") + .append("Content-Type: application/json; charset=UTF-8\n") + .append("Content-Length: " + errorContent.length() + "\n\n") + .append(errorContent + "\n\n").append("--" + RESPONSE_BOUNDARY + "--\n\n"); + } else { + responseContent.append("--" + RESPONSE_BOUNDARY + "\n") + .append("Content-Type: application/http\n") + .append("Content-Transfer-Encoding: binary\n").append("Content-ID: response-1\n\n") + .append("HTTP/1.1 200 OK\n") + .append("Content-Type: application/json; charset=UTF-8\n") + .append("Content-Length: " + content1.length() + "\n\n").append(content1 + "\n\n") + .append("--" + RESPONSE_BOUNDARY + "\n").append("Content-Type: application/http\n") + .append("Content-Transfer-Encoding: binary\n").append("Content-ID: response-2\n\n"); + + if (testServerError) { + String errorContent = new StringBuilder().append( + "{\"error\": { \"errors\": [{\"domain\": \"" + ERROR_DOMAIN + "\",").append( + "\"reason\": \"" + ERROR_REASON + "\", \"message\": \"" + ERROR_MSG + "\"}],") + .append("\"code\": " + ERROR_CODE + ", \"message\": \"" + ERROR_MSG + "\"}}") + .toString(); + responseContent.append("HTTP/1.1 " + ERROR_CODE + " Not Found\n") + .append("Content-Type: application/json; charset=UTF-8\n") + .append("Content-Length: " + errorContent.length() + "\n\n") + .append(errorContent + "\n\n").append("--" + RESPONSE_BOUNDARY + "--\n\n"); + } else if (testAuthenticationError) { + responseContent.append("HTTP/1.1 401 Unauthorized\n") + .append("Content-Type: application/json; charset=UTF-8\n\n") + .append("--" + RESPONSE_BOUNDARY + "--\n\n"); + } else if (testRedirect && actualCalls == 1) { + responseContent.append("HTTP/1.1 301 MovedPermanently\n") + .append("Content-Type: application/json; charset=UTF-8\n") + .append("Location: http://redirect/location\n\n") + .append("--" + RESPONSE_BOUNDARY + "--\n\n"); + } else { + responseContent.append("HTTP/1.1 200 OK\n") + .append("Content-Type: application/json; charset=UTF-8\n") + .append("Content-Length: " + content2.length() + "\n\n").append(content2 + "\n\n") + .append("--" + RESPONSE_BOUNDARY + "--\n\n"); + } + } + response.setContent(responseContent.toString()); + return response; + } + }; + } + } + + private static class MockCredential implements HttpRequestInitializer, HttpExecuteInterceptor { + + boolean initializerCalled = false; + boolean interceptorCalled = false; + + MockCredential() { + } + + public void initialize(HttpRequest request) { + request.setInterceptor(this); + initializerCalled = true; + } + + public void intercept(HttpRequest request) { + interceptorCalled = true; + } + + } + + private BatchRequest getBatchPopulatedWithRequests(boolean testServerError, + boolean testAuthenticationError, boolean returnSuccessAuthenticatedContent, + boolean testExponentialBackOff, boolean testRedirect) throws Exception { + transport = new MockTransport( + testServerError, testAuthenticationError, testExponentialBackOff, testRedirect); + MockGoogleClient client = new MockGoogleClient.Builder( + transport, ROOT_URL, SERVICE_PATH, null, null).setApplicationName("Test Application") + .build(); + MockGoogleClientRequest jsonHttpRequest1 = + new MockGoogleClientRequest(client, METHOD1, URI_TEMPLATE1, null, String.class); + MockGoogleClientRequest jsonHttpRequest2 = + new MockGoogleClientRequest(client, METHOD2, URI_TEMPLATE2, null, String.class); + credential = new MockCredential(); + + ObjectParser parser = new JsonObjectParser(new JacksonFactory()); + BatchRequest batchRequest = + new BatchRequest(transport, credential).setBatchUrl(new GenericUrl(TEST_BATCH_URL)); + HttpRequest request1 = jsonHttpRequest1.buildHttpRequest(); + request1.setParser(parser); + HttpRequest request2 = jsonHttpRequest2.buildHttpRequest(); + request2.setParser(parser); + if (testAuthenticationError) { + request2.setUnsuccessfulResponseHandler( + new MockUnsuccessfulResponseHandler(transport, returnSuccessAuthenticatedContent)); + } + if (testExponentialBackOff) { + request2.setBackOffPolicy(new MockExponentialBackOffPolicy()); + } + + batchRequest.queue(request1, MockDataClass1.class, GoogleJsonErrorContainer.class, callback1); + batchRequest.queue(request2, MockDataClass2.class, GoogleJsonErrorContainer.class, callback2); + return batchRequest; + } + + public void testQueueDatastructures() throws Exception { + BatchRequest batchRequest = getBatchPopulatedWithRequests(false, false, false, false, false); + List> requestInfos = batchRequest.requestInfos; + + // Assert that the expected objects are queued. + assertEquals(2, requestInfos.size()); + assertEquals(MockDataClass1.class, requestInfos.get(0).dataClass); + assertEquals(callback1, requestInfos.get(0).callback); + assertEquals(MockDataClass2.class, requestInfos.get(1).dataClass); + assertEquals(callback2, requestInfos.get(1).callback); + // Assert that the requests in the queue are as expected. + assertEquals( + ROOT_URL + SERVICE_PATH + URI_TEMPLATE1, requestInfos.get(0).request.getUrl().build()); + assertEquals( + ROOT_URL + SERVICE_PATH + URI_TEMPLATE2, requestInfos.get(1).request.getUrl().build()); + assertEquals(METHOD1, requestInfos.get(0).request.getRequestMethod()); + assertEquals(METHOD2, requestInfos.get(1).request.getRequestMethod()); + } + + public void testExecute() throws Exception { + BatchRequest batchRequest = getBatchPopulatedWithRequests(false, false, false, false, false); + batchRequest.execute(); + // Assert callbacks have been invoked. + assertEquals(1, callback1.successCalls); + assertEquals(1, callback2.successCalls); + assertEquals(0, callback2.failureCalls); + // Assert requestInfos is empty after execute. + assertTrue(batchRequest.requestInfos.isEmpty()); + } + + public void testExecuteWithError() throws Exception { + BatchRequest batchRequest = getBatchPopulatedWithRequests(true, false, false, false, false); + batchRequest.execute(); + // Assert callbacks have been invoked. + assertEquals(1, callback1.successCalls); + assertEquals(0, callback2.successCalls); + assertEquals(1, callback2.failureCalls); + // Assert requestInfos is empty after execute. + assertTrue(batchRequest.requestInfos.isEmpty()); + // Assert transport called expected number of times. + assertEquals(1, transport.actualCalls); + } + + public void testExecuteWithVoidCallback() throws Exception { + subTestExecuteWithVoidCallback(false); + // Assert callbacks have been invoked. + assertEquals(1, callback1.successCalls); + assertEquals(1, callback3.successCalls); + assertEquals(0, callback3.failureCalls); + } + + public void testExecuteWithVoidCallbackError() throws Exception { + subTestExecuteWithVoidCallback(true); + // Assert callbacks have been invoked. + assertEquals(1, callback1.successCalls); + assertEquals(0, callback3.successCalls); + assertEquals(1, callback3.failureCalls); + } + + public void subTestExecuteWithVoidCallback(boolean testServerError) throws Exception { + MockTransport transport = new MockTransport(testServerError, false, false, false); + MockGoogleClient client = new MockGoogleClient.Builder( + transport, ROOT_URL, SERVICE_PATH, null, null).setApplicationName("Test Application") + .build(); + MockGoogleClientRequest jsonHttpRequest1 = + new MockGoogleClientRequest(client, METHOD1, URI_TEMPLATE1, null, String.class); + MockGoogleClientRequest jsonHttpRequest2 = + new MockGoogleClientRequest(client, METHOD2, URI_TEMPLATE2, null, String.class); + ObjectParser parser = new JsonObjectParser(new JacksonFactory()); + BatchRequest batchRequest = + new BatchRequest(transport, null).setBatchUrl(new GenericUrl(TEST_BATCH_URL)); + HttpRequest request1 = jsonHttpRequest1.buildHttpRequest(); + request1.setParser(parser); + HttpRequest request2 = jsonHttpRequest2.buildHttpRequest(); + request2.setParser(parser); + batchRequest.queue(request1, MockDataClass1.class, GoogleJsonErrorContainer.class, callback1); + batchRequest.queue(request2, Void.class, Void.class, callback3); + batchRequest.execute(); + // Assert transport called expected number of times. + assertEquals(1, transport.actualCalls); + } + + public void testExecuteWithAuthenticationErrorThenSuccessCallback() throws Exception { + BatchRequest batchRequest = getBatchPopulatedWithRequests(false, true, true, false, false); + batchRequest.execute(); + // Assert callbacks have been invoked. + assertEquals(1, callback1.successCalls); + assertEquals(1, callback2.successCalls); + assertEquals(0, callback2.failureCalls); + // Assert transport called expected number of times. + assertEquals(2, transport.actualCalls); + // Assert requestInfos is empty after execute. + assertTrue(batchRequest.requestInfos.isEmpty()); + } + + public void testExecuteWithAuthenticationErrorThenErrorCallback() throws Exception { + BatchRequest batchRequest = getBatchPopulatedWithRequests(false, true, false, false, false); + batchRequest.execute(); + // Assert callbacks have been invoked. + assertEquals(1, callback1.successCalls); + assertEquals(0, callback2.successCalls); + assertEquals(1, callback2.failureCalls); + // Assert transport called expected number of times. + assertEquals(2, transport.actualCalls); + // Assert requestInfos is empty after execute. + assertTrue(batchRequest.requestInfos.isEmpty()); + } + + public void testExecuteWithExponentialBackoffThenSuccessCallback() throws Exception { + BatchRequest batchRequest = getBatchPopulatedWithRequests(true, false, false, true, false); + transport.callsBeforeSuccess = 2; + batchRequest.execute(); + // Assert callbacks have been invoked. + assertEquals(1, callback1.successCalls); + assertEquals(1, callback2.successCalls); + // Assert transport called expected number of times. + assertEquals(2, transport.actualCalls); + // Assert requestInfos is empty after execute. + assertTrue(batchRequest.requestInfos.isEmpty()); + } + + public void testExecuteWithExponentialBackoffThenErrorCallback() throws Exception { + BatchRequest batchRequest = getBatchPopulatedWithRequests(true, false, false, true, false); + transport.callsBeforeSuccess = 20; + batchRequest.execute(); + // Assert callbacks have been invoked. + assertEquals(1, callback1.successCalls); + assertEquals(0, callback2.successCalls); + assertEquals(1, callback2.failureCalls); + // Assert transport called expected number of times. + assertEquals(11, transport.actualCalls); + // Assert requestInfos is empty after execute. + assertTrue(batchRequest.requestInfos.isEmpty()); + } + + public void testInterceptor() throws Exception { + BatchRequest batchRequest = getBatchPopulatedWithRequests(true, false, false, true, false); + batchRequest.execute(); + // Assert the top-level request initializer is called. + assertTrue(credential.initializerCalled); + assertTrue(credential.interceptorCalled); + } + + public void testRedirect() throws Exception { + BatchRequest batchRequest = getBatchPopulatedWithRequests(false, false, false, false, true); + transport.callsBeforeSuccess = 2; + batchRequest.execute(); + // Assert transport called expected number of times. + assertEquals(2, transport.actualCalls); + // Assert requestInfos is empty after execute. + assertTrue(batchRequest.requestInfos.isEmpty()); + } + + public void testExecute_checkWriteTo() throws Exception { + String request1Method = HttpMethods.POST; + String request1Url = "http://test/dummy/url1"; + String request1ContentType = "application/json"; + String request1Content = "{\"data\":{\"foo\":{\"v1\":{}}}}"; + + String request2Method = HttpMethods.GET; + String request2Url = "http://test/dummy/url2"; + + final StringBuilder expectedOutput = new StringBuilder(); + expectedOutput.append("--__END_OF_PART__\r\n"); + expectedOutput.append("Content-Length: 109\r\n"); + expectedOutput.append("Content-Type: application/http\r\n"); + expectedOutput.append("content-id: 1\r\n"); + expectedOutput.append("content-transfer-encoding: binary\r\n"); + expectedOutput.append("\r\n"); + expectedOutput.append("POST http://test/dummy/url1\r\n"); + expectedOutput.append("Content-Length: 26\r\n"); + expectedOutput.append("Content-Type: " + request1ContentType + "\r\n"); + expectedOutput.append("\r\n"); + expectedOutput.append(request1Content + "\r\n"); + expectedOutput.append("--__END_OF_PART__\r\n"); + expectedOutput.append("Content-Length: 28\r\n"); + expectedOutput.append("Content-Type: application/http\r\n"); + expectedOutput.append("content-id: 2\r\n"); + expectedOutput.append("content-transfer-encoding: binary\r\n"); + expectedOutput.append("\r\n"); + expectedOutput.append("GET http://test/dummy/url2\r\n"); + expectedOutput.append("\r\n"); + expectedOutput.append("--__END_OF_PART__--\r\n"); + MockHttpTransport transport = new MockHttpTransport(); + HttpRequest request1 = transport.createRequestFactory().buildRequest( + request1Method, new GenericUrl(request1Url), + new ByteArrayContent(request1ContentType, request1Content.getBytes())); + HttpRequest request2 = transport.createRequestFactory() + .buildRequest(request2Method, new GenericUrl(request2Url), null); + subtestExecute_checkWriteTo(expectedOutput.toString(), request1, request2); + } + + private void subtestExecute_checkWriteTo(final String expectedOutput, HttpRequest... requests) + throws IOException { + + MockHttpTransport transport = new MockHttpTransport() { + + @Override + public LowLevelHttpRequest buildRequest(String method, String url) { + return new MockLowLevelHttpRequest(url) { + + @Override + public LowLevelHttpResponse execute() throws IOException { + assertEquals("multipart/mixed; boundary=__END_OF_PART__", getContentType()); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + getStreamingContent().writeTo(out); + assertEquals(expectedOutput, out.toString("UTF-8")); + MockLowLevelHttpResponse response = new MockLowLevelHttpResponse(); + response.setStatusCode(200); + response.addHeader("Content-Type", "multipart/mixed; boundary=" + RESPONSE_BOUNDARY); + String content2 = "{\"name\": \"" + TEST_NAME + "\", \"number\": \"" + TEST_NUM + "\"}"; + StringBuilder responseContent = new StringBuilder(); + responseContent.append("--" + RESPONSE_BOUNDARY + "\n") + .append("Content-Type: application/http\n") + .append("Content-Transfer-Encoding: binary\n").append("Content-ID: response-1\n\n") + .append("HTTP/1.1 200 OK\n") + .append("Content-Type: application/json; charset=UTF-8\n") + .append("Content-Length: " + content2.length() + "\n\n").append(content2 + "\n\n") + .append("--" + RESPONSE_BOUNDARY + "--\n\n"); + response.setContent(responseContent.toString()); + return response; + } + }; + } + }; + + BatchRequest batchRequest = new BatchRequest(transport, null); + BatchCallback callback = new BatchCallback() { + + public void onSuccess(Void t, HttpHeaders responseHeaders) { + } + + public void onFailure(Void e, HttpHeaders responseHeaders) { + } + }; + for (HttpRequest request : requests) { + batchRequest.queue(request, Void.class, Void.class, callback); + } + batchRequest.execute(); + } + + public void testExecute_checkWriteToNoHeaders() throws Exception { + MockHttpTransport transport = new MockHttpTransport(); + HttpRequest request1 = transport.createRequestFactory() + .buildPostRequest(HttpTesting.SIMPLE_GENERIC_URL, new HttpContent() { + + public long getLength() { + return -1; + } + + public String getType() { + return null; + } + + public void writeTo(OutputStream out) { + } + + public boolean retrySupported() { + return true; + } + }); + subtestExecute_checkWriteTo(new StringBuilder().append("--__END_OF_PART__\r\n") + .append("Content-Length: 27\r\n").append("Content-Type: application/http\r\n") + .append("content-id: 1\r\n").append("content-transfer-encoding: binary\r\n").append("\r\n") + .append("POST http://google.com/\r\n").append("\r\n").append("\r\n") + .append("--__END_OF_PART__--\r\n").toString(), request1); + } +} diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/compute/ComputeCredentialTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/compute/ComputeCredentialTest.java new file mode 100644 index 00000000..b3c80412 --- /dev/null +++ b/google-api-client/src/test/java/com/google/api/client/googleapis/compute/ComputeCredentialTest.java @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2013 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.api.client.googleapis.compute; + +import com.google.api.client.auth.oauth2.TokenResponse; +import com.google.api.client.http.HttpTransport; +import com.google.api.client.http.LowLevelHttpRequest; +import com.google.api.client.json.Json; +import com.google.api.client.json.jackson.JacksonFactory; +import com.google.api.client.testing.http.MockHttpTransport; +import com.google.api.client.testing.http.MockLowLevelHttpRequest; +import com.google.api.client.testing.http.MockLowLevelHttpResponse; + +import junit.framework.TestCase; + +/** + * Tests {@link ComputeCredential}. + * + * @author Yaniv Inbar + */ +public class ComputeCredentialTest extends TestCase { + + static final String ACCESS_TOKEN = "ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_QtAS08i85nHq39HE3C2LTrCARA"; + + static final long EXPIRES_IN_SECONDS = 3599L; + + static final String TOKEN_TYPE = "Bearer"; + + public void testExecuteRefreshToken() throws Exception { + HttpTransport transport = new MockHttpTransport() { + + private int count = 0; + + @Override + public LowLevelHttpRequest buildRequest(String method, String url) { + assertEquals(1, ++count); + assertEquals("GET", method); + assertEquals( + "http://metadata/computeMetadata/v1beta1/instance/service-accounts/default/token", url); + String content = "{" + "\"access_token\":\"" + ACCESS_TOKEN + "\"," + "\"expires_in\":" + + EXPIRES_IN_SECONDS + "," + "\"token_type\":\"" + TOKEN_TYPE + "\"" + "}"; + return new MockLowLevelHttpRequest(url).setResponse( + new MockLowLevelHttpResponse().setContent(content).setContentType(Json.MEDIA_TYPE)); + } + }; + ComputeCredential cred = new ComputeCredential(transport, new JacksonFactory()); + TokenResponse response = cred.executeRefreshToken(); + assertEquals(ACCESS_TOKEN, response.getAccessToken()); + assertEquals(EXPIRES_IN_SECONDS, response.getExpiresInSeconds().longValue()); + assertEquals(TOKEN_TYPE, response.getTokenType()); + } +} diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/json/GoogleJsonErrorContainerTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/json/GoogleJsonErrorContainerTest.java new file mode 100644 index 00000000..bc0682b9 --- /dev/null +++ b/google-api-client/src/test/java/com/google/api/client/googleapis/json/GoogleJsonErrorContainerTest.java @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2012 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.api.client.googleapis.json; + +import com.google.api.client.json.JsonFactory; +import com.google.api.client.json.JsonParser; +import com.google.api.client.json.jackson.JacksonFactory; + +import junit.framework.TestCase; + +/** + * Tests {@link GoogleJsonErrorContainer}. + * + * @author rmistry@google.com (Ravi Mistry) + */ +public class GoogleJsonErrorContainerTest extends TestCase { + + static final JsonFactory FACTORY = new JacksonFactory(); + static final String ERROR = "{" + "\"error\":{" + "\"code\":403," + "\"errors\":[{" + + "\"domain\":\"usageLimits\"," + "\"message\":\"Access Not Configured\"," + + "\"reason\":\"accessNotConfigured\"" + "}]," + "\"message\":\"Access Not Configured\"}}"; + + public void test_json() throws Exception { + JsonParser parser = FACTORY.createJsonParser(ERROR); + GoogleJsonErrorContainer e = parser.parse(GoogleJsonErrorContainer.class); + assertEquals(ERROR, FACTORY.toString(e)); + } +} diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/json/GoogleJsonErrorTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/json/GoogleJsonErrorTest.java new file mode 100644 index 00000000..d7f220d4 --- /dev/null +++ b/google-api-client/src/test/java/com/google/api/client/googleapis/json/GoogleJsonErrorTest.java @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2011 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.api.client.googleapis.json; + +import com.google.api.client.http.HttpRequest; +import com.google.api.client.http.HttpResponse; +import com.google.api.client.http.HttpStatusCodes; +import com.google.api.client.http.HttpTransport; +import com.google.api.client.http.LowLevelHttpRequest; +import com.google.api.client.json.Json; +import com.google.api.client.json.JsonFactory; +import com.google.api.client.json.JsonParser; +import com.google.api.client.json.jackson.JacksonFactory; +import com.google.api.client.testing.http.HttpTesting; +import com.google.api.client.testing.http.MockHttpTransport; +import com.google.api.client.testing.http.MockLowLevelHttpRequest; +import com.google.api.client.testing.http.MockLowLevelHttpResponse; + +import junit.framework.TestCase; + + +/** + * Tests {@link GoogleJsonError}. + * + * @author Yaniv Inbar + */ +public class GoogleJsonErrorTest extends TestCase { + + static final JsonFactory FACTORY = new JacksonFactory(); + static final String ERROR = "{" + "\"code\":403," + "\"errors\":[{" + + "\"domain\":\"usageLimits\"," + "\"message\":\"Access Not Configured\"," + + "\"reason\":\"accessNotConfigured\"" + "}]," + "\"message\":\"Access Not Configured\"}"; + static final String ERROR_RESPONSE = "{\"error\":" + ERROR + "}"; + + public void test_json() throws Exception { + JsonParser parser = FACTORY.createJsonParser(ERROR); + parser.nextToken(); + GoogleJsonError e = parser.parse(GoogleJsonError.class); + assertEquals(ERROR, FACTORY.toString(e)); + } + + static class ErrorTransport extends MockHttpTransport { + final MockLowLevelHttpResponse response; + + ErrorTransport() { + this(ERROR_RESPONSE, Json.MEDIA_TYPE); + } + + ErrorTransport(String content, String contentType) { + response = new MockLowLevelHttpResponse().setContent(content) + .setContentType(contentType).setStatusCode(HttpStatusCodes.STATUS_CODE_FORBIDDEN); + } + + @Override + public LowLevelHttpRequest buildRequest(String name, String url) { + return new MockLowLevelHttpRequest(url).setResponse(response); + } + } + + public void testParse() throws Exception { + HttpTransport transport = new ErrorTransport(); + HttpRequest request = + transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); + request.setThrowExceptionOnExecuteError(false); + HttpResponse response = request.execute(); + GoogleJsonError errorResponse = GoogleJsonError.parse(FACTORY, response); + assertEquals(ERROR, FACTORY.toString(errorResponse)); + } +} diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/json/GoogleJsonResponseExceptionTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/json/GoogleJsonResponseExceptionTest.java new file mode 100644 index 00000000..19b59abe --- /dev/null +++ b/google-api-client/src/test/java/com/google/api/client/googleapis/json/GoogleJsonResponseExceptionTest.java @@ -0,0 +1,121 @@ +/* + * Copyright (c) 2011 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.api.client.googleapis.json; + +import com.google.api.client.googleapis.json.GoogleJsonErrorTest.ErrorTransport; +import com.google.api.client.http.HttpRequest; +import com.google.api.client.http.HttpResponse; +import com.google.api.client.http.HttpTransport; +import com.google.api.client.json.Json; +import com.google.api.client.testing.http.HttpTesting; +import com.google.api.client.testing.http.MockHttpTransport; +import com.google.api.client.util.StringUtils; + +import junit.framework.TestCase; + + +/** + * Tests {@link GoogleJsonResponseException}. + * + * @author Yaniv Inbar + */ +public class GoogleJsonResponseExceptionTest extends TestCase { + + public void testFrom_noDetails() throws Exception { + HttpTransport transport = new MockHttpTransport(); + HttpRequest request = + transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); + request.setThrowExceptionOnExecuteError(false); + HttpResponse response = request.execute(); + GoogleJsonResponseException ge = + GoogleJsonResponseException.from(GoogleJsonErrorTest.FACTORY, response); + assertNull(ge.getDetails()); + assertEquals("200", ge.getMessage()); + } + + public void testFrom_withDetails() throws Exception { + HttpTransport transport = new ErrorTransport(); + HttpRequest request = + transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); + request.setThrowExceptionOnExecuteError(false); + HttpResponse response = request.execute(); + GoogleJsonResponseException ge = + GoogleJsonResponseException.from(GoogleJsonErrorTest.FACTORY, response); + assertEquals(GoogleJsonErrorTest.ERROR, GoogleJsonErrorTest.FACTORY.toString(ge.getDetails())); + assertTrue( + ge.getMessage(), ge.getMessage().startsWith("403" + StringUtils.LINE_SEPARATOR + "{")); + } + + public void testFrom_detailsMissingContent() throws Exception { + HttpTransport transport = new ErrorTransport(null, Json.MEDIA_TYPE); + HttpRequest request = + transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); + request.setThrowExceptionOnExecuteError(false); + HttpResponse response = request.execute(); + GoogleJsonResponseException ge = + GoogleJsonResponseException.from(GoogleJsonErrorTest.FACTORY, response); + assertNull(ge.getDetails()); + assertEquals("403", ge.getMessage()); + } + + public void testFrom_detailsArbitraryJsonContent() throws Exception { + HttpTransport transport = new ErrorTransport("{\"foo\":\"bar\"}", Json.MEDIA_TYPE); + HttpRequest request = + transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); + request.setThrowExceptionOnExecuteError(false); + HttpResponse response = request.execute(); + GoogleJsonResponseException ge = + GoogleJsonResponseException.from(GoogleJsonErrorTest.FACTORY, response); + assertNull(ge.getDetails()); + assertEquals("403", ge.getMessage()); + } + + public void testFrom_detailsArbitraryXmlContent() throws Exception { + HttpTransport transport = new ErrorTransport("", "application/atom+xml; charset=utf-8"); + HttpRequest request = + transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); + request.setThrowExceptionOnExecuteError(false); + HttpResponse response = request.execute(); + GoogleJsonResponseException ge = + GoogleJsonResponseException.from(GoogleJsonErrorTest.FACTORY, response); + assertNull(ge.getDetails()); + assertTrue( + ge.getMessage(), ge.getMessage().startsWith("403" + StringUtils.LINE_SEPARATOR + "<")); + } + + public void testFrom_errorNoContentButWithJsonContentType() throws Exception { + HttpTransport transport = new ErrorTransport("", Json.MEDIA_TYPE); + HttpRequest request = + transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); + request.setThrowExceptionOnExecuteError(false); + HttpResponse response = request.execute(); + GoogleJsonResponseException ge = + GoogleJsonResponseException.from(GoogleJsonErrorTest.FACTORY, response); + assertNull(ge.getDetails()); + assertEquals("403", ge.getMessage()); + } + + public void testFrom_errorEmptyContentButWithJsonContentType() throws Exception { + HttpTransport transport = new ErrorTransport(null, Json.MEDIA_TYPE); + HttpRequest request = + transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); + request.setThrowExceptionOnExecuteError(false); + HttpResponse response = request.execute(); + GoogleJsonResponseException ge = + GoogleJsonResponseException.from(GoogleJsonErrorTest.FACTORY, response); + assertNull(ge.getDetails()); + assertEquals("403", ge.getMessage()); + } +} diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/media/MediaHttpDownloaderTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/media/MediaHttpDownloaderTest.java new file mode 100644 index 00000000..cd7b6506 --- /dev/null +++ b/google-api-client/src/test/java/com/google/api/client/googleapis/media/MediaHttpDownloaderTest.java @@ -0,0 +1,406 @@ +/* + * Copyright (c) 2012 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.api.client.googleapis.media; + +import com.google.api.client.http.GenericUrl; +import com.google.api.client.http.HttpResponseException; +import com.google.api.client.http.LowLevelHttpRequest; +import com.google.api.client.http.LowLevelHttpResponse; +import com.google.api.client.testing.http.MockHttpTransport; +import com.google.api.client.testing.http.MockLowLevelHttpRequest; +import com.google.api.client.testing.http.MockLowLevelHttpResponse; + +import junit.framework.TestCase; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; + +/** + * Tests {@link MediaHttpDownloader}. + * + * @author rmistry@google.com (Ravi Mistry) + */ +public class MediaHttpDownloaderTest extends TestCase { + + private static final String TEST_REQUEST_URL = "http://www.test.com/request/url?alt=media"; + private static final int TEST_CHUNK_SIZE = MediaHttpDownloader.MAXIMUM_CHUNK_SIZE; + + private static class MediaTransport extends MockHttpTransport { + + int lowLevelExecCalls; + int contentLength; + int bytesDownloaded; + int lastBytePos = -1; + boolean testServerError; + boolean testClientError; + boolean directDownloadEnabled; + + protected MediaTransport(int contentLength) { + this.contentLength = contentLength; + } + + @Override + public LowLevelHttpRequest buildRequest(String name, String url) { + assertEquals(TEST_REQUEST_URL, url); + + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() { + lowLevelExecCalls++; + MockLowLevelHttpResponse response = new MockLowLevelHttpResponse(); + + if (directDownloadEnabled) { + if (bytesDownloaded != 0) { + if (lastBytePos == -1) { + assertEquals("bytes=" + bytesDownloaded + "-", getFirstHeaderValue("Range")); + } else { + assertEquals( + "bytes=" + bytesDownloaded + "-" + lastBytePos, getFirstHeaderValue("Range")); + } + } + if (testServerError && lowLevelExecCalls == 1) { + // send a server error in the 1st request + response.setStatusCode(500); + return response; + } + response.setStatusCode(200); + response.addHeader("Content-Length", String.valueOf(contentLength)); + response.setContent( + new ByteArrayInputStream(new byte[contentLength - bytesDownloaded])); + return response; + } + + // Assert that the required headers are set. + long currentRequestLastBytePos = bytesDownloaded + TEST_CHUNK_SIZE - 1; + if (lastBytePos != -1) { + currentRequestLastBytePos = Math.min(lastBytePos, currentRequestLastBytePos); + } + assertEquals("bytes=" + bytesDownloaded + "-" + currentRequestLastBytePos, + getFirstHeaderValue("Range")); + + if (testServerError && lowLevelExecCalls == 2) { + // Send a server error in the 2nd request. + response.setStatusCode(500); + return response; + } + if (testClientError) { + // Return a 404. + response.setStatusCode(404); + return response; + } + + response.setStatusCode(206); + int upper = Math.min(bytesDownloaded + TEST_CHUNK_SIZE, contentLength) - 1; + response.addHeader( + "Content-Range", "bytes " + bytesDownloaded + "-" + upper + "/" + contentLength); + int bytesDownloadedCur = upper - bytesDownloaded + 1; + response.setContent(new ByteArrayInputStream(new byte[bytesDownloadedCur])); + bytesDownloaded += bytesDownloadedCur; + return response; + } + }; + } + } + + private static class ProgressListenerWithTwoDownloadCalls + implements + MediaHttpDownloaderProgressListener { + + int progressListenerCalls; + + public ProgressListenerWithTwoDownloadCalls() { + } + + public void progressChanged(MediaHttpDownloader downloader) { + progressListenerCalls++; + + switch (downloader.getDownloadState()) { + case MEDIA_IN_PROGRESS: + // Assert that the 1st call is media in progress and check the progress percent. + assertTrue(progressListenerCalls == 1); + assertEquals(0.5, downloader.getProgress()); + break; + case MEDIA_COMPLETE: + // Assert that the 2nd call is media complete. + assertEquals(2, progressListenerCalls); + assertEquals(1.0, downloader.getProgress()); + break; + } + } + } + + public void testDownloadOneCallHalfChunkSize() throws Exception { + int contentLength = MediaHttpDownloader.MAXIMUM_CHUNK_SIZE / 2; + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); + MediaTransport fakeTransport = new MediaTransport(contentLength); + MediaHttpDownloader downloader = new MediaHttpDownloader(fakeTransport, null); + downloader.download(new GenericUrl(TEST_REQUEST_URL), outputStream); + assertEquals(contentLength, outputStream.size()); + + // There should be 1 download call made. + assertEquals(1, fakeTransport.lowLevelExecCalls); + } + + public void testDownloadOneCallMaxChunkSize() throws Exception { + int contentLength = MediaHttpDownloader.MAXIMUM_CHUNK_SIZE; + MediaTransport fakeTransport = new MediaTransport(contentLength); + MediaHttpDownloader downloader = new MediaHttpDownloader(fakeTransport, null); + + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); + try { + downloader.download(new GenericUrl(TEST_REQUEST_URL), outputStream); + assertEquals(TEST_CHUNK_SIZE, outputStream.size()); + } finally { + outputStream.close(); + } + + // There should be 1 download call made. + assertEquals(1, fakeTransport.lowLevelExecCalls); + } + + public void testSetBytesDownloaded() throws Exception { + int contentLength = MediaHttpDownloader.MAXIMUM_CHUNK_SIZE; + MediaTransport fakeTransport = new MediaTransport(contentLength); + fakeTransport.bytesDownloaded = contentLength - 10000; + MediaHttpDownloader downloader = new MediaHttpDownloader(fakeTransport, null); + downloader.setBytesDownloaded(contentLength - 10000); + + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); + downloader.download(new GenericUrl(TEST_REQUEST_URL), outputStream); + assertEquals(10000, outputStream.size()); + + // There should be 1 download call made. + assertEquals(1, fakeTransport.lowLevelExecCalls); + } + + public void testDownloadMultipleCallsMaxChunkSize() throws Exception { + int contentLength = MediaHttpDownloader.MAXIMUM_CHUNK_SIZE * 3; + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); + MediaTransport fakeTransport = new MediaTransport(contentLength); + MediaHttpDownloader downloader = new MediaHttpDownloader(fakeTransport, null); + downloader.download(new GenericUrl(TEST_REQUEST_URL), outputStream); + assertEquals(contentLength, outputStream.size()); + + // There should be 3 download calls made. + assertEquals(3, fakeTransport.lowLevelExecCalls); + } + + public void testDownloadProgressListener() throws Exception { + int contentLength = MediaHttpDownloader.MAXIMUM_CHUNK_SIZE * 2; + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); + MediaTransport fakeTransport = new MediaTransport(contentLength); + MediaHttpDownloader downloader = new MediaHttpDownloader(fakeTransport, null); + downloader.setProgressListener(new ProgressListenerWithTwoDownloadCalls()); + downloader.download(new GenericUrl(TEST_REQUEST_URL), outputStream); + } + + public void testDownloadServerErrorWithBackOffEnabled() throws Exception { + int contentLength = MediaHttpDownloader.MAXIMUM_CHUNK_SIZE * 2; + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); + MediaTransport fakeTransport = new MediaTransport(contentLength); + fakeTransport.testServerError = true; + MediaHttpDownloader downloader = new MediaHttpDownloader( + fakeTransport, new MediaHttpUploaderTest.ZeroBackOffRequestInitializer()); + downloader.download(new GenericUrl(TEST_REQUEST_URL), outputStream); + + // There should be 3 calls made: 1 download request with server error and 2 successful download + // requests. + assertEquals(3, fakeTransport.lowLevelExecCalls); + } + + public void testDownloadServerErrorWithBackOffDisabled() throws Exception { + int contentLength = MediaHttpDownloader.MAXIMUM_CHUNK_SIZE * 2; + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); + MediaTransport fakeTransport = new MediaTransport(contentLength); + fakeTransport.testServerError = true; + MediaHttpDownloader downloader = new MediaHttpDownloader(fakeTransport, null); + try { + downloader.download(new GenericUrl(TEST_REQUEST_URL), outputStream); + fail("Expected " + HttpResponseException.class); + } catch (HttpResponseException e) { + // Expected + } + + // There should be 2 calls made: 1 successful download request and 1 download request with + // server error. + assertEquals(2, fakeTransport.lowLevelExecCalls); + } + + public void testDownloadClientError() throws Exception { + int contentLength = MediaHttpDownloader.MAXIMUM_CHUNK_SIZE * 2; + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); + MediaTransport fakeTransport = new MediaTransport(contentLength); + fakeTransport.testClientError = true; + MediaHttpDownloader downloader = new MediaHttpDownloader(fakeTransport, null); + try { + downloader.download(new GenericUrl(TEST_REQUEST_URL), outputStream); + fail("Expected " + HttpResponseException.class); + } catch (HttpResponseException e) { + // Expected + } + + // There should be only 1 call made: 1 download request that returned a 404. + assertEquals(1, fakeTransport.lowLevelExecCalls); + } + + public void testDirectMediaDownload() throws Exception { + int contentLength = MediaHttpDownloader.MAXIMUM_CHUNK_SIZE; + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); + MediaTransport fakeTransport = new MediaTransport(contentLength); + fakeTransport.directDownloadEnabled = true; + MediaHttpDownloader downloader = new MediaHttpDownloader(fakeTransport, null); + downloader.setDirectDownloadEnabled(true); + downloader.download(new GenericUrl(TEST_REQUEST_URL), outputStream); + assertEquals(TEST_CHUNK_SIZE, outputStream.size()); + + // There should be 1 download call made. + assertEquals(1, fakeTransport.lowLevelExecCalls); + } + + public void testSetBytesDownloadedWithIllegalArguments() throws Exception { + int contentLength = MediaHttpDownloader.MAXIMUM_CHUNK_SIZE; + MediaTransport fakeTransport = new MediaTransport(contentLength); + MediaHttpDownloader downloader = new MediaHttpDownloader(fakeTransport, null); + try { + downloader.setBytesDownloaded(-1); + fail("Expected " + IllegalArgumentException.class); + } catch (IllegalArgumentException e) { + // Expected. + } + + // Anything >= 0 should be accepted. + downloader.setBytesDownloaded(0); + downloader.setBytesDownloaded(1); + } + + public void testSetContentRangeWithIllegalArguments() throws Exception { + int contentLength = MediaHttpDownloader.MAXIMUM_CHUNK_SIZE; + MediaTransport fakeTransport = new MediaTransport(contentLength); + MediaHttpDownloader downloader = new MediaHttpDownloader(fakeTransport, null); + + try { + downloader.setContentRange(-1, 0); + fail("Expected " + IllegalArgumentException.class); + } catch (IllegalArgumentException e) { + // Expected. + } + + try { + downloader.setContentRange(1, 0); + fail("Expected " + IllegalArgumentException.class); + } catch (IllegalArgumentException e) { + // Expected. + } + + try { + downloader.setContentRange(200, 199); + fail("Expected " + IllegalArgumentException.class); + } catch (IllegalArgumentException e) { + // Expected. + } + + // The following should be accepted + downloader.setContentRange(0, 0); + downloader.setContentRange(0, 1); + downloader.setContentRange(1, 1); + downloader.setContentRange(199, 200); + downloader.setContentRange(200, 200); + } + + public void testSetBytesDownloadedWithDirectDownload() throws Exception { + int contentLength = MediaHttpDownloader.MAXIMUM_CHUNK_SIZE; + MediaTransport fakeTransport = new MediaTransport(contentLength); + fakeTransport.directDownloadEnabled = true; + fakeTransport.bytesDownloaded = contentLength - 10000; + MediaHttpDownloader downloader = new MediaHttpDownloader(fakeTransport, null); + downloader.setDirectDownloadEnabled(true); + downloader.setBytesDownloaded(contentLength - 10000); + + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); + downloader.download(new GenericUrl(TEST_REQUEST_URL), outputStream); + assertEquals(10000, outputStream.size()); + + // There should be 1 download call made. + assertEquals(1, fakeTransport.lowLevelExecCalls); + } + + public void testSetContentRangeWithResumableDownload() throws Exception { + int contentLength = MediaHttpDownloader.MAXIMUM_CHUNK_SIZE; + MediaTransport fakeTransport = new MediaTransport(contentLength); + fakeTransport.bytesDownloaded = contentLength - 10000; + fakeTransport.lastBytePos = contentLength; + + MediaHttpDownloader downloader = new MediaHttpDownloader(fakeTransport, null); + downloader.setContentRange(contentLength - 10000, contentLength); + + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); + downloader.download(new GenericUrl(TEST_REQUEST_URL), outputStream); + assertEquals(10000, outputStream.size()); + + // There should be 1 download call made. + assertEquals(1, fakeTransport.lowLevelExecCalls); + } + + public void testSetContentRangeWithDirectDownload() throws Exception { + int contentLength = MediaHttpDownloader.MAXIMUM_CHUNK_SIZE; + MediaTransport fakeTransport = new MediaTransport(contentLength); + fakeTransport.directDownloadEnabled = true; + fakeTransport.bytesDownloaded = contentLength - 10000; + fakeTransport.lastBytePos = contentLength; + + MediaHttpDownloader downloader = new MediaHttpDownloader(fakeTransport, null); + downloader.setDirectDownloadEnabled(true); + downloader.setContentRange(contentLength - 10000, contentLength); + + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); + downloader.download(new GenericUrl(TEST_REQUEST_URL), outputStream); + assertEquals(10000, outputStream.size()); + + // There should be 1 download call made. + assertEquals(1, fakeTransport.lowLevelExecCalls); + } + + public void testDirectDownloadServerErrorWithBackOffEnabled() throws Exception { + int contentLength = MediaHttpDownloader.MAXIMUM_CHUNK_SIZE * 2; + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); + MediaTransport fakeTransport = new MediaTransport(contentLength); + fakeTransport.directDownloadEnabled = true; + fakeTransport.testServerError = true; + MediaHttpDownloader downloader = new MediaHttpDownloader( + fakeTransport, new MediaHttpUploaderTest.ZeroBackOffRequestInitializer()); + downloader.download(new GenericUrl(TEST_REQUEST_URL), outputStream); + + // should be 2 calls made: 1 download request w/server error and 1 successful download request + assertEquals(2, fakeTransport.lowLevelExecCalls); + } + + public void testDirectDownloadServerErrorWithBackOffDisabled() throws Exception { + int contentLength = MediaHttpDownloader.MAXIMUM_CHUNK_SIZE * 2; + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); + MediaTransport fakeTransport = new MediaTransport(contentLength); + fakeTransport.directDownloadEnabled = true; + fakeTransport.testServerError = true; + MediaHttpDownloader downloader = new MediaHttpDownloader(fakeTransport, null); + try { + downloader.download(new GenericUrl(TEST_REQUEST_URL), outputStream); + fail("Expected " + HttpResponseException.class); + } catch (HttpResponseException e) { + // Expected + } + + // should be 1 call made: 1 download request with server error + assertEquals(1, fakeTransport.lowLevelExecCalls); + } +} diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/media/MediaHttpUploaderTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/media/MediaHttpUploaderTest.java new file mode 100644 index 00000000..cd51172f --- /dev/null +++ b/google-api-client/src/test/java/com/google/api/client/googleapis/media/MediaHttpUploaderTest.java @@ -0,0 +1,1028 @@ +/* + * Copyright (c) 2011 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.api.client.googleapis.media; + +import com.google.api.client.http.AbstractHttpContent; +import com.google.api.client.http.ByteArrayContent; +import com.google.api.client.http.EmptyContent; +import com.google.api.client.http.GenericUrl; +import com.google.api.client.http.HttpBackOffIOExceptionHandler; +import com.google.api.client.http.HttpBackOffUnsuccessfulResponseHandler; +import com.google.api.client.http.HttpExecuteInterceptor; +import com.google.api.client.http.HttpRequest; +import com.google.api.client.http.HttpRequestInitializer; +import com.google.api.client.http.HttpResponse; +import com.google.api.client.http.HttpTransport; +import com.google.api.client.http.InputStreamContent; +import com.google.api.client.http.LowLevelHttpRequest; +import com.google.api.client.http.LowLevelHttpResponse; +import com.google.api.client.testing.http.MockHttpTransport; +import com.google.api.client.testing.http.MockLowLevelHttpRequest; +import com.google.api.client.testing.http.MockLowLevelHttpResponse; +import com.google.api.client.testing.util.TestableByteArrayInputStream; +import com.google.api.client.util.BackOff; + +import junit.framework.TestCase; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.util.Arrays; +import java.util.Random; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * Tests {@link MediaHttpUploader}. + * + * @author rmistry@google.com (Ravi Mistry) + */ +public class MediaHttpUploaderTest extends TestCase { + + private static final String TEST_RESUMABLE_REQUEST_URL = + "http://www.test.com/request/url?uploadType=resumable"; + private static final String TEST_DIRECT_REQUEST_URL = + "http://www.test.com/request/url?uploadType=media"; + private static final String TEST_MULTIPART_REQUEST_URL = + "http://www.test.com/request/url?uploadType=multipart"; + private static final String TEST_UPLOAD_URL = "http://www.test.com/media/upload/location"; + private static final String TEST_CONTENT_TYPE = "image/jpeg"; + + private static Logger LOGGER = Logger.getLogger(HttpTransport.class.getName()); + private Level oldLevel; + + @Override + public void setUp() { + // suppress logging warnings to the console + oldLevel = LOGGER.getLevel(); + LOGGER.setLevel(Level.SEVERE); + } + + @Override + public void tearDown() { + // back to the standard logging level for console + LOGGER.setLevel(oldLevel); + } + + private static class MockHttpContent extends AbstractHttpContent { + + public MockHttpContent() { + super("mock/type"); + } + + public void writeTo(OutputStream out) { + } + } + + static class MediaTransport extends MockHttpTransport { + + int lowLevelExecCalls; + int bytesUploaded; + final int contentLength; + boolean testServerError; + boolean testClientError; + boolean testAuthenticationError; + boolean directUploadEnabled; + boolean directUploadWithMetadata; + boolean contentLengthNotSpecified; + boolean assertTestHeaders; + boolean testIOException; + int maxByteIndexUploadedOnError = MediaHttpUploader.DEFAULT_CHUNK_SIZE - 1; + + /** + * Bytes received by this server or {@code null} for none. To enable test content use the + * following constructor {@link #MediaTransport(int, boolean)}. + */ + byte[] bytesReceived; + + MediaTransport(int contentLength) { + this.contentLength = contentLength; + } + + MediaTransport(int contentLength, boolean testContent) { + this(contentLength); + if (testContent) { + bytesReceived = new byte[contentLength]; + } + } + + @Override + public LowLevelHttpRequest buildRequest(String name, String url) { + if (name.equals("POST")) { + if (directUploadEnabled) { + if (directUploadWithMetadata) { + assertEquals(TEST_MULTIPART_REQUEST_URL, url); + } else { + assertEquals(TEST_DIRECT_REQUEST_URL, url); + } + } else { + assertEquals(TEST_RESUMABLE_REQUEST_URL, url); + } + + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() { + lowLevelExecCalls++; + if (!directUploadEnabled) { + // Assert that the required headers are set. + if (!contentLengthNotSpecified) { + assertEquals(Integer.toString(contentLength), + getFirstHeaderValue("x-upload-content-length")); + } + assertEquals(TEST_CONTENT_TYPE, getFirstHeaderValue("x-upload-content-type")); + } + if (assertTestHeaders) { + assertEquals("test-header-value", getFirstHeaderValue("test-header-name")); + } + // This is the initiation call. + MockLowLevelHttpResponse response = new MockLowLevelHttpResponse(); + assertFalse(directUploadEnabled && testIOException); + if (directUploadEnabled && testServerError && lowLevelExecCalls == 1) { + // send a server error in the 1st request of a direct upload + response.setStatusCode(500); + } else if (testAuthenticationError) { + // Return 404. + response.setStatusCode(404); + } else { + // Return 200 with the upload URI. + response.setStatusCode(200); + if (!directUploadEnabled) { + response.addHeader("Location", TEST_UPLOAD_URL); + } + } + return response; + } + }; + } + assertEquals(TEST_UPLOAD_URL, url); + assertEquals("PUT", name); + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() throws IOException { + lowLevelExecCalls++; + MockLowLevelHttpResponse response = new MockLowLevelHttpResponse(); + String contentRangeHeader = getFirstHeaderValue("Content-Range"); + if (testServerError || testIOException) { + // TODO(peleyal): add test with two different failures in a row + switch (lowLevelExecCalls) { + case 3: + int bytesToRead = maxByteIndexUploadedOnError + 1 - bytesUploaded; + copyBytesToBytesReceivedArray(bytesToRead); + bytesUploaded += bytesToRead; + // Send a server error or throw IOException in the 3rd request + if (testIOException) { + throw new IOException(); + } + response.setStatusCode(500); + return response; + case 4: + // Assert that the 4th request is a range query request. + if (contentLengthNotSpecified) { + assertEquals("bytes */*", contentRangeHeader); + } else { + assertEquals("bytes */" + contentLength, contentRangeHeader); + } + // Return 308 in case there are more bytes to upload, otherwise return 200. + // set the Range header with the bytes uploaded so far. + response.setStatusCode( + contentLength == maxByteIndexUploadedOnError + 1 ? 200 : 308); + bytesUploaded = maxByteIndexUploadedOnError + 1; + response.addHeader("Range", "bytes=0-" + maxByteIndexUploadedOnError); + return response; + default: + break; + } + } else if (testClientError) { + // Return a 411. + response.setStatusCode(411); + return response; + } + + String bytesRange; + if (bytesUploaded + MediaHttpUploader.DEFAULT_CHUNK_SIZE > contentLength) { + bytesRange = bytesUploaded + "-" + (contentLength - 1); + } else { + bytesRange = + bytesUploaded + "-" + (bytesUploaded + MediaHttpUploader.DEFAULT_CHUNK_SIZE - 1); + } + String expectedContentRange; + if (contentLength == 0) { + expectedContentRange = "bytes */0"; + } else if (contentLengthNotSpecified + && ((bytesUploaded + MediaHttpUploader.DEFAULT_CHUNK_SIZE) < contentLength)) { + expectedContentRange = "bytes " + bytesRange + "/*"; + } else { + expectedContentRange = "bytes " + bytesRange + "/" + contentLength; + } + + assertEquals(expectedContentRange, contentRangeHeader); + + copyBytesToBytesReceivedArray(-1); + + bytesUploaded += MediaHttpUploader.DEFAULT_CHUNK_SIZE; + + if (bytesUploaded >= contentLength) { + // Return 200 since the upload is complete. + response.setStatusCode(200); + } else { + // Return 308 and the range since the upload is incomplete. + response.setStatusCode(308); + response.addHeader("Range", "bytes=" + bytesRange); + } + return response; + } + + void copyBytesToBytesReceivedArray(int length) throws IOException { + if (bytesReceived == null || length == 0) { + return; + } + ByteArrayOutputStream stream = new ByteArrayOutputStream(); + this.getStreamingContent().writeTo(stream); + byte[] currentRequest = stream.toByteArray(); + System.arraycopy(currentRequest, 0, bytesReceived, bytesUploaded, + length == -1 ? currentRequest.length : length); + } + }; + } + } + + private static class ResumableProgressListenerWithTwoUploadCalls + implements + MediaHttpUploaderProgressListener { + + int progressListenerCalls; + boolean contentLengthNotSpecified; + + public ResumableProgressListenerWithTwoUploadCalls() { + } + + public void progressChanged(MediaHttpUploader uploader) throws IOException { + progressListenerCalls++; + + switch (uploader.getUploadState()) { + case INITIATION_STARTED: + // Assert that the first call is initiation started. + assertEquals(1, progressListenerCalls); + break; + case INITIATION_COMPLETE: + // Assert that the 2nd call is initiation complete. + assertEquals(2, progressListenerCalls); + break; + case MEDIA_IN_PROGRESS: + // Assert that the 3rd call is media in progress and check the progress percent. + assertTrue(progressListenerCalls == 3); + if (contentLengthNotSpecified) { + try { + uploader.getProgress(); + fail("Expected " + IllegalArgumentException.class); + } catch (IllegalArgumentException iae) { + // Expected. + } + } else { + assertEquals(0.5, uploader.getProgress()); + } + break; + case MEDIA_COMPLETE: + // Assert that the 4th call is media complete. + assertEquals(4, progressListenerCalls); + if (contentLengthNotSpecified) { + try { + uploader.getProgress(); + fail("Expected " + IllegalArgumentException.class); + } catch (IllegalArgumentException iae) { + // Expected. + } + } else { + assertEquals(1.0, uploader.getProgress()); + } + break; + } + } + } + + private static class DirectProgressListener implements MediaHttpUploaderProgressListener { + + int progressListenerCalls; + boolean contentLengthNotSpecified; + + public DirectProgressListener() { + } + + public void progressChanged(MediaHttpUploader uploader) throws IOException { + progressListenerCalls++; + + switch (uploader.getUploadState()) { + case MEDIA_IN_PROGRESS: + // Assert that the first call is media in progress. + assertEquals(1, progressListenerCalls); + if (contentLengthNotSpecified) { + try { + uploader.getProgress(); + fail("Expected " + IllegalArgumentException.class); + } catch (IllegalArgumentException iae) { + // Expected. + } + } else { + assertEquals(0.0, uploader.getProgress()); + } + break; + case MEDIA_COMPLETE: + // Assert that the 2nd call is media complete. + assertEquals(2, progressListenerCalls); + if (contentLengthNotSpecified) { + try { + uploader.getProgress(); + fail("Expected " + IllegalArgumentException.class); + } catch (IllegalArgumentException iae) { + // Expected. + } + } else { + assertEquals(1.0, uploader.getProgress()); + } + break; + } + } + } + + private static class GZipCheckerInitializer implements HttpRequestInitializer { + + private boolean gzipDisabled; + + public GZipCheckerInitializer(boolean gzipDisabled) { + this.gzipDisabled = gzipDisabled; + } + + public void initialize(HttpRequest request) { + request.setInterceptor(new GZipCheckerInterceptor(gzipDisabled)); + } + } + + private static class GZipCheckerInterceptor implements HttpExecuteInterceptor { + + private boolean gzipDisabled; + + public GZipCheckerInterceptor(boolean gzipDisabled) { + this.gzipDisabled = gzipDisabled; + } + + public void intercept(HttpRequest request) { + assertEquals(!gzipDisabled && !(request.getContent() instanceof EmptyContent), + request.getEncoding() != null); + } + } + + // TODO(peleyal): ZeroBackOffRequestInitializer can go into http testing package? + + static class ZeroBackOffRequestInitializer implements HttpRequestInitializer { + public void initialize(HttpRequest request) { + request.setIOExceptionHandler(new HttpBackOffIOExceptionHandler(BackOff.ZERO_BACKOFF)); + request.setUnsuccessfulResponseHandler( + new HttpBackOffUnsuccessfulResponseHandler(BackOff.ZERO_BACKOFF)); + } + } + + public void testUploadOneCall() throws Exception { + int contentLength = MediaHttpUploader.DEFAULT_CHUNK_SIZE; + MediaTransport fakeTransport = new MediaTransport(contentLength); + InputStream is = new ByteArrayInputStream(new byte[contentLength]); + InputStreamContent mediaContent = new InputStreamContent(TEST_CONTENT_TYPE, is); + mediaContent.setLength(contentLength); + MediaHttpUploader uploader = new MediaHttpUploader(mediaContent, fakeTransport, null); + uploader.upload(new GenericUrl(TEST_RESUMABLE_REQUEST_URL)); + + // There should be 2 calls made. 1 initiation request and 1 upload request. + assertEquals(2, fakeTransport.lowLevelExecCalls); + } + + public void testUploadOneCall_WithGZipDisabled() throws Exception { + int contentLength = MediaHttpUploader.DEFAULT_CHUNK_SIZE; + MediaTransport fakeTransport = new MediaTransport(contentLength); + InputStream is = new ByteArrayInputStream(new byte[contentLength]); + InputStreamContent mediaContent = new InputStreamContent(TEST_CONTENT_TYPE, is); + fakeTransport.contentLengthNotSpecified = true; + + // Disable GZip content. + MediaHttpUploader uploader = + new MediaHttpUploader(mediaContent, fakeTransport, new GZipCheckerInitializer(true)); + uploader.setDisableGZipContent(true); + uploader.upload(new GenericUrl(TEST_RESUMABLE_REQUEST_URL)); + // There should be 2 calls made. 1 initiation request and 1 upload request. + assertEquals(2, fakeTransport.lowLevelExecCalls); + } + + public void testUploadOneCall_WithGZipEnabled() throws Exception { + int contentLength = MediaHttpUploader.DEFAULT_CHUNK_SIZE; + MediaTransport fakeTransport = new MediaTransport(contentLength); + InputStream is = new ByteArrayInputStream(new byte[contentLength]); + InputStreamContent mediaContent = new InputStreamContent(TEST_CONTENT_TYPE, is); + fakeTransport.contentLengthNotSpecified = true; + + // Enable GZip content. + MediaHttpUploader uploader = + new MediaHttpUploader(mediaContent, fakeTransport, new GZipCheckerInitializer(false)); + uploader.setDisableGZipContent(false); + uploader.upload(new GenericUrl(TEST_RESUMABLE_REQUEST_URL)); + // There should be 2 calls made. 1 initiation request and 1 upload request. + assertEquals(2, fakeTransport.lowLevelExecCalls); + } + + public void testUploadOneCall_WithDefaultGzip() throws Exception { + int contentLength = MediaHttpUploader.DEFAULT_CHUNK_SIZE; + MediaTransport fakeTransport = new MediaTransport(contentLength); + InputStream is = new ByteArrayInputStream(new byte[contentLength]); + InputStreamContent mediaContent = new InputStreamContent(TEST_CONTENT_TYPE, is); + fakeTransport.contentLengthNotSpecified = true; + + // GZip content must be disabled by default. + MediaHttpUploader uploader = + new MediaHttpUploader(mediaContent, fakeTransport, new GZipCheckerInitializer(false)); + uploader.upload(new GenericUrl(TEST_RESUMABLE_REQUEST_URL)); + // There should be 2 calls made. 1 initiation request and 1 upload request. + assertEquals(2, fakeTransport.lowLevelExecCalls); + } + + public void testUploadOneCall_WithNoContentSizeProvided() throws Exception { + int contentLength = MediaHttpUploader.DEFAULT_CHUNK_SIZE; + MediaTransport fakeTransport = new MediaTransport(contentLength); + fakeTransport.contentLengthNotSpecified = true; + InputStream is = new ByteArrayInputStream(new byte[contentLength]); + InputStreamContent mediaContent = new InputStreamContent(TEST_CONTENT_TYPE, is); + MediaHttpUploader uploader = new MediaHttpUploader(mediaContent, fakeTransport, null); + uploader.upload(new GenericUrl(TEST_RESUMABLE_REQUEST_URL)); + + // There should be 2 calls made. 1 initiation request and 1 upload request. + assertEquals(2, fakeTransport.lowLevelExecCalls); + } + + public void testUploadOneCall_WithContentSizeProvided() throws Exception { + int contentLength = MediaHttpUploader.DEFAULT_CHUNK_SIZE; + MediaTransport fakeTransport = new MediaTransport(contentLength); + InputStream is = new ByteArrayInputStream(new byte[contentLength]); + InputStreamContent mediaContent = new InputStreamContent(TEST_CONTENT_TYPE, is); + mediaContent.setLength(contentLength); + MediaHttpUploader uploader = + new MediaHttpUploader(mediaContent, fakeTransport, new GZipCheckerInitializer(true)); + uploader.upload(new GenericUrl(TEST_RESUMABLE_REQUEST_URL)); + + // There should be 2 calls made. 1 initiation request and 1 upload request. + assertEquals(2, fakeTransport.lowLevelExecCalls); + } + + public void testUploadMultipleCalls() throws Exception { + int contentLength = MediaHttpUploader.DEFAULT_CHUNK_SIZE * 5; + MediaTransport fakeTransport = new MediaTransport(contentLength); + InputStream is = new ByteArrayInputStream(new byte[contentLength]); + InputStreamContent mediaContent = new InputStreamContent(TEST_CONTENT_TYPE, is); + mediaContent.setLength(contentLength); + MediaHttpUploader uploader = new MediaHttpUploader(mediaContent, fakeTransport, null); + uploader.upload(new GenericUrl(TEST_RESUMABLE_REQUEST_URL)); + + // There should be 6 calls made. 1 initiation request and 5 upload requests. + assertEquals(6, fakeTransport.lowLevelExecCalls); + } + + public void testUploadMultipleCalls_WithSpecifiedHeader() throws Exception { + int contentLength = MediaHttpUploader.DEFAULT_CHUNK_SIZE * 5; + MediaTransport fakeTransport = new MediaTransport(contentLength); + fakeTransport.assertTestHeaders = true; + InputStream is = new ByteArrayInputStream(new byte[contentLength]); + InputStreamContent mediaContent = new InputStreamContent(TEST_CONTENT_TYPE, is); + mediaContent.setLength(contentLength); + MediaHttpUploader uploader = new MediaHttpUploader(mediaContent, fakeTransport, null); + uploader.getInitiationHeaders().set("test-header-name", "test-header-value"); + uploader.upload(new GenericUrl(TEST_RESUMABLE_REQUEST_URL)); + + // There should be 6 calls made. 1 initiation request and 5 upload requests. + assertEquals(6, fakeTransport.lowLevelExecCalls); + } + + public void testUploadMultipleCalls_WithNoContentSizeProvided() throws Exception { + int contentLength = MediaHttpUploader.DEFAULT_CHUNK_SIZE * 5; + MediaTransport fakeTransport = new MediaTransport(contentLength); + fakeTransport.contentLengthNotSpecified = true; + InputStream is = new ByteArrayInputStream(new byte[contentLength]); + InputStreamContent mediaContent = new InputStreamContent(TEST_CONTENT_TYPE, is); + MediaHttpUploader uploader = new MediaHttpUploader(mediaContent, fakeTransport, null); + uploader.upload(new GenericUrl(TEST_RESUMABLE_REQUEST_URL)); + + // There should be 6 calls made. 1 initiation request and 5 upload requests. + assertEquals(6, fakeTransport.lowLevelExecCalls); + } + + public void testUploadMultipleCalls_WithNoContentSizeProvidedChunkedInput() throws Exception { + int contentLength = MediaHttpUploader.DEFAULT_CHUNK_SIZE * 5; + MediaTransport fakeTransport = new MediaTransport(contentLength); + fakeTransport.contentLengthNotSpecified = true; + InputStream is = new ByteArrayInputStream(new byte[contentLength]) { + @Override + public synchronized int read(byte[] b, int off, int len) { + return super.read(b, off, Math.min(len, MediaHttpUploader.DEFAULT_CHUNK_SIZE / 10)); + } + }; + InputStreamContent mediaContent = new InputStreamContent(TEST_CONTENT_TYPE, is); + MediaHttpUploader uploader = new MediaHttpUploader(mediaContent, fakeTransport, null); + uploader.upload(new GenericUrl(TEST_RESUMABLE_REQUEST_URL)); + + // There should be 6 calls made. 1 initiation request and 5 upload requests. + assertEquals(6, fakeTransport.lowLevelExecCalls); + } + + public void testUploadMultipleCalls_WithNoContentSizeProvided_WithExtraByte() throws Exception { + int contentLength = MediaHttpUploader.DEFAULT_CHUNK_SIZE * 5 + 1; + MediaTransport fakeTransport = new MediaTransport(contentLength); + fakeTransport.contentLengthNotSpecified = true; + InputStream is = new ByteArrayInputStream(new byte[contentLength]); + InputStreamContent mediaContent = new InputStreamContent(TEST_CONTENT_TYPE, is); + MediaHttpUploader uploader = new MediaHttpUploader(mediaContent, fakeTransport, null); + uploader.upload(new GenericUrl(TEST_RESUMABLE_REQUEST_URL)); + + // There should be 7 calls made. 1 initiation request and 6 upload requests. + assertEquals(7, fakeTransport.lowLevelExecCalls); + } + + public void testUploadProgressListener() throws Exception { + int contentLength = MediaHttpUploader.DEFAULT_CHUNK_SIZE * 2; + MediaTransport fakeTransport = new MediaTransport(contentLength); + InputStream is = new ByteArrayInputStream(new byte[contentLength]); + InputStreamContent mediaContent = new InputStreamContent(TEST_CONTENT_TYPE, is); + mediaContent.setLength(contentLength); + MediaHttpUploader uploader = new MediaHttpUploader(mediaContent, fakeTransport, null); + uploader.setProgressListener(new ResumableProgressListenerWithTwoUploadCalls()); + uploader.upload(new GenericUrl(TEST_RESUMABLE_REQUEST_URL)); + } + + public void testUploadProgressListener_WithNoContentSizeProvided() throws Exception { + int contentLength = MediaHttpUploader.DEFAULT_CHUNK_SIZE * 2; + MediaTransport fakeTransport = new MediaTransport(contentLength); + fakeTransport.contentLengthNotSpecified = true; + InputStream is = new ByteArrayInputStream(new byte[contentLength]); + InputStreamContent mediaContent = new InputStreamContent(TEST_CONTENT_TYPE, is); + MediaHttpUploader uploader = new MediaHttpUploader(mediaContent, fakeTransport, null); + ResumableProgressListenerWithTwoUploadCalls listener = + new ResumableProgressListenerWithTwoUploadCalls(); + listener.contentLengthNotSpecified = true; + uploader.setProgressListener(listener); + uploader.upload(new GenericUrl(TEST_RESUMABLE_REQUEST_URL)); + } + + public void testUploadServerError_WithoutUnsuccessfulHandler() throws Exception { + int contentLength = MediaHttpUploader.DEFAULT_CHUNK_SIZE * 2; + MediaTransport fakeTransport = new MediaTransport(contentLength); + fakeTransport.testServerError = true; + InputStream is = new ByteArrayInputStream(new byte[contentLength]); + InputStreamContent mediaContent = new InputStreamContent(TEST_CONTENT_TYPE, is); + mediaContent.setLength(contentLength); + MediaHttpUploader uploader = new MediaHttpUploader(mediaContent, fakeTransport, null); + + HttpResponse response = uploader.upload(new GenericUrl(TEST_RESUMABLE_REQUEST_URL)); + assertEquals(500, response.getStatusCode()); + + // There should be 3 calls made. 1 initiation request, 1 successful upload request and 1 upload + // request with server error + assertEquals(3, fakeTransport.lowLevelExecCalls); + } + + public void testUpload_ResumableIOException_WithIOExceptionHandler() throws Exception { + subtestUpload_ResumableWithError(ErrorType.IO_EXCEPTION); + } + + public void testUpload_ResumableServerError_WithoutUnsuccessfulHandler() throws Exception { + subtestUpload_ResumableWithError(ErrorType.SERVER_UNAVAILABLE); + } + + private void subtestUpload_ResumableWithError(ErrorType error) throws Exception { + // no bytes were uploaded on the 2nd chunk. Client sends the following 3 media chunks: + // 0-[DEFAULT-1], DEFAULT-[2*DEFAULT-1], DEFAULT-[2*DEFAULT-1] + subtestUpload_ResumableWithError(error, MediaHttpUploader.DEFAULT_CHUNK_SIZE * 2, false, + MediaHttpUploader.DEFAULT_CHUNK_SIZE - 1, 3); + subtestUpload_ResumableWithError(error, MediaHttpUploader.DEFAULT_CHUNK_SIZE * 2, true, + MediaHttpUploader.DEFAULT_CHUNK_SIZE - 1, 3); + + // no bytes were uploaded on the 2nd chunk. Client sends the following 4 media chunks: + // 0-[DEFAULT-1], DEFAULT-[2*DEFAULT-1], DEFAULT-[2*DEFAULT-1], 2*DEFAULT-[3*DEFAULT-1] + subtestUpload_ResumableWithError(error, MediaHttpUploader.DEFAULT_CHUNK_SIZE * 3, false, + MediaHttpUploader.DEFAULT_CHUNK_SIZE - 1, 4); + subtestUpload_ResumableWithError(error, MediaHttpUploader.DEFAULT_CHUNK_SIZE * 3, true, + MediaHttpUploader.DEFAULT_CHUNK_SIZE - 1, 4); + + // all bytes were uploaded in the 2nd chunk. Client sends the following 2 media chunks: + // 0-[DEFAULT-1], DEFAULT-[2*DEFAULT-1] + subtestUpload_ResumableWithError(error, MediaHttpUploader.DEFAULT_CHUNK_SIZE * 2, false, + MediaHttpUploader.DEFAULT_CHUNK_SIZE * 2 - 1, 2); + subtestUpload_ResumableWithError(error, MediaHttpUploader.DEFAULT_CHUNK_SIZE * 2, true, + MediaHttpUploader.DEFAULT_CHUNK_SIZE * 2 - 1, 2); + + // all bytes were uploaded in the 2nd chunk. Client sends the following 3 media chunks: + // 0-[DEFAULT-1], DEFAULT-[2*DEFAULT-1], 2*DEFAULT-[3*DEFAULT-1] + subtestUpload_ResumableWithError(error, MediaHttpUploader.DEFAULT_CHUNK_SIZE * 3, false, + MediaHttpUploader.DEFAULT_CHUNK_SIZE * 2 - 1, 3); + subtestUpload_ResumableWithError(error, MediaHttpUploader.DEFAULT_CHUNK_SIZE * 3, true, + MediaHttpUploader.DEFAULT_CHUNK_SIZE * 2 - 1, 3); + + // part of the bytes were uploaded in the 2nd chunk. Client sends the following 3 media chunks: + // 0-[DEFAULT-1], DEFAULT-[2*DEFAULT-1], DEFAULT*4/3-[2*DEFAULT-1] + subtestUpload_ResumableWithError(error, MediaHttpUploader.DEFAULT_CHUNK_SIZE * 2, false, + MediaHttpUploader.DEFAULT_CHUNK_SIZE * 4 / 3, 3); + subtestUpload_ResumableWithError(error, MediaHttpUploader.DEFAULT_CHUNK_SIZE * 2, true, + MediaHttpUploader.DEFAULT_CHUNK_SIZE * 4 / 3, 3); + + // part of the bytes were uploaded in the 2nd chunk. Client sends the following 3 media chunks: + // 0-[DEFAULT-1], DEFAULT-[2*DEFAULT-1], DEFAULT+5/[2*DEFAULT+2] + subtestUpload_ResumableWithError(error, MediaHttpUploader.DEFAULT_CHUNK_SIZE * 2 + 3, false, + MediaHttpUploader.DEFAULT_CHUNK_SIZE + 4, 3); + subtestUpload_ResumableWithError(error, MediaHttpUploader.DEFAULT_CHUNK_SIZE * 2 + 3, true, + MediaHttpUploader.DEFAULT_CHUNK_SIZE + 4, 3); + + // only 1 byte were uploaded in the 2nd chunk. Client sends the following 3 media chunks: + // 0-[DEFAULT-1], DEFAULT-[2*DEFAULT-1], [DEFAULT+1]-[2*DEFAULT-1] + subtestUpload_ResumableWithError(error, MediaHttpUploader.DEFAULT_CHUNK_SIZE * 2, false, + MediaHttpUploader.DEFAULT_CHUNK_SIZE, 3); + subtestUpload_ResumableWithError(error, MediaHttpUploader.DEFAULT_CHUNK_SIZE * 2, true, + MediaHttpUploader.DEFAULT_CHUNK_SIZE, 3); + + // only 1 byte were uploaded in the 2nd chunk. Client sends the following 5 media chunks: + // 0-[DEFAULT-1], DEFAULT-[2*DEFAULT-1], [DEFAULT+1]-[2*DEFAULT], [2*DEFAULT+1]-[3*DEFAULT], + // [3*DEFAULT+1]-[3*DEFAULT+1] + subtestUpload_ResumableWithError(error, MediaHttpUploader.DEFAULT_CHUNK_SIZE * 3 + 2, false, + MediaHttpUploader.DEFAULT_CHUNK_SIZE, 5); + subtestUpload_ResumableWithError(error, MediaHttpUploader.DEFAULT_CHUNK_SIZE * 3 + 2, true, + MediaHttpUploader.DEFAULT_CHUNK_SIZE, 5); + } + + /** + * Error type represents an error (I/O exception or server unavailable error) which will be raise + * when uploading media to the server. + */ + enum ErrorType { + IO_EXCEPTION, SERVER_UNAVAILABLE + } + + public void subtestUpload_ResumableWithError(ErrorType error, int contentLength, + boolean contentLengthKnown, int maxByteIndexUploadedOnError, int chunks) throws Exception { + MediaTransport fakeTransport = new MediaTransport(contentLength, true); + if (error == ErrorType.IO_EXCEPTION) { + fakeTransport.testIOException = true; + } else if (error == ErrorType.SERVER_UNAVAILABLE) { + fakeTransport.testServerError = true; + } + fakeTransport.contentLengthNotSpecified = !contentLengthKnown; + fakeTransport.maxByteIndexUploadedOnError = maxByteIndexUploadedOnError; + byte[] testedData = new byte[contentLength]; + new Random().nextBytes(testedData); + InputStream is = new ByteArrayInputStream(testedData); + InputStreamContent mediaContent = new InputStreamContent(TEST_CONTENT_TYPE, is); + if (contentLengthKnown) { + mediaContent.setLength(contentLength); + } + MediaHttpUploader uploader = + new MediaHttpUploader(mediaContent, fakeTransport, new ZeroBackOffRequestInitializer()); + + // disable GZip - so we would be able to test byte received by server. + uploader.setDisableGZipContent(true); + HttpResponse response = uploader.upload(new GenericUrl(TEST_RESUMABLE_REQUEST_URL)); + assertEquals(200, response.getStatusCode()); + + // There should be the following number of calls made: + // 1 initiation request + 1 call to query the range + chunks + int calls = 2 + chunks; + assertEquals(calls, fakeTransport.lowLevelExecCalls); + + assertTrue(Arrays.equals(testedData, fakeTransport.bytesReceived)); + } + + public void testUploadIOException_WithoutIOExceptionHandler() throws Exception { + int contentLength = MediaHttpUploader.DEFAULT_CHUNK_SIZE * 2; + MediaTransport fakeTransport = new MediaTransport(contentLength); + fakeTransport.testIOException = true; + InputStream is = new ByteArrayInputStream(new byte[contentLength]); + InputStreamContent mediaContent = new InputStreamContent(TEST_CONTENT_TYPE, is); + mediaContent.setLength(contentLength); + MediaHttpUploader uploader = new MediaHttpUploader(mediaContent, fakeTransport, null); + + try { + uploader.upload(new GenericUrl(TEST_RESUMABLE_REQUEST_URL)); + fail("expected " + IOException.class); + } catch (IOException e) { + // There should be 3 calls made. 1 initiation request, 1 successful upload request, + // and 1 upload request with server error + assertEquals(3, fakeTransport.lowLevelExecCalls); + } + } + + public void testUploadServerErrorWithBackOffDisabled_WithNoContentSizeProvided() + throws Exception { + int contentLength = MediaHttpUploader.DEFAULT_CHUNK_SIZE * 2; + MediaTransport fakeTransport = new MediaTransport(contentLength); + fakeTransport.testServerError = true; + fakeTransport.contentLengthNotSpecified = true; + InputStream is = new ByteArrayInputStream(new byte[contentLength]); + InputStreamContent mediaContent = new InputStreamContent(TEST_CONTENT_TYPE, is); + MediaHttpUploader uploader = new MediaHttpUploader(mediaContent, fakeTransport, null); + + HttpResponse response = uploader.upload(new GenericUrl(TEST_RESUMABLE_REQUEST_URL)); + assertEquals(500, response.getStatusCode()); + + // There should be 3 calls made. 1 initiation request, 1 successful upload request and 1 upload + // request with server error + assertEquals(3, fakeTransport.lowLevelExecCalls); + } + + public void testUploadAuthenticationError() throws Exception { + int contentLength = MediaHttpUploader.DEFAULT_CHUNK_SIZE * 2; + MediaTransport fakeTransport = new MediaTransport(contentLength); + fakeTransport.testAuthenticationError = true; + InputStream is = new ByteArrayInputStream(new byte[contentLength]); + InputStreamContent mediaContent = new InputStreamContent(TEST_CONTENT_TYPE, is); + mediaContent.setLength(contentLength); + MediaHttpUploader uploader = new MediaHttpUploader(mediaContent, fakeTransport, null); + + HttpResponse response = uploader.upload(new GenericUrl(TEST_RESUMABLE_REQUEST_URL)); + assertEquals(404, response.getStatusCode()); + + // There should be only 1 initiation request made with a 404. + assertEquals(1, fakeTransport.lowLevelExecCalls); + } + + public void testUploadClientErrorInUploadCalls() throws Exception { + int contentLength = MediaHttpUploader.DEFAULT_CHUNK_SIZE * 2; + MediaTransport fakeTransport = new MediaTransport(contentLength); + fakeTransport.testClientError = true; + InputStream is = new ByteArrayInputStream(new byte[contentLength]); + InputStreamContent mediaContent = new InputStreamContent(TEST_CONTENT_TYPE, is); + mediaContent.setLength(contentLength); + MediaHttpUploader uploader = new MediaHttpUploader(mediaContent, fakeTransport, null); + + HttpResponse response = uploader.upload(new GenericUrl(TEST_RESUMABLE_REQUEST_URL)); + assertEquals(411, response.getStatusCode()); + + // There should be 2 calls made. 1 initiation request and 1 upload request that returned a 411. + assertEquals(2, fakeTransport.lowLevelExecCalls); + } + + public void testUploadClientErrorInUploadCalls_WithNoContentSizeProvided() throws Exception { + int contentLength = MediaHttpUploader.DEFAULT_CHUNK_SIZE * 2; + MediaTransport fakeTransport = new MediaTransport(contentLength); + fakeTransport.testClientError = true; + fakeTransport.contentLengthNotSpecified = true; + InputStream is = new ByteArrayInputStream(new byte[contentLength]); + InputStreamContent mediaContent = new InputStreamContent(TEST_CONTENT_TYPE, is); + MediaHttpUploader uploader = new MediaHttpUploader(mediaContent, fakeTransport, null); + + HttpResponse response = uploader.upload(new GenericUrl(TEST_RESUMABLE_REQUEST_URL)); + assertEquals(411, response.getStatusCode()); + + // There should be 2 calls made. 1 initiation request and 1 upload request that returned a 411. + assertEquals(2, fakeTransport.lowLevelExecCalls); + } + + public void testDirectMediaUpload() throws Exception { + int contentLength = MediaHttpUploader.DEFAULT_CHUNK_SIZE * 2; + MediaTransport fakeTransport = new MediaTransport(contentLength); + fakeTransport.directUploadEnabled = true; + InputStream is = new ByteArrayInputStream(new byte[contentLength]); + InputStreamContent mediaContent = new InputStreamContent(TEST_CONTENT_TYPE, is); + mediaContent.setLength(contentLength); + MediaHttpUploader uploader = new MediaHttpUploader(mediaContent, fakeTransport, null); + uploader.setProgressListener(new DirectProgressListener()); + // Enable direct media upload. + uploader.setDirectUploadEnabled(true); + + HttpResponse response = uploader.upload(new GenericUrl(TEST_DIRECT_REQUEST_URL)); + assertEquals(200, response.getStatusCode()); + + // There should be only 1 call made for direct media upload. + assertEquals(1, fakeTransport.lowLevelExecCalls); + } + + public void testDirectMediaUpload_WithSpecifiedHeader() throws Exception { + int contentLength = MediaHttpUploader.DEFAULT_CHUNK_SIZE * 2; + MediaTransport fakeTransport = new MediaTransport(contentLength); + fakeTransport.directUploadEnabled = true; + fakeTransport.assertTestHeaders = true; + InputStream is = new ByteArrayInputStream(new byte[contentLength]); + InputStreamContent mediaContent = new InputStreamContent(TEST_CONTENT_TYPE, is); + mediaContent.setLength(contentLength); + MediaHttpUploader uploader = new MediaHttpUploader(mediaContent, fakeTransport, null); + uploader.getInitiationHeaders().set("test-header-name", "test-header-value"); + uploader.setProgressListener(new DirectProgressListener()); + // Enable direct media upload. + uploader.setDirectUploadEnabled(true); + + HttpResponse response = uploader.upload(new GenericUrl(TEST_DIRECT_REQUEST_URL)); + assertEquals(200, response.getStatusCode()); + + // There should be only 1 call made for direct media upload. + assertEquals(1, fakeTransport.lowLevelExecCalls); + } + + public void testDirectMediaUpload_WithNoContentSizeProvided() throws Exception { + int contentLength = MediaHttpUploader.DEFAULT_CHUNK_SIZE * 2; + MediaTransport fakeTransport = new MediaTransport(contentLength); + fakeTransport.directUploadEnabled = true; + fakeTransport.contentLengthNotSpecified = true; + InputStream is = new ByteArrayInputStream(new byte[contentLength]); + InputStreamContent mediaContent = new InputStreamContent(TEST_CONTENT_TYPE, is); + MediaHttpUploader uploader = new MediaHttpUploader(mediaContent, fakeTransport, null); + DirectProgressListener listener = new DirectProgressListener(); + listener.contentLengthNotSpecified = true; + uploader.setProgressListener(listener); + // Enable direct media upload. + uploader.setDirectUploadEnabled(true); + + HttpResponse response = uploader.upload(new GenericUrl(TEST_DIRECT_REQUEST_URL)); + assertEquals(200, response.getStatusCode()); + + // There should be only 1 call made for direct media upload. + assertEquals(1, fakeTransport.lowLevelExecCalls); + } + + public void testDirectMediaUploadWithMetadata() throws Exception { + int contentLength = MediaHttpUploader.DEFAULT_CHUNK_SIZE * 2; + MediaTransport fakeTransport = new MediaTransport(contentLength); + fakeTransport.directUploadEnabled = true; + fakeTransport.directUploadWithMetadata = true; + InputStream is = new ByteArrayInputStream(new byte[contentLength]); + InputStreamContent mediaContent = new InputStreamContent(TEST_CONTENT_TYPE, is); + mediaContent.setLength(contentLength); + MediaHttpUploader uploader = new MediaHttpUploader(mediaContent, fakeTransport, null); + uploader.setProgressListener(new DirectProgressListener()); + // Enable direct media upload. + uploader.setDirectUploadEnabled(true); + // Set Metadata + uploader.setMetadata(new MockHttpContent()); + + HttpResponse response = uploader.upload(new GenericUrl(TEST_MULTIPART_REQUEST_URL)); + assertEquals(200, response.getStatusCode()); + + // There should be only 1 call made for direct media upload. + assertEquals(1, fakeTransport.lowLevelExecCalls); + } + + public void testDirectMediaUploadWithMetadata_WithNoContentSizeProvided() throws Exception { + int contentLength = MediaHttpUploader.DEFAULT_CHUNK_SIZE * 2; + MediaTransport fakeTransport = new MediaTransport(contentLength); + fakeTransport.directUploadEnabled = true; + fakeTransport.contentLengthNotSpecified = true; + fakeTransport.directUploadWithMetadata = true; + InputStream is = new ByteArrayInputStream(new byte[contentLength]); + InputStreamContent mediaContent = new InputStreamContent(TEST_CONTENT_TYPE, is); + MediaHttpUploader uploader = new MediaHttpUploader(mediaContent, fakeTransport, null); + DirectProgressListener listener = new DirectProgressListener(); + listener.contentLengthNotSpecified = true; + uploader.setProgressListener(listener); + // Enable direct media upload. + uploader.setDirectUploadEnabled(true); + // Set Metadata + uploader.setMetadata(new MockHttpContent()); + + HttpResponse response = uploader.upload(new GenericUrl(TEST_MULTIPART_REQUEST_URL)); + assertEquals(200, response.getStatusCode()); + + // There should be only 1 call made for direct media upload. + assertEquals(1, fakeTransport.lowLevelExecCalls); + } + + public void testSetChunkSize() throws Exception { + int contentLength = MediaHttpUploader.DEFAULT_CHUNK_SIZE * 2; + MediaTransport fakeTransport = new MediaTransport(contentLength); + fakeTransport.directUploadEnabled = true; + InputStream is = new ByteArrayInputStream(new byte[contentLength]); + InputStreamContent mediaContent = new InputStreamContent(TEST_CONTENT_TYPE, is); + MediaHttpUploader uploader = new MediaHttpUploader(mediaContent, fakeTransport, null); + + // None of the below should throw Exceptions. + uploader.setChunkSize(MediaHttpUploader.DEFAULT_CHUNK_SIZE); + uploader.setChunkSize(MediaHttpUploader.MINIMUM_CHUNK_SIZE); + uploader.setChunkSize(MediaHttpUploader.MINIMUM_CHUNK_SIZE * 2); + uploader.setChunkSize(MediaHttpUploader.MINIMUM_CHUNK_SIZE * 3); + uploader.setChunkSize(MediaHttpUploader.MINIMUM_CHUNK_SIZE * 100); + + // Assert that specifying invalid chunk sizes throws an Exception. + try { + uploader.setChunkSize(MediaHttpUploader.MINIMUM_CHUNK_SIZE - 1); + fail("Expected " + IllegalArgumentException.class); + } catch (IllegalArgumentException iae) { + // Expected. + } + try { + uploader.setChunkSize(MediaHttpUploader.MINIMUM_CHUNK_SIZE + 1); + fail("Expected " + IllegalArgumentException.class); + } catch (IllegalArgumentException iae) { + // Expected. + } + try { + uploader.setChunkSize((int) (MediaHttpUploader.MINIMUM_CHUNK_SIZE * 2.5)); + fail("Expected " + IllegalArgumentException.class); + } catch (IllegalArgumentException iae) { + // Expected. + } + } + + public void testDirectUploadServerErrorWithBackOffEnabled() throws Exception { + int contentLength = MediaHttpUploader.DEFAULT_CHUNK_SIZE * 2; + MediaTransport fakeTransport = new MediaTransport(contentLength); + fakeTransport.testServerError = true; + fakeTransport.directUploadEnabled = true; + ByteArrayContent mediaContent = + new ByteArrayContent(TEST_CONTENT_TYPE, new byte[contentLength]); + MediaHttpUploader uploader = + new MediaHttpUploader(mediaContent, fakeTransport, new ZeroBackOffRequestInitializer()); + uploader.setDirectUploadEnabled(true); + uploader.upload(new GenericUrl(TEST_DIRECT_REQUEST_URL)); + + // should be 2 calls made: 1 upload request with server error, 1 successful upload request + assertEquals(2, fakeTransport.lowLevelExecCalls); + } + + public void testDirectUploadServerErrorWithBackOffDisabled() throws Exception { + int contentLength = MediaHttpUploader.DEFAULT_CHUNK_SIZE * 2; + MediaTransport fakeTransport = new MediaTransport(contentLength); + fakeTransport.testServerError = true; + fakeTransport.directUploadEnabled = true; + ByteArrayContent mediaContent = + new ByteArrayContent(TEST_CONTENT_TYPE, new byte[contentLength]); + MediaHttpUploader uploader = new MediaHttpUploader(mediaContent, fakeTransport, null); + uploader.setDirectUploadEnabled(true); + uploader.upload(new GenericUrl(TEST_DIRECT_REQUEST_URL)); + + // should be 1 call made: 1 upload request with server error + assertEquals(1, fakeTransport.lowLevelExecCalls); + } + + public void testDirectMediaUploadWithZeroContent() throws Exception { + int contentLength = 0; + MediaTransport fakeTransport = new MediaTransport(contentLength); + fakeTransport.directUploadEnabled = true; + ByteArrayContent mediaContent = + new ByteArrayContent(TEST_CONTENT_TYPE, new byte[contentLength]); + MediaHttpUploader uploader = new MediaHttpUploader(mediaContent, fakeTransport, null); + uploader.setDirectUploadEnabled(true); + uploader.upload(new GenericUrl(TEST_DIRECT_REQUEST_URL)); + + // There should be only 1 call made for direct media upload. + assertEquals(1, fakeTransport.lowLevelExecCalls); + } + + public void testResumableMediaUploadWithZeroContent() throws Exception { + int contentLength = 0; + MediaTransport fakeTransport = new MediaTransport(contentLength); + ByteArrayContent mediaContent = + new ByteArrayContent(TEST_CONTENT_TYPE, new byte[contentLength]); + MediaHttpUploader uploader = new MediaHttpUploader(mediaContent, fakeTransport, null); + uploader.upload(new GenericUrl(TEST_RESUMABLE_REQUEST_URL)); + + // There should be 2 calls made. 1 initiation request and 1 upload request. + assertEquals(2, fakeTransport.lowLevelExecCalls); + } + + public void testResumableMediaUploadWithZeroContentOfUnknownLength() throws Exception { + int contentLength = 0; + MediaTransport fakeTransport = new MediaTransport(contentLength); + fakeTransport.contentLengthNotSpecified = true; + InputStream is = new ByteArrayInputStream(new byte[contentLength]); + InputStreamContent mediaContent = new InputStreamContent(TEST_CONTENT_TYPE, is); + MediaHttpUploader uploader = new MediaHttpUploader(mediaContent, fakeTransport, null); + uploader.upload(new GenericUrl(TEST_RESUMABLE_REQUEST_URL)); + + // There should be 2 calls made. 1 initiation request and 1 upload request. + assertEquals(2, fakeTransport.lowLevelExecCalls); + } + + public void testResumableMediaUploadWithContentClose() throws Exception { + int contentLength = 0; + MediaTransport fakeTransport = new MediaTransport(contentLength); + TestableByteArrayInputStream inputStream = + new TestableByteArrayInputStream(new byte[contentLength]); + InputStreamContent mediaContent = + new InputStreamContent(TEST_CONTENT_TYPE, inputStream).setLength(contentLength); + MediaHttpUploader uploader = new MediaHttpUploader(mediaContent, fakeTransport, null); + uploader.upload(new GenericUrl(TEST_RESUMABLE_REQUEST_URL)); + assertTrue(inputStream.isClosed()); + } + + public void testResumableMediaUploadWithoutContentClose() throws Exception { + int contentLength = 0; + MediaTransport fakeTransport = new MediaTransport(contentLength); + TestableByteArrayInputStream inputStream = + new TestableByteArrayInputStream(new byte[contentLength]); + InputStreamContent mediaContent = new InputStreamContent( + TEST_CONTENT_TYPE, inputStream).setLength(contentLength).setCloseInputStream(false); + MediaHttpUploader uploader = new MediaHttpUploader(mediaContent, fakeTransport, null); + uploader.upload(new GenericUrl(TEST_RESUMABLE_REQUEST_URL)); + assertFalse(inputStream.isClosed()); + } +} diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/services/AbstractGoogleClientRequestTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/services/AbstractGoogleClientRequestTest.java new file mode 100644 index 00000000..a73482c7 --- /dev/null +++ b/google-api-client/src/test/java/com/google/api/client/googleapis/services/AbstractGoogleClientRequestTest.java @@ -0,0 +1,176 @@ +/* + * 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.api.client.googleapis.services; + +import com.google.api.client.googleapis.testing.services.MockGoogleClient; +import com.google.api.client.googleapis.testing.services.MockGoogleClientRequest; +import com.google.api.client.http.EmptyContent; +import com.google.api.client.http.HttpMethods; +import com.google.api.client.http.HttpRequest; +import com.google.api.client.http.HttpResponseException; +import com.google.api.client.http.HttpStatusCodes; +import com.google.api.client.http.HttpTransport; +import com.google.api.client.http.LowLevelHttpRequest; +import com.google.api.client.http.LowLevelHttpResponse; +import com.google.api.client.json.Json; +import com.google.api.client.json.JsonFactory; +import com.google.api.client.json.JsonObjectParser; +import com.google.api.client.json.jackson.JacksonFactory; +import com.google.api.client.testing.http.MockHttpTransport; +import com.google.api.client.testing.http.MockLowLevelHttpRequest; +import com.google.api.client.testing.http.MockLowLevelHttpResponse; +import com.google.api.client.util.StringUtils; + +import junit.framework.TestCase; + +import java.util.Arrays; + +/** + * Tests {@link AbstractGoogleClientRequest}. + * + * @author Yaniv Inbar + */ +public class AbstractGoogleClientRequestTest extends TestCase { + + private static final String ROOT_URL = "https://www.googleapis.com/test/"; + private static final String SERVICE_PATH = "path/v1/"; + private static final String URI_TEMPLATE = "tests/{testId}"; + private static final JsonFactory JSON_FACTORY = new JacksonFactory(); + private static final JsonObjectParser JSON_OBJECT_PARSER = new JsonObjectParser(JSON_FACTORY); + private static final String ERROR_CONTENT = + "{\"error\":{\"code\":401,\"errors\":[{\"domain\":\"global\"," + + "\"location\":\"Authorization\",\"locationType\":\"header\"," + + "\"message\":\"me\",\"reason\":\"authError\"}],\"message\":\"me\"}}"; + + public void testExecuteUnparsed_error() throws Exception { + HttpTransport transport = new MockHttpTransport() { + @Override + public LowLevelHttpRequest buildRequest(final String method, final String url) { + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() { + assertEquals("GET", method); + assertEquals("https://www.googleapis.com/test/path/v1/tests/foo", url); + MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); + result.setStatusCode(HttpStatusCodes.STATUS_CODE_UNAUTHORIZED); + result.setContentType(Json.MEDIA_TYPE); + result.setContent(ERROR_CONTENT); + return result; + } + }; + } + }; + MockGoogleClient client = new MockGoogleClient.Builder( + transport, ROOT_URL, SERVICE_PATH, JSON_OBJECT_PARSER, null).setApplicationName( + "Test Application").build(); + MockGoogleClientRequest request = new MockGoogleClientRequest( + client, HttpMethods.GET, URI_TEMPLATE, null, String.class); + try { + request.put("testId", "foo"); + request.executeUnparsed(); + fail("expected " + HttpResponseException.class); + } catch (HttpResponseException e) { + // expected + assertEquals("401" + StringUtils.LINE_SEPARATOR + ERROR_CONTENT, e.getMessage()); + } + } + + public void testExecuteUsingHead() throws Exception { + HttpTransport transport = new MockHttpTransport() { + @Override + public LowLevelHttpRequest buildRequest(final String method, final String url) { + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() { + assertEquals("HEAD", method); + assertEquals("https://www.googleapis.com/test/path/v1/tests/foo", url); + return new MockLowLevelHttpResponse(); + } + }; + } + }; + MockGoogleClient client = new MockGoogleClient.Builder( + transport, ROOT_URL, SERVICE_PATH, JSON_OBJECT_PARSER, null).setApplicationName( + "Test Application").build(); + MockGoogleClientRequest request = new MockGoogleClientRequest( + client, HttpMethods.GET, URI_TEMPLATE, null, String.class); + request.put("testId", "foo"); + request.executeUsingHead(); + } + + public void testBuildHttpRequest_emptyContent() throws Exception { + for (String method : Arrays.asList("GET", "HEAD", "DELETE", "FOO")) { + subtestBuildHttpRequest_emptyContent(method, false); + } + for (String method : Arrays.asList("POST", "PUT", "PATCH")) { + subtestBuildHttpRequest_emptyContent(method, true); + } + } + + private void subtestBuildHttpRequest_emptyContent(String method, boolean expectEmptyContent) + throws Exception { + HttpTransport transport = new MockHttpTransport(); + MockGoogleClient client = new MockGoogleClient.Builder( + transport, ROOT_URL, SERVICE_PATH, JSON_OBJECT_PARSER, null).setApplicationName( + "Test Application").build(); + MockGoogleClientRequest request = + new MockGoogleClientRequest(client, method, URI_TEMPLATE, null, String.class); + HttpRequest httpRequest = request.buildHttpRequest(); + if (expectEmptyContent) { + assertTrue(httpRequest.getContent() instanceof EmptyContent); + } else { + assertNull(httpRequest.getContent()); + } + } + + public void testCheckRequiredParameter() throws Exception { + HttpTransport transport = new MockHttpTransport(); + MockGoogleClient client = new MockGoogleClient.Builder( + transport, ROOT_URL, SERVICE_PATH, JSON_OBJECT_PARSER, null).setApplicationName( + "Test Application").build(); + MockGoogleClientRequest request = new MockGoogleClientRequest( + client, HttpMethods.GET, URI_TEMPLATE, null, String.class); + + // Should not throw an Exception. + request.checkRequiredParameter("Not Null", "notNull()"); + + try { + request.checkRequiredParameter(null, "content.getTest().getAnotherTest()"); + fail("Expected " + IllegalArgumentException.class); + } catch (IllegalArgumentException iae) { + // Expected. + } + } + + public void testExecute_void() throws Exception { + HttpTransport transport = new MockHttpTransport() { + @Override + public LowLevelHttpRequest buildRequest(final String method, final String url) { + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() { + return new MockLowLevelHttpResponse().setContent("{\"a\":\"ignored\"}") + .setContentType(Json.MEDIA_TYPE); + } + }; + } + }; + MockGoogleClient client = new MockGoogleClient.Builder( + transport, ROOT_URL, SERVICE_PATH, JSON_OBJECT_PARSER, null).setApplicationName( + "Test Application").build(); + MockGoogleClientRequest request = + new MockGoogleClientRequest(client, HttpMethods.GET, URI_TEMPLATE, null, Void.class); + Void v = request.execute(); + assertNull(v); + } +} diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/services/AbstractGoogleClientTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/services/AbstractGoogleClientTest.java new file mode 100644 index 00000000..46647883 --- /dev/null +++ b/google-api-client/src/test/java/com/google/api/client/googleapis/services/AbstractGoogleClientTest.java @@ -0,0 +1,275 @@ +/* + * 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.api.client.googleapis.services; + +import com.google.api.client.googleapis.media.MediaHttpUploader; +import com.google.api.client.googleapis.testing.services.MockGoogleClient; +import com.google.api.client.googleapis.testing.services.MockGoogleClientRequest; +import com.google.api.client.http.EmptyContent; +import com.google.api.client.http.HttpExecuteInterceptor; +import com.google.api.client.http.HttpRequest; +import com.google.api.client.http.HttpRequestInitializer; +import com.google.api.client.http.HttpTransport; +import com.google.api.client.http.InputStreamContent; +import com.google.api.client.http.LowLevelHttpRequest; +import com.google.api.client.http.LowLevelHttpResponse; +import com.google.api.client.json.Json; +import com.google.api.client.json.JsonFactory; +import com.google.api.client.json.JsonObjectParser; +import com.google.api.client.json.jackson.JacksonFactory; +import com.google.api.client.testing.http.MockHttpTransport; +import com.google.api.client.testing.http.MockLowLevelHttpRequest; +import com.google.api.client.testing.http.MockLowLevelHttpResponse; +import com.google.api.client.util.Key; + +import junit.framework.TestCase; + +import java.io.ByteArrayInputStream; +import java.io.InputStream; + +/** + * Tests {@link AbstractGoogleClient}. + * + * @author Yaniv Inbar + */ +public class AbstractGoogleClientTest extends TestCase { + + private static final JsonFactory JSON_FACTORY = new JacksonFactory(); + private static final JsonObjectParser JSON_OBJECT_PARSER = new JsonObjectParser(JSON_FACTORY); + private static final HttpTransport TRANSPORT = new MockHttpTransport(); + + static private class TestRemoteRequestInitializer implements GoogleClientRequestInitializer { + + boolean isCalled; + + TestRemoteRequestInitializer() { + } + + public void initialize(AbstractGoogleClientRequest request) { + isCalled = true; + } + } + + public void testGoogleClientBuilder() { + String rootUrl = "http://www.testgoogleapis.com/test/"; + String servicePath = "path/v1/"; + GoogleClientRequestInitializer jsonHttpRequestInitializer = new TestRemoteRequestInitializer(); + String applicationName = "Test Application"; + + AbstractGoogleClient.Builder setApplicationName = new MockGoogleClient.Builder( + TRANSPORT, rootUrl, servicePath, JSON_OBJECT_PARSER, null).setApplicationName( + applicationName).setGoogleClientRequestInitializer(jsonHttpRequestInitializer) + .setSuppressAllChecks(true); + AbstractGoogleClient client = setApplicationName.build(); + + assertEquals(rootUrl + servicePath, client.getBaseUrl()); + assertEquals(rootUrl, client.getRootUrl()); + assertEquals(servicePath, client.getServicePath()); + assertEquals(applicationName, client.getApplicationName()); + assertEquals(jsonHttpRequestInitializer, client.getGoogleClientRequestInitializer()); + assertTrue(client.getSuppressPatternChecks()); + assertTrue(client.getSuppressRequiredParameterChecks()); + } + + public void testGoogleClientSuppressionDefaults() { + String rootUrl = "http://www.testgoogleapis.com/test/"; + String servicePath = "path/v1/"; + + // Assert suppression defaults. + AbstractGoogleClient.Builder googleClientBuilder = new MockGoogleClient.Builder( + TRANSPORT, rootUrl, servicePath, JSON_OBJECT_PARSER, null); + assertFalse(googleClientBuilder.getSuppressPatternChecks()); + assertFalse(googleClientBuilder.getSuppressRequiredParameterChecks()); + + AbstractGoogleClient googleClient = googleClientBuilder.build(); + assertFalse(googleClient.getSuppressPatternChecks()); + assertFalse(googleClient.getSuppressRequiredParameterChecks()); + } + + public void testBaseServerAndBasePathBuilder() { + AbstractGoogleClient client = new MockGoogleClient.Builder( + TRANSPORT, "http://www.testgoogleapis.com/test/", "path/v1/", JSON_OBJECT_PARSER, + null).setApplicationName("Test Application") + .setRootUrl("http://www.googleapis.com/test/").setServicePath("path/v2/").build(); + + assertEquals("http://www.googleapis.com/test/path/v2/", client.getBaseUrl()); + } + + public void testInitialize() throws Exception { + TestRemoteRequestInitializer remoteRequestInitializer = new TestRemoteRequestInitializer(); + AbstractGoogleClient client = new MockGoogleClient.Builder( + TRANSPORT, "http://www.test.com/", "", JSON_OBJECT_PARSER, null).setApplicationName( + "Test Application").setGoogleClientRequestInitializer(remoteRequestInitializer).build(); + client.initialize(null); + assertTrue(remoteRequestInitializer.isCalled); + } + + private static final String TEST_RESUMABLE_REQUEST_URL = + "http://www.test.com/request/url?uploadType=resumable"; + private static final String TEST_UPLOAD_URL = "http://www.test.com/media/upload/location"; + private static final String TEST_CONTENT_TYPE = "image/jpeg"; + + private static class MediaTransport extends MockHttpTransport { + + int bytesUploaded; + int contentLength = MediaHttpUploader.DEFAULT_CHUNK_SIZE; + boolean contentLengthNotSpecified; + + protected MediaTransport() { + } + + @Override + public LowLevelHttpRequest buildRequest(String name, String url) { + if (name.equals("POST")) { + assertEquals(TEST_RESUMABLE_REQUEST_URL, url); + + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() { + // Assert that the required headers are set. + if (!contentLengthNotSpecified) { + assertEquals( + Integer.toString(contentLength), getFirstHeaderValue("x-upload-content-length")); + } + assertEquals(TEST_CONTENT_TYPE, getFirstHeaderValue("x-upload-content-type")); + // This is the initiation call. Return 200 with the upload URI. + MockLowLevelHttpResponse response = new MockLowLevelHttpResponse(); + response.setStatusCode(200); + response.addHeader("Location", TEST_UPLOAD_URL); + return response; + } + }; + } + assertEquals(TEST_UPLOAD_URL, url); + + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() { + MockLowLevelHttpResponse response = new MockLowLevelHttpResponse(); + + String bytesRange = + bytesUploaded + "-" + (bytesUploaded + MediaHttpUploader.DEFAULT_CHUNK_SIZE - 1); + String expectedContentRange = "bytes " + bytesRange + "/" + contentLength; + assertEquals(expectedContentRange, getFirstHeaderValue("Content-Range")); + bytesUploaded += MediaHttpUploader.DEFAULT_CHUNK_SIZE; + + if (bytesUploaded == contentLength) { + // Return 200 since the upload is complete. + response.setStatusCode(200); + response.setContent("{\"foo\":\"somevalue\"}"); + response.setContentType(Json.MEDIA_TYPE); + } else { + // Return 308 and the range since the upload is incomplete. + response.setStatusCode(308); + response.addHeader("Range", bytesRange); + } + return response; + } + }; + } + } + + public static class A { + @Key + String foo; + } + + public void testMediaUpload() throws Exception { + MediaTransport transport = new MediaTransport(); + AbstractGoogleClient client = new MockGoogleClient.Builder( + transport, TEST_RESUMABLE_REQUEST_URL, "", JSON_OBJECT_PARSER, null).setApplicationName( + "Test Application").build(); + InputStream is = new ByteArrayInputStream(new byte[MediaHttpUploader.DEFAULT_CHUNK_SIZE]); + InputStreamContent mediaContent = new InputStreamContent(TEST_CONTENT_TYPE, is); + mediaContent.setLength(MediaHttpUploader.DEFAULT_CHUNK_SIZE); + MockGoogleClientRequest rq = + new MockGoogleClientRequest(client, "POST", "", null, A.class); + rq.initializeMediaUpload(mediaContent); + A result = rq.execute(); + assertEquals("somevalue", result.foo); + } + + private static class GZipCheckerInitializer implements HttpRequestInitializer { + + private boolean gzipDisabled; + + public GZipCheckerInitializer(boolean gzipDisabled) { + this.gzipDisabled = gzipDisabled; + } + + public void initialize(HttpRequest request) { + request.setInterceptor(new GZipCheckerInterceptor(gzipDisabled)); + } + } + + private static class GZipCheckerInterceptor implements HttpExecuteInterceptor { + + private boolean gzipDisabled; + + public GZipCheckerInterceptor(boolean gzipDisabled) { + this.gzipDisabled = gzipDisabled; + } + + public void intercept(HttpRequest request) { + assertEquals(!gzipDisabled && !(request.getContent() instanceof EmptyContent), + request.getEncoding() != null); + } + } + + public void testMediaUpload_disableGZip() throws Exception { + MediaTransport transport = new MediaTransport(); + transport.contentLengthNotSpecified = true; + AbstractGoogleClient client = new MockGoogleClient.Builder( + transport, TEST_RESUMABLE_REQUEST_URL, "", JSON_OBJECT_PARSER, + new GZipCheckerInitializer(true)).setApplicationName("Test Application").build(); + InputStream is = new ByteArrayInputStream(new byte[MediaHttpUploader.DEFAULT_CHUNK_SIZE]); + InputStreamContent mediaContent = new InputStreamContent(TEST_CONTENT_TYPE, is); + MockGoogleClientRequest rq = + new MockGoogleClientRequest(client, "POST", "", null, A.class); + rq.initializeMediaUpload(mediaContent); + rq.setDisableGZipContent(true); + A result = rq.execute(); + assertEquals("somevalue", result.foo); + } + + public void testMediaUpload_enableGZip() throws Exception { + MediaTransport transport = new MediaTransport(); + transport.contentLengthNotSpecified = true; + AbstractGoogleClient client = new MockGoogleClient.Builder( + transport, TEST_RESUMABLE_REQUEST_URL, "", JSON_OBJECT_PARSER, + new GZipCheckerInitializer(false)).setApplicationName("Test Application").build(); + InputStream is = new ByteArrayInputStream(new byte[MediaHttpUploader.DEFAULT_CHUNK_SIZE]); + InputStreamContent mediaContent = new InputStreamContent(TEST_CONTENT_TYPE, is); + MockGoogleClientRequest rq = + new MockGoogleClientRequest(client, "POST", "", null, A.class); + rq.initializeMediaUpload(mediaContent); + rq.setDisableGZipContent(false); + A result = rq.execute(); + assertEquals("somevalue", result.foo); + } + + public void testMediaUpload_defaultGZip() throws Exception { + MediaTransport transport = new MediaTransport(); + transport.contentLengthNotSpecified = true; + AbstractGoogleClient client = new MockGoogleClient.Builder( + transport, TEST_RESUMABLE_REQUEST_URL, "", JSON_OBJECT_PARSER, + new GZipCheckerInitializer(false)).setApplicationName("Test Application").build(); + InputStream is = new ByteArrayInputStream(new byte[MediaHttpUploader.DEFAULT_CHUNK_SIZE]); + InputStreamContent mediaContent = new InputStreamContent(TEST_CONTENT_TYPE, is); + MockGoogleClientRequest rq = + new MockGoogleClientRequest(client, "POST", "", null, A.class); + rq.initializeMediaUpload(mediaContent); + A result = rq.execute(); + assertEquals("somevalue", result.foo); + } +} diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/services/CommonGoogleClientRequestInitializerTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/services/CommonGoogleClientRequestInitializerTest.java new file mode 100644 index 00000000..8c73a0e3 --- /dev/null +++ b/google-api-client/src/test/java/com/google/api/client/googleapis/services/CommonGoogleClientRequestInitializerTest.java @@ -0,0 +1,49 @@ +/* + * 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.api.client.googleapis.services; + +import com.google.api.client.googleapis.testing.services.MockGoogleClient; +import com.google.api.client.http.HttpContent; +import com.google.api.client.testing.http.HttpTesting; +import com.google.api.client.testing.http.MockHttpTransport; +import com.google.api.client.util.Key; + +import junit.framework.TestCase; + +/** + * Tests {@link CommonGoogleClientRequestInitializer}. + * + * @author Yaniv Inbar + */ +public class CommonGoogleClientRequestInitializerTest extends TestCase { + + public static class MyRequest extends AbstractGoogleClientRequest { + @Key + String key; + + protected MyRequest(MockGoogleClient client, String method, String uriTemplate, + HttpContent content, Class responseClass) { + super(client, method, uriTemplate, content, responseClass); + } + } + + public void testInitialize() throws Exception { + CommonGoogleClientRequestInitializer key = new CommonGoogleClientRequestInitializer("foo"); + MockGoogleClient client = new MockGoogleClient.Builder(new MockHttpTransport(), + HttpTesting.SIMPLE_URL, "test/", null, null).setApplicationName("Test Application").build(); + MyRequest request = new MyRequest(client, "GET", "", null, String.class); + assertNull(request.key); + key.initialize(request); + assertEquals("foo", request.key); + } +} diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/services/json/AbstractGoogleJsonClientTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/services/json/AbstractGoogleJsonClientTest.java new file mode 100644 index 00000000..ac99f5cf --- /dev/null +++ b/google-api-client/src/test/java/com/google/api/client/googleapis/services/json/AbstractGoogleJsonClientTest.java @@ -0,0 +1,74 @@ +/* + * 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.api.client.googleapis.services.json; + +import com.google.api.client.googleapis.json.GoogleJsonError; +import com.google.api.client.googleapis.json.GoogleJsonResponseException; +import com.google.api.client.googleapis.testing.services.json.MockGoogleJsonClient; +import com.google.api.client.googleapis.testing.services.json.MockGoogleJsonClientRequest; +import com.google.api.client.http.HttpStatusCodes; +import com.google.api.client.http.HttpTransport; +import com.google.api.client.http.LowLevelHttpRequest; +import com.google.api.client.http.LowLevelHttpResponse; +import com.google.api.client.json.Json; +import com.google.api.client.json.JsonFactory; +import com.google.api.client.json.jackson.JacksonFactory; +import com.google.api.client.testing.http.HttpTesting; +import com.google.api.client.testing.http.MockHttpTransport; +import com.google.api.client.testing.http.MockLowLevelHttpRequest; +import com.google.api.client.testing.http.MockLowLevelHttpResponse; + +import junit.framework.TestCase; + +/** + * Tests {@link AbstractGoogleJsonClient}. + * + * @author Yaniv Inbar + */ +public class AbstractGoogleJsonClientTest extends TestCase { + + public void testExecuteUnparsed_error() throws Exception { + HttpTransport transport = new MockHttpTransport() { + @Override + public LowLevelHttpRequest buildRequest(String name, String url) { + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() { + MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); + result.setStatusCode(HttpStatusCodes.STATUS_CODE_UNAUTHORIZED); + result.setContentType(Json.MEDIA_TYPE); + result.setContent("{\"error\":{\"code\":401,\"errors\":[{\"domain\":\"global\"," + + "\"location\":\"Authorization\",\"locationType\":\"header\"," + + "\"message\":\"me\",\"reason\":\"authError\"}],\"message\":\"me\"}}"); + return result; + } + }; + } + }; + JsonFactory jsonFactory = new JacksonFactory(); + MockGoogleJsonClient client = new MockGoogleJsonClient.Builder( + transport, jsonFactory, HttpTesting.SIMPLE_URL, "", null, false).setApplicationName( + "Test Application").build(); + MockGoogleJsonClientRequest request = + new MockGoogleJsonClientRequest(client, "GET", "foo", null, String.class); + try { + request.executeUnparsed(); + fail("expected " + GoogleJsonResponseException.class); + } catch (GoogleJsonResponseException e) { + // expected + GoogleJsonError details = e.getDetails(); + assertEquals("me", details.getMessage()); + assertEquals("me", details.getErrors().get(0).getMessage()); + } + } +} diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/services/json/CommonGoogleJsonClientRequestInitializerTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/services/json/CommonGoogleJsonClientRequestInitializerTest.java new file mode 100644 index 00000000..e54f4b8d --- /dev/null +++ b/google-api-client/src/test/java/com/google/api/client/googleapis/services/json/CommonGoogleJsonClientRequestInitializerTest.java @@ -0,0 +1,52 @@ +/* + * 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.api.client.googleapis.services.json; + +import com.google.api.client.googleapis.testing.services.json.MockGoogleJsonClient; +import com.google.api.client.http.HttpContent; +import com.google.api.client.json.jackson.JacksonFactory; +import com.google.api.client.testing.http.HttpTesting; +import com.google.api.client.testing.http.MockHttpTransport; +import com.google.api.client.util.Key; + +import junit.framework.TestCase; + +/** + * Tests {@link CommonGoogleJsonClientRequestInitializer}. + * + * @author Yaniv Inbar + */ +public class CommonGoogleJsonClientRequestInitializerTest extends TestCase { + + public static class MyRequest extends AbstractGoogleJsonClientRequest { + @Key + String key; + + protected MyRequest(MockGoogleJsonClient client, String method, String uriTemplate, + HttpContent content, Class responseClass) { + super(client, method, uriTemplate, content, responseClass); + } + } + + public void testInitialize() throws Exception { + CommonGoogleJsonClientRequestInitializer key = + new CommonGoogleJsonClientRequestInitializer("foo"); + MockGoogleJsonClient client = new MockGoogleJsonClient.Builder( + new MockHttpTransport(), new JacksonFactory(), HttpTesting.SIMPLE_URL, "test/", null, + false).setApplicationName("Test Application").build(); + MyRequest request = new MyRequest(client, "GET", "", null, String.class); + assertNull(request.key); + key.initialize(request); + assertEquals("foo", request.key); + } +} diff --git a/instructions.html b/instructions.html new file mode 100644 index 00000000..52a65eb1 --- /dev/null +++ b/instructions.html @@ -0,0 +1,73 @@ + +Setup Instructions for the Google API Client Library for Java + +

Setup Instructions for the Google API Client Library for Java

+ +

Browse Online

+ +
+ +

Checkout Instructions

+ +

Prerequisites: install Java 6, Mercurial and Maven. You may need to set +your JAVA_HOME.

+ +
hg clone https://google-api-java-client.googlecode.com/hg/ google-api-java-client
+cd google-api-java-client
+mvn install
+ +There are two named branches: +
    +
  • The "default" branch has the stable 1.4 library. This is the default + branch that is checked out with the instructions above.
  • +
  • The "dev" branch has the development 1.5 library. To switch to this + branch, run:
    hg update dev
    +mvn clean install
  • +
+ +

Setup Project in Eclipse 3.5

+ +

Prerequisites: install Eclipse, +the Mercurial plugin, the Maven +plugin, and the Android +plugin.

+ +
    +
  • Setup Eclipse Preferences +
      +
    • Window > Preferences... (or on Mac, Eclipse > Preferences...)
    • +
    • Select Maven +
        +
      • check on "Download Artifact Sources"
      • +
      • check on "Download Artifact JavaDoc"
      • +
      +
    • +
    • Select Android +
        +
      • setup SDK location
      • +
      +
    • +
    +
  • +
  • Import projects +
      +
    • File > Import...
    • +
    • Select "General > Existing Project into Workspace" and click + "Next"
    • +
    • Click "Browse" next to "Select root directory", find [someDirectory]/google-api-java-client + and click OK
    • +
    • Click "Next" and "Finish"
    • +
    +
  • +
+ + + diff --git a/pom.xml b/pom.xml new file mode 100644 index 00000000..5ca55c10 --- /dev/null +++ b/pom.xml @@ -0,0 +1,601 @@ + + + 4.0.0 + + org.sonatype.oss + oss-parent + 7 + + com.google.api-client + google-api-client-parent + 1.17.1-rc-SNAPSHOT + pom + Parent for the Google API Client Library for Java + + http://code.google.com/p/google-api-java-client/ + + + code.google.com + http://code.google.com/p/google-api-java-client/issues/list + + + 2010 + + + 2.0.9 + + + + scm:hg:https://code.google.com/p/google-api-java-client/ + scm:hg:https://code.google.com/p/google-api-java-client/ + http://code.google.com/p/google-api-java-client/source/browse/ + + + + Google + http://www.google.com/ + + + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + + + yanivi + Yaniv Inbar + yanivi@google.com + Google + http://www.google.com + + owner + developer + + -5 + + + + + + google-api-client + google-api-client-servlet + google-api-client-android + google-api-client-appengine + google-api-client-assembly + google-api-client-gson + google-api-client-jackson2 + google-api-client-java6 + google-api-client-protobuf + google-api-client-xml + + + + + + junit + junit + 4.8.2 + + + com.google.appengine + appengine-api-1.0-sdk + ${project.appengine.version} + + + com.google.appengine + appengine-testing + ${project.appengine.version} + + + com.google.appengine + appengine-api-labs + ${project.appengine.version} + + + com.google.appengine + appengine-api-stubs + ${project.appengine.version} + + + xpp3 + xpp3 + ${project.xpp3.version} + + + org.apache.httpcomponents + httpclient + ${project.httpclient.version} + + + com.google.guava + guava-jdk5 + ${project.guava.version} + + + com.google.code.findbugs + jsr305 + ${project.jsr305.version} + + + javax.jdo + jdo2-api + ${project.jdo2-api.version} + + + javax.servlet + servlet-api + 2.5 + + + com.google.http-client + google-http-client + ${project.http.version} + + + com.google.http-client + google-http-client-assembly + ${project.http.version} + pom + + + com.google.http-client + google-http-client-android + ${project.http.version} + + + com.google.http-client + google-http-client-appengine + ${project.http.version} + + + com.google.http-client + google-http-client-gson + ${project.http.version} + + + com.google.http-client + google-http-client-jackson2 + ${project.http.version} + + + com.google.http-client + google-http-client-protobuf + ${project.http.version} + + + com.google.http-client + google-http-client-jackson + ${project.http.version} + + + com.google.http-client + google-http-client-xml + ${project.version} + + + com.google.oauth-client + google-oauth-client + ${project.oauth.version} + + + com.google.oauth-client + google-oauth-client-assembly + ${project.oauth.version} + pom + + + com.google.oauth-client + google-oauth-client-appengine + ${project.oauth.version} + + + com.google.oauth-client + google-oauth-client-java6 + ${project.oauth.version} + + + com.google.oauth-client + google-oauth-client-java7 + ${project.oauth.version} + + + com.google.oauth-client + google-oauth-client-servlet + ${project.oauth.version} + + + com.google.api-client + google-api-client + ${project.version} + + + com.google.api-client + google-api-client-appengine + ${project.version} + + + com.google.api-client + google-api-client-servlet + ${project.version} + + + com.google.api-client + google-api-client-android + ${project.version} + + + com.google.api-client + google-api-client-java6 + ${project.version} + + + com.google.api-client + google-api-client-gson + ${project.version} + + + com.google.api-client + google-api-client-jackson2 + ${project.version} + + + com.google.api-client + google-api-client-protobuf + ${project.version} + + + com.google.api-client + google-api-client-xml + ${project.version} + + + + com.google.android.google-play-services + google-play-services + 1 + + + + + + + + + + maven-antrun-plugin + 1.6 + + + + org.apache.maven.plugins + maven-release-plugin + 2.1 + + forked-path + true + -Psonatype-oss-release ${arguments} + + + + maven-assembly-plugin + 2.2 + + + maven-clean-plugin + 2.4.1 + + + maven-compiler-plugin + 2.3.2 + + 1.5 + 1.5 + + + + maven-dependency-plugin + 2.1 + + + maven-deploy-plugin + 2.5 + + + maven-ear-plugin + 2.4.2 + + + maven-ejb-plugin + 2.3 + + + maven-install-plugin + 2.3.1 + + + maven-jar-plugin + 2.3.1 + + + false + + + + + maven-javadoc-plugin + 2.7 + + + maven-plugin-plugin + 2.6 + + + maven-rar-plugin + 2.2 + + + maven-release-plugin + 2.1 + + + maven-resources-plugin + 2.4.3 + + + maven-site-plugin + 2.1.1 + + + maven-source-plugin + 2.1.2 + + + maven-surefire-plugin + 2.12.4 + + -Xmx1024m + + + + maven-war-plugin + 2.1 + + + maven-checkstyle-plugin + 2.6 + + + org.codehaus.mojo + findbugs-maven-plugin + 2.5.2 + + + org.codehaus.mojo + clirr-maven-plugin + 2.5 + + + org.codehaus.mojo + animal-sniffer-maven-plugin + 1.9 + + + org.apache.maven.plugins + maven-project-info-reports-plugin + 2.7 + + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + org.apache.maven.plugins + maven-jar-plugin + [2.3.1,) + + jar + + + + + + + + + org.datanucleus + maven-datanucleus-plugin + [2.2.1,) + + enhance + + + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + [1.0,) + + enforce + + + + + + + + + + + + + + + maven-javadoc-plugin + + + aggregate + + aggregate + + site + + + http://download.oracle.com/javase/6/docs/api/ + http://code.google.com/appengine/docs/java/javadoc + http://javadoc.google-http-java-client.googlecode.com/hg/${project.http.version} + http://javadoc.google-oauth-java-client.googlecode.com/hg/${project.oauth.version} + + Google API Client Library for Java ${project.version} + + + google-api-client + com.google.api.client.googleapis* + + + google-api-client-android + com.google.api.client.googleapis.extensions.android.* + + + google-api-client-appengine + com.google.api.client.googleapis.extensions.appengine* + + + google-api-client-gson + com.google.api.client.googleapis.notifications.json.gson.* + + + google-api-client-jackson2 + com.google.api.client.googleapis.notifications.json.jackson2.* + + + google-api-client-java6 + com.google.api.client.googleapis.extensions.java6.* + + + google-api-client-protobuf + com.google.api.client.googleapis.services.protobuf*:com.google.api.client.googleapis.testing.services.protobuf* + + + google-api-client-servlet + com.google.api.client.googleapis.extensions.servlet* + + + google-api-client-xml + com.google.api.client.googleapis.xml.* + + + google-api-java-client ${project.version} + + + + + + maven-checkstyle-plugin + + checkstyle.xml + true + ${basedir}/../checkstyle-suppressions.xml + + + + + check + + + + + + org.codehaus.mojo + findbugs-maven-plugin + + ${basedir}/../findbugs-exclude.xml + + + com.google.http-client + google-http-client-findbugs + ${project.http.version} + + + + + + org.codehaus.mojo + clirr-maven-plugin + + 1.16.0-rc + ${basedir}/../clirr-ignored-differences.xml + false + true + + + + org.codehaus.mojo + animal-sniffer-maven-plugin + + + org.codehaus.mojo.signature + java15 + 1.0 + + + + + + check + + + + + + + + UTF-8 + 1.17.1-rc-SNAPSHOT + 1.17.1-rc-SNAPSHOT + 1.3.9 + 2.1 + 1.9.11 + 2.1.3 + 2.4.1 + 13.0 + 1.7.7 + 1.1.4c + 1.1.1 + 4.0.1 + 4.0.1 + 2.3-eb + 1.1 + + From dab1597ba969a6f26f81f8b0c90ac6f9885eb4bf Mon Sep 17 00:00:00 2001 From: Nick Miceli Date: Wed, 11 Sep 2013 21:07:51 -0400 Subject: [PATCH 11/12] api 1.17 Issue 795: Add javadoc overview description with link to HTTP & OAuth projects https://codereview.appspot.com/13401049/ --- overview.html | 17 +++++++++++++++++ pom.xml | 1 + 2 files changed, 18 insertions(+) create mode 100644 overview.html diff --git a/overview.html b/overview.html new file mode 100644 index 00000000..a4274fa2 --- /dev/null +++ b/overview.html @@ -0,0 +1,17 @@ + + + Written by Google, the + google-api-java-client library is an easy-to-use and efficient Java client library for + accessing Google APIs using JSON and OAuth 2.0. + +

+ This library is built on top of two common libraries, also built by Google, but designed to + work with any HTTP service on the web: the Google HTTP Client Library for Java and the Google + OAuth Client Library for Java. + @see + Google HTTP Java Client Library Javadoc + @see + Google OAuth Java Client Library Javadoc +

+ + diff --git a/pom.xml b/pom.xml index 5ca55c10..569a7b21 100644 --- a/pom.xml +++ b/pom.xml @@ -478,6 +478,7 @@ http://javadoc.google-oauth-java-client.googlecode.com/hg/${project.oauth.version} Google API Client Library for Java ${project.version} + ${basedir}/overview.html google-api-client From 74317001dd9de75975fbeebcef1c95e1363d0fa2 Mon Sep 17 00:00:00 2001 From: Yaniv Inbar Date: Fri, 13 Sep 2013 10:34:30 -0400 Subject: [PATCH 12/12] api: update ProGuard configuration to suppress warnings from google-play-services when linking against an older Android platform version. For reference, this is a copy of the proguard config from the samples: https://code.google.com/p/google-api-java-client/source/browse/calendar-android-sample/proguard-google-api-client.txt?repo=samples https://codereview.appspot.com/13388046/ --- google-api-client-assembly/proguard-google-api-client.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/google-api-client-assembly/proguard-google-api-client.txt b/google-api-client-assembly/proguard-google-api-client.txt index 3f3f45b0..68ec92b8 100644 --- a/google-api-client-assembly/proguard-google-api-client.txt +++ b/google-api-client-assembly/proguard-google-api-client.txt @@ -17,3 +17,7 @@ # Needed by google-api-client-android when linking against an older platform version -dontwarn com.google.api.client.googleapis.extensions.android.** + +# Needed by google-play-services when linking against an older platform version + +-dontwarn com.google.android.gms.**