Search in sources :

Example 16 with VersionServiceTrait

use of org.alfresco.repo.version.traitextender.VersionServiceTrait in project alfresco-repository by Alfresco.

the class VirtualVersionServiceExtension method deleteVersionHistory.

@Override
public void deleteVersionHistory(NodeRef nodeRef) throws AspectMissingException {
    VersionServiceTrait theTrait = getTrait();
    Reference reference = Reference.fromNodeRef(nodeRef);
    if (reference == null) {
        theTrait.deleteVersionHistory(nodeRef);
    } else {
        NodeRef materialNode = smartStore.materialize(reference);
        theTrait.deleteVersionHistory(materialNode);
    }
}
Also used : VersionServiceTrait(org.alfresco.repo.version.traitextender.VersionServiceTrait) NodeRef(org.alfresco.service.cmr.repository.NodeRef) Reference(org.alfresco.repo.virtual.ref.Reference)

Aggregations

VersionServiceTrait (org.alfresco.repo.version.traitextender.VersionServiceTrait)16 Reference (org.alfresco.repo.virtual.ref.Reference)16 NodeRef (org.alfresco.service.cmr.repository.NodeRef)16 Version (org.alfresco.service.cmr.version.Version)7 HashMap (java.util.HashMap)1 LinkedList (java.util.LinkedList)1 VersionHistory (org.alfresco.service.cmr.version.VersionHistory)1