public
Created

Using CMIS to dump an object's versions

  • Download Gist
dumpVersions.groovy
Groovy
1 2 3 4 5 6
document = session.getObjectByPath('/versionableExample.txt')
println("Checked out?" + document.versionSeriesCheckedOut)
versions = document.getAllVersions()
for (version in versions) {
println ("Version:" + version.versionLabel + " PWC?:" + version.privateWorkingCopy)
}
output.txt
1 2 3 4 5
Checked out?true
Version:V 4.0 PWC?:true
Version:V 3.0 PWC?:false
Version:V 2.0 PWC?:false
Version:V 1.0 PWC?:false

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.