1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.owasp.dependencycheck.data.nvd.ecosystem;
19
20 import org.owasp.dependencycheck.utils.Settings;
21
22
23
24
25
26
27 public final class Ecosystem {
28
29
30
31
32 public static final String RUBY = "ruby";
33
34
35
36 public static final String DOTNET = "dotnet";
37
38
39
40 public static final String IOS = "ios";
41
42
43
44 public static final String PHP = "php";
45
46
47
48 public static final String GOLANG = "golang";
49
50
51
52 public static final String JAVA = "java";
53
54
55
56 public static final String NATIVE = "native";
57
58
59
60 public static final String PYTHON = "python";
61
62
63
64 public static final String JAVASCRIPT = "js";
65
66
67
68 public static final String NODEJS = "nodejs";
69
70
71
72 public static final String RUST = "rust";
73
74
75
76 public static final String COLDFUSION = "coldfusion";
77
78
79
80 public static final String PERL = "perl";
81
82
83
84 public static final String ELIXIR = "exlixir";
85
86
87
88
89 public static final String DART = "dart";
90
91
92
93
94
95 private final Settings settings;
96
97
98
99 private final int defaultQuerySize;
100
101
102
103
104
105
106 public Ecosystem(Settings settings) {
107 this.settings = settings;
108 this.defaultQuerySize = settings.getInt(Settings.KEYS.MAX_QUERY_SIZE_DEFAULT, 100);
109 }
110
111
112
113
114
115
116
117
118 public int getLuceneMaxQueryLimitFor(String ecosystem) {
119 return settings.getInt(Settings.KEYS.MAX_QUERY_SIZE_PREFIX + ecosystem, defaultQuerySize);
120 }
121 }