Hi, On Wed, Apr 3, 2013 at 5:04 PM, Antonio Gioia <[email protected]> wrote: > ...I'd like to add some "link" to files stored in a remote storage, I don't > wont import the files present in this remote storage in my jackrabbit > repository. So, I was thinking still to use a subtype of nt:resource node > adding a property to store the URL (a simple string) for the remote files, > but in this way what I can retrieve the content of the remote files?...
Do you mean retrieving the content via WebDAV, or via HTTP? If it's WebDAV I think you'd have to proxy the whole file retrieval protocol (PROPFIND, PROPGET, GET etc.) which is certainly possible by customizing the Jackrabbit WebDAV server, or reimplementing the parts that you need on something like http://milton.io/ and using that instead of Jackrabbit's WebDAV server, if it's easier to customize. Retrieving the files via HTTP would probably be easier, you'd just need to implement a servlet that maps incoming URLs to JCR nodes, checking if the addressed node is a local or remote file, and serving/proxying the content accordingly. In that case you might not even need a specific node type, you could use nt:unstructured with a remoteFileURL property, at least initially. -Bertrand
