判断是否需要排除自定义过滤器

@param customFilters 自定义filter列表
@return 需要排除的过滤器的key列表
13187
private static HashSet<String> parseExcludeFilter(List<Filter> customFilters) {
        HashSet<String> excludeKeys = new HashSet<String>();
        if (CommonUtils.isNotEmpty(customFilters)) {
            for (Filter filter : customFilters) {
                if (filter instanceof ExcludeFilter) {
                    // 存在需要排除的过滤器
                    ExcludeFilter excludeFilter = (ExcludeFilter) filter;
                    String excludeName = excludeFilter.getExcludeName();
                    if (StringUtils.isNotEmpty(excludeName)) {
                        String excludeFilterName = startsWithExcludePrefix(excludeName) ?
                            excludeName.substring(1)
                            : excludeName;
                        if (StringUtils.isNotEmpty(excludeFilterName)) {
                            excludeKeys.add(excludeFilterName);
                        }
                    }
                    customFilters.remove(filter);
                }
            }
        }
        if (!excludeKeys.isEmpty()) {
            if (LOGGER.isInfoEnabled()) {
                LOGGER.info("Find exclude filters: {}", excludeKeys);
            }
        }
        return excludeKeys;
    }
1150092
private FilterIndexingServiceProvider findIndexingServiceProvider(IndexedFilter indexedFilter) {
      if (filterIndexingServiceProviders != null) {
         for (FilterIndexingServiceProvider provider : filterIndexingServiceProviders) {
            if (provider.supportsFilter(indexedFilter)) {
               return provider;
            }
         }
      }
      log.noFilterIndexingServiceProviderFound(indexedFilter.getClass().getName());
      return null;
   }
1277309
public void setFilters(java.util.Collection<DocumentKeyValuesFilter> filters) {
        if (filters == null) {
            this.filters = null;
            return;
        }

        this.filters = new com.amazonaws.internal.SdkInternalList<DocumentKeyValuesFilter>(filters);
    }
890326
public static mps[] get_filtered(nitro_service service, String filter) throws Exception
	{
		mps obj = new mps();
		options option = new options();
		option.set_filter(filter);
		mps[] response = (mps[]) obj.getfiltered(service, option);
		return response;
	}
399109
public List<Row> search(ExtendedFilter filter)
    {
        SecondaryIndexSearcher mostSelective = getHighestSelectivityIndexSearcher(filter.getClause());
        if (mostSelective == null)
            return Collections.emptyList();
        else
            return mostSelective.search(filter);
    }
530202
public String getFiltersString() {

        StringBuffer result = new StringBuffer();
        Iterator<String> i = m_filters.iterator();
        while (i.hasNext()) {
            String filter = i.next();
            result.append(filter);
            if (i.hasNext()) {
                result.append(':');
            }
        }
        return result.toString();
    }
1307966
def _get_filter(sdk_filter, attr_map):
    
    if not isinstance(sdk_filter, dict):
        raise CloudValueError('filter value must be a dictionary, was %r' % (sdk_filter,))
    custom = sdk_filter.pop('custom_attributes', {})
    new_filter = _normalise_key_values(filter_obj=sdk_filter, attr_map=attr_map)
    new_filter.update({
        'custom_attributes__%s' % k: v for k, v in _normalise_key_values(filter_obj=custom).items()
    })
    return new_filter
287042
def _register_custom_filters(self):
        """"""
        custom_filters = self.settings.get('CUSTOM_FILTERS', [])
        if not isinstance(custom_filters, list):
            raise KeyError("`CUSTOM_FILTERS` setting must be a list.")

        for filter_module_name in custom_filters:
            try:
                filter_module = import_module(filter_module_name)
            except ImportError as error:
                raise ImproperlyConfigured(
                    "Failed to load custom filter module '{}'.\n"
                    "Error was: {}".format(filter_module_name, error)
                )

            try:
                filter_map = getattr(filter_module, 'filters')
                if not isinstance(filter_map, dict):
                    raise TypeError
            except (AttributeError, TypeError):
                raise ImproperlyConfigured(
                    "Filter module '{}' does not define a 'filters' dictionary".format(filter_module_name)
                )
            self._environment.filters.update(filter_map)
632586
public static boolean matchesFilter(String key, List<String> filters) {
		boolean rets = (null == filters);
		if (!rets) {
			for (Iterator<String> it = filters.iterator(); it.hasNext() && !rets;)
				rets = key.startsWith(it.next());
		}

		return rets;
	}
