|
|
@ -315,22 +315,6 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
|
|
|
|
return enrolmentInfos;
|
|
|
|
return enrolmentInfos;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public List<Integer> getDeviceEnrolledTenants() throws DeviceManagementException {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
DeviceManagementDAOFactory.openConnection();
|
|
|
|
|
|
|
|
return deviceDAO.getDeviceEnrolledTenants();
|
|
|
|
|
|
|
|
} catch (DeviceManagementDAOException e) {
|
|
|
|
|
|
|
|
throw new DeviceManagementException("Error occurred while retrieving the tenants " +
|
|
|
|
|
|
|
|
"which have device enrolled.", e);
|
|
|
|
|
|
|
|
} catch (SQLException e) {
|
|
|
|
|
|
|
|
throw new DeviceManagementException("Error occurred while opening a connection to the data source", e);
|
|
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
|
|
DeviceManagementDAOFactory.closeConnection();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public boolean disenrollDevice(DeviceIdentifier deviceId) throws DeviceManagementException {
|
|
|
|
public boolean disenrollDevice(DeviceIdentifier deviceId) throws DeviceManagementException {
|
|
|
|
DeviceManager deviceManager = this.getDeviceManager(deviceId.getType());
|
|
|
|
DeviceManager deviceManager = this.getDeviceManager(deviceId.getType());
|
|
|
@ -1295,6 +1279,21 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
|
|
|
|
return dms.getPolicyMonitoringManager();
|
|
|
|
return dms.getPolicyMonitoringManager();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public List<Integer> getDeviceEnrolledTenants() throws DeviceManagementException {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
DeviceManagementDAOFactory.openConnection();
|
|
|
|
|
|
|
|
return deviceDAO.getDeviceEnrolledTenants();
|
|
|
|
|
|
|
|
} catch (DeviceManagementDAOException e) {
|
|
|
|
|
|
|
|
throw new DeviceManagementException("Error occurred while retrieving the tenants " +
|
|
|
|
|
|
|
|
"which have device enrolled.", e);
|
|
|
|
|
|
|
|
} catch (SQLException e) {
|
|
|
|
|
|
|
|
throw new DeviceManagementException("Error occurred while opening a connection to the data source", e);
|
|
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
|
|
DeviceManagementDAOFactory.closeConnection();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<Device> getDevicesOfUser(String username) throws DeviceManagementException {
|
|
|
|
public List<Device> getDevicesOfUser(String username) throws DeviceManagementException {
|
|
|
|
List<Device> devices = new ArrayList<>();
|
|
|
|
List<Device> devices = new ArrayList<>();
|
|
|
|