Skip to content

Commit f03e2fa

Browse files
author
Yaniv Inbar
committed
[api issue 310] Add command line auth helpers in google-api-java-client
https://codereview.appspot.com/6475071/
1 parent 17edd1c commit f03e2fa

13 files changed

Lines changed: 806 additions & 1 deletion

File tree

google-api-client-assembly/dependencies/java6-dependencies.html

Lines changed: 110 additions & 0 deletions
Large diffs are not rendered by default.

google-api-client-assembly/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@
4343
<groupId>com.google.api-client</groupId>
4444
<artifactId>google-api-client-android2</artifactId>
4545
</dependency>
46+
<dependency>
47+
<groupId>com.google.api-client</groupId>
48+
<artifactId>google-api-client-java6</artifactId>
49+
</dependency>
4650
</dependencies>
4751

4852
<build>

google-api-client-assembly/readme.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ <h3>Library Details</h3>
1919
<li>[deprecated] google-api-client-android2 is for Android SDK 2.1 (Eclair) & higher.</li>
2020
<li>google-api-client-appengine is for Google App Engine.</li>
2121
<li>google-api-client-servlet is for the HTTP Servlet environment.</li>
22+
<li>google-api-client-java6 is for Java 6 & Higher.</li>
2223
</ul>
2324

2425
<h3>Dependencies and Licenses</h3>
@@ -31,6 +32,7 @@ <h3>Dependencies and Licenses</h3>
3132
<li>[deprecated] google-api-client-android2: <a href='dependencies/android2-dependencies.html'>android2-dependencies.html</a></li>
3233
<li>google-api-client-appengine: <a href='dependencies/appengine-dependencies.html'>appengine-dependencies.html</a></li>
3334
<li>google-api-client-servlet: <a href='dependencies/servlet-dependencies.html'>servlet-dependencies.html</a></li>
35+
<li>google-api-client-java6: <a href='dependencies/java6-dependencies.html'>java6-dependencies.html</a></li>
3436
</ul>
3537

3638
<h3>Maven Usage</h3>
@@ -129,6 +131,17 @@ <h3>General Purpose Java 5 Environment Dependencies</h3>
129131
folder required for general purpose Java 5 applications or a newer compatible version:
130132
<ul>
131133
<li>google-api-client-${project.version}.jar</li>
134+
<li>google-api-client-java6-${project.version}.jar
135+
<ul>
136+
<li>google-oauth-client-java6-${project.oauth.version}.jar (only for JDK >= 6)</li>
137+
</ul>
138+
</li>
139+
<li>google-oauth-client-jetty-${project.oauth.version}.jar
140+
<ul>
141+
<li>jetty-${project.jetty.version}.jar</li>
142+
<li>jetty-util-${project.jetty.version}.jar</li>
143+
</ul>
144+
</li>
132145
<li>google-oauth-client-${project.oauth.version}.jar</li>
133146
<li>google-http-client-${project.http.version}.jar</li>
134147
<li>commons-logging-${project.commons-logging.version}.jar</li>

google-api-client-java6/.classpath

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="src/main/java"/>
4+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
5+
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>
6+
<classpathentry kind="output" path="bin"/>
7+
</classpath>

google-api-client-java6/.project

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<projectDescription>
2+
<name>google-api-client-java6</name>
3+
<comment></comment>
4+
<projects>
5+
</projects>
6+
<buildSpec>
7+
<buildCommand>
8+
<name>org.eclipse.m2e.core.maven2Builder</name>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments></arguments>
11+
</buildCommand>
12+
</buildSpec>
13+
<natures>
14+
<nature>org.eclipse.m2e.core.maven2Nature</nature>
15+
<nature>org.eclipse.jdt.core.javanature</nature>
16+
</natures>
17+
</projectDescription>

google-api-client-java6/.settings/org.eclipse.jdt.core.prefs

