Fix review issues and format code

merge-requests/713/head
Pahansith 4 years ago
parent a36733d224
commit baeb34e1da

@ -360,7 +360,7 @@ public abstract class AbstractEventConfigDAO implements EventConfigDAO {
} catch (SQLException e) {
String msg = "Failed while creating event task entry for event operation " + eventTaskEntry.getOperationCode()
+ " of the tenant " + eventTaskEntry.getTenantId();
log.error(msg);
log.error(msg, e);
throw new EventManagementDAOException(msg, e);
}
}
@ -404,7 +404,7 @@ public abstract class AbstractEventConfigDAO implements EventConfigDAO {
}
} catch (SQLException e) {
String msg = "Failed while retrieving event task entries";
log.error(msg);
log.error(msg, e);
throw new EventManagementDAOException(msg, e);
}
}
@ -433,7 +433,7 @@ public abstract class AbstractEventConfigDAO implements EventConfigDAO {
}
} catch (SQLException e) {
String msg = "Failed while retrieving event task entries";
log.error(msg);
log.error(msg, e);
throw new EventManagementDAOException(msg, e);
}
}

@ -1779,6 +1779,13 @@ public class GeoLocationProviderServiceImpl implements GeoLocationProviderServic
}
}
/**
* Build and retrieve the EventTaskEntry object
* @param operationCode operationCode of the requesting EventTask
* @param geoFenceId id of the geofence which the task creating
* @param tenantId id of the tenant owns the geofence
* @return built EventTaskEntry object
*/
private EventTaskEntry getEventOperationTask(String operationCode, int geoFenceId, int tenantId) {
EventTaskEntry eventTaskEntry = new EventTaskEntry();
eventTaskEntry.setEventSource(DeviceManagementConstants.EventServices.GEOFENCE);

@ -76,7 +76,9 @@ public class EventOperationTaskManagerImpl {
taskManager.deleteTask(TASK_NAME);
}
} catch (TaskException e) {
throw new EventOperationTaskException("Error occurred while stopping the group event operation task");
String msg = "Error occurred while stopping the group event operation task";
log.error(msg, e);
throw new EventOperationTaskException(msg, e);
}
}
}

@ -150,6 +150,10 @@ public class DeviceTaskManagerServiceComponent {
}
}
/**
* Start event operation creation task
* @param bundleContext OsgiBundle context
*/
private void startGroupEventCreationTask(BundleContext bundleContext) {
DeviceManagementConfig deviceManagementConfig = DeviceConfigurationManager.getInstance().getDeviceManagementConfig();
EventOperationTaskConfiguration eventTaskConfig = deviceManagementConfig.getEventOperationTaskConfiguration();
@ -165,6 +169,9 @@ public class DeviceTaskManagerServiceComponent {
}
}
/**
* Stop event operation creation task
*/
private void stopGroupEventCreationTask() {
EventOperationTaskManagerImpl eventOperationTaskManager = DeviceManagementDataHolder.getInstance()
.getEventOperationTaskManager();

Loading…
Cancel
Save