Use the below code ,to retrieve all the versions of a particular document.
- Dictionary < string, string > parameters = new Dictionary < string, string > ();
- parameters[DotCMIS.SessionParameter.BindingType] = BindingType.AtomPub;
- parameters[DotCMIS.SessionParameter.AtomPubUrl] = "http://localhost:8080/alfresco/service/cmis";
- parameters[DotCMIS.SessionParameter.User] = "admin";
- parameters[DotCMIS.SessionParameter.Password] = "admin";
- SessionFactory factory = SessionFactory.NewInstance();
- ISession session = factory.GetRepositories(parameters)[0].CreateSession();
- IList < IDocument > documents = document.GetAllVersions();
- foreach(Document doc in documents) {
- Console.WriteLine("Document name : " + doc.Name + " and its version " + doc.VersionLabel);
- }
Hope this helps someone.
Gowtham RajamanickamPosted Apr 2, 2015, 1:35 AM
god