@Test public void resolve() { assertThat( new ReferenceFilterGroupFilterSpecifier(_filterGroupName, _refBookName) .resolve(_nodeName, _ctxt), equalTo(ImmutableSet.of(_filter1, _filter3))); }
@Override public Set<IpAccessList> resolve(String node, SpecifierContext ctxt) { FilterGroup filterGroup = ctxt.getReferenceBook(_bookName) .orElseThrow( () -> new NoSuchElementException("ReferenceBook '" + _bookName + "' not found")) .getFilterGroup(_filterGroupName) .orElseThrow( () -> new NoSuchElementException( "FilterGroup '" + _filterGroupName + "' not found in ReferenceBook '" + _bookName + "'")); return filterGroup.getFilters().stream() .flatMap( f -> SpecifierFactories.getFilterSpecifierOrDefault(f, NoFiltersFilterSpecifier.INSTANCE) .resolve(node, ctxt).stream()) .collect(ImmutableSet.toImmutableSet()); }
ReferenceFilterGroupFilterSpecifier implements FilterSpecifier { @Override public Set<IpAccessList> resolve(String node, SpecifierContext ctxt) { FilterGroup filterGroup = ctxt.getReferenceBook(_bookName) .orElseThrow( () -> new NoSuchElementException("ReferenceBook '" + _bookName + "' not found")) .getFilterGroup(_filterGroupName) .orElseThrow( () -> new NoSuchElementException( "FilterGroup '" + _filterGroupName + "' not found in ReferenceBook '" + _bookName + "'")); return filterGroup.getFilters().stream() .flatMap( f -> SpecifierFactories.getFilterSpecifierOrDefault(f, NoFiltersFilterSpecifier.INSTANCE) .resolve(node, ctxt).stream()) .collect(ImmutableSet.toImmutableSet()); } }
ReferenceFilterGroupFilterSpecifier implements FilterSpecifier { @Override public Set<IpAccessList> resolve(String node, SpecifierContext ctxt) { FilterGroup filterGroup = ctxt.getReferenceBook(_bookName) .orElseThrow( () -> new NoSuchElementException("ReferenceBook '" + _bookName + "' not found")) .getFilterGroup(_filterGroupName) .orElseThrow( () -> new NoSuchElementException( "FilterGroup '" + _filterGroupName + "' not found in ReferenceBook '" + _bookName + "'")); return filterGroup.getFilters().stream() .flatMap( f -> SpecifierFactories.getFilterSpecifierOrDefault(f, NoFiltersFilterSpecifier.INSTANCE) .resolve(node, ctxt).stream()) .collect(ImmutableSet.toImmutableSet()); } ReferenceFilterGroupFilterSpecifier(String filterGroupName, String bookName); }
ReferenceFilterGroupFilterSpecifier implements FilterSpecifier { @Override public Set<IpAccessList> resolve(String node, SpecifierContext ctxt) { FilterGroup filterGroup = ctxt.getReferenceBook(_bookName) .orElseThrow( () -> new NoSuchElementException("ReferenceBook '" + _bookName + "' not found")) .getFilterGroup(_filterGroupName) .orElseThrow( () -> new NoSuchElementException( "FilterGroup '" + _filterGroupName + "' not found in ReferenceBook '" + _bookName + "'")); return filterGroup.getFilters().stream() .flatMap( f -> SpecifierFactories.getFilterSpecifierOrDefault(f, NoFiltersFilterSpecifier.INSTANCE) .resolve(node, ctxt).stream()) .collect(ImmutableSet.toImmutableSet()); } ReferenceFilterGroupFilterSpecifier(String filterGroupName, String bookName); @Override boolean equals(Object o); @Override int hashCode(); @Override Set<IpAccessList> resolve(String node, SpecifierContext ctxt); }
ReferenceFilterGroupFilterSpecifier implements FilterSpecifier { @Override public Set<IpAccessList> resolve(String node, SpecifierContext ctxt) { FilterGroup filterGroup = ctxt.getReferenceBook(_bookName) .orElseThrow( () -> new NoSuchElementException("ReferenceBook '" + _bookName + "' not found")) .getFilterGroup(_filterGroupName) .orElseThrow( () -> new NoSuchElementException( "FilterGroup '" + _filterGroupName + "' not found in ReferenceBook '" + _bookName + "'")); return filterGroup.getFilters().stream() .flatMap( f -> SpecifierFactories.getFilterSpecifierOrDefault(f, NoFiltersFilterSpecifier.INSTANCE) .resolve(node, ctxt).stream()) .collect(ImmutableSet.toImmutableSet()); } ReferenceFilterGroupFilterSpecifier(String filterGroupName, String bookName); @Override boolean equals(Object o); @Override int hashCode(); @Override Set<IpAccessList> resolve(String node, SpecifierContext ctxt);  }