AESProperties.java
2.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* com.adobe.pdfg.logging.PDFGLogger
*/
package com.adobe.pdfg.common;
import com.adobe.pdfg.common.EarProperties;
import com.adobe.pdfg.logging.PDFGLogger;
import java.util.Locale;
import java.util.Map;
import java.util.Properties;
public class AESProperties
extends EarProperties {
protected static AESProperties instance = null;
private static PDFGLogger pdfgLogger = PDFGLogger.getPDFGLogger(AESProperties.class);
protected AESProperties() {
this.init(null, this.getClass().getClassLoader());
}
public static AESProperties getInstance() {
if (instance == null || AESProperties.instance.tryCreationAgain) {
instance = new AESProperties();
}
return instance;
}
public static String getProperty(String key) {
return AESProperties.getInstance().properties.getProperty(key);
}
public static String getProperty(String key, String defaultValue) {
return AESProperties.getInstance().properties.getProperty(key, defaultValue);
}
public static Object setProperty(String key, String value) {
return AESProperties.getInstance().properties.setProperty(key, value);
}
public static int getIntProperty(String key, int defaultValue) {
return AESProperties.getInstance().virtualGetIntProperty(key, defaultValue);
}
public static int getMaximumTimeout() {
int timeoutSeconds = AESProperties.getIntProperty("server.conversion.timeout", 270);
return timeoutSeconds;
}
public static int getGlobalTimeout() {
int timeoutSeconds = AESProperties.getIntProperty("server.global.timeout", 300);
return timeoutSeconds;
}
public static int getJobCleanupScanSeconds() {
try {
return AESProperties.getIntProperty("server.pdfg.cleanup.scan.seconds", 0);
}
catch (Exception e) {
pdfgLogger.trace(e.getMessage(), null, (Throwable)e);
return 0;
}
}
public static int getJobExpirationSeconds() {
try {
return AESProperties.getIntProperty("server.pdfg.job.expiration.seconds", 0);
}
catch (Exception e) {
pdfgLogger.trace(e.getMessage(), null, (Throwable)e);
return 0;
}
}
public static Locale getLocale() {
String localeSet = AESProperties.getProperty("server.locale");
if (localeSet == null) {
return null;
}
return new Locale(localeSet);
}
public static void initialize(Map config) {
AESProperties.getInstance().properties.putAll(config);
}
}