mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Merge pull request #7 from manojgunayadev/master
set active status for enroll device
This commit is contained in:
commit
a4ffdf1aa5
@ -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);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user