The easiest way to get this is to retrieve the File object from the server. The latest
version
number will be childCount() on this object.
The easiest way to get the file object is to call the getFileObj() method in
SimpleInterface.
The version number of any version in the file object is the same as that version's
NodeInfo
object's nodeName.
Here's some code that might explain things:
File myFile = SimpleInterface.getFileObj(100);
NodeIterator versions = myFile.childNodes();
while(versions.hasMoreNodes(){
Node ver = versions.getNextNode();
System.out.println("version number " + ver.getNodeName());
}
System.out.println("latest version number is " + myFile.childCount());
--- Muthu Kumaran <[EMAIL PROTECTED]> wrote:
> Sir,
> I want to use the method "getChangeList" in CommandCentral class.
> One of the input parameter for that method is Newerver(New Version number).I want
> that this
> number should be the latest version number of the corresponding label.If i use
> getFileLatestVersionID method it returns only file ID but not the version number. So
> please mail
> me how can i get the latest version number of a particular label, so that i can use
> that as a
> input parameter in getChangeList method.
> Thanks,
> N.Muthukkumaran
>
> On Wed, 25 Aug 2004 Robert MacGrogan wrote :
> >Hello.
> >
> >See my answers below.
> >
> >--- Muthu Kumaran <[EMAIL PROTECTED]> wrote:
> >
> > > Hello sir,
> > > I am working in a system where only SourceJammer Client is installed.
> > > I copied the file SJ_Server.jar file from my server, and extracted that.
> > > I have seen the ChangeListMaker class in that.
> > >
> > > 1)I want to know, where this class is used.
> > > I have seen that this is used in LabelMaker Class.
> > > But i want to know where this is linked with UI.( I haven't seen this
> > > AUTO-GENERATED CHANGE
> LIST
> > > anywhere).
> >
> >This class is used to make change lists. You can make a change list by doing the
> >following:
> >* Create a label
> >* Make one or more changes to files that are part of your label.
> >* Rebuild your label (select the label and select Tools|Rebuild Label)
> >* Select the Build Change List option in the rebuild label dialog.
> >
> >You can also build a change list to show the differences between any two versions
> >of a label.
> >* Select the label.
> >* Select File|Details.
> >* Select any two versions of the label.
> >* Click the Change List button.
> >
> > >
> > > 2)Is there any UI for SJ Server?
> >
> >There is no admin UI for the server. The only UI is the SJ Client.
> >
> > >
> > > 3)If i want to compare the versions in the input label with current versions,
> > > i may need the classes from SJ_Server.Jar. If so, whether i have to copy this to
> > > my SJ Client system from SJ server or Is it possible to do something directly
> > > from client
> > > system?
> >
> >Anything you need to do to compare two labels is done using the server. You don't
> >ever need a
> copy
> >of sj_server.jar in your SJ client.
> >
> > >
> > > 4)Is it possible to get the XML file(In which versions of all files are listed)
> > > of the input
> > > label,
> > > and current versions in another XML file?i.e, if i have 2 XML files(One for
> > > Input label and
> > > another for Current Version), i can compare them in another
> > > application(.Net).As i was not
> a
> > > java programmer, if i did that in .net i can do it faster. But i can do
> > > something in Java
> also.
> > > If some otherway is available to compare, then i don't need XML files.
> >
> >I'm sorry, but I really don't understand this question.
> >
> > >
> > > 5)In every folder there is a file called .Source.Jam. What is the purpose of
> > > this file?
> >
> >.source.jam stores information about which version of each file SourceJammer has
> >most recently
> put
> >in a directory. SJ uses this to figure out if it needs to download a file again
> >when you do a
> get
> >or a checkout. If the local file is the same as file you're trying to download, SJ
> >saves time
> by
> >not downloading the file.
> >
> >Thanks.
> >
> >--Rob
> >
> > >
> > > Yours,
> > > N.Muthukkumaran
> > >
> > >
> >
> >
> >
> >
> >__________________________________
> >Do you Yahoo!?
> >Yahoo! Mail - You care about security. So do we.
> >http://promotions.yahoo.com/new_mail
>
>
>
_______________________________
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
SourceJammer-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/sourcejammer-devel