SystemParamCache.java
5.17 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
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 getSpecialDays() {
return systemParamService1.getValue(SystemParamKeys.SPECIAL_DAYS);
}
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 String getUrlHttpSsoAuth() {
return systemParamService1.getValue(SystemParamKeys.URL_HTTP_SSO_AUTH);
}
public static String getUrlHttpMaintenance() {
return systemParamService1.getValue(SystemParamKeys.URL_HTTP_MAINTENANCE);
}
public static boolean getEnabledWhiteIp() {
return Boolean.parseBoolean(systemParamService1.getValue(SystemParamKeys.ENABLED_WHITE_IP));
}
public static boolean getEnableFilterAuthority() {
return Boolean.parseBoolean(systemParamService1.getValue(SystemParamKeys.ENABLED_FILTER_AUTHORITY));
}
public static String getUrlHttpDvr() {
return systemParamService1.getValue(SystemParamKeys.URL_HTTP_DVR);
}
public static String getUrlHttpDvrPwd() {
return systemParamService1.getValue(SystemParamKeys.URL_HTTP_DVR_PWD);
}
public static String getDrSysCityInterfaceUrl() {
return systemParamService1.getValue(SystemParamKeys.DR_SYS_CITY_INTERFACE_URL);
}
public static String getDrSysCityInterfaceUrl1() {
return systemParamService1.getValue(SystemParamKeys.DR_SYS_CITY_INTERFACE_URL1);
}
public static String getDrSysCityInterfaceUser() {
return systemParamService1.getValue(SystemParamKeys.DR_SYS_CITY_INTERFACE_USER);
}
public static String getDrSysCityInterfacePassword() {
return systemParamService1.getValue(SystemParamKeys.DR_SYS_CITY_INTERFACE_PASSWORD);
}
public static String getDrSysCityInterfaceBakUrl() {
return systemParamService1.getValue(SystemParamKeys.DR_SYS_CITY_INTERFACE_BAK_URL);
}
public static String getDrSysCityInterfaceBakUrl1() {
return systemParamService1.getValue(SystemParamKeys.DR_SYS_CITY_INTERFACE_BAK_URL1);
}
public static String getDrSysCityInterfaceBakUser() {
return systemParamService1.getValue(SystemParamKeys.DR_SYS_CITY_INTERFACE_BAK_USER);
}
public static String getDrSysCityInterfaceBakPassword() {
return systemParamService1.getValue(SystemParamKeys.DR_SYS_CITY_INTERFACE_BAK_PASSWORD);
}
@Override
public void afterPropertiesSet() throws Exception {
systemParamService1 = systemParamService;
systemParamService1.refresh();
}
}