@Test public void leaders_must_be_the_first_search_chain_in_a_target() throws Exception { FederationFixture f = new ProvidersWithSourceFixture(); FederationConfig federationConfig = getConfig(f.federationSearchWithDefaultSources); List<FederationConfig.Target.SearchChain> searchChain = federationConfig.target(0).searchChain(); assertEquals("provider1", searchChain.get(0).providerId()); assertEquals("provider2", searchChain.get(1).providerId()); }
@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();  }