+ /**
+ * Init tapi provider beans.
+ *
+ * @param lightyServices LightyServices
+ * @param rendererServiceOperations RendererServiceOperations
+ * @param networkModelWavelengthService NetworkModelWavelengthService
+ * @return TapiProvider instance
+ */
+ private TapiProvider initTapi(LightyServices lightyServices, RendererServiceOperations rendererServiceOperations,
+ NetworkModelWavelengthService networkModelWavelengthService,
+ PathComputationService pathComputationService) {
+ RendererListenerImpl rendererListenerImpl = new RendererListenerImpl(pathComputationService,
+ lightyServices.getBindingNotificationPublishService());
+ ServiceDataStoreOperations serviceDataStoreOperations = new ServiceDataStoreOperationsImpl(
+ lightyServices.getBindingDataBroker());
+ PceListenerImpl pceListenerImpl = new PceListenerImpl(rendererServiceOperations, pathComputationService,
+ lightyServices.getBindingNotificationPublishService(), serviceDataStoreOperations);
+ ServiceHandlerOperations serviceHandlerOperations = new ServiceHandlerOperationsImpl(
+ lightyServices.getBindingDataBroker(), pathComputationService, rendererServiceOperations,
+ lightyServices.getBindingNotificationPublishService(), pceListenerImpl, rendererListenerImpl,
+ networkModelWavelengthService);
+ return new TapiProvider(lightyServices.getBindingDataBroker(), lightyServices.getRpcProviderService(),
+ serviceHandlerOperations, new TapiListener());
+ }
+
+ /**
+ * Init renderer provider beans.
+ *
+ * @param lightyServices LightyServices
+ * @param olmPowerServiceRpc TransportpceOlmService
+ * @param networkModelWavelengthService NetworkModelWavelengthService
+ * @param deviceRendererService DeviceRendererService
+ * @param otnDeviceRendererService OtnDeviceRendererService
+ * @return RendererProvider instance
+ */
+ private RendererProvider initRenderer(LightyServices lightyServices, TransportpceOlmService olmPowerServiceRpc,
+ NetworkModelWavelengthService networkModelWavelengthService, DeviceRendererService deviceRendererService,
+ OtnDeviceRendererService otnDeviceRendererService) {
+ DeviceRendererRPCImpl deviceRendererRPC = new DeviceRendererRPCImpl(deviceRendererService,
+ otnDeviceRendererService);
+ RendererServiceOperationsImpl rendererServiceOperations = new RendererServiceOperationsImpl(
+ deviceRendererService, otnDeviceRendererService, olmPowerServiceRpc,
+ lightyServices.getBindingDataBroker(), networkModelWavelengthService,
+ lightyServices.getBindingNotificationPublishService());
+ return new RendererProvider(lightyServices.getRpcProviderService(), deviceRendererRPC,
+ rendererServiceOperations);
+ }
+
+ /**
+ * Init OpenRoadmInterfaceFactory.
+ *
+ * @param mappingUtils MappingUtils
+ * @param openRoadmInterfaces OpenRoadmInterfaces
+ * @param portMapping PortMapping
+ * @return OpenRoadmInterfaceFactory instance
+ */
+ private OpenRoadmInterfaceFactory initOpenRoadmFactory(MappingUtils mappingUtils,
+ OpenRoadmInterfaces openRoadmInterfaces, PortMapping portMapping) {
+ OpenRoadmInterface121 openRoadmInterface121 = new OpenRoadmInterface121(portMapping, openRoadmInterfaces);
+ OpenRoadmInterface221 openRoadmInterface221 = new OpenRoadmInterface221(portMapping, openRoadmInterfaces,
+ new FixedFlexImpl(), new FlexGridImpl());
+ OpenRoadmOtnInterface221 openRoadmOtnInterface221 = new OpenRoadmOtnInterface221(portMapping,
+ openRoadmInterfaces);
+ return new OpenRoadmInterfaceFactory(mappingUtils, openRoadmInterface121, openRoadmInterface221,
+ openRoadmOtnInterface221);
+ }
+
+ /**
+ * Init PortMapping.
+ *
+ * @param lightyServices LightyServices
+ * @param openRoadmInterfaces OpenRoadmInterfaces
+ * @return PortMapping instance
+ */
+ private PortMapping initPortMapping(LightyServices lightyServices, OpenRoadmInterfaces openRoadmInterfaces) {
+ PortMappingVersion221 portMappingVersion221 = new PortMappingVersion221(lightyServices.getBindingDataBroker(),
+ deviceTransactionManager, openRoadmInterfaces);
+ PortMappingVersion121 portMappingVersion121 = new PortMappingVersion121(lightyServices.getBindingDataBroker(),
+ deviceTransactionManager, openRoadmInterfaces);
+ return new PortMappingImpl(lightyServices.getBindingDataBroker(), portMappingVersion221, portMappingVersion121);
+ }
+
+ /**
+ * Init OpenRoadmInterfaces.
+ *
+ * @param mappingUtils MappingUtils
+ * @return OpenRoadmInterfaces instance
+ */
+ private OpenRoadmInterfaces initOpenRoadmInterfaces(MappingUtils mappingUtils) {
+ OpenRoadmInterfacesImpl121 openRoadmInterfacesImpl121 = new OpenRoadmInterfacesImpl121(
+ deviceTransactionManager);
+ OpenRoadmInterfacesImpl221 openRoadmInterfacesImpl221 = new OpenRoadmInterfacesImpl221(
+ deviceTransactionManager);
+ return new OpenRoadmInterfacesImpl(deviceTransactionManager, mappingUtils, openRoadmInterfacesImpl121,
+ openRoadmInterfacesImpl221);
+ }
+
+ /**
+ * Init CrossConnect.
+ *
+ * @param mappingUtils MappingUtils
+ * @return CrossConnect instance
+ */
+ private CrossConnect initCrossConnect(MappingUtils mappingUtils) {
+ CrossConnectImpl121 crossConnectImpl121 = new CrossConnectImpl121(deviceTransactionManager);
+ CrossConnectImpl221 crossConnectImpl221 = new CrossConnectImpl221(deviceTransactionManager);
+ return new CrossConnectImpl(deviceTransactionManager, mappingUtils, crossConnectImpl121, crossConnectImpl221);
+ }