Find Permissions Assigned to a Role using Client Side Java API

I am looking for a way to extract permission information about Project area roles and the team area roles.
Is there a way to find this out?
If not a direct way? Then is there a way to retrieve the full project process configuration source in the API so that I may just parse it and get get this detail?
Regards,
Arun Batra
Is there a way to find this out?
If not a direct way? Then is there a way to retrieve the full project process configuration source in the API so that I may just parse it and get get this detail?
Regards,
Arun Batra
Accepted answer

Thank you Ralph for your comment. As per the javadocs, the above only provides the permitted actions for the "logged in user". However I am looking for all the permissions assigned to each role in a Project and to all the users in it. I worked it out by extracting the process configuration source and reading the XML to find all the information I needed. Roles>PermissionIds>ActionIds. However I had to keep create a separate mapping file to store the relation of the permission/action Ids and their names.
IContentManager icm = teamRepository.contentManager();
Map pd = projectArea.getProcessData();
projectContent = (IContent) pd.get(ProcessContentKeys.PROCESS_SPECIFICATION_KEY);
teamContent = (IContent) pd.get(ProcessContentKeys.PROCESS_CUSTOMIZATION_KEY);
ByteArrayOutputStream stream = new ByteArrayOutputStream();
icm.retrieveContent(<team/project_content>, stream, null);
String contentString = new String(stream.toByteArray(), content.getCharacterEncoding());
IContentManager icm = teamRepository.contentManager();
Map pd = projectArea.getProcessData();
projectContent = (IContent) pd.get(ProcessContentKeys.PROCESS_SPECIFICATION_KEY);
teamContent = (IContent) pd.get(ProcessContentKeys.PROCESS_CUSTOMIZATION_KEY);
ByteArrayOutputStream stream = new ByteArrayOutputStream();
icm.retrieveContent(<team/project_content>, stream, null);
String contentString = new String(stream.toByteArray(), content.getCharacterEncoding());
Comments
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Nov 17 '15, 8:39 a.m.I haven't done this. You can try IProcessClientService.getClientProcess(projectArea,monitor).getPermittedActions(processArea, operationId, actions, monitor) and go ahead from there.
1 vote