获取在线用户
来源:互联网 发布:淘宝图文详情模板 编辑:程序博客网 时间:2024/05/21 16:58
//获取在线用户
UserInfo userInfo = SysContext.getSysContext().getCurrentUserInfo();
IObjectPK userPK = new ObjectUuidPK(userInfo.getId());
//根据组织范围获取在线用户
List orgList = OrgRangeService.getCUOrgRange(null, userPK);
OrgRangeService-》PermissionRangeHelper的getCUOrgRange方法
public static List getCUOrgRange(Context ctx, IObjectPK userPK)
throws BOSException, EASBizException
{
return getUserOrgId(ctx, userPK, OrgRangeType.BIZ_ORG_TYPE);
}
//获取用户组织范围
public static List getUserOrgId(Context ctx, IObjectPK userPK, OrgRangeType orgType)
throws BOSException, EASBizException
{
OrgRangeCollection fullOrgCol = getUserOrgRange(ctx, userPK, orgType);
List cuIdList = ToolUtils.transCol2ListByPeroperty(fullOrgCol, new IObjectCol2List()
{
public String getList(Object obj) {
OrgRangeInfo orgInfo = (OrgRangeInfo)obj;
return orgInfo.getOrg().getId().toString();
}
});
return cuIdList;
}
//获取在线用户集合UMRegistryCollection
protected IUserMonitor getBizInterface() throws EASBizException {
return UserMonitorFactory.getRemoteInstance();
}
UserMonitorFactory.getRemoteInstance()
如果ui的话,remote
;
如果facade,local
UMRegistryCollection regs = ((UMRegistryCollection)getBizInterface().getCollectionByOrgRange(SysContext.getSysContext().getDcName(), orgList));
//UMRegistryCollection是UMRegistryInfo的集合
//UMRegistryInfo是在线用户 里面有用户Id,用户名称等等信息。
- 获取在线用户
- 获取用户在线列表
- red5获取在线用户列表
- 获取LCS中在线用户的信息
- 获取当前系统在线用户的数量
- Erlang 聊天室程序(七) 获取在线用户
- 使用redis实现获取在线用户列表
- uptime 获取运行时间,负载 在线用户
- openfire如何获取所有在线用户
- apache shiro踢出用户和获取所有在线用户
- apache shiro踢出用户和获取所有在线用户
- HttpSessionBindingListener获取在线用户数,同一用户登陆一次
- PHP处理在线用户
- 在线用户统计
- 在线用户统计
- LotusScript获得在线用户
- 在线用户统计
- 用户在线统计实现
- Python 打包指南
- 订婚前夕
- VS出错:未能创建Microsoft Visual C# 2008 编译器
- 如何扩展标准产品F7弹出窗口的功能
- tomcat启动时报Error listenerStart错误,访问web服务时报HTTP Status 404错误
- 获取在线用户
- 线程的启动方法
- 共享与专用服务器的区别
- ios各版本特性
- 通过BOS新建的UI,挂到EAS菜单中打开报错
- CenterOS 安装 sendmail
- python操作redis简单例子
- 关于二叉树的相关操作
- 全点对最短路径