mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Move code for test to happen accordingly
This commit is contained in:
parent
908161d23e
commit
28f58ece9f
@ -262,6 +262,14 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
|
||||
log.error(msg);
|
||||
throw new DeviceManagementException(msg);
|
||||
}
|
||||
DeviceManager deviceManager = this.getDeviceManager(device.getType());
|
||||
if (deviceManager == null) {
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Device Manager associated with the device type '" + device.getType() + "' is null. " +
|
||||
"Therefore, not attempting method 'enrollDevice'");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
EnrollmentConfiguration enrollmentConfiguration = DeviceManagerUtil.getEnrollmentConfigurationEntry(
|
||||
this.getConfiguration(device.getType()));
|
||||
String deviceSerialNumber = null;
|
||||
@ -281,14 +289,6 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
|
||||
boolean status = false;
|
||||
DeviceIdentifier deviceIdentifier = new DeviceIdentifier(device.getDeviceIdentifier(), device.getType());
|
||||
|
||||
DeviceManager deviceManager = this.getDeviceManager(device.getType());
|
||||
if (deviceManager == null) {
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Device Manager associated with the device type '" + device.getType() + "' is null. " +
|
||||
"Therefore, not attempting method 'enrollDevice'");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
deviceManager.enrollDevice(device);
|
||||
if (deviceManager.isClaimable(deviceIdentifier)) {
|
||||
device.getEnrolmentInfo().setStatus(EnrolmentInfo.Status.INACTIVE);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user