You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2012/12/18 13:29:32 UTC
[3/5] git commit: api: Add @Entity annotation for user related
response classes
api: Add @Entity annotation for user related response classes
Signed-off-by: Rohit Yadav <bh...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/b008f31f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/b008f31f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/b008f31f
Branch: refs/heads/api_refactoring
Commit: b008f31fd58c5ba496a20823af4b0608f448d355
Parents: 5fdce84
Author: Rohit Yadav <bh...@apache.org>
Authored: Tue Dec 18 04:19:46 2012 -0800
Committer: Rohit Yadav <bh...@apache.org>
Committed: Tue Dec 18 04:19:46 2012 -0800
----------------------------------------------------------------------
.../cloudstack/api/response/ProjectResponse.java | 3 +++
.../api/response/ResourceLimitResponse.java | 3 +++
.../cloudstack/api/response/UserResponse.java | 7 +++++--
.../cloudstack/api/response/VpnUsersResponse.java | 3 +++
4 files changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/b008f31f/api/src/org/apache/cloudstack/api/response/ProjectResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/ProjectResponse.java b/api/src/org/apache/cloudstack/api/response/ProjectResponse.java
index c47e7b6..e7d4dd3 100644
--- a/api/src/org/apache/cloudstack/api/response/ProjectResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/ProjectResponse.java
@@ -19,12 +19,15 @@ package org.apache.cloudstack.api.response;
import java.util.ArrayList;
import java.util.List;
+import com.cloud.projects.Project;
import org.apache.cloudstack.api.ApiConstants;
import com.cloud.serializer.Param;
import com.cloud.utils.IdentityProxy;
import com.google.gson.annotations.SerializedName;
import org.apache.cloudstack.api.BaseResponse;
+import org.apache.cloudstack.api.Entity;
+@Entity(value = Project.class)
@SuppressWarnings("unused")
public class ProjectResponse extends BaseResponse {
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/b008f31f/api/src/org/apache/cloudstack/api/response/ResourceLimitResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/ResourceLimitResponse.java b/api/src/org/apache/cloudstack/api/response/ResourceLimitResponse.java
index 854ebee..dc44615 100644
--- a/api/src/org/apache/cloudstack/api/response/ResourceLimitResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/ResourceLimitResponse.java
@@ -16,12 +16,15 @@
// under the License.
package org.apache.cloudstack.api.response;
+import com.cloud.configuration.ResourceLimit;
import org.apache.cloudstack.api.ApiConstants;
import com.cloud.utils.IdentityProxy;
import com.cloud.serializer.Param;
import com.google.gson.annotations.SerializedName;
import org.apache.cloudstack.api.BaseResponse;
+import org.apache.cloudstack.api.Entity;
+@Entity(value = ResourceLimit.class)
@SuppressWarnings("unused")
public class ResourceLimitResponse extends BaseResponse implements ControlledEntityResponse {
@SerializedName(ApiConstants.ACCOUNT) @Param(description="the account of the resource limit")
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/b008f31f/api/src/org/apache/cloudstack/api/response/UserResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/UserResponse.java b/api/src/org/apache/cloudstack/api/response/UserResponse.java
index bb16126..8c070fd 100644
--- a/api/src/org/apache/cloudstack/api/response/UserResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/UserResponse.java
@@ -18,10 +18,14 @@ package org.apache.cloudstack.api.response;
import java.util.Date;
-import com.cloud.serializer.Param;
import com.google.gson.annotations.SerializedName;
+import com.cloud.serializer.Param;
+import com.cloud.user.User;
+
import org.apache.cloudstack.api.BaseResponse;
+import org.apache.cloudstack.api.Entity;
+@Entity(value = User.class)
public class UserResponse extends BaseResponse {
@SerializedName("id") @Param(description="the user ID")
private String id;
@@ -68,7 +72,6 @@ public class UserResponse extends BaseResponse {
@SerializedName("accountid") @Param(description="the account ID of the user")
private String accountId;
-
public String getId() {
return id;
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/b008f31f/api/src/org/apache/cloudstack/api/response/VpnUsersResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/VpnUsersResponse.java b/api/src/org/apache/cloudstack/api/response/VpnUsersResponse.java
index d1f45de..665781f 100644
--- a/api/src/org/apache/cloudstack/api/response/VpnUsersResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/VpnUsersResponse.java
@@ -16,12 +16,15 @@
// under the License.
package org.apache.cloudstack.api.response;
+import com.cloud.network.VpnUser;
import org.apache.cloudstack.api.ApiConstants;
import com.cloud.utils.IdentityProxy;
import com.cloud.serializer.Param;
import com.google.gson.annotations.SerializedName;
import org.apache.cloudstack.api.BaseResponse;
+import org.apache.cloudstack.api.Entity;
+@Entity(value = VpnUser.class)
@SuppressWarnings("unused")
public class VpnUsersResponse extends BaseResponse implements ControlledEntityResponse{
@SerializedName(ApiConstants.ID) @Param(description="the vpn userID")