@Test public void default_providers_are_inherited_when_inheritDefaultSources_is_true() throws Exception { FederationFixture f = new FederationFixture(); final String providerId = "providerId"; f.registerProviderWithSources(createProvider(ComponentId.fromString(providerId))); f.initializeFederationSearcher(f.federationSearchWithDefaultSources); FederationConfig federationConfig = getConfig(f.federationSearchWithDefaultSources); FederationConfig.Target target = federationConfig.target(0); assertSame(providerId, target.id()); assertTrue("Not used by default", target.searchChain(0).useByDefault()); }
@Override public void getConfig(FederationConfig.Builder builder) { for (Target target : resolvedTargets.values()) { builder.target(target.getTargetConfig()); } if (targetSelector.isPresent()) { builder.targetSelector(targetSelector.get().getGlobalComponentId().stringValue()); } }
FederationSearcher extends Searcher<FederationSearcherModel> implements FederationConfig.Producer { @Override public void getConfig(FederationConfig.Builder builder) { for (Target target : resolvedTargets.values()) { builder.target(target.getTargetConfig()); } if (targetSelector.isPresent()) { builder.targetSelector(targetSelector.get().getGlobalComponentId().stringValue()); } } }
FederationSearcher extends Searcher<FederationSearcherModel> implements FederationConfig.Producer { @Override public void getConfig(FederationConfig.Builder builder) { for (Target target : resolvedTargets.values()) { builder.target(target.getTargetConfig()); } if (targetSelector.isPresent()) { builder.targetSelector(targetSelector.get().getGlobalComponentId().stringValue()); } } FederationSearcher(FederationSearcherModel searcherModel, Optional<Component> targetSelector); }
FederationSearcher extends Searcher<FederationSearcherModel> implements FederationConfig.Producer { @Override public void getConfig(FederationConfig.Builder builder) { for (Target target : resolvedTargets.values()) { builder.target(target.getTargetConfig()); } if (targetSelector.isPresent()) { builder.targetSelector(targetSelector.get().getGlobalComponentId().stringValue()); } } FederationSearcher(FederationSearcherModel searcherModel, Optional<Component> targetSelector); @Override void getConfig(FederationConfig.Builder builder); @Override void initialize(); }
FederationSearcher extends Searcher<FederationSearcherModel> implements FederationConfig.Producer { @Override public void getConfig(FederationConfig.Builder builder) { for (Target target : resolvedTargets.values()) { builder.target(target.getTargetConfig()); } if (targetSelector.isPresent()) { builder.targetSelector(targetSelector.get().getGlobalComponentId().stringValue()); } } FederationSearcher(FederationSearcherModel searcherModel, Optional<Component> targetSelector); @Override void getConfig(FederationConfig.Builder builder); @Override void initialize();  }