1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package org.opencastproject.adopter.registration.dto;
23
24 import com.google.gson.Gson;
25 import com.google.gson.annotations.SerializedName;
26
27 import java.util.ArrayList;
28 import java.util.List;
29
30
31
32
33 public class StatisticData {
34
35
36 private static final Gson gson = new Gson();
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51 @SerializedName("statistic_key")
52 private String statisticKey;
53
54 @SerializedName("adopter_key")
55 private String adopterKey;
56
57
58 @SerializedName("job_count")
59 private long jobCount;
60
61
62 @SerializedName("event_count")
63 private long eventCount;
64
65
66 @SerializedName("series_count")
67 private int seriesCount;
68
69
70 @SerializedName("user_count")
71 private long userCount;
72
73 @SerializedName("ca_count")
74 private long caCount;
75
76 @SerializedName("total_minutes")
77 private long totalMinutes;
78
79 @SerializedName("tenant_count")
80 private int tenantCount;
81
82
83 private List<Host> hosts;
84
85
86 private String version;
87
88
89
90
91
92
93
94
95
96 public StatisticData(String statisticKey) {
97 this.statisticKey = statisticKey;
98 }
99
100
101
102
103
104 public String jsonify() {
105 return gson.toJson(this);
106 }
107
108
109
110
111
112
113 public String getStatisticKey() {
114 return statisticKey;
115 }
116
117 public void setStatisticKey(String statisticKey) {
118 this.statisticKey = statisticKey;
119 }
120
121 public String getAdopterKey() {
122 return adopterKey;
123 }
124
125 public void setAdopterKey(String adopterKey) {
126 this.adopterKey = adopterKey;
127 }
128
129 public long getJobCount() {
130 return jobCount;
131 }
132
133 public void setJobCount(long jobCount) {
134 this.jobCount = jobCount;
135 }
136
137 public long getEventCount() {
138 return eventCount;
139 }
140
141 public void setEventCount(long eventCount) {
142 this.eventCount = eventCount;
143 }
144
145 public int getSeriesCount() {
146 return seriesCount;
147 }
148
149 public void setSeriesCount(int seriesCount) {
150 this.seriesCount = seriesCount;
151 }
152
153 public long getUserCount() {
154 return userCount;
155 }
156
157 public void setUserCount(long userCount) {
158 this.userCount = userCount;
159 }
160
161 public long getCACount() {
162 return caCount;
163 }
164
165 public void setCACount(long caCount) {
166 this.caCount = caCount;
167 }
168
169 public long getTotalMinutes() {
170 return totalMinutes;
171 }
172
173 public void setTotalMinutes(long totalMinutes) {
174 this.totalMinutes = totalMinutes;
175 }
176
177 public List<Host> getHosts() {
178 return hosts;
179 }
180
181 public void setHosts(List<Host> hosts) {
182 this.hosts = hosts;
183 }
184
185 public int getTenantCount() {
186 return tenantCount;
187 }
188
189 public void setTenantCount(int tenantCount) {
190 this.tenantCount = tenantCount;
191 }
192
193 public void addHost(Host host) {
194 if (this.hosts == null) {
195 this.hosts = new ArrayList<>();
196 }
197 this.hosts.add(host);
198 }
199
200 public void setVersion(String version) {
201 this.version = version;
202 }
203
204 public String getVersion() {
205 return version;
206 }
207 }