Lines changed: 380 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
#Thu Nov 17 08:52:25 EST 2011
2+
cleanup.add_default_serial_version_id=true
3+
cleanup.add_generated_serial_version_id=false
4+
cleanup.add_missing_annotations=true
5+
cleanup.add_missing_deprecated_annotations=true
6+
cleanup.add_missing_methods=false
7+
cleanup.add_missing_nls_tags=false
8+
cleanup.add_missing_override_annotations=true
9+
cleanup.add_missing_override_annotations_interface_methods=true
10+
cleanup.add_serial_version_id=true
11+
cleanup.always_use_blocks=true
12+
cleanup.always_use_parentheses_in_expressions=false
13+
cleanup.always_use_this_for_non_static_field_access=false
14+
cleanup.always_use_this_for_non_static_method_access=false
15+
cleanup.convert_to_enhanced_for_loop=false
16+
cleanup.correct_indentation=true
17+
cleanup.format_source_code=true
18+
cleanup.format_source_code_changes_only=false
19+
cleanup.make_local_variable_final=true
20+
cleanup.make_parameters_final=false
21+
cleanup.make_private_fields_final=true
22+
cleanup.make_type_abstract_if_missing_method=false
23+
cleanup.make_variable_declarations_final=false
24+
cleanup.never_use_blocks=false
25+
cleanup.never_use_parentheses_in_expressions=true
26+
cleanup.organize_imports=true
27+
cleanup.qualify_static_field_accesses_with_declaring_class=false
28+
cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
29+
cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
30+
cleanup.qualify_static_member_accesses_with_declaring_class=true
31+
cleanup.qualify_static_method_accesses_with_declaring_class=false
32+
cleanup.remove_private_constructors=true
33+
cleanup.remove_trailing_whitespaces=true
34+
cleanup.remove_trailing_whitespaces_all=true
35+
cleanup.remove_trailing_whitespaces_ignore_empty=false
36+
cleanup.remove_unnecessary_casts=true
37+
cleanup.remove_unnecessary_nls_tags=true
38+
cleanup.remove_unused_imports=true
39+
cleanup.remove_unused_local_variables=false
40+
cleanup.remove_unused_private_fields=true
41+
cleanup.remove_unused_private_members=false
42+
cleanup.remove_unused_private_methods=true
43+
cleanup.remove_unused_private_types=true
44+
cleanup.sort_members=false
45+
cleanup.sort_members_all=false
46+
cleanup.use_blocks=true
47+
cleanup.use_blocks_only_for_return_and_throw=false
48+
cleanup.use_parentheses_in_expressions=true
49+
cleanup.use_this_for_non_static_field_access=true
50+
cleanup.use_this_for_non_static_field_access_only_if_necessary=true
51+
cleanup.use_this_for_non_static_method_access=true
52+
cleanup.use_this_for_non_static_method_access_only_if_necessary=true
53+
cleanup_profile=_google-api-java-client
54+
cleanup_settings_version=2
55+
eclipse.preferences.version=1
56+
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
57+
formatter_profile=_google-api-java-client 100
58+
formatter_settings_version=12
59+
org.eclipse.jdt.ui.exception.name=exception
60+
org.eclipse.jdt.ui.gettersetter.use.is=false
61+
org.eclipse.jdt.ui.ignorelowercasenames=true
62+
org.eclipse.jdt.ui.importorder=com.google;;java;javax;
63+
org.eclipse.jdt.ui.javadoc=true
64+
org.eclipse.jdt.ui.keywordthis=false
65+
org.eclipse.jdt.ui.ondemandthreshold=999
66+
org.eclipse.jdt.ui.overrideannotation=true
67+
org.eclipse.jdt.ui.staticondemandthreshold=999
68+
org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*\n * Copyright (c) 2012 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except\n * in compliance with the License. You may obtain a copy of the License at\n *\n * http\://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under the License\n * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n * or implied. See the License for the specific language governing permissions and limitations under\n * the License.\n */\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}@google.com (Your Name Here)\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created JavaScript files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author Yaniv Inbar\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for vars" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-JSDoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created function stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated function stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
69+
sp_cleanup.add_default_serial_version_id=true
70+
sp_cleanup.add_generated_serial_version_id=false
71+
sp_cleanup.add_missing_annotations=true
72+
sp_cleanup.add_missing_deprecated_annotations=true
73+
sp_cleanup.add_missing_methods=false
74+
sp_cleanup.add_missing_nls_tags=false
75+
sp_cleanup.add_missing_override_annotations=true
76+
sp_cleanup.add_missing_override_annotations_interface_methods=true
77+
sp_cleanup.add_serial_version_id=false
78+
sp_cleanup.always_use_blocks=true
79+
sp_cleanup.always_use_parentheses_in_expressions=false
80+
sp_cleanup.always_use_this_for_non_static_field_access=false
81+
sp_cleanup.always_use_this_for_non_static_method_access=false
82+
sp_cleanup.convert_to_enhanced_for_loop=false
83+
sp_cleanup.correct_indentation=false
84+
sp_cleanup.format_source_code=false
85+
sp_cleanup.format_source_code_changes_only=true
86+
sp_cleanup.make_local_variable_final=false
87+
sp_cleanup.make_parameters_final=false
88+
sp_cleanup.make_private_fields_final=true
89+
sp_cleanup.make_type_abstract_if_missing_method=false
90+
sp_cleanup.make_variable_declarations_final=false
91+
sp_cleanup.never_use_blocks=false
92+
sp_cleanup.never_use_parentheses_in_expressions=true
93+
sp_cleanup.on_save_use_additional_actions=true
94+
sp_cleanup.organize_imports=true
95+
sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
96+
sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
97+
sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
98+
sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
99+
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
100+
sp_cleanup.remove_private_constructors=true
101+
sp_cleanup.remove_trailing_whitespaces=true
102+
sp_cleanup.remove_trailing_whitespaces_all=true
103+
sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
104+
sp_cleanup.remove_unnecessary_casts=true
105+
sp_cleanup.remove_unnecessary_nls_tags=false
106+
sp_cleanup.remove_unused_imports=false
107+
sp_cleanup.remove_unused_local_variables=false
108+
sp_cleanup.remove_unused_private_fields=true
109+
sp_cleanup.remove_unused_private_members=false
110+
sp_cleanup.remove_unused_private_methods=true
111+
sp_cleanup.remove_unused_private_types=true
112+
sp_cleanup.sort_members=false
113+
sp_cleanup.sort_members_all=false
114+
sp_cleanup.use_blocks=false
115+
sp_cleanup.use_blocks_only_for_return_and_throw=false
116+
sp_cleanup.use_parentheses_in_expressions=false
117+
sp_cleanup.use_this_for_non_static_field_access=false
118+
sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
119+
sp_cleanup.use_this_for_non_static_method_access=false
120+
sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true

0 commit comments

Comments
 (0)