Package org.palo.viewapi.services

Examples of org.palo.viewapi.services.AdministrationService


    return xConnections.toArray(new XConnection[0]);
    // TODO throw exception or return empty array !?!?!?
  }

  public XGroup[] getGroups(String sessionId, XUser xUser) throws SessionExpiredException {
    AdministrationService adminService = ServiceProvider
        .getAdministrationService(getLoggedInUser(sessionId));
    List<XGroup> xGroups = new ArrayList<XGroup>();
    User forUser = getNativeUser(sessionId, xUser);
    if (forUser != null) {
      for (Group group : adminService.getGroups(forUser)) {
        XGroup xGroup = (XGroup) XConverter.createX(group);
        xGroup.clearRoleNames();
        for (Role r: group.getRoles()) {
          xGroup.addRoleName(r.getName());
        }
View Full Code Here


    }
    return xGroups.toArray(new XGroup[0]);
  }

  public XRole[] getRoles(String sessionId, XUser user) throws SessionExpiredException {
    AdministrationService adminService = ServiceProvider
        .getAdministrationService(getLoggedInUser(sessionId));
    List<XRole> xRoles = new ArrayList<XRole>();
    for(Role role : adminService.getRoles()) {
      XRole xRole = (XRole)XConverter.createX(role);
      xRoles.add(xRole);
    }
    return xRoles.toArray(new XRole[0]);
  }
View Full Code Here

TOP

Related Classes of org.palo.viewapi.services.AdministrationService

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.