Search in sources :

Example 1 with SearchIndexUpdater

use of fi.otavanopisto.muikku.search.SearchIndexUpdater in project muikku by otavanopisto.

the class SearchPluginDescriptor method init.

@Override
public void init() {
    Iterator<SearchIndexUpdater> updaterIterator = searchIndexUpdaters.iterator();
    while (updaterIterator.hasNext()) {
        SearchIndexUpdater updater = updaterIterator.next();
        logger.info("Initializing search index updater: " + updater.getName());
        updater.init();
    }
    Iterator<SearchProvider> providerIterator = searchProviders.iterator();
    while (providerIterator.hasNext()) {
        SearchProvider provider = providerIterator.next();
        logger.info("Initializing search provider: " + provider.getName());
        provider.init();
    }
}
Also used : SearchProvider(fi.otavanopisto.muikku.search.SearchProvider) SearchIndexUpdater(fi.otavanopisto.muikku.search.SearchIndexUpdater)

Example 2 with SearchIndexUpdater

use of fi.otavanopisto.muikku.search.SearchIndexUpdater in project muikku by otavanopisto.

the class SearchPluginDescriptor method deinit.

@PreDestroy
public void deinit() {
    Iterator<SearchProvider> searchProviderIterator = searchProviders.iterator();
    while (searchProviderIterator.hasNext()) {
        SearchProvider provider = searchProviderIterator.next();
        logger.info("Deinitializing search provider: " + provider.getName());
        provider.deinit();
    }
    Iterator<SearchIndexUpdater> updaterProviderIterator = searchIndexUpdaters.iterator();
    while (updaterProviderIterator.hasNext()) {
        SearchIndexUpdater updater = updaterProviderIterator.next();
        logger.info("Deinitializing search index updater: " + updater.getName());
        updater.deinit();
    }
}
Also used : SearchProvider(fi.otavanopisto.muikku.search.SearchProvider) SearchIndexUpdater(fi.otavanopisto.muikku.search.SearchIndexUpdater) PreDestroy(javax.annotation.PreDestroy)

Aggregations

SearchIndexUpdater (fi.otavanopisto.muikku.search.SearchIndexUpdater)2 SearchProvider (fi.otavanopisto.muikku.search.SearchProvider)2 PreDestroy (javax.annotation.PreDestroy)1