code: @SuppressWarnings("unchecked")
      @Resource(name = "searchTabs")
      // Map of tab-key to string or collection<string> of search result types
      public void setSearchTabs(Map<String, Object> searchTabMappings) {
          final Map<String, Set<String>> resultTypeMappingsBuilder = new LinkedHashMap<>();
          final List<String> tabKeysBuilder = new ArrayList<>(searchTabMappings.size());
  
          for (final Map.Entry<String, Object> tabMapping : searchTabMappings.entrySet()) {
              final String tabKey = tabMapping.getKey();
              tabKeysBuilder.add(tabKey);
  
              final Object resultTypes = tabMapping.getValue();
              if (resultTypes instanceof Collection) {
                  for (final String resultType : (Collection<String>) resultTypes) {
                      addTabKey(resultTypeMappingsBuilder, tabKey, resultType);
                  }
              } else {
                  final String resultType = (String) resultTypes;
                  addTabKey(resultTypeMappingsBuilder, tabKey, resultType);
              }
          }
  
          this.resultTypeMappings = resultTypeMappingsBuilder;
          this.tabKeys = tabKeysBuilder;
      }
docs: Set the mappings from TabKey to ResultType. The map keys must be strings but the values can
  be either String or Collection<String>