It's all about the answers!

Ask a question

How to set the components owner Programatically using client libraries?


vinitha dsouza (147223136) | asked Jul 17 '17, 9:56 a.m.

Hello team

I am creating the RTC components programmatically ,and now i want to change the components owner name
I am using the below code , But how i can pass the team area name in the below code :

In my case team area i have as a string

workspaceManager.setComponentOwnerAndVisibility(IComponentHandle ch, IAuditableHandle ah, IReadScope pscope, monitor); 

One answer



permanent link
Shashikant Padur (4.3k27) | answered Jul 17 '17, 11:50 p.m.
JAZZ DEVELOPER
edited Jul 17 '17, 11:53 p.m.
<style type="text/css"> p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 16.0px; font: 14.0px 'Helvetica Neue'; color: #000000; -webkit-text-stroke: #333333} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px 'Helvetica Neue'; color: #000000; -webkit-text-stroke: #333333} p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 16.0px; font: 14.0px 'Helvetica Neue'; color: #000000; -webkit-text-stroke: #333333; min-height: 16.0px} p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px 'Helvetica Neue'; color: #000000; -webkit-text-stroke: #333333; min-height: 16.0px} span.s1 {font-kerning: none} </style>
If you have the project area and team area name you could do the following:
IProcessItemService itemService = (IProcessItemService)repo.getClientLibrary(IProcessItemService.class);
ITeamArea teamArea = (ITeamArea) itemService.findProcessArea(new URI(NAME_OF_PROJECTAREA + “/“ + NAME_OF_TEAMAREA), IProcessClientService.ALL_PROPERTIES, null);

If you have the team area item id you could do the following: ITeamArea.ITEM_TYPE.createItemHandle(repository, UUID_OF_TEAMAREA, null); If none of the above, then you need to retrieve all the project area’s and match the team area name in the project area: List<IProjectArea> projectAreas = itemService.findAllProjectAreas(IProcessClientService.ALL_PROPERTIES, null); List<ITeamArea> teamAreas = repo.itemManager().fetchPartialItems(projectArea.getTeamAreas(), IItemManager.DEFAULT, Collections.singletonList(ITeamArea.NAME_PROPERTY_ID), null);

Your answer


Register or 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.