Commit Graph

381 Commits

Author SHA1 Message Date
Inderjeet Singh
f4098b5cf7 implemented feedback from r585 2010-11-05 22:18:35 +00:00
Inderjeet Singh
c3bae2d35e incorporating code review comments from r648 2010-11-05 21:51:29 +00:00
Jesse Wilson
832257234d New overloads for constructing MalformedJsonException 2010-11-05 20:58:41 +00:00
Joel Leitch
bdf5bef887 Fix JavaDoc on JsonSyntaxException 2010-11-05 20:34:27 +00:00
Inderjeet Singh
0b4bf7706a Changed JsonParser API to throw specific JsonIOException,JsonSyntaxException instead of the general JsonParseException 2010-11-05 20:31:52 +00:00
Inderjeet Singh
399d49c0e8 Revised RestClient to provide easy access to RestMethods.
Updated Order and Cart to be rest resources.
Added a Queryable interface that can be used to indicate that a Rest Resource supports querying.
Added getValueAsString() method to Id.
Removed spurious warnings.
2010-11-04 20:11:05 +00:00
Inderjeet Singh
7e05cde813 Added ability to specify a different ID than the Id class for a RestResource. 2010-11-04 15:25:43 +00:00
Inderjeet Singh
7b99419aea Removed compiler warnings. 2010-11-03 23:14:42 +00:00
Inderjeet Singh
10db917e93 Updated fromJson and toJson signatures to indicate the kind of exceptions (JsonIOException, JsonSyntaxException) that can be thrown. 2010-11-03 19:46:29 +00:00
Inderjeet Singh
44edfcfb33 Added version support in RestClient. Revised CallPath to extract version number specified in the path.
Moved version tests in CallPathProviderTest to CallPathTest.
2010-11-03 16:16:17 +00:00
Inderjeet Singh
83539c534c removed compiler warnings.
Added default serial version id for MalformedJsonException.
2010-11-03 13:28:09 +00:00
Inderjeet Singh
40b6ddb591 Added support for parsing out version numbers from the URLs while constructing a callpath. 2010-11-03 01:43:24 +00:00
Inderjeet Singh
82a1a9511e removed a System.out.println from a test. 2010-11-03 01:25:57 +00:00
Inderjeet Singh
200bccef21 Added tests for issue 249 2010-11-03 00:15:03 +00:00
Inderjeet Singh
b50277c9af revised prefix for rest packages to com.google.gson.rest from com.google.gson.webservice.rest 2010-11-02 21:43:26 +00:00
Inderjeet Singh
b8d8244016 changed serial version id to default for WebServiceSystemException. Removed a system.out.println from a test. 2010-11-02 17:52:47 +00:00
Inderjeet Singh
4a852043b3 Moved the classes to create procedural web-services into a procedural package. 2010-11-02 17:48:51 +00:00
Inderjeet Singh
681281e772 Moved the classes to create procedural web-services into a procedural package.
Moved IdTypeAdapter as an inner class of Id (Id.GsonTypeAdapter).
Created a internal.util package to keep commonly used classes such as Preconditions.
made common base classes such as ParamMap, ContentBody public.
2010-11-02 17:16:01 +00:00
Joel Leitch
c6a4f55d1a Fix for Issue #40. 2010-11-02 03:32:39 +00:00
Inderjeet Singh
4413c299ea Fixing compiler warnings 2010-11-02 00:13:48 +00:00
Inderjeet Singh
cf02621275 removed unused import 2010-11-02 00:12:21 +00:00
Inderjeet Singh
a224bb1e2b added serial version id 2010-11-01 23:16:03 +00:00
Inderjeet Singh
ad7bd1f465 removed unused JsonFormatter classes. 2010-11-01 23:10:09 +00:00
Jesse Wilson
dea7ab89fe Restore pretty printing. The pretty printing format isn't as compact as the previous format - for example arrays of integers are printed one-per-line, whereas the previous format compacted these to all sit on the same line. 2010-11-01 23:03:41 +00:00
Inderjeet Singh
43f2a0012b Removed JavaCC parser definition and its generated classes. 2010-11-01 22:57:39 +00:00
Inderjeet Singh
abe244c099 renamed com.google.gson.stream.JsonSyntaxException to MalformedJsonException.
Throwing JsonSyntaxException instead of JsonParseException where we can detect a syntax error.
2010-11-01 22:48:52 +00:00
Jesse Wilson
c8c3a6965c Fix a regression that expects different type adapters for long.class and Long.class. This is a temporary fix; later we may want to always use the canonical wrapped class. 2010-11-01 22:46:20 +00:00
Jesse Wilson
20d895ff95 Fix primitive wrapping and casting.
Issue: 235
2010-11-01 22:36:30 +00:00
Joel Leitch
d0977c2e3a Exposing the declaring class for the field wrapped by FieldAttributes. 2010-11-01 22:31:48 +00:00
Inderjeet Singh
7127be7965 Updated the OSGi descriptor to 1.6 2010-11-01 22:12:58 +00:00
Inderjeet Singh
7ea5cc2b36 Added a new JsonSyntaxException to indicate syntax errors in Gson. 2010-11-01 17:53:31 +00:00
Inderjeet Singh
ebd4047707 switched to using Google Guava library instead of older collections library. 2010-11-01 17:50:48 +00:00
Inderjeet Singh
b64f69cb00 Added efficient equals and isValid static methods. 2010-11-01 16:00:01 +00:00
Jesse Wilson
d9feb90593 Small cleanup of exception conversion. 2010-10-31 04:58:23 +00:00
Jesse Wilson
b2005299e4 Make JsonSyntaxException public, so clients can differentiate between IO problems and malformed JSON. 2010-10-30 21:32:08 +00:00
Inderjeet Singh
2b993d83b6 Made the GsonBuilder registerTypeHierarchyAdapter a public method.
Updated the Gson version number to 1.6 and added @since tag for the new classes
2010-10-27 23:53:09 +00:00
Inderjeet Singh
2d7367364b Added additional functional tests involving complex protocol buffers, and protos with repeated fields.
Moved all the functional tests under a functional package.
2010-10-27 23:49:22 +00:00
Inderjeet Singh
6feb325044 Added a type adapter for serializing and deserializing protobufs 2010-10-27 23:06:26 +00:00
Inderjeet Singh
9b10e70a79 Removed the version numbers from the plugin configuration of pom.xmls. This ensures that the latest version of the plugins gets downloaded and used while building a project. 2010-10-25 23:09:24 +00:00
Inderjeet Singh
af6307a77f Implemented feedback from r607 2010-10-23 19:06:22 +00:00
Inderjeet Singh
6d9893ddf3 Added a transient map in Metadata since metadata is often of two kinds: transient and persistent. persistent part is serialized/deserialized to JSON. Fixed imports in RepositoryInMemory. 2010-10-23 15:45:33 +00:00
Inderjeet Singh
1d2648231f Revised the hashCode of Id to be based just on the value. Also, revised the equals method to return true when the only difference in the type is that one class is Foo and other is Foo<?, ?>. Added a compact toString() in the Id class that prints the type as MyType<Foo,Bar> instead of fully qualified names for each of the types.
Added tests regarding object equality for the Id class.
2010-10-23 15:34:57 +00:00
Inderjeet Singh
d3eda04f33 Added support for deserializing from null input to a null value.
Added toString() method to ObjectTypePair.
2010-10-22 16:06:59 +00:00
Inderjeet Singh
c01fd85adb Added toString() methods. 2010-10-22 15:12:05 +00:00
Inderjeet Singh
91bee2a688 Throwing JsonIOException on write failures 2010-10-18 23:58:09 +00:00
Inderjeet Singh
18a9205a04 Added an exception class to indicate IO Errors. 2010-10-18 23:54:09 +00:00
Inderjeet Singh
281ed6f866 Created a generalized key-value store,MetaDataMap, for a map of MetaData.
Moved MetaData to wsdef from wsf.
Added a Gson type adapter for Id type.
2010-10-18 15:45:35 +00:00
Inderjeet Singh
8cbdd8a030 simplified the equals method for CallPath 2010-10-17 16:04:07 +00:00
Inderjeet Singh
5adfa4bc04 Defined an interface RestResource that all resources need to extend from. Defined an Id class for a resource.
Changed a rest body spec to take a type instead of a class. This allows parameterized resource types.
Defined a repository interface with an in-memory implementation for server-side storage of rest resource instances.
2010-10-17 16:01:36 +00:00
Inderjeet Singh
6825477d75 Added a method to retrieve a Rest Response with a provided HTTP URL Connection. 2010-09-30 12:45:06 +00:00