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