From fce61a59e2b2320649c057385aa202f9761aec71 Mon Sep 17 00:00:00 2001 From: prabathabey Date: Mon, 8 Dec 2014 19:53:01 +0530 Subject: [PATCH] Fixing DeviceManagementRepository initialization related issues --- .../device/mgt/core/DeviceManagementRepository.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagementRepository.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagementRepository.java index 5f8cc9112..7be454928 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagementRepository.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagementRepository.java @@ -17,12 +17,17 @@ package org.wso2.carbon.device.mgt.core; import org.wso2.carbon.device.mgt.common.spi.DeviceManagerService; +import java.util.HashMap; import java.util.Map; public class DeviceManagementRepository { private Map providers; + public DeviceManagementRepository() { + providers = new HashMap(); + } + public void addDeviceManagementProvider(DeviceManagerService provider) { providers.put(provider.getProviderType(), provider); } @@ -31,4 +36,8 @@ public class DeviceManagementRepository { return providers.get(type); } + public Map getProviders() { + return providers; + } + }