From b56e42792a2bec56d0f64d763fab8ee7a7964aff Mon Sep 17 00:00:00 2001 From: manoj Date: Tue, 27 Jan 2015 20:18:15 +0530 Subject: [PATCH] set active status for enroll device --- .../java/org/wso2/carbon/device/mgt/core/DeviceManagerImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagerImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagerImpl.java index 8f8f24328b..c65a5478d5 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagerImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagerImpl.java @@ -31,6 +31,7 @@ import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOFactory; import org.wso2.carbon.device.mgt.core.dao.DeviceTypeDAO; import org.wso2.carbon.device.mgt.core.dao.util.DeviceManagementDAOUtil; import org.wso2.carbon.device.mgt.core.dto.DeviceType; +import org.wso2.carbon.device.mgt.core.dto.Status; import java.util.ArrayList; import java.util.List; @@ -57,6 +58,7 @@ public class DeviceManagerImpl implements DeviceManager { try { org.wso2.carbon.device.mgt.core.dto.Device deviceDto = DeviceManagementDAOUtil.convertDevice(device); Integer deviceTypeId = this.getDeviceTypeDAO().getDeviceTypeIdByDeviceTypeName(device.getType()); + deviceDto.setStatus(Status.ACTIVE); deviceDto.setDeviceTypeId(deviceTypeId); this.getDeviceDAO().addDevice(deviceDto);