Class CpeEcosystemCache

java.lang.Object
org.owasp.dependencycheck.data.update.cpe.CpeEcosystemCache

public final class CpeEcosystemCache extends Object
Author:
Jeremy Long
  • Method Details

    • getEcosystem

      public static String getEcosystem(String vendor, String product, String identifiedEcosystem)
      Returns the ecosystem for the given CPE (vendor, product). If the CPE has a different ecosystem previously identified the ecosystem will be updated to Multiple; otherwise, if an ecosystem is provided it will be cached for future matching.
      Parameters:
      vendor - the vendor for the CPE
      product - the product for the CPE
      identifiedEcosystem - the ecosystem identified for a CVE.
      Returns:
      the ecosystem
    • setCache

      public static void setCache(Map<Pair<String,String>, String> cache)
      Sets the ecosystem cache and resets the changed map.
      Parameters:
      cache - the new CPE to ecosystem mapping
    • getChanged

      public static Map<Pair<String,String>, String> getChanged()
      Returns the map of changed CPE to ecosystem mappings.
      Returns:
      the map of changed CPE to ecosystem mappings
    • isEmpty

      public static boolean isEmpty()
      Returns true if the ecosystem cache is empty; otherwise false.
      Returns:
      true if the ecosystem cache is empty; otherwise false