/** * Returns the ServerGroups that the user can administer. * * @param loggedInUser The current user in user. * @param login The login for the user whose ServerGroups are sought. * @return the ServerGroups that the user can administer. * @throws FaultException A FaultException is thrown if the user doesn't have access to lookup the * user corresponding to login or if the user does not exist. * @xmlrpc.doc Returns the system groups that a user can administer. * @xmlrpc.param #param("string", "sessionKey") * @xmlrpc.param #param_desc("string", "login", "User's login name.") * @xmlrpc.returntype #array() #struct("system group") #prop("int", "id") #prop("string", "name") * #prop("string", "description") #prop("int", "system_count") #prop_desc("int", "org_id", * "Organization ID for this system group.") #struct_end() #array_end() */ public Object[] listAssignedSystemGroups(User loggedInUser, String login) throws FaultException { User target = XmlRpcUserHelper.getInstance().lookupTargetUser(loggedInUser, login); List groups = ServerGroupFactory.listAdministeredServerGroups(target); return groups.toArray(); }