mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
Removed deleting device data from disenrolment function.
This commit is contained in:
parent
4624794979
commit
889598c3b3
@ -200,26 +200,8 @@ public class AndroidDeviceManager implements DeviceManager {
|
||||
|
||||
@Override
|
||||
public boolean disenrollDevice(DeviceIdentifier deviceId) throws DeviceManagementException {
|
||||
boolean status;
|
||||
try {
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Dis-enrolling Android device : " + deviceId);
|
||||
}
|
||||
AndroidDAOFactory.beginTransaction();
|
||||
status = daoFactory.getMobileDeviceDAO().deleteMobileDevice(deviceId.getId());
|
||||
AndroidDAOFactory.commitTransaction();
|
||||
} catch (MobileDeviceManagementDAOException e) {
|
||||
try {
|
||||
AndroidDAOFactory.rollbackTransaction();
|
||||
} catch (MobileDeviceManagementDAOException mobileDAOEx) {
|
||||
String msg = "Error occurred while roll back the device dis enrol transaction :" +
|
||||
deviceId.toString();
|
||||
log.warn(msg, mobileDAOEx);
|
||||
}
|
||||
String msg = "Error while removing the Android device : " + deviceId.getId();
|
||||
throw new DeviceManagementException(msg, e);
|
||||
}
|
||||
return status;
|
||||
//Here we don't have anything specific to do. Hence returning.
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -164,21 +164,8 @@ public class WindowsDeviceManager implements DeviceManager {
|
||||
|
||||
@Override
|
||||
public boolean disenrollDevice(DeviceIdentifier deviceId) throws DeviceManagementException {
|
||||
boolean status;
|
||||
try {
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Dis-enrolling windows device : " + deviceId);
|
||||
}
|
||||
WindowsDAOFactory.beginTransaction();
|
||||
status = daoFactory.getMobileDeviceDAO().deleteMobileDevice(deviceId.getId());
|
||||
WindowsDAOFactory.commitTransaction();
|
||||
} catch (MobileDeviceManagementDAOException e) {
|
||||
WindowsDAOFactory.rollbackTransaction();
|
||||
throw new DeviceManagementException("Error while removing the Windows device : " + deviceId.getId(), e);
|
||||
} finally {
|
||||
WindowsDAOFactory.closeConnection();
|
||||
}
|
||||
return status;
|
||||
//Here we don't have anything specific to do. Hence returning.
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Loading…
Reference in New Issue
Block a user