Search in sources :

Example 1 with MarcBibReaderFactory

use of org.folio.processing.mapping.mapper.reader.record.marc.MarcBibReaderFactory in project mod-inventory by folio-org.

the class DataImportKafkaHandler method registerDataImportProcessingHandlers.

private void registerDataImportProcessingHandlers(Storage storage, HttpClient client) {
    MatchValueLoaderFactory.register(new InstanceLoader(storage, vertx));
    MatchValueLoaderFactory.register(new ItemLoader(storage, vertx));
    MatchValueLoaderFactory.register(new HoldingLoader(storage, vertx));
    MatchValueLoaderFactory.register(new AuthorityLoader(storage, vertx));
    MatchValueReaderFactory.register(new MarcValueReaderImpl());
    MatchValueReaderFactory.register(new StaticValueReaderImpl());
    MappingManager.registerReaderFactory(new MarcBibReaderFactory());
    MappingManager.registerReaderFactory(new MarcHoldingsReaderFactory());
    MappingManager.registerWriterFactory(new ItemWriterFactory());
    MappingManager.registerWriterFactory(new HoldingWriterFactory());
    MappingManager.registerWriterFactory(new InstanceWriterFactory());
    PrecedingSucceedingTitlesHelper precedingSucceedingTitlesHelper = new PrecedingSucceedingTitlesHelper(WebClient.wrap(client));
    EventManager.registerEventHandler(new MatchInstanceEventHandler(mappingMetadataCache));
    EventManager.registerEventHandler(new MatchItemEventHandler(mappingMetadataCache));
    EventManager.registerEventHandler(new MatchHoldingEventHandler(mappingMetadataCache));
    EventManager.registerEventHandler(new MatchAuthorityEventHandler(mappingMetadataCache));
    EventManager.registerEventHandler(new CreateItemEventHandler(storage, mappingMetadataCache, new ItemIdStorageService(new EntityIdStorageDaoImpl(new PostgresClientFactory(vertx)))));
    EventManager.registerEventHandler(new CreateHoldingEventHandler(storage, mappingMetadataCache, new HoldingsIdStorageService(new EntityIdStorageDaoImpl(new PostgresClientFactory(vertx)))));
    EventManager.registerEventHandler(new CreateInstanceEventHandler(storage, precedingSucceedingTitlesHelper, mappingMetadataCache, new InstanceIdStorageService(new EntityIdStorageDaoImpl(new PostgresClientFactory(vertx)))));
    EventManager.registerEventHandler(new CreateMarcHoldingsEventHandler(storage, mappingMetadataCache, new HoldingsIdStorageService(new EntityIdStorageDaoImpl(new PostgresClientFactory(vertx)))));
    EventManager.registerEventHandler(new CreateAuthorityEventHandler(storage, mappingMetadataCache, new AuthorityIdStorageService(new EntityIdStorageDaoImpl(new PostgresClientFactory(vertx)))));
    EventManager.registerEventHandler(new UpdateAuthorityEventHandler(storage, mappingMetadataCache, new KafkaEventPublisher(kafkaConfig, vertx, 100)));
    EventManager.registerEventHandler(new DeleteAuthorityEventHandler(storage));
    EventManager.registerEventHandler(new UpdateItemEventHandler(storage, mappingMetadataCache));
    EventManager.registerEventHandler(new UpdateHoldingEventHandler(storage, mappingMetadataCache));
    EventManager.registerEventHandler(new ReplaceInstanceEventHandler(storage, precedingSucceedingTitlesHelper, mappingMetadataCache));
    EventManager.registerEventHandler(new MarcBibModifiedPostProcessingEventHandler(new InstanceUpdateDelegate(storage), precedingSucceedingTitlesHelper, mappingMetadataCache));
    EventManager.registerEventHandler(new MarcBibMatchedPostProcessingEventHandler(storage));
}
Also used : MatchHoldingEventHandler(org.folio.inventory.dataimport.handlers.matching.MatchHoldingEventHandler) StaticValueReaderImpl(org.folio.processing.matching.reader.StaticValueReaderImpl) MatchInstanceEventHandler(org.folio.inventory.dataimport.handlers.matching.MatchInstanceEventHandler) EntityIdStorageDaoImpl(org.folio.inventory.common.dao.EntityIdStorageDaoImpl) CreateMarcHoldingsEventHandler(org.folio.inventory.dataimport.handlers.actions.CreateMarcHoldingsEventHandler) UpdateItemEventHandler(org.folio.inventory.dataimport.handlers.actions.UpdateItemEventHandler) ItemWriterFactory(org.folio.inventory.dataimport.ItemWriterFactory) ReplaceInstanceEventHandler(org.folio.inventory.dataimport.handlers.actions.ReplaceInstanceEventHandler) CreateAuthorityEventHandler(org.folio.inventory.dataimport.handlers.actions.CreateAuthorityEventHandler) CreateItemEventHandler(org.folio.inventory.dataimport.handlers.actions.CreateItemEventHandler) HoldingsIdStorageService(org.folio.inventory.services.HoldingsIdStorageService) PostgresClientFactory(org.folio.inventory.common.dao.PostgresClientFactory) CreateInstanceEventHandler(org.folio.inventory.dataimport.handlers.actions.CreateInstanceEventHandler) PrecedingSucceedingTitlesHelper(org.folio.inventory.dataimport.handlers.actions.PrecedingSucceedingTitlesHelper) ItemIdStorageService(org.folio.inventory.services.ItemIdStorageService) MarcBibMatchedPostProcessingEventHandler(org.folio.inventory.dataimport.handlers.actions.MarcBibMatchedPostProcessingEventHandler) MarcValueReaderImpl(org.folio.processing.matching.reader.MarcValueReaderImpl) MarcBibReaderFactory(org.folio.processing.mapping.mapper.reader.record.marc.MarcBibReaderFactory) MatchAuthorityEventHandler(org.folio.inventory.dataimport.handlers.matching.MatchAuthorityEventHandler) KafkaEventPublisher(org.folio.processing.events.services.publisher.KafkaEventPublisher) HoldingLoader(org.folio.inventory.dataimport.handlers.matching.loaders.HoldingLoader) AuthorityIdStorageService(org.folio.inventory.services.AuthorityIdStorageService) ItemLoader(org.folio.inventory.dataimport.handlers.matching.loaders.ItemLoader) DeleteAuthorityEventHandler(org.folio.inventory.dataimport.handlers.actions.DeleteAuthorityEventHandler) InstanceLoader(org.folio.inventory.dataimport.handlers.matching.loaders.InstanceLoader) InstanceWriterFactory(org.folio.inventory.dataimport.InstanceWriterFactory) MarcBibModifiedPostProcessingEventHandler(org.folio.inventory.dataimport.handlers.actions.MarcBibModifiedPostProcessingEventHandler) UpdateHoldingEventHandler(org.folio.inventory.dataimport.handlers.actions.UpdateHoldingEventHandler) MatchItemEventHandler(org.folio.inventory.dataimport.handlers.matching.MatchItemEventHandler) AuthorityLoader(org.folio.inventory.dataimport.handlers.matching.loaders.AuthorityLoader) HoldingWriterFactory(org.folio.inventory.dataimport.HoldingWriterFactory) InstanceIdStorageService(org.folio.inventory.services.InstanceIdStorageService) InstanceUpdateDelegate(org.folio.inventory.dataimport.handlers.actions.InstanceUpdateDelegate) UpdateAuthorityEventHandler(org.folio.inventory.dataimport.handlers.actions.UpdateAuthorityEventHandler) MarcHoldingsReaderFactory(org.folio.processing.mapping.mapper.reader.record.marc.MarcHoldingsReaderFactory) CreateHoldingEventHandler(org.folio.inventory.dataimport.handlers.actions.CreateHoldingEventHandler)

