Changed the Map implementations to List since Map implementations are not very well supported by CFX

revert-70aa11f8
Dulitha Wijewantha 10 years ago
parent 0ffa15f463
commit 394d841d4b

@ -18,10 +18,8 @@ package org.wso2.carbon.device.mgt.common;
import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlRootElement;
import java.util.List; import java.util.List;
import java.util.Map;
@XmlRootElement @XmlRootElement public class Device {
public class Device {
private int id; private int id;
private String type; private String type;
@ -35,10 +33,9 @@ public class Device {
private String deviceIdentifier; private String deviceIdentifier;
private String owner; private String owner;
private List<Feature> features; private List<Feature> features;
private Map<String, String> properties; private List<Device.Property> properties;
@XmlElement @XmlElement public int getId() {
public int getId() {
return id; return id;
} }
@ -46,8 +43,7 @@ public class Device {
this.id = id; this.id = id;
} }
@XmlElement @XmlElement public String getDescription() {
public String getDescription() {
return description; return description;
} }
@ -55,8 +51,7 @@ public class Device {
this.description = description; this.description = description;
} }
@XmlElement @XmlElement public String getName() {
public String getName() {
return name; return name;
} }
@ -64,8 +59,7 @@ public class Device {
this.name = name; this.name = name;
} }
@XmlElement @XmlElement public Long getDateOfEnrolment() {
public Long getDateOfEnrolment() {
return dateOfEnrolment; return dateOfEnrolment;
} }
@ -73,8 +67,7 @@ public class Device {
this.dateOfEnrolment = dateOfEnrolment; this.dateOfEnrolment = dateOfEnrolment;
} }
@XmlElement @XmlElement public Long getDateOfLastUpdate() {
public Long getDateOfLastUpdate() {
return dateOfLastUpdate; return dateOfLastUpdate;
} }
@ -82,8 +75,7 @@ public class Device {
this.dateOfLastUpdate = dateOfLastUpdate; this.dateOfLastUpdate = dateOfLastUpdate;
} }
@XmlElement @XmlElement public String getOwnership() {
public String getOwnership() {
return ownership; return ownership;
} }
@ -91,8 +83,7 @@ public class Device {
this.ownership = ownership; this.ownership = ownership;
} }
@XmlElement @XmlElement public boolean isStatus() {
public boolean isStatus() {
return status; return status;
} }
@ -100,8 +91,7 @@ public class Device {
this.status = status; this.status = status;
} }
@XmlElement @XmlElement public int getDeviceTypeId() {
public int getDeviceTypeId() {
return deviceTypeId; return deviceTypeId;
} }
@ -109,8 +99,7 @@ public class Device {
this.deviceTypeId = deviceTypeId; this.deviceTypeId = deviceTypeId;
} }
@XmlElement @XmlElement public String getDeviceIdentifier() {
public String getDeviceIdentifier() {
return deviceIdentifier; return deviceIdentifier;
} }
@ -118,8 +107,7 @@ public class Device {
this.deviceIdentifier = deviceIdentifier; this.deviceIdentifier = deviceIdentifier;
} }
@XmlElement @XmlElement public String getOwner() {
public String getOwner() {
return owner; return owner;
} }
@ -127,8 +115,7 @@ public class Device {
this.owner = owner; this.owner = owner;
} }
@XmlElement @XmlElement public List<Feature> getFeatures() {
public List<Feature> getFeatures() {
return features; return features;
} }
@ -136,8 +123,7 @@ public class Device {
this.features = features; this.features = features;
} }
@XmlElement @XmlElement public String getType() {
public String getType() {
return type; return type;
} }
@ -145,13 +131,34 @@ public class Device {
this.type = type; this.type = type;
} }
@XmlElement @XmlElement public List<Device.Property> getProperties() {
public Map<String, String> getProperties() {
return properties; return properties;
} }
public void setProperties(Map<String, String> properties) { public void setProperties(List<Device.Property> properties) {
this.properties = 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;
}
}
} }

Loading…
Cancel
Save