Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 11065 invoked from network); 24 Jun 2008 07:31:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Jun 2008 07:31:59 -0000 Received: (qmail 69021 invoked by uid 500); 24 Jun 2008 07:32:00 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 68561 invoked by uid 500); 24 Jun 2008 07:31:59 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 68550 invoked by uid 99); 24 Jun 2008 07:31:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Jun 2008 00:31:59 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of marcel.reutegger@gmx.net designates 213.165.64.20 as permitted sender) Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 24 Jun 2008 07:31:09 +0000 Received: (qmail invoked by alias); 24 Jun 2008 07:30:27 -0000 Received: from adsl-84-226-105-143.adslplus.ch (EHLO [10.0.1.195]) [84.226.105.143] by mail.gmx.net (mp017) with SMTP; 24 Jun 2008 09:30:27 +0200 X-Authenticated: #894343 X-Provags-ID: V01U2FsdGVkX1+CRAE2zg2CrKjIUria0c7mf7eFYSmyiwFUiXHUcf ltzSEkyIi+1v9Z Message-ID: <4860A292.2090903@gmx.net> Date: Tue, 24 Jun 2008 09:30:26 +0200 From: Marcel Reutegger User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: users@jackrabbit.apache.org Subject: Re: Custom PersistenceManagers - How can I get the path associated with a NodeId? References: <5689ad4a0806231102p60a520adhfc4dcb825e941b35@mail.gmail.com> In-Reply-To: <5689ad4a0806231102p60a520adhfc4dcb825e941b35@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Checked: Checked by ClamAV on apache.org Hi Jerome, you might want to have a look at the SPI in Jackrabbit. It defines interfaces at a higher level than the persistence manager and allows an implementation to be path based. a major consequence however is, that you have to implement more operations compared to a persistence manager. while a persistence manager only implements CRUD, an SPI implementation needs to implement low level JCR operations. regards marcel Jerome Banks wrote: > Hey Folks, > I'm trying to implement a custom PersistenceManager, and I'm running into > some difficulties. > > I'd like to create a PersistenceManager where Nodes are stored on a > filesystem, in a Folder corresponding the path of the Node in the > Repository. This way we could have nt:file file nodes which are accessible > by non-JCR clients, simply as files on a filesystem. > > However, the methods provided to PersistenceManager only seem to pass in > NodeId or PropertyId, which don't seem to have a path, but simply a UUID. > It looks like various components in Jackrabbit are able to store items on > the filesystem, but they do so by chopping up the UUID, and creating their > own path. Is there any reason we couldn't just use the Node's path to start > out with? From the JCR API perspective, it is alway available when a Node > or Property is created. Why can't it be accessed by the PersistenceManager? > > Any hints on how to accomplish my goal? I want to be able to store items > (basically binary properties ) on a filesystem, according to their path in > the repository. > > thx ... >