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

From project to Stream

Hi,
I've been messing around with the Jazz SCM for a while and I already know how to connect to a team repository, access different workspaces, baselines and fetch artifacts from there.
Know I would like, given a java project to get the Stream related to it. I read that it's the same as getting a Workspace, but I somehow got stuck.
I'm already able to get connect the SharingDescriptor from the project and from there I get the Component and the team repository associated to the project, but then I just can't find a way to get a connection to the stream. In fact if I use the following code:

IWorkspaceManager wsManager = SCMPlatform.getWorkspaceManager(repository);

IWorkspaceConnection conn = wsManager.getWorkspaceConnection((IWorkspaceHandle) sharingDescriptor.getConnectionHandle(), monitor);


I just get a connection to the user's workspace for that project, as the test conn.isStream() returns false, which is not what I need. Any suggestions?
Thanks
Giacomo

0 votes



4 answers

Permanent link
On Fri, 01 Aug 2008 07:28:03 +0000, ghezzi wrote:

Know I would like, given a
java project to get the Stream related to it. I read that it's the same
as getting a Workspace, but I somehow got stuck.


There is no such notion as a stream related to a java project. The
content on disk corresponds to a user's workspace, which may collaborate
with 0 or more streams that also contain the project.

- Dmitry

0 votes


Permanent link
I realized now that my previous post was a little unclear and misleading. I was talking about java project as they are the things I'm interested in, but I know that jazz works on a more generic level.
As I said, I'm already able to connect to a TeamRepository, get the WorkspaceManager (with SCMPlatform.getWorkspaceManager), a WorkspaceConnection (with SCMPlatform.getWorkspaceManager), get the workspace components and fetch artifacts and so on.
I would then like to fetch all the streams the workspace is collaborating with. Which is were I got stuck. Is it possible to fetch that information?
cheers
Giacomo

0 votes


Permanent link
You can get the flow table from a workspace connection via
getFlowTable(). Look at the deliver and accept targets (which are
of type IFlowEntry). IFlowEntry#getFlowNode() returns a workspace
handle : you can either fetch the workspace item through IItemManager or
get a workspace connection through IWorkspaceManager and call isStream()
on either object to determine if the collaboration is with a stream.

Alternatively, you can call
IWorkspaceManager#findWorkspaceAcceptRelationships and
IWorkspaceManager#findWorkspaceDeliverRelationships, but these APIs are
not paged and may cause you trouble if the # of collaborations is quite
large.

Hope that helps,
JohnC
SCM Server


ghezzi wrote:
I realized now that my previous post was a little unclear and
misleading. I was talking about java project as they are the things
I'm interested in, but I know that jazz works on a more generic
level.
As I said, I'm already able to connect to a TeamRepository, get the
WorkspaceManager (with SCMPlatform.getWorkspaceManager), a
WorkspaceConnection (with SCMPlatform.getWorkspaceManager), get the
workspace components and fetch artifacts and so on.
I would then like to fetch all the streams the workspace is
collaborating with. Which is were I got stuck. Is it possible to
fetch that information?
cheers
Giacomo

0 votes


Permanent link
Thanks John, that's exactly what I was looking for.
cheers
Giacomo

0 votes

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

Question asked: Aug 01 '08, 3:19 a.m.

Question was seen: 7,466 times

Last updated: Aug 01 '08, 3:19 a.m.

Confirmation Cancel Confirm