It's all about the answers!

Ask a question

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


Andrew Ciaz (493) | asked Apr 01 '20, 3:58 a.m.

 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 "?

One answer



permanent link
Ralph Schoon (57.2k23642) | answered Apr 01 '20, 4:27 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Apr 01 '20, 4:28 a.m.
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.

Your answer


Register or to post your answer.