code: public Collection<? extends RepositoryResource> getAllResources(LicenseType licenseType,
                                                                      ResourceType type) throws RepositoryBackendException {
          Collection<? extends RepositoryResource> allResources = getAllResources(type);
  
          if (licenseType != null) {
              Collection<RepositoryResource> licensedResources = new ArrayList<RepositoryResource>();
  
              for (RepositoryResource resource : getAllResources(type)) {
                  if (licenseType.equals(resource.getLicenseType())) {
                      licensedResources.add(resource);
                  }
              }
  
              return licensedResources;
          } else {
              return allResources;
          }
      }
docs: Gets all resources of the specified type and license type from the repositories.
  
  @param licenseType The {@link LicenseType} of the resources to obtain
  @param type The {@link ResourceType} of resource to obtain
  @return A {@link Collection} of {@link RepositoryResourceImpl} object
  @throws RepositoryBackendException