How to retrieve User Groups in a community using RAM API
One answer
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.
You can get a specific user from RAMSession. But you need to know the user's userid.
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());
}
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.