+ /**
+ * 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());
+ 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);
+ }
+}
\ No newline at end of file