是否可以在子团队区域中添加用户和角色?我的代码目前可以在团队区域中添加用户和角色,但是如何在子团队区域中添加它们。
ITeamArea TA = (ITeamArea)teamRepository.itemManager().fetchCompleteItem(newTAHandle,ItemManager.DEFAULT,monitor);
IContributor contributor = teamRepository.contributorManager().fetchContributorByUserId(members,monitor);
ArrayList roles = getTeamRoleName(projectArea,member_roles);
IProcessAreaWorkingCopy areaWc = (IProcessAreaWorkingCopy)service.getWorkingCopyManager().createPrivateWorkingCopy(TA);
areaWc.getTeam().addContributorsSettingRoleCast( new IContributor[] {contributor}, new IRole[] {roles}));
areaWc.save(null);
我试图找到层次结构的东西,但没有找到将贡献者添加到子团队区域的选项。
IProjectArea workinCopyProjectArea = (IProjectArea) projectArea.getWorkingCopy();
ITeamAreaHierarchy teamAreaHierarchy = (TeamAreaHierarchy) workinCopyProjectArea.getTeamAreaHierarchy();