Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to retrieve User Groups in a community using RAM API

 Hi,
      Is there a way to retrieve User Groups and users in a Community using RAM API?

Thanks,
Abhilash



0 votes



One answer

Permanent link
No there isn't a way to get these through RAM API.

You can get a specific user from RAMSession. But you need to know the user's userid.

0 votes

Comments

Thank you Richard. I saw a similar requirement in the Jazz and following the below Thread.




As a work around i am trying this way also for my requirement as stated above. When I am trying to work with the code i am getting an odd error if i include import com.ibm.ram.repository.security.SecurityManager; as shown below.



With the help of the below I should be able to access the users from the groups associated to the lifecycle

 String groupId = JAXBLinksUtil.getUserGroupIdentifier(reviewer.getUserGroup().getHref()); 
               UserGroupInstance userGroup = null; 
               try 
               { 
                  userGroup = SecurityManager.getManager().getUserGroup(Integer.parseInt(groupId)); 
               } catch (NumberFormatException e) { 
                  System.out.println("Exception: \n" + e.toString()); 
               } catch (Exception e) { 
                  System.out.println("Exception: \n" + e.toString()); 
               } 


Please let me know what should i do to fix the error.

Thanks,
Abhilash

That code is not and is not available to RAM API. It is only available to RAM code running in the RAM server. It is not available outside of internal RAM.

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,940

Question asked: Mar 05 '13, 9:13 a.m.

Question was seen: 4,813 times

Last updated: Apr 30 '13, 3:16 p.m.

Confirmation Cancel Confirm