Save OperationStartupHandler in data holder

11788^2
Pasindu Rupasinghe 3 months ago
parent c37cf31ffe
commit f59208f6e7

@ -100,6 +100,7 @@ public class DeviceManagementDataHolder {
private DeviceStatusManagementService deviceStatusManagementService;
private APIApplicationServices apiApplicationServices;
private PublisherRESTAPIServices publisherRESTAPIServices;
private OperationStartupHandler operationStartupHandler;
private final Map<DeviceType, DeviceStatusTaskPluginConfig> deviceStatusTaskPluginConfigs = Collections.synchronizedMap(
new HashMap<>());
@ -457,4 +458,12 @@ public class DeviceManagementDataHolder {
public void setGroupAccessAuthorizationService(GroupAccessAuthorizationService groupAccessAuthorizationService) {
this.groupAccessAuthorizationService = groupAccessAuthorizationService;
}
public OperationStartupHandler getOperationStartupHandler() {
return operationStartupHandler;
}
public void setOperationStartupHandler(OperationStartupHandler operationStartupHandler) {
this.operationStartupHandler = operationStartupHandler;
}
}

@ -262,7 +262,9 @@ public class DeviceManagementServiceComponent {
UserRoleCreateObserver userRoleCreateObserver = new UserRoleCreateObserver();
bundleContext.registerService(ServerStartupObserver.class.getName(), userRoleCreateObserver, null);
/* Registering Device Operation Management Startup Handler */
OperationStartupHandler operationStartupHandler = new OperationStartupHandler();
DeviceManagementDataHolder.getInstance().setOperationStartupHandler(operationStartupHandler);
bundleContext.registerService(ServerStartupObserver.class.getName(), operationStartupHandler, null);
/* Registering Device Management Service */

Loading…
Cancel
Save