It's all about the answers!

Ask a question

How to set stream visibility by Java API?


benito neto (626) | asked Jun 22 '15, 2:36 p.m.
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



permanent link
Ralph Schoon (57.2k23642) | 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)



Comments
Ralph Schoon commented Jun 23 '15, 2:38 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Your answer


Register or to post your answer.