SystemParamCache.java
3.32 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
package com.bsth.data;
import com.bsth.common.SystemParamKeys;
import com.bsth.service.SystemParamService;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* @author Hill
*/
@Component
public class SystemParamCache implements InitializingBean {
@Autowired
private SystemParamService systemParamService;
private static SystemParamService systemParamService1;
public static String getSpecialRoles() {
return systemParamService1.getValue(SystemParamKeys.SPECIAL_ROLES);
}
public static String getUrlHttpGpsRealCache() {
return systemParamService1.getValue(SystemParamKeys.URL_HTTP_GPS_REAL_CACHE);
}
public static String getUrlHttpGpsReal() {
return systemParamService1.getValue(SystemParamKeys.URL_HTTP_GPS_REAL);
}
public static String getUrlHttpDirective() {
return systemParamService1.getValue(SystemParamKeys.URL_HTTP_DIRECTIVE);
}
public static String getUrlHttpRfid() {
return systemParamService1.getValue(SystemParamKeys.URL_HTTP_RFID);
}
public static String getUrlHttpReport(String param) {
return systemParamService1.getValue(String.format(SystemParamKeys.URL_HTTP_REPORT, param));
}
public static String getUrlHttpTicketing() {
return systemParamService1.getValue(SystemParamKeys.URL_HTTP_TICKETING);
}
public static String getUrlHttpDsmAck() {
return systemParamService1.getValue(SystemParamKeys.URL_HTTP_DSM_ACK);
}
public static String getUrlHttpCpAck() {
return systemParamService1.getValue(SystemParamKeys.URL_HTTP_CP_ACK);
}
public static String getMailAdmin() {
return systemParamService1.getValue(SystemParamKeys.MAIL_ADMIN);
}
public static String getMailWaybill() {
return systemParamService1.getValue(SystemParamKeys.MAIL_WAYBILL);
}
public static boolean getEnabledFirstLastGeneration() {
return Boolean.parseBoolean(systemParamService1.getValue(SystemParamKeys.ENABLED_FIRST_LAST_GENERATION));
}
public static boolean getEnabledFilterSqlInjection() {
return Boolean.parseBoolean(systemParamService1.getValue(SystemParamKeys.ENABLED_FILTER_SQL_INJECTION));
}
public static boolean getEnabledSso() {
return Boolean.parseBoolean(systemParamService1.getValue(SystemParamKeys.ENABLED_SSO));
}
public static String getSsoSystemCode() {
return systemParamService1.getValue(SystemParamKeys.SSO_SYSTEM_CODE);
}
public static String getUrlHttpSsoLogin() {
return systemParamService1.getValue(SystemParamKeys.URL_HTTP_SSO_LOGIN);
}
public static String getUrlHttpSsoLogout() {
return systemParamService1.getValue(SystemParamKeys.URL_HTTP_SSO_LOGOUT);
}
public static final String URL_HTTP_SSO_AUTH = "url.http.sso.auth";
public static String getUrlHttpSsoAuth() {
return systemParamService1.getValue(SystemParamKeys.URL_HTTP_SSO_AUTH);
}
public static String getUrlHttpPwd() {
return systemParamService1.getValue(SystemParamKeys.URL_HTTP_PWD);
}
@Override
public void afterPropertiesSet() throws Exception {
systemParamService1 = systemParamService;
systemParamService1.refresh();
}
}