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

SCM properties of a file

Hi, I'm trying to get (java) programmatic access to the properties of a
file in SCM - i.e. what you see when you do right
click->properties->Jazz Source Control. In particular, the Jazz
Repository URI.

Is this possible via an API? If no API, then perhaps an unsupported way
of doing it.

Thanks,
Jeremy

0 votes



5 answers

Permanent link
Hi, I'm trying to get (java) programmatic access to the properties of a
file in SCM - i.e. what you see when you do right
click->properties->Jazz Source Control. In particular, the Jazz
Repository URI.


I assume you have the IResource that corresponds to the file. Then you do:

((IShareable)resource.getAdapter(IShareable.class)).getShare
().getSharingDesciptor().getRepositoryUri()

- Dmitry

0 votes


Permanent link
Thanks for the quick response, but I'm a newb to jazz.extend. How do I
get an IResource to a file?

IResource is an eclipse concept. What object do you have to start with
that you want to get the properties for?

- Dmitry

0 votes


Permanent link
On 05/11/2008 13:36, Dmitry Karasik wrote:
Hi, I'm trying to get (java) programmatic access to the properties of a
file in SCM - i.e. what you see when you do right
click->properties->Jazz Source Control. In particular, the Jazz
Repository URI.


I assume you have the IResource that corresponds to the file. Then you do:

((IShareable)resource.getAdapter(IShareable.class)).getShare
().getSharingDesciptor().getRepositoryUri()

- Dmitry
Thanks for the quick response, but I'm a newb to jazz.extend. How do I

get an IResource to a file?

Thanks,
Jeremy

0 votes


Permanent link
On 05/11/2008 18:13, Dmitry Karasik wrote:
Thanks for the quick response, but I'm a newb to jazz.extend. How do I
get an IResource to a file?

IResource is an eclipse concept. What object do you have to start with
that you want to get the properties for?

- Dmitry

I wasn't sure whether you meant the IResource in Eclipse or the one in
com.ibm.team.repository.common.

I'd prefer to start with a File object, keeping the number of extra jars
on the classpath to a minimum - I'll be coding this in an Ant task and
potentially running outside Eclipse. Having said that I don't know the
extent of jars I'll need from Team Concert and whether those depend on
Eclipse.

Thanks,
Jeremy

0 votes


Permanent link
I wasn't sure whether you meant the IResource in Eclipse or the one in
com.ibm.team.repository.common.

I meant the one in eclipse.

I'd prefer to start with a File object, keeping the number of extra jars
on the classpath to a minimum - I'll be coding this in an Ant task and
potentially running outside Eclipse. Having said that I don't know the
extent of jars I'll need from Team Concert and whether those depend on
Eclipse.

If you run outside eclipse then you need to have 2 things, a copy file
area root and a path relative to the copy file area root. Then you can
call

FileSystemCore.getSharingManager().findShareable(cfaPath,
filePathRelativeToCFA, !file.isFile()).getShare().getSharingDescriptor
().getRepositoryUri()

- Dmitry

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,948

Question asked: Nov 05 '08, 8:38 a.m.

Question was seen: 8,946 times

Last updated: Nov 05 '08, 8:38 a.m.

Confirmation Cancel Confirm