public static void buildAvroTypes(EventTypeRepositoryImpl repo, Map<String, ConfigurationCommonEventTypeAvro> eventTypesAvro, EventTypeAvroHandler eventTypeAvroHandler, EventBeanTypedEventFactory eventBeanTypedEventFactory) { for (Map.Entry<String, ConfigurationCommonEventTypeAvro> entry : eventTypesAvro.entrySet()) { if (repo.getTypeByName(entry.getKey()) != null) { continue; } buildAvroType(repo, entry.getKey(), entry.getValue(), eventTypeAvroHandler, eventBeanTypedEventFactory); } }
EventTypeRepositoryXMLTypeUtil.buildXMLTypes(eventTypeRepositoryPreconfigured, configuration.getCommon().getEventTypesXMLDOM(), beanEventTypeFactoryPrivate, xmlFragmentEventTypeFactory, classpathImportServiceCompileTime); EventTypeAvroHandler eventTypeAvroHandler = EventTypeAvroHandlerFactory.resolve(classpathImportServiceCompileTime, configuration.getCommon().getEventMeta().getAvroSettings(), EventTypeAvroHandler.COMPILE_TIME_HANDLER_IMPL); EventTypeRepositoryAvroTypeUtil.buildAvroTypes(eventTypeRepositoryPreconfigured, configuration.getCommon().getEventTypesAvro(), eventTypeAvroHandler, beanEventTypeFactoryPrivate.getEventBeanTypedEventFactory()); EventTypeRepositoryVariantStreamUtil.buildVariantStreams(eventTypeRepositoryPreconfigured, configuration.getCommon().getVariantStreams(), EventTypeFactoryImpl.INSTANCE);
EventTypeRepositoryXMLTypeUtil.buildXMLTypes(eventTypeRepositoryPreconfigured, configuration.getCommon().getEventTypesXMLDOM(), beanEventTypeFactoryPrivate, xmlFragmentEventTypeFactory, classpathImportServiceCompileTime); EventTypeAvroHandler eventTypeAvroHandler = EventTypeAvroHandlerFactory.resolve(classpathImportServiceCompileTime, configuration.getCommon().getEventMeta().getAvroSettings(), EventTypeAvroHandler.COMPILE_TIME_HANDLER_IMPL); EventTypeRepositoryAvroTypeUtil.buildAvroTypes(eventTypeRepositoryPreconfigured, configuration.getCommon().getEventTypesAvro(), eventTypeAvroHandler, beanEventTypeFactoryPrivate.getEventBeanTypedEventFactory()); EventTypeRepositoryVariantStreamUtil.buildVariantStreams(eventTypeRepositoryPreconfigured, configuration.getCommon().getVariantStreams(), EventTypeFactoryImpl.INSTANCE);
XMLFragmentEventTypeFactory xmlFragmentEventTypeFactory = new XMLFragmentEventTypeFactory(beanEventTypeFactoryPrivate, null, eventTypeRepositoryPreconfigured); EventTypeRepositoryXMLTypeUtil.buildXMLTypes(eventTypeRepositoryPreconfigured, configs.getCommon().getEventTypesXMLDOM(), beanEventTypeFactoryPrivate, xmlFragmentEventTypeFactory, classpathImportServiceRuntime); EventTypeRepositoryAvroTypeUtil.buildAvroTypes(eventTypeRepositoryPreconfigured, configs.getCommon().getEventTypesAvro(), eventTypeAvroHandler, beanEventTypeFactoryPrivate.getEventBeanTypedEventFactory()); EventTypeRepositoryVariantStreamUtil.buildVariantStreams(eventTypeRepositoryPreconfigured, configs.getCommon().getVariantStreams(), eventTypeFactory);