It's all about the answers!

Ask a question

setting the visibilty of a stream using the java api 3.014


K M (38325251) | asked Nov 06 '12, 8:34 a.m.
edited Nov 06 '12, 11:43 a.m. by Ralph Schoon (63.3k33646)
I am setting the owner of a stream to a team using

stream.setOwnerAndVisibility(teamArea, <project visibility> , MONITOR);

I want to set the visibility to the project.

How do I get the IReadScope of a project using the java API.

2 answers



permanent link
Tim Mok (6.6k38) | answered Nov 06 '12, 10:32 a.m.
JAZZ DEVELOPER
IReadScope.FACTORY has methods to create the different scopes for your visibility. The javadoc for IReadScope will explain the read scopes that can be applied to each type of owner. For your case, you set the visibility of the team area to the process area scope. Process area scope defers the visibility to the owning project area.

permanent link
K M (38325251) | answered Nov 06 '12, 11:30 a.m.
ProcessAreaScope pas = (ProcessAreaScope) IReadScope.FACTORY.createProcessAreaScope();
pas.setProcessArea(processarea);
wc.setOwnerAndVisibility(teamArea,(IReadScope) pas, MONITOR);


You would think their is a simpler way.

Your answer


Register or 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.