You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sn...@apache.org on 2014/04/10 01:21:00 UTC

[1/2] git commit: Added license headers to Java SDK

Repository: incubator-usergrid
Updated Branches:
  refs/heads/master 1cdb6b953 -> 594b9fad5
  refs/pull/101/head [created] 11567d339


Added license headers to Java SDK


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

Branch: refs/heads/master
Commit: 11567d33972d7e4300792bbc0f72b21dee1c6f58
Parents: 1cdb6b9
Author: Rod Simpson <ro...@apigee.com>
Authored: Wed Apr 9 17:12:23 2014 -0600
Committer: Rod Simpson <ro...@apigee.com>
Committed: Wed Apr 9 17:12:23 2014 -0600

----------------------------------------------------------------------
 sdks/java/README.md                             |  20 +++
 sdks/java/README.txt                            |  13 --
 .../org/apache/usergrid/java/client/Client.java | 122 +++++++++++--------
 .../usergrid/java/client/entities/Activity.java |  54 ++++----
 .../usergrid/java/client/entities/Device.java   |  16 +++
 .../usergrid/java/client/entities/Entity.java   |  28 ++++-
 .../usergrid/java/client/entities/Group.java    |  16 +++
 .../usergrid/java/client/entities/Message.java  |  16 +++
 .../usergrid/java/client/entities/User.java     |  16 +++
 .../java/client/exception/ClientException.java  |  27 ++--
 .../java/client/response/AggregateCounter.java  |  16 +++
 .../client/response/AggregateCounterSet.java    |  16 +++
 .../java/client/response/ApiResponse.java       |  16 +++
 .../client/response/ClientCredentialsInfo.java  |  16 +++
 .../java/client/response/QueueInfo.java         |  16 +++
 .../usergrid/java/client/utils/JsonUtils.java   |  18 ++-
 .../usergrid/java/client/utils/MapUtils.java    |  16 +++
 .../usergrid/java/client/utils/ObjectUtils.java |  16 +++
 .../usergrid/java/client/utils/UrlUtils.java    |  18 ++-
 19 files changed, 361 insertions(+), 115 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/11567d33/sdks/java/README.md
----------------------------------------------------------------------
diff --git a/sdks/java/README.md b/sdks/java/README.md
new file mode 100644
index 0000000..7943c41
--- /dev/null
+++ b/sdks/java/README.md
@@ -0,0 +1,20 @@
+
+#Usergrid Java Client
+
+#License
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you 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.

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/11567d33/sdks/java/README.txt
----------------------------------------------------------------------
diff --git a/sdks/java/README.txt b/sdks/java/README.txt
deleted file mode 100644
index 5540ba4..0000000
--- a/sdks/java/README.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-
-Usergrid Android Client
-
-Experimental Android client for Usergrid. Basically uses Spring Android and
-Jackson to wrap calls to Usergrid REST API. Loosely based on the Usergrid
-Javascript client.
-
-Requires the following permissions:
-
-    <uses-permission android:name="android.permission.INTERNET" />
-    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
-    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
-

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/11567d33/sdks/java/src/main/java/org/apache/usergrid/java/client/Client.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/Client.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/Client.java
index 1128a4c..f72bb94 100644
--- a/sdks/java/src/main/java/org/apache/usergrid/java/client/Client.java
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/Client.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.usergrid.java.client;
 
 import static org.springframework.util.StringUtils.arrayToDelimitedString;
