Class CpeEcosystemCache
- java.lang.Object
-
- org.owasp.dependencycheck.data.update.cpe.CpeEcosystemCache
-
public final class CpeEcosystemCache extends java.lang.Object
- Author:
- Jeremy Long
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Map<Pair<java.lang.String,java.lang.String>,java.lang.String>
getChanged()
Returns the map of changed CPE to ecosystem mappings.static java.lang.String
getEcosystem(java.lang.String vendor, java.lang.String product, java.lang.String identifiedEcosystem)
Returns the ecosystem for the given CPE (vendor, product).static boolean
isEmpty()
Returnstrue
if the ecosystem cache is empty; otherwisefalse
.static void
setCache(java.util.Map<Pair<java.lang.String,java.lang.String>,java.lang.String> cache)
Sets the ecosystem cache and resets the changed map.
-
-
-
Method Detail
-
getEcosystem
public static java.lang.String getEcosystem(java.lang.String vendor, java.lang.String product, java.lang.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 CPEproduct
- the product for the CPEidentifiedEcosystem
- the ecosystem identified for a CVE.- Returns:
- the ecosystem
-
setCache
public static void setCache(java.util.Map<Pair<java.lang.String,java.lang.String>,java.lang.String> cache)
Sets the ecosystem cache and resets the changed map.- Parameters:
cache
- the new CPE to ecosystem mapping
-
getChanged
public static java.util.Map<Pair<java.lang.String,java.lang.String>,java.lang.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()
Returnstrue
if the ecosystem cache is empty; otherwisefalse
.- Returns:
true
if the ecosystem cache is empty; otherwisefalse
-
-