AnsweredAssumed Answered

How to show all users from a group in my own JAVA application

Question asked by svedec@kava.be on Oct 15, 2015
Latest reply on Oct 16, 2015 by svedec@kava.be
Hi everyone,

first-timer question here. I have successfully developed an AMP module and added aspects to documents. I have a Java Spring app that uses CMIS to show all these documents on a webpage with their added aspects.

Now, I have 2 groups in which my Alfresco users are divided: "Scientific" and "Commercial".
I would like to have a separate page for each group (like www.example.com/myApp/docs/Scientific) which - in this case - lists the users in the 'Scientific' group.

It sounds really simple, but I haven't found anything while Googling.
Can anyone help?

I'm running an older Alfresco CE (4.2.d or .e, don't remember exactly) and would like to do this through the CMIS module, be it with a query for instance.

I have tried (as a test):
ItemIterable<QueryResult> rs = CmisSession.getSession().query("SELECT * FROM cm:authorityContainer", false); 
return "Total:"+rs.getTotalNumItems();


But it gives me an error: "Type is unsupported in query: cm:authorityContainer" probably because my Alfresco version is too low (I read you need at least 4.3.a).

I have also 'discovered' this: /alfresco/service/api/groups/Commercial/
but I can't figure out how to list the users belonging to this group. Also, I would have to parse the JSON output and initially I'd prefer to stick to the CMIS since I'm already using it.

Any help is appreciated, thanks.

Outcomes