Added UsergridEntity.toMapValue() and fixed bugs in UsergridRequest.

Also added the generated jar artifact to the repo.


Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/fb353884
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/fb353884
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/fb353884

Branch: refs/heads/master
Commit: fb353884b334b83d401a6a32362646db942445d6
Parents: f0829ac
Author: Robert Walsh <rjwalsh1...@gmail.com>
Authored: Wed May 11 12:24:14 2016 -0500
Committer: Robert Walsh <rjwalsh1...@gmail.com>
Committed: Wed May 11 12:24:14 2016 -0500

----------------------------------------------------------------------
 .../usergrid/java/client/UsergridRequest.java    |   4 ++--
 .../java/client/model/UsergridEntity.java        |   2 ++
 sdks/java/usergrid-java-client-2.1.0.jar         | Bin 0 -> 1991588 bytes
 3 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/fb353884/sdks/java/src/main/java/org/apache/usergrid/java/client/UsergridRequest.java
----------------------------------------------------------------------
diff --git 
a/sdks/java/src/main/java/org/apache/usergrid/java/client/UsergridRequest.java 
b/sdks/java/src/main/java/org/apache/usergrid/java/client/UsergridRequest.java
index 6939eb2..0ac29d6 100644
--- 
a/sdks/java/src/main/java/org/apache/usergrid/java/client/UsergridRequest.java
+++ 
b/sdks/java/src/main/java/org/apache/usergrid/java/client/UsergridRequest.java
@@ -157,12 +157,12 @@ public class UsergridRequest {
     protected HttpUrl constructUrl() {
         String url = this.baseUrl;
         if( this.query != null ) {
-            url += this.query.build();
+            url += this.query.build(false);
         }
         HttpUrl.Builder urlBuilder = HttpUrl.parse(url).newBuilder();
         if( this.pathSegments != null ) {
             for( String path : this.pathSegments ) {
-                urlBuilder.addPathSegment(path);
+                urlBuilder.addPathSegments(path);
             }
         }
         if( this.parameters != null ) {

http://git-wip-us.apache.org/repos/asf/usergrid/blob/fb353884/sdks/java/src/main/java/org/apache/usergrid/java/client/model/UsergridEntity.java
----------------------------------------------------------------------
diff --git 
a/sdks/java/src/main/java/org/apache/usergrid/java/client/model/UsergridEntity.java
 
b/sdks/java/src/main/java/org/apache/usergrid/java/client/model/UsergridEntity.java
index 689f818..e7af748 100644
--- 
a/sdks/java/src/main/java/org/apache/usergrid/java/client/model/UsergridEntity.java
+++ 
b/sdks/java/src/main/java/org/apache/usergrid/java/client/model/UsergridEntity.java
@@ -103,6 +103,8 @@ public class UsergridEntity {
     @NotNull public JsonNode toJsonObjectValue() {
         return toJsonNode(this);
     }
+    @SuppressWarnings("unchecked")
+    @NotNull public Map<String,?> toMapValue() { return 
entityUpdateMapper.convertValue(this,Map.class); }
 
     @JsonIgnore
     public boolean isUser() { return (this instanceof UsergridUser || 
this.getType().equalsIgnoreCase(UsergridUser.USER_ENTITY_TYPE)); }

http://git-wip-us.apache.org/repos/asf/usergrid/blob/fb353884/sdks/java/usergrid-java-client-2.1.0.jar
----------------------------------------------------------------------
diff --git a/sdks/java/usergrid-java-client-2.1.0.jar 
b/sdks/java/usergrid-java-client-2.1.0.jar
new file mode 100644
index 0000000..ce5a1e6
Binary files /dev/null and b/sdks/java/usergrid-java-client-2.1.0.jar differ

Reply via email to