code: public Collection<? extends RepositoryResource> findResources(final String searchTerm,
                                                                    final Collection<ProductDefinition> productDefinitions,
                                                                    final Collection<ResourceType> types,
                                                                    final Visibility visibility) throws RepositoryBackendException {
          return cycleThroughRepositories(new RepositoryInvoker<RepositoryResource>() {
              @SuppressWarnings("unchecked")
              @Override
              public Collection<RepositoryResource> performActionOnRepository(RepositoryConnection connection) throws RepositoryBackendException {
                  return (Collection<RepositoryResource>) connection.findResources(searchTerm, productDefinitions, types, visibility);
              }
          });
      }
docs: Searches for resources that contained <code>searchTerm</code> from the repository returning only those that are relevant to the <code>productDefinitions</code>.
  
  @param searchTerm The word(s) to search for.
  @param productDefinitions The products that these resources will be installed into. Can be <code>null</code> or empty indicating resources for any product should be obtained
  (they will just be filtered by type).
  @param types The {@link ResourceType} of resource to obtain. <code>null</code> indicates that all types should be obtained.
  @param visibility The {@link Visibility} of resources to obtain. <code>null</code> indicates that resources with any visibility should be obtained. This is only relevant if
  {@link ResourceType#FEATURE} is one of the <code>types</code> being obtained, it is ignored for other types.
  @return A LinkedHashSet of resources that match the search term for this product. They will be ordered according to the order returned from the repository which should be in
  priority order.
  @throws RepositoryBackendException If there is an error connecting to one of the repositories.