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:
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
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
4 answers
On Fri, 01 Aug 2008 07:28:03 +0000, ghezzi wrote:
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
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
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
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
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:
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