07-24-2013 07:01 AM
07-24-2013 10:29 AM
07-24-2013 02:18 PM
public void afterCreateVersion(NodeRef versionableNode, Version version) {
VersionHistory versionHistory = versionService
.getVersionHistory(versionableNode);
Version ancestorVersion = version;
ContentData curContentData = (ContentData) version
.getVersionProperty(ContentModel.PROP_CONTENT.getLocalName());
while ((ancestorVersion = versionHistory
.getPredecessor(ancestorVersion)) != null) {
ContentData ancestorContentData = (ContentData) ancestorVersion
.getVersionProperty(ContentModel.PROP_CONTENT
.getLocalName());
if (curContentData != null
&& ancestorContentData != null
&& curContentData.getContentUrl().equals(
ancestorContentData.getContentUrl())) {
return; // this is a revert so no further action is needed
}
}
//TODO - do the work here
}
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.