|
|
@ -39,6 +39,7 @@ public class DeviceDetailsRetrieverTask implements Task {
|
|
|
|
private String deviceType;
|
|
|
|
private String deviceType;
|
|
|
|
private boolean executeForTenants = false;
|
|
|
|
private boolean executeForTenants = false;
|
|
|
|
private final String IS_CLOUD = "is.cloud";
|
|
|
|
private final String IS_CLOUD = "is.cloud";
|
|
|
|
|
|
|
|
private DeviceManagementProviderService deviceManagementProviderService;
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void setProperties(Map<String, String> map) {
|
|
|
|
public void setProperties(Map<String, String> map) {
|
|
|
@ -51,7 +52,7 @@ public class DeviceDetailsRetrieverTask implements Task {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void execute() {
|
|
|
|
public void execute() {
|
|
|
|
DeviceManagementProviderService deviceManagementProviderService = DeviceManagementDataHolder.getInstance()
|
|
|
|
deviceManagementProviderService = DeviceManagementDataHolder.getInstance()
|
|
|
|
.getDeviceManagementProvider();
|
|
|
|
.getDeviceManagementProvider();
|
|
|
|
OperationMonitoringTaskConfig operationMonitoringTaskConfig = deviceManagementProviderService
|
|
|
|
OperationMonitoringTaskConfig operationMonitoringTaskConfig = deviceManagementProviderService
|
|
|
|
.getDeviceMonitoringConfig(deviceType);
|
|
|
|
.getDeviceMonitoringConfig(deviceType);
|
|
|
@ -96,7 +97,9 @@ public class DeviceDetailsRetrieverTask implements Task {
|
|
|
|
operationMonitoringTaskConfig);
|
|
|
|
operationMonitoringTaskConfig);
|
|
|
|
//pass the configurations also from here, monitoring tasks
|
|
|
|
//pass the configurations also from here, monitoring tasks
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
deviceTaskManager.addOperations();
|
|
|
|
if (deviceManagementProviderService.isDeviceMonitoringEnabled(deviceType)) {
|
|
|
|
|
|
|
|
deviceTaskManager.addOperations();
|
|
|
|
|
|
|
|
}
|
|
|
|
} catch (DeviceMgtTaskException e) {
|
|
|
|
} catch (DeviceMgtTaskException e) {
|
|
|
|
log.error("Error occurred while trying to add the operations to " +
|
|
|
|
log.error("Error occurred while trying to add the operations to " +
|
|
|
|
"device to retrieve device details.", e);
|
|
|
|
"device to retrieve device details.", e);
|
|
|
|