@Test public void shouldNotAllowAnyWhenEmptyFilterList() { setFilter(" "); FederationConfigurationSourceFilter filter = new FederationConfigurationSourceFilterImpl(DEFAULT_OWN_INSTANCE); assertThat(filter.shouldDownloadConfigurationFor("EE"), is(false)); assertThat(filter.shouldDownloadConfigurationFor("fi-prod"), is(false)); assertThat(filter.shouldDownloadConfigurationFor(DEFAULT_OWN_INSTANCE), is(true)); }
@Override public boolean shouldDownloadConfigurationFor(String instanceIdentifier) { if (ownInstance.equalsIgnoreCase(instanceIdentifier)) { return true; } switch (allowedFederationMode) { case CUSTOM: return allowedFederationPartners.contains(instanceIdentifier); case ALL: return true; default: return false; } }
FederationConfigurationSourceFilterImpl implements FederationConfigurationSourceFilter { @Override public boolean shouldDownloadConfigurationFor(String instanceIdentifier) { if (ownInstance.equalsIgnoreCase(instanceIdentifier)) { return true; } switch (allowedFederationMode) { case CUSTOM: return allowedFederationPartners.contains(instanceIdentifier); case ALL: return true; default: return false; } } }
FederationConfigurationSourceFilterImpl implements FederationConfigurationSourceFilter { @Override public boolean shouldDownloadConfigurationFor(String instanceIdentifier) { if (ownInstance.equalsIgnoreCase(instanceIdentifier)) { return true; } switch (allowedFederationMode) { case CUSTOM: return allowedFederationPartners.contains(instanceIdentifier); case ALL: return true; default: return false; } } FederationConfigurationSourceFilterImpl(String ownInstance); }
FederationConfigurationSourceFilterImpl implements FederationConfigurationSourceFilter { @Override public boolean shouldDownloadConfigurationFor(String instanceIdentifier) { if (ownInstance.equalsIgnoreCase(instanceIdentifier)) { return true; } switch (allowedFederationMode) { case CUSTOM: return allowedFederationPartners.contains(instanceIdentifier); case ALL: return true; default: return false; } } FederationConfigurationSourceFilterImpl(String ownInstance); @Override boolean shouldDownloadConfigurationFor(String instanceIdentifier); }
FederationConfigurationSourceFilterImpl implements FederationConfigurationSourceFilter { @Override public boolean shouldDownloadConfigurationFor(String instanceIdentifier) { if (ownInstance.equalsIgnoreCase(instanceIdentifier)) { return true; } switch (allowedFederationMode) { case CUSTOM: return allowedFederationPartners.contains(instanceIdentifier); case ALL: return true; default: return false; } } FederationConfigurationSourceFilterImpl(String ownInstance); @Override boolean shouldDownloadConfigurationFor(String instanceIdentifier);  }