mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
Rearranging how response objects work since we need the response name when doing serialization. Now there's a base class that implements the getResponseName method, all responses extend this base class
This commit is contained in:
parent
4a73639d67
commit
a5f50d236f
@ -48,16 +48,6 @@ public class SerializerHelper {
|
||||
return null;
|
||||
}
|
||||
|
||||
// FIXME: what about XML response?
|
||||
public static String toSerializedString(Object result) {
|
||||
if (result != null) {
|
||||
Gson gson = GsonHelper.getBuilder().create();
|
||||
|
||||
return gson.toJson(result);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static Object fromSerializedString(String result) {
|
||||
try {
|
||||
if(result != null && !result.isEmpty()) {
|
||||
|
||||
@ -1,4 +1,15 @@
|
||||
package com.cloud.api;
|
||||
|
||||
public interface ResponseObject {
|
||||
/**
|
||||
* Get the name of the API response
|
||||
* @return the name of the API response
|
||||
*/
|
||||
String getResponseName();
|
||||
|
||||
/**
|
||||
* Set the name of the API response
|
||||
* @param name
|
||||
*/
|
||||
void setResponseName(String name);
|
||||
}
|
||||
|
||||
@ -27,6 +27,7 @@ import com.cloud.api.BaseCmd.Manager;
|
||||
import com.cloud.api.Implementation;
|
||||
import com.cloud.api.Parameter;
|
||||
import com.cloud.api.ServerApiException;
|
||||
import com.cloud.api.response.ApiResponseSerializer;
|
||||
import com.cloud.api.response.CloudIdentifierResponse;
|
||||
import com.cloud.serializer.SerializerHelper;
|
||||
|
||||
@ -60,9 +61,10 @@ public class GetCloudIdentifierCmd extends BaseCmd {
|
||||
return s_name;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override @SuppressWarnings("unchecked")
|
||||
public String getResponse() {
|
||||
CloudIdentifierResponse response = new CloudIdentifierResponse();
|
||||
response.se
|
||||
ArrayList<String> responseObject = (ArrayList<String>)getResponseObject();
|
||||
if (responseObject != null) {
|
||||
response.setCloudIdentifier(responseObject.get(0));
|
||||
@ -71,6 +73,6 @@ public class GetCloudIdentifierCmd extends BaseCmd {
|
||||
} else {
|
||||
throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to add config");
|
||||
}
|
||||
return SerializerHelper.toSerializedString(responseObject);
|
||||
return ApiResponseSerializer.toSerializedString(responseObject);
|
||||
}
|
||||
}
|
||||
@ -17,10 +17,9 @@
|
||||
*/
|
||||
package com.cloud.api.response;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.Param;
|
||||
|
||||
public class AccountResponse implements ResponseObject {
|
||||
public class AccountResponse extends BaseResponse {
|
||||
@Param(name="id")
|
||||
private Long id;
|
||||
|
||||
|
||||
@ -19,10 +19,9 @@ package com.cloud.api.response;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.Param;
|
||||
|
||||
public class AlertResponse implements ResponseObject {
|
||||
public class AlertResponse extends BaseResponse {
|
||||
@Param(name="type")
|
||||
private Short alertType;
|
||||
|
||||
|
||||
17
server/src/com/cloud/api/response/ApiResponseSerializer.java
Normal file
17
server/src/com/cloud/api/response/ApiResponseSerializer.java
Normal file
@ -0,0 +1,17 @@
|
||||
package com.cloud.api.response;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.GsonHelper;
|
||||
import com.google.gson.Gson;
|
||||
|
||||
public class ApiResponseSerializer {
|
||||
// FIXME: what about XML response?
|
||||
public static String toSerializedString(ResponseObject result) {
|
||||
if (result != null) {
|
||||
Gson gson = GsonHelper.getBuilder().create();
|
||||
|
||||
return gson.toJson(result);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -19,10 +19,9 @@ package com.cloud.api.response;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.Param;
|
||||
|
||||
public class AsyncJobResponse implements ResponseObject {
|
||||
public class AsyncJobResponse extends BaseResponse {
|
||||
@Param(name="id")
|
||||
private Long id;
|
||||
|
||||
|
||||
18
server/src/com/cloud/api/response/BaseResponse.java
Normal file
18
server/src/com/cloud/api/response/BaseResponse.java
Normal file
@ -0,0 +1,18 @@
|
||||
package com.cloud.api.response;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
|
||||
public class BaseResponse implements ResponseObject {
|
||||
private String responseName;
|
||||
|
||||
@Override
|
||||
public String getResponseName() {
|
||||
return responseName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setResponseName(String responseName) {
|
||||
this.responseName = responseName;
|
||||
}
|
||||
|
||||
}
|
||||
@ -17,10 +17,9 @@
|
||||
*/
|
||||
package com.cloud.api.response;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.Param;
|
||||
|
||||
public class CapacityResponse implements ResponseObject {
|
||||
public class CapacityResponse extends BaseResponse {
|
||||
@Param(name="type")
|
||||
private Short capacityType;
|
||||
|
||||
|
||||
@ -1,9 +1,8 @@
|
||||
package com.cloud.api.response;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.Param;
|
||||
|
||||
public class CloudIdentifierResponse implements ResponseObject{
|
||||
public class CloudIdentifierResponse extends BaseResponse {
|
||||
|
||||
@Param(name="userid")
|
||||
private Long userId;
|
||||
|
||||
@ -17,10 +17,9 @@
|
||||
*/
|
||||
package com.cloud.api.response;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.Param;
|
||||
|
||||
public class ClusterResponse implements ResponseObject {
|
||||
public class ClusterResponse extends BaseResponse {
|
||||
@Param(name="id")
|
||||
private Long id;
|
||||
|
||||
|
||||
@ -17,10 +17,9 @@
|
||||
*/
|
||||
package com.cloud.api.response;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.Param;
|
||||
|
||||
public class ConfigurationResponse implements ResponseObject {
|
||||
public class ConfigurationResponse extends BaseResponse {
|
||||
@Param(name="category")
|
||||
private String category;
|
||||
|
||||
|
||||
@ -1,9 +1,8 @@
|
||||
package com.cloud.api.response;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.Param;
|
||||
|
||||
public class CreateCmdResponse implements ResponseObject {
|
||||
public class CreateCmdResponse extends BaseResponse {
|
||||
@Param(name="jobid")
|
||||
private Long jobId;
|
||||
|
||||
|
||||
@ -17,10 +17,9 @@
|
||||
*/
|
||||
package com.cloud.api.response;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.Param;
|
||||
|
||||
public class DeleteDomainResponse implements ResponseObject {
|
||||
public class DeleteDomainResponse extends BaseResponse {
|
||||
@Param(name="result")
|
||||
private String result;
|
||||
|
||||
|
||||
@ -1,9 +1,8 @@
|
||||
package com.cloud.api.response;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.Param;
|
||||
|
||||
public class DeletePreallocatedLunResponse implements ResponseObject {
|
||||
public class DeletePreallocatedLunResponse extends BaseResponse {
|
||||
@Param(name="success")
|
||||
private Boolean success;
|
||||
|
||||
|
||||
@ -19,10 +19,9 @@ package com.cloud.api.response;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.Param;
|
||||
|
||||
public class DiskOfferingResponse implements ResponseObject {
|
||||
public class DiskOfferingResponse extends BaseResponse {
|
||||
@Param(name="id")
|
||||
private Long id;
|
||||
|
||||
|
||||
@ -17,10 +17,9 @@
|
||||
*/
|
||||
package com.cloud.api.response;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.Param;
|
||||
|
||||
public class DomainResponse implements ResponseObject {
|
||||
public class DomainResponse extends BaseResponse {
|
||||
@Param(name="id")
|
||||
private Long id;
|
||||
|
||||
|
||||
@ -19,11 +19,10 @@ package com.cloud.api.response;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.Param;
|
||||
import com.cloud.vm.State;
|
||||
|
||||
public class DomainRouterResponse implements ResponseObject {
|
||||
public class DomainRouterResponse extends BaseResponse {
|
||||
@Param(name="id")
|
||||
private Long id;
|
||||
|
||||
|
||||
@ -19,11 +19,10 @@ package com.cloud.api.response;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.event.EventState;
|
||||
import com.cloud.serializer.Param;
|
||||
|
||||
public class EventResponse implements ResponseObject {
|
||||
public class EventResponse extends BaseResponse {
|
||||
@Param(name="id")
|
||||
private Long id;
|
||||
|
||||
|
||||
@ -17,10 +17,9 @@
|
||||
*/
|
||||
package com.cloud.api.response;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.Param;
|
||||
|
||||
public class FirewallRuleResponse implements ResponseObject {
|
||||
public class FirewallRuleResponse extends BaseResponse {
|
||||
@Param(name="id")
|
||||
private Long id;
|
||||
|
||||
|
||||
@ -17,10 +17,9 @@
|
||||
*/
|
||||
package com.cloud.api.response;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.Param;
|
||||
|
||||
public class GuestOSCategoryResponse implements ResponseObject {
|
||||
public class GuestOSCategoryResponse extends BaseResponse {
|
||||
@Param(name="id")
|
||||
private Long id;
|
||||
|
||||
|
||||
@ -17,10 +17,9 @@
|
||||
*/
|
||||
package com.cloud.api.response;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.Param;
|
||||
|
||||
public class GuestOSResponse implements ResponseObject {
|
||||
public class GuestOSResponse extends BaseResponse {
|
||||
@Param(name="id")
|
||||
private Long id;
|
||||
|
||||
|
||||
@ -19,13 +19,12 @@ package com.cloud.api.response;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.host.Host;
|
||||
import com.cloud.host.Status;
|
||||
import com.cloud.hypervisor.Hypervisor;
|
||||
import com.cloud.serializer.Param;
|
||||
|
||||
public class HostResponse implements ResponseObject {
|
||||
public class HostResponse extends BaseResponse {
|
||||
@Param(name="id")
|
||||
private Long id;
|
||||
|
||||
|
||||
@ -19,10 +19,9 @@ package com.cloud.api.response;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.Param;
|
||||
|
||||
public class IPAddressResponse implements ResponseObject {
|
||||
public class IPAddressResponse extends BaseResponse {
|
||||
@Param(name="ipaddress")
|
||||
private String ipAddress;
|
||||
|
||||
|
||||
@ -17,10 +17,9 @@
|
||||
*/
|
||||
package com.cloud.api.response;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.Param;
|
||||
|
||||
public class IngressRuleResponse implements ResponseObject {
|
||||
public class IngressRuleResponse extends BaseResponse {
|
||||
@Param(name="ruleid")
|
||||
private Long ruleId;
|
||||
|
||||
|
||||
@ -17,10 +17,9 @@
|
||||
*/
|
||||
package com.cloud.api.response;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.Param;
|
||||
|
||||
public class LoadBalancerResponse implements ResponseObject {
|
||||
public class LoadBalancerResponse extends BaseResponse {
|
||||
@Param(name="id")
|
||||
private Long id;
|
||||
|
||||
|
||||
@ -19,10 +19,9 @@ package com.cloud.api.response;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.Param;
|
||||
|
||||
public class NetworkGroupResponse implements ResponseObject {
|
||||
public class NetworkGroupResponse extends BaseResponse {
|
||||
@Param(name="id")
|
||||
private Long id;
|
||||
|
||||
|
||||
@ -17,10 +17,9 @@
|
||||
*/
|
||||
package com.cloud.api.response;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.Param;
|
||||
|
||||
public class PodResponse implements ResponseObject {
|
||||
public class PodResponse extends BaseResponse {
|
||||
@Param(name="id")
|
||||
private Long id;
|
||||
|
||||
|
||||
@ -17,10 +17,9 @@
|
||||
*/
|
||||
package com.cloud.api.response;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.Param;
|
||||
|
||||
public class PortForwardingServiceRuleResponse implements ResponseObject {
|
||||
public class PortForwardingServiceRuleResponse extends BaseResponse {
|
||||
@Param(name="id")
|
||||
private long ruleId;
|
||||
|
||||
|
||||
@ -19,10 +19,9 @@ package com.cloud.api.response;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.Param;
|
||||
|
||||
public class PreallocatedLunResponse implements ResponseObject {
|
||||
public class PreallocatedLunResponse extends BaseResponse {
|
||||
@Param(name="id")
|
||||
private Long id;
|
||||
|
||||
|
||||
@ -17,10 +17,9 @@
|
||||
*/
|
||||
package com.cloud.api.response;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.Param;
|
||||
|
||||
public class ResourceLimitResponse implements ResponseObject {
|
||||
public class ResourceLimitResponse extends BaseResponse {
|
||||
@Param(name="account")
|
||||
private String accountName;
|
||||
|
||||
|
||||
@ -17,10 +17,9 @@
|
||||
*/
|
||||
package com.cloud.api.response;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.Param;
|
||||
|
||||
public class SecurityGroupResponse implements ResponseObject {
|
||||
public class SecurityGroupResponse extends BaseResponse {
|
||||
@Param(name="id")
|
||||
private Long id;
|
||||
|
||||
|
||||
@ -19,10 +19,9 @@ package com.cloud.api.response;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.Param;
|
||||
|
||||
public class ServiceOfferingResponse implements ResponseObject {
|
||||
public class ServiceOfferingResponse extends BaseResponse {
|
||||
@Param(name="id")
|
||||
private Long id;
|
||||
|
||||
|
||||
@ -17,10 +17,9 @@
|
||||
*/
|
||||
package com.cloud.api.response;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.Param;
|
||||
|
||||
public class SnapshotPolicyResponse implements ResponseObject {
|
||||
public class SnapshotPolicyResponse extends BaseResponse {
|
||||
@Param(name="id")
|
||||
private Long id;
|
||||
|
||||
|
||||
@ -19,10 +19,9 @@ package com.cloud.api.response;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.Param;
|
||||
|
||||
public class SnapshotResponse implements ResponseObject {
|
||||
public class SnapshotResponse extends BaseResponse {
|
||||
@Param(name="id")
|
||||
private Long id;
|
||||
|
||||
|
||||
@ -19,10 +19,9 @@ package com.cloud.api.response;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.Param;
|
||||
|
||||
public class SnapshotScheduleResponse implements ResponseObject {
|
||||
public class SnapshotScheduleResponse extends BaseResponse {
|
||||
@Param(name="id")
|
||||
private Long id;
|
||||
|
||||
|
||||
@ -19,10 +19,9 @@ package com.cloud.api.response;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.Param;
|
||||
|
||||
public class StoragePoolResponse implements ResponseObject {
|
||||
public class StoragePoolResponse extends BaseResponse {
|
||||
@Param(name="id")
|
||||
private Long id;
|
||||
|
||||
|
||||
@ -1,9 +1,8 @@
|
||||
package com.cloud.api.response;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.Param;
|
||||
|
||||
public class SuccessResponse implements ResponseObject{
|
||||
public class SuccessResponse extends BaseResponse {
|
||||
@Param(name="success")
|
||||
private Boolean success;
|
||||
|
||||
|
||||
@ -19,10 +19,9 @@ package com.cloud.api.response;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.Param;
|
||||
|
||||
public class SystemVmResponse implements ResponseObject {
|
||||
public class SystemVmResponse extends BaseResponse {
|
||||
@Param(name="id")
|
||||
private Long id;
|
||||
|
||||
|
||||
@ -19,10 +19,9 @@ package com.cloud.api.response;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.Param;
|
||||
|
||||
public class TemplatePermissionsResponse implements ResponseObject {
|
||||
public class TemplatePermissionsResponse extends BaseResponse {
|
||||
@Param(name="id")
|
||||
private Long id;
|
||||
|
||||
|
||||
@ -19,11 +19,10 @@ package com.cloud.api.response;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.Param;
|
||||
import com.cloud.storage.Storage.ImageFormat;
|
||||
|
||||
public class TemplateResponse implements ResponseObject {
|
||||
public class TemplateResponse extends BaseResponse {
|
||||
@Param(name="id")
|
||||
private long id;
|
||||
|
||||
|
||||
@ -19,280 +19,277 @@ package com.cloud.api.response;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.Param;
|
||||
|
||||
public class UpgradeVmResponse implements ResponseObject
|
||||
{
|
||||
@Param(name="id")
|
||||
private long id;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public class UpgradeVmResponse extends BaseResponse {
|
||||
@Param(name = "id")
|
||||
private long id;
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Date getCreated() {
|
||||
return created;
|
||||
}
|
||||
|
||||
public void setCreated(Date created) {
|
||||
this.created = created;
|
||||
}
|
||||
|
||||
public String getIpAddress() {
|
||||
return ipAddress;
|
||||
}
|
||||
|
||||
public void setIpAddress(String ipAddress) {
|
||||
this.ipAddress = ipAddress;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public String getAccount() {
|
||||
return account;
|
||||
}
|
||||
|
||||
public void setAccount(String account) {
|
||||
this.account = account;
|
||||
}
|
||||
|
||||
public long getDomainId() {
|
||||
return domainId;
|
||||
}
|
||||
|
||||
public void setDomainId(long domainId) {
|
||||
this.domainId = domainId;
|
||||
}
|
||||
|
||||
public String getDomain() {
|
||||
return domain;
|
||||
}
|
||||
|
||||
public void setDomain(String domain) {
|
||||
this.domain = domain;
|
||||
}
|
||||
|
||||
public boolean isHaEnable() {
|
||||
return haEnable;
|
||||
}
|
||||
|
||||
public void setHaEnable(boolean haEnable) {
|
||||
this.haEnable = haEnable;
|
||||
}
|
||||
|
||||
public long getZoneId() {
|
||||
return zoneId;
|
||||
}
|
||||
|
||||
public void setZoneId(long zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
return displayName;
|
||||
}
|
||||
|
||||
public void setDisplayName(String displayName) {
|
||||
this.displayName = displayName;
|
||||
}
|
||||
|
||||
public String getZoneName() {
|
||||
return zoneName;
|
||||
}
|
||||
|
||||
public void setZoneName(String zoneName) {
|
||||
this.zoneName = zoneName;
|
||||
}
|
||||
|
||||
public long getHostId() {
|
||||
return hostId;
|
||||
}
|
||||
|
||||
public void setHostId(long hostId) {
|
||||
this.hostId = hostId;
|
||||
}
|
||||
|
||||
public String getHostName() {
|
||||
return hostName;
|
||||
}
|
||||
|
||||
public void setHostName(String hostName) {
|
||||
this.hostName = hostName;
|
||||
}
|
||||
|
||||
public long getTemplateId() {
|
||||
return templateId;
|
||||
}
|
||||
|
||||
public void setTemplateId(long templateId) {
|
||||
this.templateId = templateId;
|
||||
}
|
||||
|
||||
public String getTemplateName() {
|
||||
return templateName;
|
||||
}
|
||||
|
||||
public void setTemplateName(String templateName) {
|
||||
this.templateName = templateName;
|
||||
}
|
||||
|
||||
public String getTemplateDisplayText() {
|
||||
return templateDisplayText;
|
||||
}
|
||||
|
||||
public void setTemplateDisplayText(String templateDisplayText) {
|
||||
this.templateDisplayText = templateDisplayText;
|
||||
}
|
||||
|
||||
public boolean isPasswordEnabled() {
|
||||
return passwordEnabled;
|
||||
}
|
||||
|
||||
public void setPasswordEnabled(boolean passwordEnabled) {
|
||||
this.passwordEnabled = passwordEnabled;
|
||||
}
|
||||
|
||||
public long getServiceOfferingId() {
|
||||
return serviceOfferingId;
|
||||
}
|
||||
|
||||
public void setServiceOfferingId(long serviceOfferingId) {
|
||||
this.serviceOfferingId = serviceOfferingId;
|
||||
}
|
||||
|
||||
public String getServiceOfferingName() {
|
||||
return serviceOfferingName;
|
||||
}
|
||||
|
||||
public void setServiceOfferingName(String serviceOfferingName) {
|
||||
this.serviceOfferingName = serviceOfferingName;
|
||||
}
|
||||
|
||||
public long getCpuSpeed() {
|
||||
return cpuSpeed;
|
||||
}
|
||||
|
||||
public void setCpuSpeed(long cpuSpeed) {
|
||||
this.cpuSpeed = cpuSpeed;
|
||||
}
|
||||
|
||||
public long getMemory() {
|
||||
return memory;
|
||||
}
|
||||
|
||||
public void setMemory(long memory) {
|
||||
this.memory = memory;
|
||||
}
|
||||
|
||||
public long getCpuUsed() {
|
||||
return cpuUsed;
|
||||
}
|
||||
|
||||
public void setCpuUsed(long cpuUsed) {
|
||||
this.cpuUsed = cpuUsed;
|
||||
}
|
||||
|
||||
public long getNetworkKbsRead() {
|
||||
return networkKbsRead;
|
||||
}
|
||||
|
||||
public void setNetworkKbsRead(long networkKbsRead) {
|
||||
this.networkKbsRead = networkKbsRead;
|
||||
}
|
||||
|
||||
public long getNetworkKbsWrite() {
|
||||
return networkKbsWrite;
|
||||
}
|
||||
|
||||
public void setNetworkKbsWrite(long networkKbsWrite) {
|
||||
this.networkKbsWrite = networkKbsWrite;
|
||||
}
|
||||
|
||||
public long isId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
@Param(name="name")
|
||||
private String name;
|
||||
|
||||
@Param(name="created")
|
||||
private Date created;
|
||||
|
||||
@Param(name="ipaddress")
|
||||
private String ipAddress;
|
||||
|
||||
@Param(name="state")
|
||||
private String state;
|
||||
|
||||
@Param(name="account")
|
||||
private String account;
|
||||
|
||||
@Param(name="domainid")
|
||||
private long domainId;
|
||||
|
||||
@Param(name="domain")
|
||||
private String domain;
|
||||
|
||||
@Param(name="haenable")
|
||||
private boolean haEnable;
|
||||
|
||||
@Param(name="zoneid")
|
||||
private long zoneId;
|
||||
|
||||
@Param(name="displayname")
|
||||
private String displayName;
|
||||
|
||||
@Param(name="zonename")
|
||||
private String zoneName;
|
||||
|
||||
@Param(name="hostid")
|
||||
private long hostId;
|
||||
|
||||
@Param(name="hostname")
|
||||
private String hostName;
|
||||
|
||||
@Param(name="templateid")
|
||||
private long templateId;
|
||||
|
||||
@Param(name="templatename")
|
||||
private String templateName;
|
||||
|
||||
@Param(name="templatedisplaytext")
|
||||
private String templateDisplayText;
|
||||
|
||||
@Param(name="passwordenabled")
|
||||
private boolean passwordEnabled;
|
||||
|
||||
@Param(name="serviceofferingid")
|
||||
private long serviceOfferingId;
|
||||
|
||||
@Param(name="serviceofferingname")
|
||||
private String serviceOfferingName;
|
||||
|
||||
@Param(name="cpunumber")
|
||||
private long cpuSpeed;
|
||||
|
||||
@Param(name="memory")
|
||||
private long memory;
|
||||
|
||||
@Param(name="cpuused")
|
||||
private long cpuUsed;
|
||||
|
||||
@Param(name="networkkbsread")
|
||||
private long networkKbsRead;
|
||||
|
||||
@Param(name="networkkbswrite")
|
||||
private long networkKbsWrite;
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Date getCreated() {
|
||||
return created;
|
||||
}
|
||||
|
||||
public void setCreated(Date created) {
|
||||
this.created = created;
|
||||
}
|
||||
|
||||
public String getIpAddress() {
|
||||
return ipAddress;
|
||||
}
|
||||
|
||||
public void setIpAddress(String ipAddress) {
|
||||
this.ipAddress = ipAddress;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public String getAccount() {
|
||||
return account;
|
||||
}
|
||||
|
||||
public void setAccount(String account) {
|
||||
this.account = account;
|
||||
}
|
||||
|
||||
public long getDomainId() {
|
||||
return domainId;
|
||||
}
|
||||
|
||||
public void setDomainId(long domainId) {
|
||||
this.domainId = domainId;
|
||||
}
|
||||
|
||||
public String getDomain() {
|
||||
return domain;
|
||||
}
|
||||
|
||||
public void setDomain(String domain) {
|
||||
this.domain = domain;
|
||||
}
|
||||
|
||||
public boolean isHaEnable() {
|
||||
return haEnable;
|
||||
}
|
||||
|
||||
public void setHaEnable(boolean haEnable) {
|
||||
this.haEnable = haEnable;
|
||||
}
|
||||
|
||||
public long getZoneId() {
|
||||
return zoneId;
|
||||
}
|
||||
|
||||
public void setZoneId(long zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
return displayName;
|
||||
}
|
||||
|
||||
public void setDisplayName(String displayName) {
|
||||
this.displayName = displayName;
|
||||
}
|
||||
|
||||
public String getZoneName() {
|
||||
return zoneName;
|
||||
}
|
||||
|
||||
public void setZoneName(String zoneName) {
|
||||
this.zoneName = zoneName;
|
||||
}
|
||||
|
||||
public long getHostId() {
|
||||
return hostId;
|
||||
}
|
||||
|
||||
public void setHostId(long hostId) {
|
||||
this.hostId = hostId;
|
||||
}
|
||||
|
||||
public String getHostName() {
|
||||
return hostName;
|
||||
}
|
||||
|
||||
public void setHostName(String hostName) {
|
||||
this.hostName = hostName;
|
||||
}
|
||||
|
||||
public long getTemplateId() {
|
||||
return templateId;
|
||||
}
|
||||
|
||||
public void setTemplateId(long templateId) {
|
||||
this.templateId = templateId;
|
||||
}
|
||||
|
||||
public String getTemplateName() {
|
||||
return templateName;
|
||||
}
|
||||
|
||||
public void setTemplateName(String templateName) {
|
||||
this.templateName = templateName;
|
||||
}
|
||||
|
||||
public String getTemplateDisplayText() {
|
||||
return templateDisplayText;
|
||||
}
|
||||
|
||||
public void setTemplateDisplayText(String templateDisplayText) {
|
||||
this.templateDisplayText = templateDisplayText;
|
||||
}
|
||||
|
||||
public boolean isPasswordEnabled() {
|
||||
return passwordEnabled;
|
||||
}
|
||||
|
||||
public void setPasswordEnabled(boolean passwordEnabled) {
|
||||
this.passwordEnabled = passwordEnabled;
|
||||
}
|
||||
|
||||
public long getServiceOfferingId() {
|
||||
return serviceOfferingId;
|
||||
}
|
||||
|
||||
public void setServiceOfferingId(long serviceOfferingId) {
|
||||
this.serviceOfferingId = serviceOfferingId;
|
||||
}
|
||||
|
||||
public String getServiceOfferingName() {
|
||||
return serviceOfferingName;
|
||||
}
|
||||
|
||||
public void setServiceOfferingName(String serviceOfferingName) {
|
||||
this.serviceOfferingName = serviceOfferingName;
|
||||
}
|
||||
|
||||
public long getCpuSpeed() {
|
||||
return cpuSpeed;
|
||||
}
|
||||
|
||||
public void setCpuSpeed(long cpuSpeed) {
|
||||
this.cpuSpeed = cpuSpeed;
|
||||
}
|
||||
|
||||
public long getMemory() {
|
||||
return memory;
|
||||
}
|
||||
|
||||
public void setMemory(long memory) {
|
||||
this.memory = memory;
|
||||
}
|
||||
|
||||
public long getCpuUsed() {
|
||||
return cpuUsed;
|
||||
}
|
||||
|
||||
public void setCpuUsed(long cpuUsed) {
|
||||
this.cpuUsed = cpuUsed;
|
||||
}
|
||||
|
||||
public long getNetworkKbsRead() {
|
||||
return networkKbsRead;
|
||||
}
|
||||
|
||||
public void setNetworkKbsRead(long networkKbsRead) {
|
||||
this.networkKbsRead = networkKbsRead;
|
||||
}
|
||||
|
||||
public long getNetworkKbsWrite() {
|
||||
return networkKbsWrite;
|
||||
}
|
||||
|
||||
public void setNetworkKbsWrite(long networkKbsWrite) {
|
||||
this.networkKbsWrite = networkKbsWrite;
|
||||
}
|
||||
|
||||
public long isId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Param(name = "name")
|
||||
private String name;
|
||||
|
||||
@Param(name = "created")
|
||||
private Date created;
|
||||
|
||||
@Param(name = "ipaddress")
|
||||
private String ipAddress;
|
||||
|
||||
@Param(name = "state")
|
||||
private String state;
|
||||
|
||||
@Param(name = "account")
|
||||
private String account;
|
||||
|
||||
@Param(name = "domainid")
|
||||
private long domainId;
|
||||
|
||||
@Param(name = "domain")
|
||||
private String domain;
|
||||
|
||||
@Param(name = "haenable")
|
||||
private boolean haEnable;
|
||||
|
||||
@Param(name = "zoneid")
|
||||
private long zoneId;
|
||||
|
||||
@Param(name = "displayname")
|
||||
private String displayName;
|
||||
|
||||
@Param(name = "zonename")
|
||||
private String zoneName;
|
||||
|
||||
@Param(name = "hostid")
|
||||
private long hostId;
|
||||
|
||||
@Param(name = "hostname")
|
||||
private String hostName;
|
||||
|
||||
@Param(name = "templateid")
|
||||
private long templateId;
|
||||
|
||||
@Param(name = "templatename")
|
||||
private String templateName;
|
||||
|
||||
@Param(name = "templatedisplaytext")
|
||||
private String templateDisplayText;
|
||||
|
||||
@Param(name = "passwordenabled")
|
||||
private boolean passwordEnabled;
|
||||
|
||||
@Param(name = "serviceofferingid")
|
||||
private long serviceOfferingId;
|
||||
|
||||
@Param(name = "serviceofferingname")
|
||||
private String serviceOfferingName;
|
||||
|
||||
@Param(name = "cpunumber")
|
||||
private long cpuSpeed;
|
||||
|
||||
@Param(name = "memory")
|
||||
private long memory;
|
||||
|
||||
@Param(name = "cpuused")
|
||||
private long cpuUsed;
|
||||
|
||||
@Param(name = "networkkbsread")
|
||||
private long networkKbsRead;
|
||||
|
||||
@Param(name = "networkkbswrite")
|
||||
private long networkKbsWrite;
|
||||
}
|
||||
|
||||
@ -19,10 +19,9 @@ package com.cloud.api.response;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.Param;
|
||||
|
||||
public class UserResponse implements ResponseObject {
|
||||
public class UserResponse extends BaseResponse {
|
||||
@Param(name="id")
|
||||
private Long id;
|
||||
|
||||
|
||||
@ -19,10 +19,9 @@ package com.cloud.api.response;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.Param;
|
||||
|
||||
public class UserVmResponse implements ResponseObject {
|
||||
public class UserVmResponse extends BaseResponse {
|
||||
@Param(name="id")
|
||||
private Long id;
|
||||
|
||||
|
||||
@ -17,10 +17,9 @@
|
||||
*/
|
||||
package com.cloud.api.response;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.Param;
|
||||
|
||||
public class VlanIpRangeResponse implements ResponseObject {
|
||||
public class VlanIpRangeResponse extends BaseResponse {
|
||||
@Param(name="id")
|
||||
private Long id;
|
||||
|
||||
|
||||
@ -19,10 +19,9 @@ package com.cloud.api.response;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.Param;
|
||||
|
||||
public class VolumeResponse implements ResponseObject {
|
||||
public class VolumeResponse extends BaseResponse {
|
||||
@Param(name="id")
|
||||
private Long id;
|
||||
|
||||
|
||||
@ -17,10 +17,9 @@
|
||||
*/
|
||||
package com.cloud.api.response;
|
||||
|
||||
import com.cloud.api.ResponseObject;
|
||||
import com.cloud.serializer.Param;
|
||||
|
||||
public class ZoneResponse implements ResponseObject {
|
||||
public class ZoneResponse extends BaseResponse {
|
||||
@Param(name="id")
|
||||
private Long id;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user