How to archive access groups programmatically
I don't see option to archive multiple access groups at one shot in web client.
|
One answer
Ralph Schoon (63.7k●3●36●48)
| answered Feb 22 '17, 3:13 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Feb 22 '17, 3:13 a.m. Likely Yes. The code below is untested and might not work but could be some kind of stating point.
I know this works:
And you can find accessGroups using IAuditableCommon.
Comments
Sanjeev Kulkarni
commented Feb 22 '17, 5:12 a.m.
Hi Ralph,
.getClientLibrary(IAccessGroupService.class);
I am working on a client side application, above code always returns me null. It's not able to fetch proper service object. While I face some difficulty in getting it working with alternative approach suggested. accessGroupClientService.archiveAcccessGroup(group, rtcBean.getProgressMonitor()); {Error: Method is undefined } I am using RTC 6.0.2 java libraries. Am I missing something?
Ralph Schoon
commented Feb 22 '17, 5:19 a.m.
| edited Feb 22 '17, 5:19 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I searched the code and IAccessGroupService is only used in the server API using getService(). If is however the only API I found that allows to archive and delete AccessGroups. I might have overlooked something.
If you set up the development environment with the SDK as explained in the Extensions Workshop, you can search the API. I don't have the time to search the API for you. I spent as much time as I could.
I had another quick look. The IAccessGroupService is not easily accessible. You can get the IAccessGroupClientService
IAccessGroupClientService accessGroupClientService = (IAccessGroupClientService) teamRepository
.getClientLibrary(IAccessGroupClientService.class);
Which internally uses IAccessGroupService but does not expose the API to archive and delete access groups.
You can look up how that class gets the IAccessGroupService and try to get it in a similar way, but it is basically using internal APIs if you achieve that goal.
|
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.