Given an user, get the list of groups via Web Services

Technical questions related to installation and integration of Yellowfin

Given an user, get the list of groups via Web Services

Postby kallunga on Fri Sep 18, 2009 2:44 am

Hey guys

Via Web Services, I want to get the list of groups which a given user is part.
I expected to find something like listGroups(AdministrationPerson person) or listGroups(String userId) in AdministrationServiceClient class.
Should be easy like that but I couldn't find anything similar in any class of the JavaDoc.

Environment:
Yellow Fin 4.1

thanks
Leo
kallunga
 
Posts: 2
Joined: Fri Sep 18, 2009 1:05 am

Re: Given an user, get the list of groups via Web Services

Postby kallunga on Fri Sep 18, 2009 5:05 am

The way I did (thanks Steve):
Code: Select all
         AdministrationServiceClient asm = null;
         asm = new AdministrationServiceClient("myServer", 80, "eu@eu.com.br",
               "xxx", "/services/AdministrationService");
         AdministrationPerson person = new AdministrationPerson();                   
         person.setUserId("someUser@xxx.com.br");
         person.setPassword("xxx");

         AdministrationGroup[] grupos = asm.listGroups();
         
         for(AdministrationGroup grupo: grupos){
            AdministrationGroupMember[] members = grupo.getGroupMembers();
            for(AdministrationGroupMember member : members){
               if (member.getLoginId().equals("someUser@xxx.com.br")){
                  System.out.println("Member of " + grupo.getGroupDescription());
               }
            }
            
         }

There is no specific method for this action in the YF web services API. I think there should be one.

Leonardo
kallunga
 
Posts: 2
Joined: Fri Sep 18, 2009 1:05 am


Return to Installation & Integration

Who is online

Users browsing this forum: No registered users and 1 guest

cron