Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Retrieve all the Versions of a Particular Document in Alfresco
WhatsApp
Muralidharan Deenathayalan
5y
6.3
k
0
1
25
Blog
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.
Retrieve all the Versions of a Particular Document in Alfresco
Up Next
Configure Alfresco User Quota and Usage
Ebook Download
View all
Programming in Java
Read by 669 people
Download Now!
Learn
View all
Membership not found