jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bertrand Delacretaz <bdelacre...@apache.org>
Subject Re: Files on the filesystem?
Date Fri, 15 Jun 2012 13:16:26 GMT
Hi,

On Thu, Jun 7, 2012 at 10:48 AM, Rob Bone <lonewolf.rjb@googlemail.com> wrote:
> ...What I am looking for is a way to essentially  have files on the file
> system (so I can access them from say, explorer if I want to) but have my
> program manipulate them through Jackrabbit, with authentication,
> authorization etc all handled by the JCR. Is this possible with Jackrabbit?...

You could implement your own DataStore [1] [2] to have one filesystem
file for each JCR property that's stored in the DataStore.

However, the DataStore just receives the binary content of the file,
not its path in JCR, so you would probably use the content's md5 or
other digest to name the file that you store on disk. You could then
view the files from the filesystem, but their names would be lost -
unless you setup something to create filesystem links from those
md5-named files to their original names, but that's a bit tricky.

A simpler alternative would be to just keep your files on the
filesystem, store their paths in JCR as String properties, and do the
mapping at the application level.

-Bertrand

[1] http://wiki.apache.org/jackrabbit/DataStore
[2] http://jackrabbit.apache.org/api/1.5/org/apache/jackrabbit/core/data/DataStore.html

Mime
View raw message