jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Brooking <public+jackrab...@charlie.brooking.id.au>
Subject Re: Files for binary properties
Date Tue, 02 Dec 2008 13:19:19 GMT
Thomas Müller wrote:
> Just recently there was a discussion about getting the unique
> identifier for a binary value. I created an issue:
> https://issues.apache.org/jira/browse/JCR-1892
>>    I am currently using the XMLPersistenceManager.
> You should consider using a bundle database persistence manager. See
> also http://wiki.apache.org/jackrabbit/PersistenceManagerFAQ -
> XMLPersistenceManager: If the JVM process is killed the repository
> might turn inconsistent; Status: obsolete, mature

If it does become inconsistent, though, I would assume things could be 
fixed quite easily given the XML representation is spread across several 
files and is in a simple human-readable format.

>> Listed below is the code I've used to obtain file paths. One problem is
>> that BLOBInResource does not have a getFileSystem() method - is there a
>> reason for this?
> BLOBInResource is not used if you use a data store. I would consider
> using a data store. Unfortunately, you can't get the identifier from
> the BLOBInDataStore. But using Jackrabbit internal classes directly is
> anyway problematic as they change in future versions.

When using a datastore I assumed files might not be directly stored on 
the (operating system) filesystem. Currently, I need a direct mapping to 
files so I can pass file paths to other programs for processing.

Basically, I want files uploaded by users through WebDAV to be stored as 
actual files in the operating system, and to be able to get their path.

As you say, my code is a hack right now - even down to accessing a 
private field - but I wondered if we could create a proper interface 
based on what the code illustrates. The getFileName part of your ticket 
is good, although I would further "if it is stored in the file system" 
with a suggestion that in some applications people will want assurance 
that all nt:files are stored as actual files. This is the "I want a 
normal WebDAV server" kind of use case.


View raw message