I think is as simple as:

node.restore(node.getBaseVersion(), true);

On Wed, Jun 9, 2010 at 11:56 AM, Dieter Wachters
<[email protected]> wrote:
> Hi,
>
> I might have found a solution that seems to work at first sight, but would 
> like to hear if this isn't breaking something.
> I use the restore method and then remove the latest version again. So I get 
> something like:
>        final VersionManager vm = session.getWorkspace().getVersionManager();
>        
> vm.restore(session.getWorkspace().getVersionManager().getBaseVersion(path), 
> true);
>        final Node baseVersion = vm.getBaseVersion(path);
>        final VersionHistory vh = vm.getVersionHistory(path);
>        vh.removeVersion(baseVersion.getName());
>

-- 
OpenKM
http://www.openkm.com
http://www.guia-ubuntu.org

Reply via email to