Jazz Register Log in
Jazz Forum Welcome to the Jazz Community Forum

Welcome to the Jazz Community Forum

Connect and collaborate with IBM Engineering experts and users

How to set the components owner Programatically using client libraries?

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); 

0 votes



One answer

Permanent link
<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);

0 votes

Your answer

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

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Jul 17 '17, 9:56 a.m.

Question was seen: 1,723 times

Last updated: Jul 17 '17, 11:53 p.m.

Confirmation Cancel Confirm