1
2
3
4
5
6
7
8 package com.buckosoft.PicMan.domain;
9
10 import java.io.Serializable;
11 import java.text.DecimalFormat;
12 import java.util.List;
13 import java.util.LinkedList;
14
15
16
17
18
19
20 public class System implements Serializable {
21
22 private static final long serialVersionUID = 1L;
23
24
25 private LinkedList<String> picExtensions = new LinkedList<String>();
26 private int thumbHeight = 75;
27 private boolean useThumbCache = false;
28 private String thumbCacheDirectory = "";
29 private int thumbCacheSize = 2000;
30 private String importDirectory = "";
31 private int importsToDo = 5;
32 private int virginsToDo = 10;
33 private boolean engineOn = false;
34 private boolean engineRunOnce = false;
35 private boolean skipXThumbs = false;
36 private boolean showRateOnPics = false;
37 private boolean jobLogSummaryOnly = false;
38 private String engineCronExpression = "0 */5 * * * ?";
39 private boolean updatePicSize = false;
40 private boolean updateMlbFilters = false;
41 private boolean updateMD5s = false;
42 private boolean calcMosaicVectors = false;
43 private boolean buildMosaicPic = false;
44 private int mosaicDepth = 3;
45 private int mosaicThumbHeight = 50;
46 private int mosaicPicsPerPage = 14;
47 private String mosaicThumbCacheDir = "";
48 private int mosaicThumbCacheHeight = 600;
49 private boolean syncEnable = false;
50 private String syncUrl = "http://localhost:8081";
51
52 public System() {}
53
54
55
56
57
58
59 public List<String> getPicExtensions() { return(picExtensions); }
60 public void setPicExtensions(LinkedList<String> ll) { this.picExtensions = ll; }
61 public void addPicExtension(String pe) { this.picExtensions.add((pe)); }
62
63 public int getThumbHeight() { return(thumbHeight); }
64 public void setThumbHeight(int c) { thumbHeight = c; }
65 public boolean isUseThumbCache() { return(useThumbCache); }
66 public void setUseThumbCache(boolean b) { useThumbCache = b; }
67 public String getThumbCacheDirectory() { return(thumbCacheDirectory); }
68 public void setThumbCacheDirectory(String s) { thumbCacheDirectory = s; }
69
70 public int getVirginsToDo() { return virginsToDo; }
71 public void setVirginsToDo(int virginsToDo) { this.virginsToDo = virginsToDo; }
72
73 public int getImportsToDo() { return importsToDo; }
74 public void setImportsToDo(int importsToDo) { this.importsToDo = importsToDo; }
75
76 public boolean isEngineOn() { return engineOn; }
77 public void setEngineOn(boolean engineOn) { this.engineOn = engineOn; }
78 public boolean isEngineRunOnce() { return engineRunOnce; }
79 public void setEngineRunOnce(boolean engineRunOnce) { this.engineRunOnce = engineRunOnce; }
80
81 public String getEngineCronExpression() { return(engineCronExpression); }
82 public void setEngineCronExpression(String s) { engineCronExpression = s; }
83
84 public int getMosaicDepth() { return(mosaicDepth); }
85 public void setMosaicDepth(int mosaicDepth) { this.mosaicDepth = mosaicDepth; }
86
87
88
89
90
91
92 public int getThumbCacheSize() {
93 return thumbCacheSize;
94 }
95
96
97
98
99
100 public void setThumbCacheSize(int thumbCacheSize) {
101 this.thumbCacheSize = thumbCacheSize;
102 }
103
104
105
106
107 public int getMosaicThumbHeight() {
108 return mosaicThumbHeight;
109 }
110
111
112
113
114 public void setMosaicThumbHeight(int mosaicThumbHeight) {
115 this.mosaicThumbHeight = mosaicThumbHeight;
116 }
117
118
119
120
121 public int getMosaicPicsPerPage() {
122 return mosaicPicsPerPage;
123 }
124
125
126
127
128 public void setMosaicPicsPerPage(int mosaicPicsPerPage) {
129 this.mosaicPicsPerPage = mosaicPicsPerPage;
130 }
131
132
133
134
135 public String getMosaicThumbCacheDir() {
136 return mosaicThumbCacheDir;
137 }
138
139
140
141
142 public void setMosaicThumbCacheDir(String mosaicThumbCacheDir) {
143 this.mosaicThumbCacheDir = mosaicThumbCacheDir;
144 }
145
146
147
148
149 public int getMosaicThumbCacheHeight() {
150 return mosaicThumbCacheHeight;
151 }
152
153
154
155
156 public void setMosaicThumbCacheHeight(int mosaicThumbCacheHeight) {
157 this.mosaicThumbCacheHeight = mosaicThumbCacheHeight;
158 }
159
160
161
162
163 public String getImportDirectory() {
164 return importDirectory;
165 }
166
167
168
169
170 public void setImportDirectory(String importDirectory) {
171 this.importDirectory = importDirectory;
172 }
173
174
175
176
177 public boolean isSkipXThumbs() {
178 return skipXThumbs;
179 }
180
181
182
183
184 public void setSkipXThumbs(boolean skipXThumbs) {
185 this.skipXThumbs = skipXThumbs;
186 }
187
188
189
190
191
192 public boolean isShowRateOnPics() {
193 return showRateOnPics;
194 }
195
196
197
198
199 public void setShowRateOnPics(boolean showRateOnPics) {
200 this.showRateOnPics = showRateOnPics;
201 }
202
203
204
205
206 public boolean isJobLogSummaryOnly() {
207 return jobLogSummaryOnly;
208 }
209
210
211
212
213 public void setJobLogSummaryOnly(boolean jobLogSummaryOnly) {
214 this.jobLogSummaryOnly = jobLogSummaryOnly;
215 }
216
217
218
219
220 public boolean isBuildMosaicPic() {
221 return buildMosaicPic;
222 }
223
224
225
226
227 public void setBuildMosaicPic(boolean buildMosaicPic) {
228 this.buildMosaicPic = buildMosaicPic;
229 }
230
231
232
233
234 public boolean isCalcMosaicVectors() {
235 return calcMosaicVectors;
236 }
237
238
239
240
241 public void setCalcMosaicVectors(boolean calcMosaicVectors) {
242 this.calcMosaicVectors = calcMosaicVectors;
243 }
244
245
246 public boolean isSyncEnable() {
247 return syncEnable;
248 }
249
250 public void setSyncEnable(boolean syncEnable) {
251 this.syncEnable = syncEnable;
252 }
253
254 public String getSyncUrl() {
255 return syncUrl;
256 }
257
258 public void setSyncUrl(String syncUrl) {
259 this.syncUrl = syncUrl;
260 }
261
262
263
264
265
266 public boolean isUpdatePicSize() {
267 return updatePicSize;
268 }
269
270
271
272
273 public void setUpdatePicSize(boolean updatePicSize) {
274 this.updatePicSize = updatePicSize;
275 }
276
277
278
279
280 public boolean isUpdateMlbFilters() {
281 return updateMlbFilters;
282 }
283
284
285
286
287 public void setUpdateMlbFilters(boolean updateMlbFilters) {
288 this.updateMlbFilters = updateMlbFilters;
289 }
290
291
292
293
294
295 public boolean isUpdateMD5Sums() {
296 return updateMD5s;
297 }
298
299
300
301
302 public void setUpdateMD5Sums(boolean updateMD5s) {
303 this.updateMD5s = updateMD5s;
304 }
305
306
307 public static String getUuid(String setName, int size, int item) {
308 DecimalFormat df2 = new DecimalFormat("00");
309 DecimalFormat df3 = new DecimalFormat("000");
310 return(new String(setName
311 + "-" + df3.format(size)
312 + "-" + df2.format(item)));
313 }
314
315
316 public static String getUuid(String set, int size) {
317 DecimalFormat df3 = new DecimalFormat("000");
318 return(new String(set
319 + "-" + df3.format(size)));
320 }
321
322 public static String getDUid(String setName, int size) {
323 return(setName + "_" + size);
324 }
325 }