547032
public java.util.List<SubscriptionFilter> getSubscriptionFilters() {
        if (subscriptionFilters == null) {
            subscriptionFilters = new com.amazonaws.internal.SdkInternalList<SubscriptionFilter>();
        }
        return subscriptionFilters;
    }
610457
public void updateFilters(List<CmsDataViewFilter> newFilters) {

        if (newFilters.isEmpty()) {
            m_filterContainer.setVisible(false);
        }
        if (m_filters.equals(newFilters)) {
            return;
        }
        m_filterContainer.removeAllComponents();
        m_filters = newFilters;
        m_filterMap.clear();
        for (CmsDataViewFilter filter : newFilters) {
            m_filterMap.put(filter.getId(), filter);
            final CmsDataViewFilter finalFilter = filter;
            ComboBox select = new ComboBox(filter.getNiceName());
            select.setWidth("175px");
            select.setNullSelectionAllowed(false);
            select.setPageLength(0);
            Map<String, String> options = filter.getOptions();
            for (Map.Entry<String, String> entry : options.entrySet()) {
                String key = entry.getKey();
                String value = entry.getValue();
                select.addItem(key);
                select.setItemCaption(key, value);
            }
            select.setValue(filter.getValue());
            if (filter.getHelpText() != null) {
                select.setDescription(filter.getHelpText());
            }

            select.addValueChangeListener(new ValueChangeListener() {

                private static final long serialVersionUID = 1L;

                public void valueChange(ValueChangeEvent event) {

                    String newValue = (String)(event.getProperty().getValue());
                    updateFilter(finalFilter.getId(), newValue);
                }
            });
            m_filterContainer.addComponent(select);
        }
    }
421029
public List<ZuulFilter> getFiltersByType(FilterType filterType) {

        List<ZuulFilter> list = hashFiltersByType.get(filterType);
        if (list != null) return list;

        list = new ArrayList<ZuulFilter>();

        Collection<ZuulFilter> filters = filterRegistry.getAllFilters();
        for (Iterator<ZuulFilter> iterator = filters.iterator(); iterator.hasNext(); ) {
            ZuulFilter filter = iterator.next();
            if (filter.filterType().equals(filterType)) {
                list.add(filter);
            }
        }

        // Sort by filterOrder.
        Collections.sort(list, new Comparator<ZuulFilter>() {
            @Override
            public int compare(ZuulFilter o1, ZuulFilter o2) {
                return o1.filterOrder() - o2.filterOrder();
            }
        });

        hashFiltersByType.putIfAbsent(filterType, list);
        return list;
    }
1046901
public static mpsuser[] get_filtered(nitro_service service, String filter) throws Exception
	{
		mpsuser obj = new mpsuser();
		options option = new options();
		option.set_filter(filter);
		mpsuser[] response = (mpsuser[]) obj.getfiltered(service, option);
		return response;
	}
330605
public static cacheforwardproxy[] get_filtered(nitro_service service, String filter) throws Exception{
		cacheforwardproxy obj = new cacheforwardproxy();
		options option = new options();
		option.set_filter(filter);
		cacheforwardproxy[] response = (cacheforwardproxy[]) obj.getfiltered(service, option);
		return response;
	}
615656
public static sslwrapkey[] get_filtered(nitro_service service, String filter) throws Exception{
		sslwrapkey obj = new sslwrapkey();
		options option = new options();
		option.set_filter(filter);
		sslwrapkey[] response = (sslwrapkey[]) obj.getfiltered(service, option);
		return response;
	}
287305
public void addFilter(Filter filter) {
    filter.setInitialContext(initialContext);

    int minIndex = Integer.MAX_VALUE;
    String[] before = filter.before();
    for (int i = 0; i < before.length; i++) {
        String s = before[i];
        int index = index(activeFilters, s);
        if (index < minIndex) {
          minIndex = index;
        }
      }
      if (minIndex == Integer.MAX_VALUE) {
        // -1 is more usable for not-found than MAX_VALUE
        minIndex = -1;
      }

    if (contains(filter.before(), FIRST_IN_PIPE)) {
      activeFilters.add(0, filter);
    } else if (minIndex != -1) {
      activeFilters.add(minIndex, filter);
    } else {
      activeFilters.add(filter);
    }
  }
1261286
public void setParameterFilters(java.util.Collection<ParameterStringFilter> parameterFilters) {
        if (parameterFilters == null) {
            this.parameterFilters = null;
            return;
        }

        this.parameterFilters = new com.amazonaws.internal.SdkInternalList<ParameterStringFilter>(parameterFilters);
    }