protected FilterBypass getFilterBypass(ContentHandlerConfigMapTable... visitorTables) { for(ContentHandlerConfigMapTable visitorTable : visitorTables) { if(visitorTable != null && visitorTable.getUserConfiguredCount() > 1) { // If any of the visitor tables have more than 1 visitor instance... return null; } } // Gather the possible set of FilterBypass instances... Set<FilterBypass> bypassSet = new HashSet<FilterBypass>(); for(ContentHandlerConfigMapTable visitorTable : visitorTables) { if(visitorTable != null && visitorTable.getUserConfiguredCount() == 1) { FilterBypass filterBypass = getFilterBypass(visitorTable); if(filterBypass != null) { bypassSet.add(filterBypass); } else { // There's a non-FilterBypass Visitor configured, so we can't // use the Bypass Filter return null; } } } // If there's just one FilterBypass instance, return it... if(bypassSet.size() == 1) { return bypassSet.iterator().next(); } // Otherwise we're not going to allow filter bypassing... return null; }
protected FilterBypass getFilterBypass(ContentHandlerConfigMapTable... visitorTables) { for(ContentHandlerConfigMapTable visitorTable : visitorTables) { if(visitorTable != null && visitorTable.getUserConfiguredCount() > 1) { // If any of the visitor tables have more than 1 visitor instance... return null; } } // Gather the possible set of FilterBypass instances... Set<FilterBypass> bypassSet = new HashSet<FilterBypass>(); for(ContentHandlerConfigMapTable visitorTable : visitorTables) { if(visitorTable != null && visitorTable.getUserConfiguredCount() == 1) { FilterBypass filterBypass = getFilterBypass(visitorTable); if(filterBypass != null) { bypassSet.add(filterBypass); } else { // There's a non-FilterBypass Visitor configured, so we can't // use the Bypass Filter return null; } } } // If there's just one FilterBypass instance, return it... if(bypassSet.size() == 1) { return bypassSet.iterator().next(); } // Otherwise we're not going to allow filter bypassing... return null; }
protected FilterBypass getFilterBypass(ContentHandlerConfigMapTable... visitorTables) { for(ContentHandlerConfigMapTable visitorTable : visitorTables) { if(visitorTable != null && visitorTable.getUserConfiguredCount() > 1) { // If any of the visitor tables have more than 1 visitor instance... return null; } } // Gather the possible set of FilterBypass instances... Set<FilterBypass> bypassSet = new HashSet<FilterBypass>(); for(ContentHandlerConfigMapTable visitorTable : visitorTables) { if(visitorTable != null && visitorTable.getUserConfiguredCount() == 1) { FilterBypass filterBypass = getFilterBypass(visitorTable); if(filterBypass != null) { bypassSet.add(filterBypass); } else { // There's a non-FilterBypass Visitor configured, so we can't // use the Bypass Filter return null; } } } // If there's just one FilterBypass instance, return it... if(bypassSet.size() == 1) { return bypassSet.iterator().next(); } // Otherwise we're not going to allow filter bypassing... return null; }
for(ContentHandlerConfigMapTable visitorTable : visitorTables) { if(visitorTable != null && visitorTable.getUserConfiguredCount() == 1) { FilterBypass filterBypass = getFilterBypass(visitorTable);