View Javadoc
1   /**
2    * Copyright By Grandsoft Company Limited.  
3    * 2012-3-16 下午03:47:38
4    */
5   package gboat2.web.action;
6   
7   import gboat2.base.bridge.GboatAppContext;
8   import gboat2.base.bridge.model.NaviResource;
9   import gboat2.base.bridge.model.UserSession;
10  import gboat2.base.bridge.util.json.JsonUtil;
11  import gboat2.base.core.web.BaseActionSupport;
12  import gboat2.base.core.web.JsonResult;
13  import gboat2.base.core.web.JsonResultSupport;
14  import gboat2.web.Constants;
15  import gboat2.web.business.IAuthorityBusiness;
16  import gboat2.web.business.IGroupBusiness;
17  import gboat2.web.business.ILoginBusiness;
18  import gboat2.web.business.IProfileBusiness;
19  import gboat2.web.business.IRoleBusiness;
20  import gboat2.web.business.IShortcutBusiness;
21  import gboat2.web.business.ISystemConfigBusiness;
22  import gboat2.web.business.IUserBusiness;
23  import gboat2.web.exception.ValidateException;
24  import gboat2.web.model.AuthorityResourceVO;
25  import gboat2.web.model.Group;
26  import gboat2.web.model.Profile;
27  import gboat2.web.model.Resource;
28  import gboat2.web.model.Role;
29  import gboat2.web.model.ShortcutResourceVO;
30  import gboat2.web.model.SystemConfig;
31  import gboat2.web.model.User;
32  import gboat2.web.model.UserGroupOrganMapper;
33  import gboat2.web.model.UserRoleGroupOrganVO;
34  import gboat2.web.service.ISessionService;
35  import gboat2.web.service.IUserAuthService;
36  import gboat2.web.service.PrivilegeException;
37  import gboat2.web.service.impl.UserAuthServiceImpl;
38  
39  import java.io.IOException;
40  import java.net.URL;
41  import java.text.SimpleDateFormat;
42  import java.util.ArrayList;
43  import java.util.Date;
44  import java.util.Iterator;
45  import java.util.List;
46  import java.util.Locale;
47  import java.util.Map;
48  
49  import net.sf.json.JSONObject;
50  
51  import org.apache.commons.lang3.StringUtils;
52  import org.apache.struts2.convention.annotation.Result;
53  import org.apache.struts2.convention.annotation.ResultPath;
54  import org.apache.struts2.convention.annotation.Results;
55  import org.osgi.framework.BundleContext;
56  import org.osgi.framework.InvalidSyntaxException;
57  import org.osgi.framework.ServiceReference;
58  import org.springframework.beans.factory.annotation.Autowired;
59  
60  /**
61   * 用户登录
62   * @author zhaop
63   * @since jdk1.6
64   * @date 2012-3-16
65   *  
66   */
67  @ResultPath("/content")
68  @Results(value = { @Result(name = "error", location = "login.jsp"),
69          @Result(name = "desktop", location = "/g-index!desktop.do", type = "redirect", params={"openUrl", "%{openUrl}", "openParams", "%{openParams}"}),
70  		@Result(name = "normal", location = "/g-index!normal.do", type = "redirect", params={"openUrl", "%{openUrl}", "openParams", "%{openParams}"}),
71          @Result(name = "usersystem", location = "${namespace}"+"/g-index!index.do?mapperId=${mapperId}", type = "redirect"),
72  		@Result(name = "logout", location = "/g-index.do", type = "redirect"), @Result(name = "no_user", location = "index.jsp") })
73  public class LoginAction extends BaseActionSupport {
74  
75  	private static final long serialVersionUID = 1L;
76  
77  	/** 用户名 */
78  	private String username;
79  
80  	/** 密码 */
81  	private String password;
82  
83  	/** 身份 */
84  	private String mapperId;
85  
86  	/** 系统id */
87  	private String systemId;
88  
89  	private List<UserRoleGroupOrganVO> userStatus;
90  
91  	/** 错误信息 */
92  	private String errorMessage = null;
93  
94  	// temp:ExtJS 版本 addby:wangsr(result配置中传递此参数)
95  	private String extJSVer = "4.1";
96  
97  	/** 用户服务*/
98  	@Autowired
99  	private IUserBusiness userService;
100 
101 	/** 快捷图标服务*/
102 	@Autowired
103 	private IShortcutBusiness shortcutService;
104 
105 	/** Session服务*/
106 	@Autowired
107 	private ISessionService sessionService;
108 
109 	/** 权限服务 */
110 	@Autowired
111 	private IAuthorityBusiness authorityService;
112 
113 	@Autowired
114 	private IProfileBusiness profileService;
115 
116 	@Autowired
117 	private ISystemConfigBusiness systemConfigService;
118 
119 	@Autowired
120 	private IGroupBusiness gropBusi;
121 
122 	@Autowired
123 	private IRoleBusiness roleBusi;
124 
125 	@Autowired
126 	private ILoginBusiness loginBusiness;
127 
128 	private String roleId;
129 
130 	private String groupId;
131 
132     private String openUrl;
133     private String openParams;
134     private String namespace = "/gbmp";
135 	/**
136 	 * 登陆
137 	 * @return 转向信息
138 	 */
139 	public String login() {
140 		//取得登录入口来源
141 		String uri = request.getRequestURI();
142 		String base = request.getContextPath();
143 		String namespace = uri.replaceAll(base, "").replace("/login!login.do", "");
144 		String indexUrl = namespace + "/g-index.do";
145 		this.setNamespace(namespace);
146 		//根据入口来源判断要登录的系统
147 		SystemConfig system = systemConfigService.getSystemByIndexUrl(indexUrl);
148 		if (null == system || StringUtils.isBlank(system.getSystemId())) {
149 			system = new SystemConfig();
150 			system.setSystemId(Constants.GBOAT2_SYSTEM_ID);
151 		}
152 		UserSession userSession = null;
153 
154 		//超级用户 直接登入
155 		if (Constants.SUPER.equals(username)) {
156 			userSession = loginBusiness.superSession(null, system.getSystemId());
157 			setSession(userSession);
158 			return getPageAppMode(userSession);
159 		}
160 		this.setSystemId(system.getSystemId()); //设置系统id
161 		
162 		List<UserGroupOrganMapper> statusList = null;
163 		if (StringUtils.isEmpty(mapperId)) {
164 			if (StringUtils.isEmpty(username)) {
165 				errorMessage = "登录失败,找不到用户身份!";
166 				addActionError("登录失败,找不到用户身份!");
167 				return "error";
168 			}
169 			statusList = getUserAuth().convertOuterAuthToInnerAuth(username);
170 			UserGroupOrganMapper userGroupOrganMapper = statusList.get(0);
171 			mapperId = userGroupOrganMapper.getMapperId();
172 		} 
173 		UserGroupOrganMapper mapper = (UserGroupOrganMapper) userService.get(UserGroupOrganMapper.class, mapperId);
174 		//身份验证
175 		if (null == mapper) {
176 			errorMessage = "登录失败,找不到用户身份!";
177 			addActionError("登录失败,找不到用户身份!");
178 			return "error";
179 		}
180 		//普通用户 直接登入
181 		User user = null;
182 		if (StringUtils.isNotEmpty(username)) {
183 			user = userService.getUserByLoginId(getUserAuth().convertOuterUserNameToInnerUserName(username));
184 		} else {//从身份mapper中,获取userID
185 			user = userService.getUserByUserId(mapper.getUserId());
186 		}
187 		try {
188 			userSession = sessionService.login(user, mapper);
189 			//SessionService中获取多系统权限,该处重新设置为当前系统
190 			userSession.setSystemId(system.getSystemId());
191 		} catch (PrivilegeException e) {
192 			errorMessage = e.getMessage();
193 			addActionError(e.getMessage());
194 			return "error";
195 		}
196 		/**获取用户菜单树**/
197 		userSession = sessionService.loadNavigationMenuToSession(userSession, mapper);
198 
199 		setSession(userSession);
200 		return getPageAppMode(userSession);
201 	}
202 	
203 	/**
204 	 * 采用ajax模式登陆前,取得登陆角色
205 	 * @author tanxw
206 	 * @date 2012-8-9
207 	 **/
208 	public void rolesBeforeLogin() {
209 
210 		//校验验证码 todo 校验此块 需要复写AbstractUserAuthService写自己的实现
211 		//if (!checkValidNumber())
212 		//	return;
213 
214 		//验证逻辑
215 		try {
216 			getUserAuth().validateUser(username, password);
217 
218 			//成功:重置登陆错误计数器
219 			resetValidCompnent();
220 		} catch (ValidateException e) {
221 			//验证失败做的一些事情
222 			outputFailureAndCheckValidCompnent(e.getMessage());
223 		}
224 
225 		//super 用户
226 		if (Constants.SUPER.equals(username)) {
227 			GboatAppContext.output(JsonResult.SUCCESS);
228 			return;
229 		}
230 
231 		//普通用户
232 		User user = userService.getUserByLoginId(username); //取得用户PO
233 		userStatus = userService.getMapperVOByUserId(user.getUserId());
234 		outputRolesBeforeLogin(userStatus);
235 	}
236 
237 	/**
238 	 * 把登陆前的角色信息输出到页面
239 	 */
240 	protected void outputRolesBeforeLogin(List<UserRoleGroupOrganVO> userStatus) {
241 		List<UserRoleGroupOrganVO> zbdlUserStatus = null;
242 		List<UserRoleGroupOrganVO> tbrUserStatus = null;
243 		if (null != userStatus && userStatus.size() > 0) {
244 			for(UserRoleGroupOrganVO status : userStatus){
245 				if (null == status) {
246 					continue;
247 				}
248 				if (status.getGroupCode().equals("zbdlg") && (zbdlUserStatus == null || zbdlUserStatus.size() <= 0)) {//招标代理组
249 					zbdlUserStatus = new ArrayList<UserRoleGroupOrganVO>();
250 					zbdlUserStatus.add(status);
251 				} else if (status.getGroupCode().equals("tbrg") && (tbrUserStatus == null || tbrUserStatus.size() <= 0)) {//投标人组
252 					tbrUserStatus = new ArrayList<UserRoleGroupOrganVO>();
253 					tbrUserStatus.add(status);
254 				}
255 			}
256 		}
257 		if (null != tbrUserStatus && tbrUserStatus.size() > 0) {
258 			userStatus = tbrUserStatus;  //投标人角色登录(default)
259 		} else if (null != zbdlUserStatus && zbdlUserStatus.size() > 0) {
260 			userStatus = zbdlUserStatus; //招标代理角色登陆
261 		}
262 		GboatAppContext.output(JsonResult.createSuccess(userStatus));
263 		
264 	}
265 	
266 	//重置登陆错误计数器
267 	private void resetValidCompnent() {
268 		request.getSession().setAttribute("checkindex", null);
269 	}
270 
271 	//输出错误信息并增加登陆错误次数计数器
272 	private void outputFailureAndCheckValidCompnent(String errMsg) {
273 		//登陆失败三次,设置前端验证码信息显示标识
274 		String checkindex = (String) request.getSession().getAttribute("checkindex");
275 		String checkCode = "false";
276 		if (StringUtils.isEmpty(checkindex)) {
277 			request.getSession().setAttribute("checkindex", "1");
278 		} else {
279 			int checkindexInt = Integer.parseInt(checkindex);
280 			if (checkindexInt > 1) {
281 				checkCode = "true";
282 			}
283 			request.getSession().setAttribute("checkindex", String.valueOf(++checkindexInt));
284 		}
285 		JSONObject failureJSONObj = JsonResultSupport.wrap(false, errMsg);
286 		failureJSONObj.accumulate("showCheckCode", checkCode);
287 		JsonResultSupport.output(failureJSONObj);
288 	}
289 
290 	//验证码校验
291 	private boolean checkValidNumber() {
292 		//已经登陆不校验验证码
293 		String loginId = (String) request.getSession().getAttribute("loginId");
294 		if (StringUtils.isNotEmpty(loginId))
295 			return true;
296 		String checkindex = (String) request.getSession().getAttribute("checkindex");
297 		String kaptchaKey = (String) request.getSession().getAttribute(com.google.code.kaptcha.Constants.KAPTCHA_SESSION_KEY);
298 		//前端无验证码组件或登陆失败次数不足3次不校验验证码
299 		if (StringUtils.isNotEmpty(kaptchaKey) && StringUtils.isNotEmpty(checkindex) && Integer.parseInt(checkindex) > 2) {
300 			String result = checkKaptcha();
301 			if (StringUtils.isNotEmpty(result)) {
302 				GboatAppContext.output(JsonResult.createFailure(result));
303 				return false;
304 			}
305 		}
306 		return true;
307 	}
308 
309 	/**
310 	 * 验证码实现方法
311 	 */
312 	private String checkKaptcha() {
313 		String kaptchaKey = (String) request.getSession().getAttribute(com.google.code.kaptcha.Constants.KAPTCHA_SESSION_KEY);
314 		String errMsg = null;
315 		String kaptchafield = request.getParameter("kaptchafield"); // 验证码ID
316 		if (StringUtils.isNotEmpty(kaptchaKey)) {
317 			if (StringUtils.isEmpty(kaptchafield) || StringUtils.isEmpty(kaptchaKey)) {
318 				errMsg = "请输入验证码!";
319 			}
320 			if (!kaptchaKey.equals(kaptchafield)) {
321 				errMsg = "验证码输入错误,请重新输入!";
322 			}
323 			if (StringUtils.isNotEmpty(errMsg)) {
324 				return errMsg;
325 			}
326 		}
327 		return errMsg;
328 	}
329 	
330 	/**
331 	 * 验证码ajax 请求验证
332 	 */
333 	public void validateKaptcha() {
334 		GboatAppContext.output(JsonResult.SUCCESS);
335 		/* 	先注释掉验证码的判断逻辑 
336 		String result = checkKaptcha();
337 		if (StringUtils.isEmpty(result)) {
338 			GboatAppContext.output(JsonResult.SUCCESS);
339 		} else {
340 			GboatAppContext.output(JsonResult.createFailure(result));
341 		}
342 		*/
343 	}
344 	
345 	/**
346 	 * 因为登录超时,重新登录
347 	 */
348 	public void reLoginForTimeout() {
349 		User user = userService.getUserByLoginId(username); //取得用户PO
350 
351 		List<UserGroupOrganMapper> statusList = null;
352 		if (null != user) {
353 			statusList = userService.getURGOMapperByUserId(user.getUserId());
354 		}
355 		String errMsg = loginBusiness.validateUser(username, user, password, statusList);
356 		if (StringUtils.isNotEmpty(errMsg)) {//有错误信息
357 			JsonResultSupport.outputFailure(errMsg);
358 			return;
359 		}
360 
361 		UserSession session = null;
362 		try {
363 			if (Constants.SUPER.equals(username)) {//super 用户作特殊处理
364 				session = loginBusiness.superSession(null, systemId);
365 			} else {//普通用户
366 				session = sessionService.login(user.getUserId(), groupId, roleId, systemId);
367 			}
368 			setSession(session);
369 			JsonResultSupport.outputSuccess();
370 		} catch (Exception e) {
371 			JsonResultSupport.outputFailure(e.getMessage());
372 		}
373 	}
374 
375 	/**切换角色重新登录
376 	 * @return 
377 	 */
378 	public String swapRole() {
379 		UserSession session = GboatAppContext.getUserSession();
380 		try {
381 			session = sessionService.login(session.getUserId(), groupId, roleId, session.getSystemId());
382 		} catch (PrivilegeException e) {
383 			errorMessage = e.getMessage();
384 			return "error";
385 		}
386 		setSession(session);
387 		return getPageAppMode(session);
388 	}
389 
390 	/** 切换系统,重新登录
391 	 * @return
392 	 */
393 	public String swapSystem() {
394 		UserSession session = GboatAppContext.getUserSession();
395 		try {
396 			Group group = gropBusi.findGroupByGroupCode(session.getGroupCode());
397 			Role role = roleBusi.findRoleByRoleCode(session.getRoleCode());
398 			session = sessionService.login(session.getUserId(), group.getGroupId(), role.getRoleId(), systemId);
399 		} catch (PrivilegeException e) {
400 			errorMessage = e.getMessage();
401 			return "error";
402 		}
403 		setSession(session);
404 		return getPageAppMode(session);
405 	}
406 
407 	/**获取页面登录对象
408 	 * @param userSession
409 	 * @return
410 	 */
411 	protected String getPageAppMode(UserSession userSession) {
412 		if(!Constants.SUPER.equals(username)){
413 			return "usersystem";
414 		}
415 		
416 		
417 		Profile profile = profileService.getProfileByUserId(userSession.getUserId());
418 		SystemConfig systemConfig = null;
419 		if (StringUtils.isNotEmpty(userSession.getSystemId())) {
420 			systemConfig = systemConfigService.findSysCfgById(userSession.getSystemId());
421 		}
422 		boolean isSysNormalMode = systemConfig != null && Constants.PAGE_APP_MODE_NORMAL.equals(systemConfig.getPageAppMode());
423 		boolean iSystemConfigNotNull = systemConfig != null && !StringUtils.isEmpty(systemConfig.getPageAppMode());
424 		boolean isProfileNotNull = profile != null && !StringUtils.isEmpty(profile.getPageAppMode());
425 		boolean isNormalMode = profile == null || Constants.PAGE_APP_MODE_NORMAL.equals(profile.getPageAppMode());
426 		//用户自己的桌面模式如果配置为传统,则返回用户自定义传统模式
427 		if (isProfileNotNull) {
428 			return this.redirectMode(userSession, isNormalMode);
429 		}
430 		//系统默认模式定义,如果是传统择返回传统模式
431 		if (iSystemConfigNotNull) {
432 			return this.redirectMode(userSession, isSysNormalMode);
433 		}
434 		userSession.setAttribute(Constants.CURRENT_PAGE_APP_MODE_KEY, Constants.PAGE_APP_MODE_DESKTOP);
435 		setSession(userSession);
436 		return "desktop";
437 	}
438 
439 	/**
440 	 * 根据模式判断跳转
441 	 * @param userSession
442 	 * @param mode
443 	 * @return
444 	 */
445 	private String redirectMode(UserSession userSession, Boolean mode) {
446 		if (mode) {
447 			userSession.setAttribute(Constants.CURRENT_PAGE_APP_MODE_KEY, Constants.PAGE_APP_MODE_NORMAL);
448 			setSession(userSession);
449 			return "normal";
450 		} else {
451 			userSession.setAttribute(Constants.CURRENT_PAGE_APP_MODE_KEY, Constants.PAGE_APP_MODE_DESKTOP);
452 			setSession(userSession);
453 			return "desktop";
454 		}
455 	}
456 
457 	/**
458 	 * 生成ssoSessionID,设置session
459 	 * @param userSession userSession
460 	 */
461 	protected void setSession(UserSession userSession) {
462 		if (null != userSession) {
463 			request.getSession().setAttribute(UserSession.USER_SESSION_KEY, userSession);
464 			String sessionId = request.getSession().getId();
465 			double rdv = (double) (Math.random() * 10000000);
466 			String key = sessionId + "_" + rdv;
467 			userSession.setSsoSessionID(key);
468 		}
469 	}
470 
471 	/**
472 	 * 请求桌面快捷图标
473 	 * @return
474 	 * @throws IOException @zhaop
475 	 */
476 	public void showShotcutByUser() throws IOException {
477 		UserSession session = GboatAppContext.getUserSession();
478 		if (session.getLoginId().equals(Constants.SUPER)) { // 超级管理员
479 		    URL url = this.getClass().getClassLoader().getResource(Constants.SUPER_SHORTCUT);
480 		    Object result = (url == null ? JsonResult.createFailure("获取超级管理员的功能菜单的数据定义失败!") : JsonUtil.fromURL(url));
481 		    GboatAppContext.output(result);
482 		} else {
483 			Group group = gropBusi.findGroupByGroupCode(session.getGroupCode());
484 			Role role = roleBusi.findRoleByRoleCode(session.getRoleCode());
485 			String authForId = sessionService.computeAuthForId(group.getGroupId(), role.getRoleId(), session.getSystemId());
486 			List<AuthorityResourceVO> authoritys = authorityService.getAuthorityByStatus(authForId, session.getSystemId());//获取用户权限
487 
488 			List<ShortcutResourceVO> shortResForSys = loginBusiness.showResourceShortcutByAuth(authoritys);//获取非用户定制的图标
489 			List<ShortcutResourceVO> shortResForUser = shortcutService.getShortcutResourceByUser(session, authoritys);//获取用户定制的图标
490 			shortResForSys.addAll(shortResForUser);//拼接两个list
491 			shortResForSys.add(loginBusiness.addModule());
492 			GboatAppContext.output(shortResForSys);
493 		}
494 	}
495 
496 	public String getDeniedPriority() {
497 		Map<String, List<String>> map = sessionService.getDeniedPriority(request);
498 		if (GboatAppContext.getUserSession().getLoginId().equals(Constants.SUPER)) { //超级管理员的禁止表为空
499 			JSONObject json = JsonResultSupport.wrap(new JSONObject());
500 			JsonResultSupport.output(json);
501 		} else if (null != map) {
502 			JsonResultSupport.output(map);
503 		} else {
504 			JsonResultSupport.outputFailure();
505 		}
506 		return null;
507 	}
508 
509 	public String logout() {
510 		UserSession session = GboatAppContext.getUserSession();
511 		request.getSession().invalidate();
512 		String systemId = null;
513 		if (session != null && !StringUtils.isEmpty(session.getSystemId())) {//证明session还未过期
514 			systemId = session.getSystemId();
515 		} else {//session过期之后,只能通过显示传入的系统id来获取查找退出后跳转到的首页
516 			systemId = this.systemId;
517 		}
518 
519 		if (!StringUtils.isEmpty(systemId)) {
520 			SystemConfig system = (SystemConfig) systemConfigService.get(SystemConfig.class, systemId);
521 			if (system != null) {
522 				try {
523 					//request.getSession().removeAttribute(UserSession.USER_SESSION_KEY);
524 					response.sendRedirect(request.getContextPath() + system.getIndexUrl());
525 					//request.getSession().removeAttribute(UserSession.USER_SESSION_KEY);
526 				} catch (IOException e) {
527 				}
528 			}
529 		} else {
530 			//request.getSession().removeAttribute(UserSession.USER_SESSION_KEY);
531 			return "logout";
532 		}
533 
534 		//重定向后:不能再使用response对象了,所以此处只能返回null
535 		return null;
536 	}
537 
538 	/**
539 	 *  判断CA锁是否在有效期内
540 	 *  @param certStartDate
541 	 *  @param certEndDate
542 	 *  @return
543 	 *  @author wanghb-a
544 	 *  @date 2014-5-22
545 	 **/
546 	protected boolean isValidateCA(String certStartDate, String certEndDate) {
547 		if (StringUtils.isEmpty(certStartDate) || StringUtils.isEmpty(certEndDate))
548 			return false;
549 
550 		//GMT格式
551 		SimpleDateFormat simpleDateFormatGMT = new SimpleDateFormat("EEE MMM dd yyyy hh:mm:ss z", Locale.ENGLISH);
552 		try {
553 			String validateStartString = certStartDate.replace("(中国标准时间)", "");
554 			validateStartString = validateStartString.replace("GMT+0800", "GMT+08:00");
555 			String validateEndString = certEndDate.replace("(中国标准时间)", "");
556 			validateEndString = validateEndString.replace("GMT+0800", "GMT+08:00");
557 			Date validateStartDate = simpleDateFormatGMT.parse(validateStartString.trim());
558 			Date validateEndDate = simpleDateFormatGMT.parse(validateEndString.trim());
559 			Date today = new Date();
560 			return (today.after(validateStartDate) && today.before(validateEndDate));
561 		} catch (Exception e) {
562 			//UTC
563 			SimpleDateFormat simpleDateFormatUTC = new SimpleDateFormat("EEE MMM dd HH:mm:ss 'UTC'Z yyyy", Locale.ENGLISH);
564 			try {
565 				Date validateStartDate = simpleDateFormatUTC.parse(certStartDate.trim());
566 				Date validateEndDate = simpleDateFormatUTC.parse(certEndDate.trim());
567 				Date today = new Date();
568 				return (today.after(validateStartDate) && today.before(validateEndDate));
569 			} catch (Exception e2) {
570 				return false;
571 			}
572 
573 		}
574 	}
575 	
576 	public String getUsername() {
577 		return username;
578 	}
579 
580 	public void setUsername(String username) {
581 		this.username = username;
582 	}
583 
584 	public String getPassword() {
585 		return password;
586 	}
587 
588 	public void setPassword(String password) {
589 		this.password = password;
590 	}
591 
592 	public String getErrorMessage() {
593 		return errorMessage;
594 	}
595 
596 	public void setErrorMessage(String errorMessage) {
597 		this.errorMessage = errorMessage;
598 	}
599 
600 	public List<UserRoleGroupOrganVO> getUserStatus() {
601 		return userStatus;
602 	}
603 
604 	public void setUserStatus(List<UserRoleGroupOrganVO> userStatus) {
605 		this.userStatus = userStatus;
606 	}
607 
608 	public String getMapperId() {
609 		return mapperId;
610 	}
611 
612 	public void setMapperId(String mapperId) {
613 		this.mapperId = mapperId;
614 	}
615 
616 	public String getExtJSVer() {
617 		return extJSVer;
618 	}
619 
620 	public void setExtJSVer(String extJSVer) {
621 		this.extJSVer = extJSVer;
622 	}
623 
624 	public String getSystemId() {
625 		return systemId;
626 	}
627 
628 	public void setSystemId(String systemId) {
629 		this.systemId = systemId;
630 	}
631 
632 	public String getRoleId() {
633 		return roleId;
634 	}
635 
636 	public void setRoleId(String roleId) {
637 		this.roleId = roleId;
638 	}
639 
640 	public String getGroupId() {
641 		return groupId;
642 	}
643 
644 	public void setGroupId(String groupId) {
645 		this.groupId = groupId;
646 	}
647 
648 	/**
649 	 * 获取实现接口IUserAuthService的实现
650 	 * @return
651 	 */
652 	private IUserAuthService getUserAuth() {
653 
654 		try {
655 			BundleContext bundleContext = this.context;
656 			ServiceReference[] sfs = bundleContext.getServiceReferences(IUserAuthService.class.getName(), null);
657 			for (ServiceReference sf : sfs) {
658 				IUserAuthService service = (IUserAuthService) bundleContext.getService(sf);
659 				String serviceImplName = service.toString();
660 				serviceImplName = serviceImplName.substring(0, serviceImplName.indexOf("@"));
661 				if (serviceImplName.equals(getDefaultUserAuthServiceImpl()))
662 					return service;
663 			}
664 		} catch (InvalidSyntaxException e) {
665 			e.printStackTrace();
666 		}
667 
668 		return null;
669 	}
670 
671 	/**
672 	 * 有定制验证需求的用户需要此方法:目前使用平台提供的默认实现类
673 	 */
674 	protected String getDefaultUserAuthServiceImpl() {
675 		return UserAuthServiceImpl.class.getName();
676 	}
677 
678     public String getOpenUrl() {
679         return openUrl;
680     }
681 
682     public void setOpenUrl(String openUrl) {
683         this.openUrl = openUrl;
684     }
685 
686     public String getOpenParams() {
687         return openParams;
688     }
689 
690     public void setOpenParams(String openParams) {
691         this.openParams = openParams;
692     }
693 
694 	public String getNamespace() {
695 		return namespace;
696 	}
697 
698 	public void setNamespace(String namespace) {
699 		this.namespace = namespace;
700 	}
701 
702 }