I'm moving this to the devel list. Kevin, if you want to post your responses to 
the list, you'll
have to subscribe.

The NodeList you get from a Project can contain either other Projects or Files. 
You have to
inspect the type. The NodeInfo object is a limited view of the objects 
properties. If you want the
full object (including it's own children) you'll have to get that object from 
the server
(getProject for Projects and getFileObj for Files).

Once you have the File object for the file you want to inspect, then you can 
follow the steps I
outlined below.

You might want to look at the SJ Eclipse code for some more examples on using 
the SimpleInterface
api. You also might want to take a look at the SJ Client code for examples of 
how to manipulate
the File and Project objects. Take a look at RetrieveFileInfoAction (following 
the code down
through CommandCentral and the dialog that this action spawns) for examples on 
manipulating the
File object.

--Rob
--- [EMAIL PROTECTED] wrote:
> Rob,
> 
> Thanks for your quick reply.  Can this be done from the Project class? 
> This is the code that I've inherited.
> 
> static public SimpleInterface   sjInterface;
> static public Project           sjProject;
> 
> sjProject = sjInterface.connect(connArchive, connUrl, connUser, connPass);
> 
> NodeList nodeList = sjProject.childList();
> 
> NodeIterator nodeIter = nodeList.getIterator();
>  
> while (nodeIter.hasMoreNodes())
> {
>     NodeInfo childNodeInfo = (NodeInfo) nodeIter.getNextNode();
> 
>     // Other code here
> 
> }
> 
> 
> thanks!
> 
> Kevin Cloudt
> 770-806-2648
> [EMAIL PROTECTED]
> 
> 
> 
> Robert MacGrogan <[EMAIL PROTECTED]> 
> 03/21/2005 10:01 AM
> 
> To
> [EMAIL PROTECTED], [email protected]
> cc
> 
> Subject
> Re: [SourceJammer-users] Using the Java APi to get dates off different 
> versions
> 
> 
> 
> 
> 
> 
> Hi, Kevin.
> 
> The easiest way to get this is to:
> 
> 1) Use the SimpleInterface class getFileObj() method to get the File 
> object.
> 2) call either childList() or childNodes() on the File object to get a 
> list of the Version
> objects.
> 3) Cast each object in childList()/childNodes() to NodeInfo.
> 4) The date value can be found with getCreatedDate() on the NodeInfo 
> object.
> 
> Good luck.
> 
> --Rob
> 
> 
> --- [EMAIL PROTECTED] wrote:
> > Hello,
> > 
> > I'm trying to get dates off of different file versions of the same file 
> > for reporting purposes.  I'm pretty sure this can be done, because by 
> > clicking the details button when using the GUI, I can see a date beside 
> > each version.  I'm having trouble trying to do this using the Java API.
> > 
> > Can you please give me some direction?
> > 
> > Thanks!
> > 
> > Kevin Cloudt
> > 770-806-2648
> > [EMAIL PROTECTED]
> 
> 
>  
> __________________________________ 
> Do you Yahoo!? 
> Yahoo! Mail - Find what you need with new enhanced search. 
> http://info.mail.yahoo.com/mail_250
> 
> 


                
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search. 
http://info.mail.yahoo.com/mail_250


-------------------------------------------------------
This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
Embedded(r) & Windows Mobile(tm) platforms, applications & content.  Register
by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
_______________________________________________
SourceJammer-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sourcejammer-devel

Reply via email to