Package org.jamwiki.model

Examples of org.jamwiki.model.RoleMap


  public List<RoleMap> getRoleMapGroups() throws DataAccessException {
    LinkedHashMap<Long, RoleMap> roleMaps = new LinkedHashMap<Long, RoleMap>();
    QueryResultIterable<GroupAuthorityEntity> list = GroupAuthorityService.getAll();
    for (GroupAuthorityEntity groupAuthorityEntity : list) {
      Long groupId = groupAuthorityEntity.getGroupId();
      RoleMap roleMap = new RoleMap();
      if (roleMaps.containsKey(groupId)) {
        roleMap = roleMaps.get(groupId);
      } else {
        roleMap.setGroupId(groupId);
        roleMap.setGroupName(groupAuthorityEntity.getGroupName());
      }
      roleMap.addRole(groupAuthorityEntity.getAuthority());
      roleMaps.put(groupId, roleMap);

    }
    return new ArrayList<RoleMap>(roleMaps.values());
  }
View Full Code Here

TOP

Related Classes of org.jamwiki.model.RoleMap

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.