Native2PDFSvc.java
3.15 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* org.apache.felix.scr.annotations.Component
* org.apache.felix.scr.annotations.Property
* org.apache.felix.scr.annotations.Service
* org.apache.sling.commons.osgi.OsgiUtil
*/
package com.adobe.native2pdf.bmc;
import com.adobe.native2pdf.bmc.ConverterBslJService;
import com.adobe.native2pdf.bmc.Native2PDFSvcMBean;
import java.io.File;
import java.io.IOException;
import java.util.Map;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Property;
import org.apache.felix.scr.annotations.Service;
import org.apache.sling.commons.osgi.OsgiUtil;
@Component(metatype=1, immediate=1, label="%native2pdf.bmc.name", description="%native2pdf.bmc.description", inherit=1)
@Service
public class Native2PDFSvc
extends ConverterBslJService
implements Native2PDFSvcMBean {
private static final int DEFAULT_MAX_LAUNCH_APP_RETRY_COUNT = 1;
@Property(intValue={1})
private static final String PROP_MAX_LAUNCH_APP_RETRY_COUNT = "native2pdf.bmc.maxLaunchAppRetryCount";
private static final boolean DEFAULT_USE_CUSTOM_LAUNCHER = true;
@Property(boolValue={1})
private static final String PROP_USE_CUSTOM_LAUNCHER = "UseCustomLauncher";
protected int m_maxLaunchAppRetryCount;
protected boolean m_useCustomLauncher;
public Native2PDFSvc() {
this.m_MainClassArg = "com.adobe.native2pdf.bmc.Native2PDFConverterServer";
this.mKillsplwow64 = "True";
this.m_maxLaunchAppRetryCount = 0;
}
protected void initializeConfig(Map config) {
super.initializeConfig(config);
int maxAppRetryCount = OsgiUtil.toInteger(config.get("native2pdf.bmc.maxLaunchAppRetryCount"), (int)1);
this.setMaxLaunchAppRetryCount(maxAppRetryCount);
boolean useCustomLauncher = OsgiUtil.toBoolean(config.get("UseCustomLauncher"), (boolean)true);
this.setUseCustomLauncher(useCustomLauncher);
}
protected synchronized void copyConfigResources(File persistentDir) throws IOException {
}
public boolean getDebug() {
return super.getDebug();
}
public int getMaximumReUseCount() {
return super.getMaximumReUseCount();
}
public String getORBParams() {
return super.getORBParams();
}
public int getPoolMax() {
return super.getPoolMax();
}
public void setDebug(boolean debug) {
super.setDebug(debug);
}
public void setMaximumReUseCount(int count) {
super.setMaximumReUseCount(count);
}
public void setORBParams(String params) {
super.setORBParams(params);
}
public void setPoolMax(int newMax) {
super.setPoolMax(newMax);
}
public int getMaxLaunchAppRetryCount() {
return this.m_maxLaunchAppRetryCount;
}
public void setMaxLaunchAppRetryCount(int newMax) {
if (newMax >= 0) {
this.m_maxLaunchAppRetryCount = newMax;
}
}
public boolean getUseCustomLauncher() {
return this.m_useCustomLauncher;
}
public void setUseCustomLauncher(boolean useCustomLauncher) {
this.m_useCustomLauncher = useCustomLauncher;
}
}