jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paco Avila <monk...@gmail.com>
Subject Re: Cancel checkout
Date Wed, 09 Jun 2010 10:46:44 GMT
I think is as simple as:

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

On Wed, Jun 9, 2010 at 11:56 AM, Dieter Wachters
<dieter.wachters@lettergen.com> 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

Mime
View raw message