From 4600968d604009be55b6a689e25d0701b90c10e2 Mon Sep 17 00:00:00 2001 From: Dulitha Wijewantha Date: Thu, 19 Mar 2015 11:17:18 +0530 Subject: [PATCH] * Re-added the method to convert a Device Property list to a Map --- .../carbon/device/mgt/core/util/DeviceManagerUtil.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/util/DeviceManagerUtil.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/util/DeviceManagerUtil.java index 110e46dacf4..eb4b1daa404 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/util/DeviceManagerUtil.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/util/DeviceManagerUtil.java @@ -132,5 +132,11 @@ public final class DeviceManagerUtil { deviceType + "'", e); } } - + public static Map convertDevicePropertiesToMap(List properties) { + Map propertiesMap = new HashMap(); + for (Device.Property prop : properties) { + propertiesMap.put(prop.getName(), prop.getValue()); + } + return propertiesMap; + } }