code: protected BooleanQuery.Builder appendResourceTypeFilter(
          CmsObject cms,
          BooleanQuery.Builder filter,
          List<String> resourceTypes) {
  
          if ((resourceTypes != null) && (resourceTypes.size() > 0)) {
              // add query resource types (if required)
              filter.add(
                  new BooleanClause(
                      getMultiTermQueryFilter(CmsSearchField.FIELD_TYPE, resourceTypes),
                      BooleanClause.Occur.MUST));
          }
  
          return filter;
      }
docs: Appends the a resource type filter to the given filter clause that matches all given resource types.<p>
  
  In case the provided List is null or empty, the original filter is left unchanged.<p>
  
  The original filter parameter is extended and also provided as return value.<p>
  
  @param cms the current OpenCms search context
  @param filter the filter to extend
  @param resourceTypes the resource types that will compose the filter
  
  @return the extended filter clause