{
List systemUserVOList = SystemUserController.getController().getFilteredSystemUserVOList(offset, limit, sortProperty, direction, searchString);
Iterator systemUserVOListIterator = systemUserVOList.iterator();
while(systemUserVOListIterator.hasNext())
{
SystemUserVO systemUserVO = (SystemUserVO)systemUserVOListIterator.next();
List<InfoGlueRole> roles = new ArrayList<InfoGlueRole>();
List<InfoGlueGroup> groups = new ArrayList<InfoGlueGroup>();
if(populateRolesAndGroups)
{
List<RoleVO> roleList = RoleController.getController().getRoleVOList(systemUserVO.getUserName());
for(RoleVO role : roleList)
{
InfoGlueRole infoGlueRole = new InfoGlueRole(role.getRoleName(), role.getRoleName(), role.getDescription(), role.getSource(), role.getIsActive(), role.getModifiedDateTime(), this);
roles.add(infoGlueRole);
}
List<GroupVO> groupList = GroupController.getController().getGroupVOList(systemUserVO.getUserName());
for(GroupVO group : groupList)
{
InfoGlueGroup infoGlueGroup = new InfoGlueGroup(group.getGroupName(), group.getGroupName(), group.getDescription(), group.getSource(), group.getGroupType(), group.getIsActive(), group.getModifiedDateTime(), this);
groups.add(infoGlueGroup);
}
}
InfoGluePrincipal infoGluePrincipal = new InfoGluePrincipal(systemUserVO.getUserName(), systemUserVO.getUserName(), systemUserVO.getFirstName(), systemUserVO.getLastName(), systemUserVO.getEmail(), systemUserVO.getSource(), systemUserVO.getIsActive(), systemUserVO.getModifiedDateTime(), roles, groups, new HashMap(), false, this);
users.add(infoGluePrincipal);
}
}
else
{