Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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!
 


0 votes



One answer

Permanent link
 Try these methods on the IWorkspaceConnection:

connection.setOwnerAndVisibility(newOwner, newScope, mon)
connection.setOwner(owner, monitor)


0 votes

Comments

Your answer

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938
× 411
× 89
× 79

Question asked: Jun 22 '15, 2:36 p.m.

Question was seen: 4,624 times

Last updated: Jun 23 '15, 2:38 a.m.

Confirmation Cancel Confirm