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

API to determine local (not checked in) changes?

Hello,
Was wondering if there is any public API to determine the presence of
and/or details about files not checked in? We need to do our operation
only when no changes have been made to the workspace. All the API I have
seen are to do with ChangeSets, and when the user does not check-in,
there is no changeset.
Regards,
Srimanth.

0 votes



8 answers

Permanent link
Note that the RTC repository has no notion of a "checked out file" (in
RTC, that is a client-side only concept). So you'll be looking for an
Eclipse client API call, not a server API call.

Cheers,
Geoff

On 10/24/2010 12:56 AM, Srimanth Gunturi wrote:
Hello,
Was wondering if there is any public API to determine the presence of
and/or details about files not checked in? We need to do our operation
only when no changes have been made to the workspace. All the API I have
seen are to do with ChangeSets, and when the user does not check-in,
there is no changeset.
Regards,
Srimanth.

0 votes


Permanent link
Srimanth

The API you want is the ILocalChangeManager which can be obtain using
FileSystemCore.getSharingManager().getLocalChanegManager().

Michael

Srimanth Gunturi wrote:
Hello,
Was wondering if there is any public API to determine the presence of
and/or details about files not checked in? We need to do our operation
only when no changes have been made to the workspace. All the API I have
seen are to do with ChangeSets, and when the user does not check-in,
there is no changeset.
Regards,
Srimanth.

0 votes


Permanent link
Hi,
I'm facing the same problem. When I try to use FileSystemCore I've always get some null object.
For example if I use FileSystemCore.getSharingManager.allShares I got an empty IShare array, and every try I made for findShareable returns null.

How do I have to use FileSystemCore in order to have these objects? I've seen there is a startUp method, how it has to be used?

Thanks,
Michele.

Srimanth

The API you want is the ILocalChangeManager which can be obtain using
FileSystemCore.getSharingManager().getLocalChanegManager().

Michael

Srimanth Gunturi wrote:
Hello,
Was wondering if there is any public API to determine the presence of
and/or details about files not checked in? We need to do our operation
only when no changes have been made to the workspace. All the API I have
seen are to do with ChangeSets, and when the user does not check-in,
there is no changeset.
Regards,
Srimanth.

0 votes


Permanent link
Are you using the plain java client? Have you loaded content from the repository? You won't get any shares until something is either loaded from the repository or shared.

0 votes


Permanent link
Yes I'm using plain java client. I've a workspace repository and I've load on a local eclipse workspace using RTC eclipse client. Do I have do load repository using java plain api in order to use these methods?

Thanks,
Michele.

Are you using the plain java client? Have you loaded content from the repository? You won't get any shares until something is either loaded from the repository or shared.

0 votes


Permanent link
Technically you don't but it would be less error prone if you did. I would suggest trying to do the load using the plain java client and see if you can access the info after that.

0 votes


Permanent link
It seems that FileSystemCore does not work properly with me. I've obtained ISharable object but only using ISandbox.findSharable and not using ISharingManager.findSharable/s. And also I can't get any ILocalChange using ILocalChangeManager.getPendingChanges.

Here is my code:

IWorkspaceConnection iwc = wm.getWorkspaceConnection(wsHandles.get(0), null);

FileSystemCore.startUp();
ISharingManager sm = FileSystemCore.getSharingManager();
ISandbox sbox = sm.getSandbox(pathObj, false);

ILocalChangeManager lcm = sm.getLocalChangeManager();
IShareable shareable = sbox.findShareable(ola, false);
ILocalChange[] localChanges = lcm.getPendingChanges(iwc.getContextHandle(), compHandles.get(0), sbox);

I've obtained IWorkspaceHandle and IComponentHandle using queries.

Can you see something I'm doing wrong using ISharingManager?

Thanks
Michele.

0 votes


Permanent link
I think I've found the problem: if I use ISandbox.allShares (although I don't use the IShare[] returned object) then getPendingChanges works.

I really don't understand which link exists between the two methods...

I also remove FileSystemCore.startUp() method. It seems to do nothing for me...

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,933
× 1,202
× 169

Question asked: Oct 24 '10, 12:56 a.m.

Question was seen: 9,850 times

Last updated: Dec 16 '13, 12:18 p.m.

Confirmation Cancel Confirm