opensubscriber
   Find in this group all groups
 
Unknown more information…

s : sourcejammer-devel@lists.sourceforge.net 28 April 2006 • 11:27AM -0400

RE: [SourceJammer-devel] Status of a file?
by Gupta, Karan

REPLY TO AUTHOR
 
REPLY TO GROUP




Hi Rob,

Thanks for the quick reply.
I got the file checkout status working using the code snippet you mentioned,
and "file diff" status using the CommandCentral.hasLocalFileChanged() method.
I can find out if a "file does not exist in SJ", by catching
NodeDoesNotExistException :-)

- Karan




-----Original Message-----
From: sourcejammer-devel-admin@list...
[mailto:sourcejammer-devel-admin@list...]On Behalf Of
Robert MacGrogan
Sent: Wednesday, April 26, 2006 7:39 AM
To: ML SJ Devel (E-mail)
Subject: Re: [SourceJammer-devel] Status of a file?


No really easy way. But here's how it's done:

Project folder = SimpleInterface.getInstance().getProjectObj(parentFolderId);
NodeInfo fileNode = (NodeInfo)folder.getNode(fileName);
fileNode.isCheckedOut();
fileNode.getCheckedOutToUser();

For the "diff from local" status, well, that's a bit more complex. Unfortunately I never created a
simply utility to test for this. To see how this is done, take a look at the method
rebuildDisplayList() in ProjectTreeNode. Hopefully this will point you in the right direction.

--Rob



--- "Gupta, Karan" <karan.gupta@tran...> wrote:

> Hi,
>  
> Is there a method somewhere in the SJ source code to do the following:
>  
> String status = SimpleInterface.getInstance().getStatus(fileID);
> where status could be "checked out", "diffFromLocal", "checked out to user 'username' ", etc..
>  
> Thanks,
> Karan Gupta
> Software Engineer
> TransCore, San Diego
> (858) 736 - 8246
>  
>


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
SourceJammer-devel mailing list
SourceJammer-devel@list...
https://lists.sourceforge.net/lists/listinfo/sourcejammer-devel


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd_______________________________________________
SourceJammer-devel mailing list
SourceJammer-devel@list...
https://lists.sourceforge.net/lists/listinfo/sourcejammer-devel

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.