@@ -36,7 +52,7 @@ import org.apache.usergrid.java.client.response.ApiResponse;
 /**
  * The Client class for accessing the Usergrid API. Start by instantiating this
  * class though the appropriate constructor.
- * 
+ *
  */
 public class Client {
 
@@ -80,7 +96,7 @@ public class Client {
 
     /**
      * Instantiate client for a specific app
-     * 
+     *
      * @param applicationId
      *            the application id or name
      */
@@ -118,8 +134,8 @@ public class Client {
         this.apiUrl = apiUrl;
         return this;
     }
-    
-    
+
+
     /**
      * the organizationId to set
      * @param organizationId
@@ -129,8 +145,8 @@ public class Client {
         this.organizationId = organizationId;
         return this;
     }
-    
-    
+
+
 
     /**
      * @return the organizationId
@@ -160,7 +176,7 @@ public class Client {
     public void setApplicationId(String applicationId) {
         this.applicationId = applicationId;
     }
-   
+
 
     /**
      * @param applicationId
@@ -275,7 +291,7 @@ public class Client {
     /**
      * Low-level HTTP request method. Synchronous, blocks till response or
      * timeout.
-     * 
+     *
      * @param method
      *            HttpMethod method
      * @param cls
@@ -328,7 +344,7 @@ public class Client {
 
     /**
      * High-level Usergrid API request.
-     * 
+     *
      * @param method
      * @param params
      * @param data
@@ -366,7 +382,7 @@ public class Client {
 
     /**
      * Log the user in and get a valid access token.
-     * 
+     *
      * @param email
      * @param password
      * @return non-null ApiResponse if request succeeds, check getError() for
@@ -402,7 +418,7 @@ public class Client {
     /**
      * Change the password for the currently logged in user. You must supply the
      * old password and the new password.
-     * 
+     *
      * @param username
      * @param oldPassword
      * @param newPassword
@@ -422,7 +438,7 @@ public class Client {
 
     /**
      * Log the user in with their numeric pin-code and get a valid access token.
-     * 
+     *
      * @param email
      * @param pin
      * @return non-null ApiResponse if request succeeds, check getError() for
@@ -458,7 +474,7 @@ public class Client {
     /**
      * Log the user in with their Facebook access token retrived via Facebook
      * OAuth.
-     * 
+     *
      * @param email
      * @param pin
      * @return non-null ApiResponse if request succeeds, check getError() for
@@ -493,7 +509,7 @@ public class Client {
     /**
      * Log the app in with it's client id and client secret key. Not recommended
      * for production apps.
-     * 
+     *
      * @param email
      * @param pin
      * @return non-null ApiResponse if request succeeds, check getError() for
@@ -535,7 +551,7 @@ public class Client {
 
     /**
      * Registers a device using the device's unique device ID.
-     * 
+     *
      * @param context
      * @param properties
      * @return a Device object if success
@@ -572,7 +588,7 @@ public class Client {
 
     /**
      * Create a new entity on the server.
-     * 
+     *
      * @param entity
      * @return an ApiResponse with the new entity in it.
      */
@@ -589,7 +605,7 @@ public class Client {
     /**
      * Create a new entity on the server from a set of properties. Properties
      * must include a "type" property.
-     * 
+     *
      * @param properties
      * @return an ApiResponse with the new entity in it.
      */
@@ -605,7 +621,7 @@ public class Client {
 
     /**
      * Creates a user.
-     * 
+     *
      * @param username
      *            required
      * @param name
@@ -634,7 +650,7 @@ public class Client {
 
     /**
      * Get the groups for the user.
-     * 
+     *
      * @param userId
      * @return a map with the group path as the key and the Group entity as the
      *         value
@@ -654,7 +670,7 @@ public class Client {
 
     /**
      * Get a user's activity feed. Returned as a query to ease paging.
-     * 
+     *
      * @param userId
      * @return
      */
@@ -666,7 +682,7 @@ public class Client {
 
     /**
      * Posts an activity to a user. Activity must already be created.
-     * 
+     *
      * @param userId
      * @param activity
      * @return
@@ -678,7 +694,7 @@ public class Client {
 
     /**
      * Creates and posts an activity to a user.
-     * 
+     *
      * @param verb
      * @param title
      * @param content
@@ -700,7 +716,7 @@ public class Client {
 
     /**
      * Posts an activity to a group. Activity must already be created.
-     * 
+     *
      * @param userId
      * @param activity
      * @return
@@ -712,7 +728,7 @@ public class Client {
 
     /**
      * Creates and posts an activity to a group.
-     * 
+     *
      * @param groupId
      * @param verb
      * @param title
@@ -735,7 +751,7 @@ public class Client {
 
     /**
      * Post an activity to the stream.
-     * 
+     *
      * @param activity
      * @return
      */
@@ -745,7 +761,7 @@ public class Client {
 
     /**
      * Creates and posts an activity to a group.
-     * 
+     *
      * @param verb
      * @param title
      * @param content
@@ -764,10 +780,10 @@ public class Client {
                 category, user, object, objectType, objectName, objectContent);
         return createEntity(activity);
     }
-    
+
     /**
      * Get a group's activity feed. Returned as a query to ease paging.
-     * 
+     *
      * @param userId
      * @return
      */
@@ -777,11 +793,11 @@ public class Client {
         return q;
     }
 
-    
+
 
     /**
      * Get a group's activity feed. Returned as a query to ease paging.
-     * 
+     *
      * @param userId
      * @return
      */
@@ -795,7 +811,7 @@ public class Client {
      * Perform a query request and return a query object. The Query object
      * provides a simple way of dealing with result sets that need to be
      * iterated or paged through.
-     * 
+     *
      * @param method
      * @param params
      * @param data
@@ -810,7 +826,7 @@ public class Client {
 
     /**
      * Perform a query of the users collection.
-     * 
+     *
      * @return
      */
     public Query queryUsers() {
@@ -822,7 +838,7 @@ public class Client {
     /**
      * Perform a query of the users collection using the provided query command.
      * For example: "name contains 'ed'".
-     * 
+     *
      * @param ql
      * @return
      */
@@ -838,7 +854,7 @@ public class Client {
      * Perform a query of the users collection within the specified distance of
      * the specified location and optionally using the provided query command.
      * For example: "name contains 'ed'".
-     * 
+     *
      * @param distance
      * @param location
      * @param ql
@@ -856,7 +872,7 @@ public class Client {
 
     /**
      * Queries the users for the specified group.
-     * 
+     *
      * @param groupId
      * @return
      */
@@ -868,7 +884,7 @@ public class Client {
 
     /**
      * Adds a user to the specified groups.
-     * 
+     *
      * @param userId
      * @param groupId
      * @return
@@ -881,7 +897,7 @@ public class Client {
     /**
      * Creates a group with the specified group path. Group paths can be slash
      * ("/") delimited like file paths for hierarchical group relationships.
-     * 
+     *
      * @param groupPath
      * @return
      */
@@ -893,15 +909,15 @@ public class Client {
      * Creates a group with the specified group path and group title. Group
      * paths can be slash ("/") delimited like file paths for hierarchical group
      * relationships.
-     * 
+     *
      * @param groupPath
      * @param groupTitle
      * @return
      */
     public ApiResponse createGroup(String groupPath, String groupTitle) {
-     return createGroup(groupPath, groupTitle, null);  
+     return createGroup(groupPath, groupTitle, null);
     }
-    
+
     /**
      * Create a group with a path, title and name
      * @param groupPath
@@ -913,22 +929,22 @@ public class Client {
         Map<String, Object> data = new HashMap<String, Object>();
         data.put("type", "group");
         data.put("path", groupPath);
-        
+
         if (groupTitle != null) {
             data.put("title", groupTitle);
         }
-        
+
         if(groupName != null){
             data.put("name", groupName);
         }
-        
+
         return apiRequest(HttpMethod.POST, null, data,  organizationId, applicationId, "groups");
     }
-    
+
     /**
      * Perform a query of the users collection using the provided query command.
      * For example: "name contains 'ed'".
-     * 
+     *
      * @param ql
      * @return
      */
@@ -940,11 +956,11 @@ public class Client {
         return q;
     }
 
-    
+
 
     /**
      * Connect two entities together.
-     * 
+     *
      * @param connectingEntityType
      * @param connectingEntityId
      * @param connectionType
@@ -961,7 +977,7 @@ public class Client {
 
     /**
      * Disconnect two entities.
-     * 
+     *
      * @param connectingEntityType
      * @param connectingEntityId
      * @param connectionType
@@ -978,7 +994,7 @@ public class Client {
 
     /**
      * Query the connected entities.
-     * 
+     *
      * @param connectingEntityType
      * @param connectingEntityId
      * @param connectionType
@@ -1005,7 +1021,7 @@ public class Client {
 
     /**
      * Query the connected entities within distance of a specific point.
-     * 
+     *
      * @param connectingEntityType
      * @param connectingEntityId
      * @param connectionType
@@ -1038,7 +1054,7 @@ public class Client {
 
     /**
      * Query object
-     * 
+     *
      */
     private class EntityQuery implements Query {
         final HttpMethod method;
@@ -1084,7 +1100,7 @@ public class Client {
 
         /**
          * Performs a request for the next set of results
-         * 
+         *
          * @return query that contains results and where to get more from.
          */
         public Query next() {
@@ -1246,7 +1262,7 @@ public class Client {
 
         /**
          * Performs a request for the next set of results
-         * 
+         *
          * @return query that contains results and where to get more from.
          */
         public Query next() {

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/11567d33/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Activity.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Activity.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Activity.java
index f2b77bd..faff3c3 100644
--- a/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Activity.java
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Activity.java
@@ -1,21 +1,19 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2011 Ed Anuff and Usergrid, all rights reserved.
- * http://www.usergrid.com
- * 
- * This file is part of Usergrid Core.
- * 
- * Usergrid Core is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later
- * version.
- * 
- * Usergrid Core is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * Usergrid Core. If not, see <http://www.gnu.org/licenses/>.
- ******************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.usergrid.java.client.entities;
 
 
@@ -39,7 +37,7 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion;
  * An entity type for representing activity stream actions. These are similar to
  * the more generic message entity type except provide the necessary properties
  * for supporting activity stream implementations.
- * 
+ *
  * @see http://activitystrea.ms/specs/json/1.0/
  */
 public class Activity extends Entity {
@@ -145,16 +143,16 @@ public class Activity extends Entity {
         activity.setCategory(category);
         activity.setContent(content);
         activity.setTitle(title);
-        
+
         ActivityObject actor = new ActivityObject();
         actor.setObjectType("person");
-        
+
         if (user != null) {
             actor.setDisplayName(getStringProperty(user.properties, "name"));
             actor.setEntityType(user.getType());
             actor.setUuid(user.getUuid());
         }
-        
+
         activity.setActor(actor);
 
         ActivityObject obj = new ActivityObject();
@@ -195,7 +193,7 @@ public class Activity extends Entity {
     /*
      * @JsonSerialize(include = Inclusion.NON_NULL) public String getActorName()
      * { return actorName; }
-     * 
+     *
      * public void setActorName(String actorName) { this.actorName = actorName;
      * }
      */
@@ -238,19 +236,19 @@ public class Activity extends Entity {
     /*
      * @JsonSerialize(include = Inclusion.NON_NULL) public String
      * getObjectType() { return objectType; }
-     * 
+     *
      * public void setObjectType(String objectType) { this.objectType =
      * objectType; }
-     * 
+     *
      * @JsonSerialize(include = Inclusion.NON_NULL) public String
      * getObjectEntityType() { return objectEntityType; }
-     * 
+     *
      * public void setObjectEntityType(String objectEntityType) {
      * this.objectEntityType = objectEntityType; }
-     * 
+     *
      * @JsonSerialize(include = Inclusion.NON_NULL) public String
      * getObjectName() { return objectName; }
-     * 
+     *
      * public void setObjectName(String objectName) { this.objectName =
      * objectName; }
      */

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/11567d33/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Device.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Device.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Device.java
index 62947c2..8db415c 100644
--- a/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Device.java
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Device.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.usergrid.java.client.entities;
 
 import static com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/11567d33/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Entity.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Entity.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Entity.java
index f5966c9..2a8c544 100644
--- a/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Entity.java
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Entity.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.usergrid.java.client.entities;
 
 import static org.apache.usergrid.java.client.utils.JsonUtils.getStringProperty;
@@ -79,10 +95,10 @@ public class Entity {
         }
     }
 
-  
+
     /**
      * Set the property
-     * 
+     *
      * @param name
      * @param value
      */
@@ -92,7 +108,7 @@ public class Entity {
 
     /**
      * Set the property
-     * 
+     *
      * @param name
      * @param value
      */
@@ -102,7 +118,7 @@ public class Entity {
 
     /**
      * Set the property
-     * 
+     *
      * @param name
      * @param value
      */
@@ -112,7 +128,7 @@ public class Entity {
 
     /**
      * Set the property
-     * 
+     *
      * @param name
      * @param value
      */
@@ -122,7 +138,7 @@ public class Entity {
 
     /**
      * Set the property
-     * 
+     *
      * @param name
      * @param value
      */

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/11567d33/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Group.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Group.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Group.java
index 12c8dff..0e80532 100644
--- a/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Group.java
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Group.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.usergrid.java.client.entities;
 
 import static com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/11567d33/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Message.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Message.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Message.java
index 70ee86e..8af64f9 100644
--- a/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Message.java
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Message.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.usergrid.java.client.entities;
 
 import static com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/11567d33/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/User.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/User.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/User.java
index e249896..0046ab2 100644
--- a/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/User.java
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/User.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.usergrid.java.client.entities;
 
 import static com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/11567d33/sdks/java/src/main/java/org/apache/usergrid/java/client/exception/ClientException.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/exception/ClientException.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/exception/ClientException.java
index f85e2fe..24f27e2 100644
--- a/sdks/java/src/main/java/org/apache/usergrid/java/client/exception/ClientException.java
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/exception/ClientException.java
@@ -1,18 +1,19 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- * 
- * 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
- * 
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.usergrid.java.client.exception;
 
 /**
@@ -23,7 +24,7 @@ package org.apache.usergrid.java.client.exception;
 public class ClientException extends RuntimeException{
 
     /**
-     * 
+     *
      */
     private static final long serialVersionUID = 1L;
 
@@ -34,7 +35,7 @@ public class ClientException extends RuntimeException{
     public ClientException(String message, Throwable cause) {
         super(message, cause);
     }
-    
-    
+
+
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/11567d33/sdks/java/src/main/java/org/apache/usergrid/java/client/response/AggregateCounter.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/response/AggregateCounter.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/response/AggregateCounter.java
index b0ba4ec..240d09f 100644
--- a/sdks/java/src/main/java/org/apache/usergrid/java/client/response/AggregateCounter.java
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/response/AggregateCounter.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.usergrid.java.client.response;
 
 import static org.apache.usergrid.java.client.utils.JsonUtils.toJsonString;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/11567d33/sdks/java/src/main/java/org/apache/usergrid/java/client/response/AggregateCounterSet.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/response/AggregateCounterSet.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/response/AggregateCounterSet.java
index a392b5f..499af3e 100644
--- a/sdks/java/src/main/java/org/apache/usergrid/java/client/response/AggregateCounterSet.java
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/response/AggregateCounterSet.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.usergrid.java.client.response;
 
 import static org.apache.usergrid.java.client.utils.JsonUtils.toJsonString;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/11567d33/sdks/java/src/main/java/org/apache/usergrid/java/client/response/ApiResponse.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/response/ApiResponse.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/response/ApiResponse.java
index 78d6b4c..a87e293 100644
--- a/sdks/java/src/main/java/org/apache/usergrid/java/client/response/ApiResponse.java
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/response/ApiResponse.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.usergrid.java.client.response;
 
 import static org.apache.usergrid.java.client.utils.JsonUtils.toJsonString;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/11567d33/sdks/java/src/main/java/org/apache/usergrid/java/client/response/ClientCredentialsInfo.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/response/ClientCredentialsInfo.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/response/ClientCredentialsInfo.java
index d23414b..7ac6b36 100644
--- a/sdks/java/src/main/java/org/apache/usergrid/java/client/response/ClientCredentialsInfo.java
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/response/ClientCredentialsInfo.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.usergrid.java.client.response;
 
 import static org.apache.usergrid.java.client.utils.JsonUtils.toJsonString;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/11567d33/sdks/java/src/main/java/org/apache/usergrid/java/client/response/QueueInfo.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/response/QueueInfo.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/response/QueueInfo.java
index c0072bc..04fe717 100644
--- a/sdks/java/src/main/java/org/apache/usergrid/java/client/response/QueueInfo.java
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/response/QueueInfo.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.usergrid.java.client.response;
 
 import java.util.UUID;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/11567d33/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/JsonUtils.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/JsonUtils.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/JsonUtils.java
index 370f0fd..a465199 100644
--- a/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/JsonUtils.java
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/JsonUtils.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.usergrid.java.client.utils;
 
 import java.io.IOException;
@@ -60,7 +76,7 @@ public class JsonUtils {
 	        properties.put(name, JsonNodeFactory.instance.numberNode(value));
 	    }
 	}
-	
+
 	public static Boolean getBooleanProperty(Map<String, JsonNode> properties,
 			String name) {
 		JsonNode value = properties.get(name);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/11567d33/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/MapUtils.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/MapUtils.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/MapUtils.java
index f7e4a1c..dd128eb 100644
--- a/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/MapUtils.java
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/MapUtils.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.usergrid.java.client.utils;
 
 import java.util.HashMap;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/11567d33/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/ObjectUtils.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/ObjectUtils.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/ObjectUtils.java
index c47002b..465845a 100644
--- a/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/ObjectUtils.java
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/ObjectUtils.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.usergrid.java.client.utils;
 
 import java.util.Map;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/11567d33/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/UrlUtils.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/UrlUtils.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/UrlUtils.java
index e2d101e..bf2a2b3 100644
--- a/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/UrlUtils.java
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/UrlUtils.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.usergrid.java.client.utils;
 
 import static java.net.URLEncoder.encode;
@@ -14,7 +30,7 @@ import org.apache.usergrid.java.client.exception.ClientException;
 
 public class UrlUtils {
 
-   
+
     public static URL url(String s) {
         try {
             return new URL(s);


[2/2] git commit: Merge pull request #101 from rodsimpson/USERGRID-118

Posted by sn...@apache.org.
Merge pull request #101 from rodsimpson/USERGRID-118

Added license headers to Java SDK

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

Branch: refs/heads/master
Commit: 594b9fad562183a25900fa9b01ca6cf1d75f23a6
Parents: 1cdb6b9 11567d3
Author: Todd Nine <tn...@apigee.com>
Authored: Wed Apr 9 17:18:42 2014 -0600
Committer: Todd Nine <tn...@apigee.com>
Committed: Wed Apr 9 17:18:42 2014 -0600

----------------------------------------------------------------------
 sdks/java/README.md                             |  20 +++
 sdks/java/README.txt                            |  13 --
 .../org/apache/usergrid/java/client/Client.java | 122 +++++++++++--------
 .../usergrid/java/client/entities/Activity.java |  54 ++++----
 .../usergrid/java/client/entities/Device.java   |  16 +++
 .../usergrid/java/client/entities/Entity.java   |  28 ++++-
 .../usergrid/java/client/entities/Group.java    |  16 +++
 .../usergrid/java/client/entities/Message.java  |  16 +++
 .../usergrid/java/client/entities/User.java     |  16 +++
 .../java/client/exception/ClientException.java  |  27 ++--
 .../java/client/response/AggregateCounter.java  |  16 +++
 .../client/response/AggregateCounterSet.java    |  16 +++
 .../java/client/response/ApiResponse.java       |  16 +++
 .../client/response/ClientCredentialsInfo.java  |  16 +++
 .../java/client/response/QueueInfo.java         |  16 +++
 .../usergrid/java/client/utils/JsonUtils.java   |  18 ++-
 .../usergrid/java/client/utils/MapUtils.java    |  16 +++
 .../usergrid/java/client/utils/ObjectUtils.java |  16 +++
 .../usergrid/java/client/utils/UrlUtils.java    |  18 ++-
 19 files changed, 361 insertions(+), 115 deletions(-)
----------------------------------------------------------------------