Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to get owner of component using client side plain java api?

 Hi all,


I wrote below code to get owner of component, but I stuck on IAuditableHandle.getOwner():
componentOwner = (ComponentOwner) repository().itemManager().fetchCompleteItem(component.getItemHandle(), ItemManager.DEFAULT, null);
IAuditableHandle ownerH = componentOwner.getOwner();

Please suggest how to extract owner from "IAuditableHandle "?

0 votes



One answer

Permanent link
getItemHandle does not return the owner of the component. It returns the itemHandle of the component (IComponentHandle). The cast to ComponentOwner does not make any sense and should fail.

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
× 10,927
× 1,699

Question asked: Apr 01 '20, 3:58 a.m.

Question was seen: 1,941 times

Last updated: Apr 01 '20, 4:28 a.m.

Confirmation Cancel Confirm