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.StringgetEcosystem(java.lang.String vendor, java.lang.String product, java.lang.String identifiedEcosystem)Returns the ecosystem for the given CPE (vendor, product).static booleanisEmpty()Returnstrueif the ecosystem cache is empty; otherwisefalse.static voidsetCache(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()
Returnstrueif the ecosystem cache is empty; otherwisefalse.- Returns:
trueif the ecosystem cache is empty; otherwisefalse
-
-