You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Joseph Wright <jo...@otnb.com> on 2012/05/07 14:18:05 UTC

Save to repository instead of checkin

Hi Folks,

Trying to confirm if jackrabbit/jcr supports a "save to repository" versus
just a checkin or checkpoint?

Here is a scenario.

We have file that is checked out by John. The file is version 1.0. The file
is locked and the user is making changes in an online web portal. The user
needs the ability to save the file to the repository, but not just checkin
or checkpoint. The reason is if John has the file checked-out for 3 days
and another user tries to access the file they should get version 1.0 and
not any of the saved versions.

almost something like this:

1.0 ( checked out by John )
1.1 ( saved to repository )
1.2 ( saved to repository )
1.3 ( saved to repository )
1.4 ( saved to repository )
1.5 ( saved to repository )
1.6 ( saved to repository )
2.0 ( checked in by John)

So if anyone request a read-only copy of this file before John checked it
back in they would get version 1.0. More importantly if John decided to
undo-checkout the system rolls back to 1.0. Only when John checks in the
file does a user get 2.0. In reality once John checked-in and created 2.0
then 1.1 through 1.6 could be removed.

Looking through the spec
http://www.day.com/maven/jsr170/javadocs/jcr-2.0/index.html it seems like
some combination of activity, label or predecessors could be used to
achieve this. Just wondering if jackrabbit handles something like this
natively before we tried to build anything.

We are using Jackrabbit 2.4.1 on OS X with JBOSS 7.

Jo

Re: Save to repository instead of checkin

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On Mon, May 7, 2012 at 2:18 PM, Joseph Wright <jo...@otnb.com> wrote:
> We have file that is checked out by John. The file is version 1.0. The file
> is locked and the user is making changes in an online web portal. The user
> needs the ability to save the file to the repository, but not just checkin
> or checkpoint. The reason is if John has the file checked-out for 3 days
> and another user tries to access the file they should get version 1.0 and
> not any of the saved versions.

What you need for this are different workspaces.

You can checkout and work on a node in one workspace without affecting
the copy in another workspace. Then when you're done, you can checkin
your changes and update the copy in the other workspace to the new
version.

BR,

Jukka Zitting