Aggregations

EntityIdStorageDaoImpl (org.folio.inventory.common.dao.EntityIdStorageDaoImpl)1 PostgresClientFactory (org.folio.inventory.common.dao.PostgresClientFactory)1 HoldingWriterFactory (org.folio.inventory.dataimport.HoldingWriterFactory)1 InstanceWriterFactory (org.folio.inventory.dataimport.InstanceWriterFactory)1 ItemWriterFactory (org.folio.inventory.dataimport.ItemWriterFactory)1 CreateAuthorityEventHandler (org.folio.inventory.dataimport.handlers.actions.CreateAuthorityEventHandler)1 CreateHoldingEventHandler (org.folio.inventory.dataimport.handlers.actions.CreateHoldingEventHandler)1 CreateInstanceEventHandler (org.folio.inventory.dataimport.handlers.actions.CreateInstanceEventHandler)1 CreateItemEventHandler (org.folio.inventory.dataimport.handlers.actions.CreateItemEventHandler)1 CreateMarcHoldingsEventHandler (org.folio.inventory.dataimport.handlers.actions.CreateMarcHoldingsEventHandler)1 DeleteAuthorityEventHandler (org.folio.inventory.dataimport.handlers.actions.DeleteAuthorityEventHandler)1 InstanceUpdateDelegate (org.folio.inventory.dataimport.handlers.actions.InstanceUpdateDelegate)1 MarcBibMatchedPostProcessingEventHandler (org.folio.inventory.dataimport.handlers.actions.MarcBibMatchedPostProcessingEventHandler)1 MarcBibModifiedPostProcessingEventHandler (org.folio.inventory.dataimport.handlers.actions.MarcBibModifiedPostProcessingEventHandler)1 PrecedingSucceedingTitlesHelper (org.folio.inventory.dataimport.handlers.actions.PrecedingSucceedingTitlesHelper)1 ReplaceInstanceEventHandler (org.folio.inventory.dataimport.handlers.actions.ReplaceInstanceEventHandler)1 UpdateAuthorityEventHandler (org.folio.inventory.dataimport.handlers.actions.UpdateAuthorityEventHandler)1 UpdateHoldingEventHandler (org.folio.inventory.dataimport.handlers.actions.UpdateHoldingEventHandler)1 UpdateItemEventHandler (org.folio.inventory.dataimport.handlers.actions.UpdateItemEventHandler)1 MatchAuthorityEventHandler (org.folio.inventory.dataimport.handlers.matching.MatchAuthorityEventHandler)1