private static Logger log=LoggerFactory.getLogger(TreeServiceImpl.class);
@Override
public GroupJobTreeModel getMyTreeData() {
String uid=LoginUser.getUser().getUid();
GroupBean rootGroup=readOnlyGroupManager.getGlobeGroupBeanForTreeDisplay(true);
Map<String, JobBean> allJobs=rootGroup.getAllSubJobBeans();
for(String key:allJobs.keySet()){
JobBean bean=allJobs.get(key);
//不是owner,删除
if(!bean.getJobDescriptor().getOwner().equals(uid)){
bean.getGroupBean().getJobBeans().remove(key);
}
}
Map<String, GroupBean> allGroups=rootGroup.getAllSubGroupBeans();
List<GroupBean> leafGroups=new ArrayList<GroupBean>();
for(GroupBean bean:allGroups.values()){
if(!bean.isDirectory() || bean.getChildrenGroupBeans().isEmpty()){
leafGroups.add(bean);
}