How to change RTC stream and component ownership using plain java api?

五迷三道 提交于 2019-12-08 00:29:27

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!