mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
reformatting code
This commit is contained in:
parent
e3453f5bb1
commit
a115cff4db
@ -92,6 +92,7 @@ public class DeviceTaskManagerImpl implements DeviceTaskManager {
|
||||
operations = this.getValidOperationNames(); //list operations for each device type
|
||||
devices = deviceManagementProviderService.getAllDevices(deviceType, false);//list devices for each type
|
||||
if (!devices.isEmpty()) {
|
||||
if (operations != null) {
|
||||
for (String str : operations) {
|
||||
CommandOperation operation = new CommandOperation();
|
||||
operation.setEnabled(true);
|
||||
@ -100,6 +101,11 @@ public class DeviceTaskManagerImpl implements DeviceTaskManager {
|
||||
deviceManagementProviderService.addOperation(deviceType, operation,
|
||||
DeviceManagerUtil.getValidDeviceIdentifiers(devices));
|
||||
}
|
||||
} else {
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("No operations are available.");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("No devices are available to perform the operations.");
|
||||
|
||||
@ -53,7 +53,6 @@ public class DeviceTaskManagerServiceImpl implements DeviceTaskManagerService {
|
||||
log.info("Task adding for " + deviceType);
|
||||
|
||||
int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId();
|
||||
|
||||
try {
|
||||
TaskService taskService = DeviceManagementDataHolder.getInstance().getTaskService();
|
||||
taskService.registerTaskType(TASK_TYPE);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user