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 "?
One answer
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.
See https://www.google.com/search?&q=get+the+owner+of+a+component+site%3Ajazz.net&oq=get+the+owner+of+a+component+site%3Ajazz.net for some questiosn that discuss how to get the owner of a component.