docs: private List<CmsResource> searchResources(I_CmsReport report, CmsObject cmsObject) {
  
          report.println(
              Messages.get().container(Messages.RPT_SOURCESEARCH_START_COLLECTING_FILES_TO_SEARCH_IN_0),
              I_CmsReport.FORMAT_HEADLINE);
  
          List<CmsResource> resources = new ArrayList<CmsResource>();
          if (m_settings.isSolrSearch()) {
              CmsSolrIndex index = OpenCms.getSearchManager().getIndexSolr(m_settings.getSource());
              if (index != null) {
                  CmsSolrQuery query = new CmsSolrQuery(
                      null,
                      CmsRequestUtil.createParameterMap(m_settings.getQuery() + "&fl=path,type"));
                  query.setSearchRoots(m_settings.getPaths());
                  if ((m_settings.getTypesArray() != null) && (m_settings.getTypesArray().length > 0)) {
                      query.setResourceTypes(m_settings.getTypesArray());
                  }
                  query.setRows(new Integer(MAX_PROCESSED_SOLR_RESULTS));
                  query.ensureParameters();
                  try {
                      resources.addAll(
                          index.search(cmsObject, query, true, null, false, null, MAX_PROCESSED_SOLR_RESULTS));
                  } catch (CmsSearchException e) {
                      LOG.error(e.getMessage(), e);
                  }
              }
          } else {
              CmsResourceFilter filter = CmsResourceFilter.ALL.addRequireFile().addExcludeState(
                  CmsResource.STATE_DELETED).addRequireTimerange().addRequireVisible();
              if ((m_settings.getTypesArray() != null) && (m_settings.getTypesArray().length > 0)) {
                  for (String resTypeName : m_settings.getTypesArray()) {
                      try {
                          I_CmsResourceType type = OpenCms.getResourceManager().getResourceType(resTypeName);
                          filter = filter.addRequireType(type);
                      } catch (CmsLoaderException e) {
                          // noop
                      } catch (NullPointerException e) {
                          // noop
                      }
                  }
              }
  
              // iterate over all selected paths
              Iterator<String> iterPaths = m_settings.getPaths().iterator();
              while (iterPaths.hasNext()) {
                  String path = iterPaths.next();
                  try {
                      // only read resources which are files and not deleted, which are in the current time range window and where the current
                      // user has the sufficient permissions to read them
                      List<CmsResource> tmpResources = getCms().readResources(path, filter);
                      if ((tmpResources != null) && !tmpResources.isEmpty()) {
                          resources.addAll(tmpResources);
                      }
                  } catch (CmsException e) {
                      // an error occured
                      LOG.error(Messages.get().container(Messages.RPT_SOURCESEARCH_ERROR_READING_RESOURCES_1, path), e);
                      report.println(
                          Messages.get().container(Messages.RPT_SOURCESEARCH_ERROR_READING_RESOURCES_1, path),
                          I_CmsReport.FORMAT_ERROR);
                  }
              }
          }
          return resources;
      }