How to set stream visibility by Java API?
Hello,
I would like to create a new stream by JAVA API and set its visibilty to a Team Area. So i try this: targetStream = scmHelper.createStream(targetTeamArea, targetStreamName, targetStreamDesc); public IWorkspace createStream(IProcessAreaHandle projectArea, String streamName, String streamDesc) throws TeamRepositoryException { return services.getScmService().createStream(projectArea, streamName, streamDesc, null, null).getWorkspace(); } But we only pass the owner in the createStream method of interface IScmService: public WorkspaceRefreshResult createStream(IProcessAreaHandle scopeHandle, String streamName, String description, ISynchronizationTimes[] syncTimes, IRepositoryProgressMonitorHandle monitor) throws TeamRepositoryException; And i didnt find how to set or change the visibility of the stream after create, so my question its possible change the visibility of stream by Java API and How can i do this? For example, i have a project area Test 9, and a TeamArea called "Equipe_<idSistema>_Repositório", in this code above I created a stream (<IdSistema>[-xxx]) and set the Team Area to be the owner, but the visibility I did not make it. How can we see in this image: Thank you! |
One answer
Ralph Schoon (63.5k●3●36●46)
| answered Jun 23 '15, 2:35 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Try these methods on the IWorkspaceConnection:
connection.setOwnerAndVisibility(newOwner, newScope, mon)
connection.setOwner(owner, monitor)
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.