private DefaultVersionedCatalog getCatalogFromPlugins(final InternalTenantContext internalTenantContext) throws CatalogApiException { final TenantContext tenantContext = internalCallContextFactory.createTenantContext(internalTenantContext); final Set<String> allServices = pluginRegistry.getAllServices(); for (final String service : allServices) { final CatalogPluginApi plugin = pluginRegistry.getServiceForName(service);
@VisibleForTesting final Collection<String> getResultingPluginNameList(final InternalTenantContext tenantContext) { final List<String> configuredPlugins = invoiceConfig.getInvoicePluginNames(tenantContext); final Set<String> registeredPlugins = pluginRegistry.getAllServices(); // No configuration, we return undeterministic list of registered plugins if (configuredPlugins == null || configuredPlugins.isEmpty()) { return registeredPlugins; } else { final List<String> result = new ArrayList<String>(configuredPlugins.size()); for (final String name : configuredPlugins) { if (pluginRegistry.getServiceForName(name) != null) { result.add(name); } } return result; } } }
@Override @BeforeMethod(groups = "fast") public void beforeMethod() { if (hasFailed()) { return; } super.beforeMethod(); for (final String name : pluginRegistry.getAllServices()) { pluginRegistry.unregisterService(name); } }
private DefaultVersionedCatalog getCatalogFromPlugins(final InternalTenantContext internalTenantContext) throws CatalogApiException { final TenantContext tenantContext = internalCallContextFactory.createTenantContext(internalTenantContext); final Set<String> allServices = pluginRegistry.getAllServices(); for (final String service : allServices) { final CatalogPluginApi plugin = pluginRegistry.getServiceForName(service);