问题
I need to change the ownership of components and stream. I am trying to find out any API for this. Please help. Here I have one code snippet with me but I don't know how it will work.
IScmService scmService = null;
IRepositoryItemService itemService;
IComponentHandle componentH;
ComponentOwnerHandle componentOwnerH = scmService.getComponentOwnerRecord((ComponentHandle) componentH);
ComponentOwner componentOwner = (ComponentOwner) itemService.fetchItem(componentOwnerH, IRepositoryRemoteService.COMPLETE);
IAuditableHandle ownerH = componentOwner.getOwner();
if (componentHandle == null) {
// Rename component
componentHandle = wm.createComponent(componentName,
teamRepository.loggedInContributor(), monitor);
wm.setComponentOwner(componentHandle, ownerH, monitor);
} else {
// Rename component
wm.renameComponent(componentHandle, componentName, monitor);
wm.setComponentOwner(componentHandle, ownerH, monitor);
}
return componentHandle;
来源:https://stackoverflow.com/questions/50675106/how-to-change-rtc-stream-and-component-ownership-using-plain-java-api