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