@Test void filterNoEntities() { CassandraConnectionFilter filter = new CassandraConnectionFilter(); Bundle filteredBundle = new Bundle(); Bundle bundle = FilterTestUtils.getBundle(); bundle.setDependencyMap(Collections.emptyMap()); List<CassandraConnection> filteredEntities = filter.filter("/my/folder/path", new FilterConfiguration(), bundle, filteredBundle); assertEquals(0, filteredEntities.size()); }
@Override public List<CassandraConnection> filter(String folderPath, FilterConfiguration filterConfiguration, Bundle bundle, Bundle filteredBundle) { List<CassandraConnection> cassandraConnections = DependencyUtils.filterDependencies(CassandraConnection.class, bundle, filteredBundle, e -> filterConfiguration.getRequiredEntityNames(ENTITY_NAME).contains(e.getName())); DependencyUtils.validateEntitiesInList(cassandraConnections, filterConfiguration.getRequiredEntityNames(ENTITY_NAME), "Cassandra Connection(s)"); return cassandraConnections; }
CassandraConnectionFilter implements EntityFilter<CassandraConnection> { @Override public List<CassandraConnection> filter(String folderPath, FilterConfiguration filterConfiguration, Bundle bundle, Bundle filteredBundle) { List<CassandraConnection> cassandraConnections = DependencyUtils.filterDependencies(CassandraConnection.class, bundle, filteredBundle, e -> filterConfiguration.getRequiredEntityNames(ENTITY_NAME).contains(e.getName())); DependencyUtils.validateEntitiesInList(cassandraConnections, filterConfiguration.getRequiredEntityNames(ENTITY_NAME), "Cassandra Connection(s)"); return cassandraConnections; } }
CassandraConnectionFilter implements EntityFilter<CassandraConnection> { @Override public List<CassandraConnection> filter(String folderPath, FilterConfiguration filterConfiguration, Bundle bundle, Bundle filteredBundle) { List<CassandraConnection> cassandraConnections = DependencyUtils.filterDependencies(CassandraConnection.class, bundle, filteredBundle, e -> filterConfiguration.getRequiredEntityNames(ENTITY_NAME).contains(e.getName())); DependencyUtils.validateEntitiesInList(cassandraConnections, filterConfiguration.getRequiredEntityNames(ENTITY_NAME), "Cassandra Connection(s)"); return cassandraConnections; }  }
CassandraConnectionFilter implements EntityFilter<CassandraConnection> { @Override public List<CassandraConnection> filter(String folderPath, FilterConfiguration filterConfiguration, Bundle bundle, Bundle filteredBundle) { List<CassandraConnection> cassandraConnections = DependencyUtils.filterDependencies(CassandraConnection.class, bundle, filteredBundle, e -> filterConfiguration.getRequiredEntityNames(ENTITY_NAME).contains(e.getName())); DependencyUtils.validateEntitiesInList(cassandraConnections, filterConfiguration.getRequiredEntityNames(ENTITY_NAME), "Cassandra Connection(s)"); return cassandraConnections; }  @Override String getFilterableEntityName(); @Override @NotNull Collection<Class<? extends EntityFilter>> getDependencyEntityFilters(); @Override List<CassandraConnection> filter(String folderPath, FilterConfiguration filterConfiguration, Bundle bundle, Bundle filteredBundle); }
CassandraConnectionFilter implements EntityFilter<CassandraConnection> { @Override public List<CassandraConnection> filter(String folderPath, FilterConfiguration filterConfiguration, Bundle bundle, Bundle filteredBundle) { List<CassandraConnection> cassandraConnections = DependencyUtils.filterDependencies(CassandraConnection.class, bundle, filteredBundle, e -> filterConfiguration.getRequiredEntityNames(ENTITY_NAME).contains(e.getName())); DependencyUtils.validateEntitiesInList(cassandraConnections, filterConfiguration.getRequiredEntityNames(ENTITY_NAME), "Cassandra Connection(s)"); return cassandraConnections; }  @Override String getFilterableEntityName(); @Override @NotNull Collection<Class<? extends EntityFilter>> getDependencyEntityFilters(); @Override List<CassandraConnection> filter(String folderPath, FilterConfiguration filterConfiguration, Bundle bundle, Bundle filteredBundle);  }