From 394d841d4bfe4727cb28556feeae99af27f49331 Mon Sep 17 00:00:00 2001 From: Dulitha Wijewantha Date: Fri, 23 Jan 2015 11:22:34 +0530 Subject: [PATCH] Changed the Map implementations to List since Map implementations are not very well supported by CFX --- .../wso2/carbon/device/mgt/common/Device.java | 277 +++++++++--------- 1 file changed, 142 insertions(+), 135 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/Device.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/Device.java index 4e083cedaa7..c71f24b1c98 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/Device.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/Device.java @@ -18,140 +18,147 @@ package org.wso2.carbon.device.mgt.common; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import java.util.List; -import java.util.Map; - -@XmlRootElement -public class Device { - - private int id; - private String type; - private String description; - private String name; - private Long dateOfEnrolment; - private Long dateOfLastUpdate; - private String ownership; - private boolean status; - private int deviceTypeId; - private String deviceIdentifier; - private String owner; - private List features; - private Map properties; - - @XmlElement - public int getId() { - return id; - } - - public void setId(int id) { - this.id = id; - } - - @XmlElement - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - @XmlElement - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @XmlElement - public Long getDateOfEnrolment() { - return dateOfEnrolment; - } - - public void setDateOfEnrolment(Long dateOfEnrolment) { - this.dateOfEnrolment = dateOfEnrolment; - } - - @XmlElement - public Long getDateOfLastUpdate() { - return dateOfLastUpdate; - } - - public void setDateOfLastUpdate(Long dateOfLastUpdate) { - this.dateOfLastUpdate = dateOfLastUpdate; - } - - @XmlElement - public String getOwnership() { - return ownership; - } - - public void setOwnership(String ownership) { - this.ownership = ownership; - } - - @XmlElement - public boolean isStatus() { - return status; - } - - public void setStatus(boolean status) { - this.status = status; - } - - @XmlElement - public int getDeviceTypeId() { - return deviceTypeId; - } - - public void setDeviceTypeId(int deviceTypeId) { - this.deviceTypeId = deviceTypeId; - } - - @XmlElement - public String getDeviceIdentifier() { - return deviceIdentifier; - } - - public void setDeviceIdentifier(String deviceIdentifier) { - this.deviceIdentifier = deviceIdentifier; - } - - @XmlElement - public String getOwner() { - return owner; - } - - public void setOwner(String owner) { - this.owner = owner; - } - - @XmlElement - public List getFeatures() { - return features; - } - - public void setFeatures(List features) { - this.features = features; - } - - @XmlElement - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - @XmlElement - public Map getProperties() { - return properties; - } - - public void setProperties(Map properties) { - this.properties = properties; - } + +@XmlRootElement public class Device { + + private int id; + private String type; + private String description; + private String name; + private Long dateOfEnrolment; + private Long dateOfLastUpdate; + private String ownership; + private boolean status; + private int deviceTypeId; + private String deviceIdentifier; + private String owner; + private List features; + private List properties; + + @XmlElement public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + @XmlElement public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + @XmlElement public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @XmlElement public Long getDateOfEnrolment() { + return dateOfEnrolment; + } + + public void setDateOfEnrolment(Long dateOfEnrolment) { + this.dateOfEnrolment = dateOfEnrolment; + } + + @XmlElement public Long getDateOfLastUpdate() { + return dateOfLastUpdate; + } + + public void setDateOfLastUpdate(Long dateOfLastUpdate) { + this.dateOfLastUpdate = dateOfLastUpdate; + } + + @XmlElement public String getOwnership() { + return ownership; + } + + public void setOwnership(String ownership) { + this.ownership = ownership; + } + + @XmlElement public boolean isStatus() { + return status; + } + + public void setStatus(boolean status) { + this.status = status; + } + + @XmlElement public int getDeviceTypeId() { + return deviceTypeId; + } + + public void setDeviceTypeId(int deviceTypeId) { + this.deviceTypeId = deviceTypeId; + } + + @XmlElement public String getDeviceIdentifier() { + return deviceIdentifier; + } + + public void setDeviceIdentifier(String deviceIdentifier) { + this.deviceIdentifier = deviceIdentifier; + } + + @XmlElement public String getOwner() { + return owner; + } + + public void setOwner(String owner) { + this.owner = owner; + } + + @XmlElement public List getFeatures() { + return features; + } + + public void setFeatures(List features) { + this.features = features; + } + + @XmlElement public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + @XmlElement public List getProperties() { + return properties; + } + + public void setProperties(List properties) { + this.properties = properties; + } + + public static class Property { + + private String name; + private String value; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + } }