LdapBaseBean.java
6.58 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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
/*
*
* Copyright (c) 2001-2017 泛微软件.
* 泛微协同商务系统,版权所有.
*
*/
package org.jasig.cas.adaptors.ldap;
/**
* <p>Title: ${file_name}</p>
* <p>Description:Ldap配置信息 </p>
*
* @author SJZ
* @version 1.0
* @date 2017/6/14
*/
public class LdapBaseBean implements Cloneable {
/**
* 主键
*/
private String ldapId;
/**
* LDAP名称
*/
private String ldapName;
/**
* 是否启用 启用:1,关闭:0
*/
private int isUsed = 0;
/**
* LDAP类别ID
*/
private String ldapType;
/**
* AD domain
*/
private String baseDomain;
/**
* 是否启用LDAP登录认证 启用:1,关闭:0
*/
private int isAdAccount = 0;
/**
* LDAP驱动类
*/
private String factoryClass;
/**
* 是否LDAP认证 开启:1,关闭:0
*/
private int isAuth = 0;
/**
* 是否AD单点登录 开启:1,关闭:0
*/
private int isSSO = 0;
/**
* 是否绕过证书 绕过:1,不绕过:0
*/
private int passingCert = 0;
/**
* 是否正向同步组织架构 开启:1,关闭:0
*/
private int isPull = 1;
/**
* 是否反向同步(推) 开启:1,关闭:0
*/
private int isPush = 1;
/**
* IP地址或域名
*/
private String ip;
/**
* 同步协议[ldap、ldaps]
*/
private String protocol;
/**
* 正向同步端口号
*/
private String port;
/**
* 证书路径 protocol=ldaps 时必填
*/
private String keystorePath;
/**
* 证书密码 pushProtocol=ldaps 时必填
*/
private String keystorePassword;
/**
* LDAP 用户名
*/
private String ldapUser;
/**
* LDAP 密码
*/
private String ldapPassword;
/**
* 创建日期
*/
private String createDate;
/**
* 创建时间
*/
private String createTime;
/**
* 修改日期
*/
private String modifyDate;
/**
* 修改时间
*/
private String modifyTime;
public String getLdapId() {
return null2String(ldapId);
}
public void setLdapId(String ldapId) {
this.ldapId = ldapId;
}
public String getLdapName() {
return null2String(ldapName);
}
public void setLdapName(String ldapName) {
this.ldapName = ldapName;
}
public int getIsUsed() {
return isUsed;
}
public void setIsUsed(int isUsed) {
this.isUsed = isUsed;
}
public String getLdapType() {
return null2String(ldapType);
}
public void setLdapType(String ldapType) {
this.ldapType = ldapType;
}
public String getFactoryClass() {
return null2String(factoryClass);
}
public void setFactoryClass(String factoryClass) {
this.factoryClass = factoryClass;
}
public int getIsAuth() {
return isAuth;
}
public void setIsAuth(int isAuth) {
this.isAuth = isAuth;
}
public int getIsSSO() {
return isSSO;
}
public void setIsSSO(int isSSO) {
this.isSSO = isSSO;
}
public String getIp() {
return null2String(ip);
}
public void setIp(String ip) {
this.ip = ip;
}
public String getProtocol() {
return null2String(protocol);
}
public void setProtocol(String protocol) {
this.protocol = protocol;
}
public String getPort() {
return null2String(port);
}
public void setPort(String port) {
this.port = port;
}
public String getKeystorePath() {
return null2String(keystorePath);
}
public void setKeystorePath(String keystorePath) {
this.keystorePath = keystorePath;
}
public String getKeystorePassword() {
return null2String(keystorePassword);
}
public void setKeystorePassword(String keystorePassword) {
this.keystorePassword = keystorePassword;
}
public String getLdapUser() {
String luser = null2String(ldapUser);
if (luser.toUpperCase().indexOf("CN=") < 0 && luser.toUpperCase().indexOf(",OU=") < 0
&& luser.toUpperCase().indexOf(",DC=") < 0
&& luser.toUpperCase().indexOf("\\") < 0) { //默认在users组下
return null2String(baseDomain) + "\\" + luser;
} else {
return luser;
}
}
public String getLdapUserForView() {
return null2String(ldapUser);
}
public void setLdapUser(String ldapUser) {
this.ldapUser = ldapUser;
}
public String getLdapPassword() {
return null2String(ldapPassword);
}
public void setLdapPassword(String ldapPassword) {
this.ldapPassword = ldapPassword;
}
public String getCreateDate() {
return null2String(createDate);
}
public void setCreateDate(String createDate) {
this.createDate = createDate;
}
public String getCreateTime() {
return null2String(createTime);
}
public void setCreateTime(String createTime) {
this.createTime = createTime;
}
public String getModifyDate() {
return null2String(modifyDate);
}
public void setModifyDate(String modifyDate) {
this.modifyDate = modifyDate;
}
public String getModifyTime() {
return null2String(modifyTime);
}
public void setModifyTime(String modifyTime) {
this.modifyTime = modifyTime;
}
public int getIsPull() {
return isPull;
}
public void setIsPull(int isPull) {
this.isPull = isPull;
}
public int getIsPush() {
return isPush;
}
public void setIsPush(int isPush) {
this.isPush = isPush;
}
public String getBaseDomain() {
return null2String(baseDomain);
}
public void setBaseDomain(String baseDomain) {
this.baseDomain = baseDomain;
}
public int getIsAdAccount() {
return isAdAccount;
}
public void setIsAdAccount(int isAdAccount) {
this.isAdAccount = isAdAccount;
}
public int getPassingCert() {
return passingCert;
}
public void setPassingCert(int passingCert) {
this.passingCert = passingCert;
}
@Override
public LdapBaseBean clone() {
LdapBaseBean obj = null;
try {
obj = (LdapBaseBean) super.clone();
} catch (CloneNotSupportedException e) {
e.printStackTrace();
}
return obj;
}
public String null2String(String s) {
return s == null ? "" : s;
}
}