mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
fixed code issues
This commit is contained in:
parent
4205ad18dd
commit
f32bdf4021
@ -298,9 +298,8 @@ public class WindowsDeviceManager implements DeviceManager {
|
|||||||
}
|
}
|
||||||
} catch (MobileDeviceManagementDAOException e) {
|
} catch (MobileDeviceManagementDAOException e) {
|
||||||
WindowsDAOFactory.rollbackTransaction();
|
WindowsDAOFactory.rollbackTransaction();
|
||||||
String msg =
|
throw new DeviceManagementException("Error while enrolling the windows device : "
|
||||||
"Error while enrolling the windows device : " + device.getDeviceIdentifier();
|
+ device.getDeviceIdentifier(), e);
|
||||||
throw new DeviceManagementException(msg, e);
|
|
||||||
}
|
}
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,24 +22,13 @@ import org.wso2.carbon.device.mgt.mobile.dto.MobileDevice;
|
|||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Contains utility methods which are used by Windows plugin.
|
* Contains utility methods which are used by Windows plugin.
|
||||||
*/
|
*/
|
||||||
public class WindowsUtils {
|
public class WindowsUtils {
|
||||||
|
|
||||||
public static String getDeviceProperty(Map<String, String> deviceProperties, String property) {
|
|
||||||
|
|
||||||
String deviceProperty = deviceProperties.get(property);
|
|
||||||
if (deviceProperty == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return deviceProperty;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static MobileDevice loadMobileDevices(ResultSet rs) throws SQLException {
|
public static MobileDevice loadMobileDevices(ResultSet rs) throws SQLException {
|
||||||
|
|
||||||
MobileDevice mobileDevice = new MobileDevice();
|
MobileDevice mobileDevice = new MobileDevice();
|
||||||
mobileDevice.setMobileDeviceId(rs.getString(WindowsPluginConstants.DEVICE_ID));
|
mobileDevice.setMobileDeviceId(rs.getString(WindowsPluginConstants.DEVICE_ID));
|
||||||
mobileDevice.setImei(rs.getString(WindowsPluginConstants.IMEI));
|
mobileDevice.setImei(rs.getString(WindowsPluginConstants.IMEI));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user