|
|
@ -92,13 +92,19 @@ public class DeviceTaskManagerImpl implements DeviceTaskManager {
|
|
|
|
operations = this.getValidOperationNames(); //list operations for each device type
|
|
|
|
operations = this.getValidOperationNames(); //list operations for each device type
|
|
|
|
devices = deviceManagementProviderService.getAllDevices(deviceType, false);//list devices for each type
|
|
|
|
devices = deviceManagementProviderService.getAllDevices(deviceType, false);//list devices for each type
|
|
|
|
if (!devices.isEmpty()) {
|
|
|
|
if (!devices.isEmpty()) {
|
|
|
|
for (String str : operations) {
|
|
|
|
if (operations != null) {
|
|
|
|
CommandOperation operation = new CommandOperation();
|
|
|
|
for (String str : operations) {
|
|
|
|
operation.setEnabled(true);
|
|
|
|
CommandOperation operation = new CommandOperation();
|
|
|
|
operation.setType(Operation.Type.COMMAND);
|
|
|
|
operation.setEnabled(true);
|
|
|
|
operation.setCode(str);
|
|
|
|
operation.setType(Operation.Type.COMMAND);
|
|
|
|
deviceManagementProviderService.addOperation(deviceType, operation,
|
|
|
|
operation.setCode(str);
|
|
|
|
DeviceManagerUtil.getValidDeviceIdentifiers(devices));
|
|
|
|
deviceManagementProviderService.addOperation(deviceType, operation,
|
|
|
|
|
|
|
|
DeviceManagerUtil.getValidDeviceIdentifiers(devices));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
if (log.isDebugEnabled()) {
|
|
|
|
|
|
|
|
log.debug("No operations are available.");
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if (log.isDebugEnabled()) {
|
|
|
|
if (log.isDebugEnabled()) {
|
|
|
|