mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
Implementing isEnrolled method
This commit is contained in:
parent
7358a5145b
commit
bbd6ff8343
@ -69,7 +69,24 @@ public class IOSDeviceManagerService implements DeviceManagerService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEnrolled(DeviceIdentifier deviceId) throws DeviceManagementException {
|
public boolean isEnrolled(DeviceIdentifier deviceId) throws DeviceManagementException {
|
||||||
return true;
|
boolean isEnrolled = false;
|
||||||
|
try {
|
||||||
|
if (log.isDebugEnabled()) {
|
||||||
|
log.debug("Checking the enrollment of iOS device : " + deviceId.getId());
|
||||||
|
}
|
||||||
|
MobileDevice mobileDevice =
|
||||||
|
MobileDeviceManagementDAOFactory.getMobileDeviceDAO().getMobileDevice(
|
||||||
|
deviceId.getId());
|
||||||
|
if (mobileDevice != null) {
|
||||||
|
isEnrolled = true;
|
||||||
|
}
|
||||||
|
} catch (MobileDeviceManagementDAOException e) {
|
||||||
|
String msg = "Error while checking the enrollment status of iOS device : " +
|
||||||
|
deviceId.getId();
|
||||||
|
log.error(msg, e);
|
||||||
|
throw new DeviceManagementException(msg, e);
|
||||||
|
}
|
||||||
|
return isEnrolled;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user