You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Steven Githens <sg...@caret.cam.ac.uk> on 2007/05/17 05:15:26 UTC

Using nt:linkedFile's in WebDav

Hello,

I currently have the Jackrabbit WebDAV pointing to a repository we are 
using.  In my repository I've programmatically created some nodes of 
type nt:linkedFile that Reference other nt:folders in the repository.

When I click on one of the nt:linkedFile's in a WebDAV it just shows the 
empty folder (since it has no child nodes).

Is there a way to get the JackRabbit WebDAV to follow the Reference in a 
nt:linkedFile to the linked directory?

Thanks,
Steve

Re: Using nt:linkedFile's in WebDav

Posted by Angela Schreiber <an...@day.com>.
hi

> I currently have the Jackrabbit WebDAV pointing to a repository we are 
> using.  In my repository I've programmatically created some nodes of 
> type nt:linkedFile that Reference other nt:folders in the repository.

but nt:folder is not referenceable, right? i assume, you added the
mixin manually...

> When I click on one of the nt:linkedFile's in a WebDAV it just shows the 
> empty folder (since it has no child nodes).

your nt:linkedFile is recognized as 'collection', because in the default
configuration it is not listed in the <noncollection> section. if it
was listed there, the nt:linkedFile would be displayed as non-collection
resource, which is probably not what you want, if your nt:linkedFile
points to nt:folder nodes.

> Is there a way to get the JackRabbit WebDAV to follow the Reference in a 
> nt:linkedFile to the linked directory?

you can add a custom 'IOHandler' implementation (see config.xml again)
that resolves the reference stored in the jcr:content property of your 
nt:linkedFile.

hope that helps
angela








Re: Using nt:linkedFile's in WebDav

Posted by Julian Reschke <ju...@gmx.de>.
Steven Githens wrote:
>> It should be possible to map them to HTTP redirects (see WebDAV 
>> redirect extensions spec: 
>> <http://greenbytes.de/tech/webdav/rfc4437.html>).
>>
>> Best regards, Julian
> Thanks for the pointer.  How would you go about mapping this in 
> JackRabbit?  Is this WebDAV extension supported by the bulk of WebDAV 
> clients (or does it come for free as a function of HTTP? Sorry I haven't 
> been able to read all the way through it yet :)  )  Would this work if 

All client should be able to follow the link; it's just an HTTP-level 
redirect. Most clients will have problems displaying the links in a 
directory, though.

> you were navigating to several folders below the nt:linkedFolder?
> So for example,
> http://server/wrkspc/wow
> 
> was a linkedFile to the 'hello' in
> 
> http://server/wrkspc/hello/again/image.gif
> 
> would,
> http://server/wrkspc/wow/again/image.gif   still work?

It's possible to make this work (SAP KM's WebDAV server does that).

> Also, I'm wondering if this functionality could be implemented by adding 
> custom hooks to a DavLocatorFactory, or one of the other interfaces in 
> the nearby packages.  So you could essentially add a custom hook to 
> resolve the node that should be looked up if it contained 
> nt:linkedFile's without necessarily redirecting.  I'm pretty new to 
> these API's so any suggestions are really appreciated.
> 
> Thanks!
> Steve

Best regards, Julian


Re: Using nt:linkedFile's in WebDav

Posted by Steven Githens <sg...@caret.cam.ac.uk>.
Julian Reschke wrote:
> Steven Githens wrote:
>> Hello,
>>
>> I currently have the Jackrabbit WebDAV pointing to a repository we 
>> are using.  In my repository I've programmatically created some nodes 
>> of type nt:linkedFile that Reference other nt:folders in the repository.
>>
>> When I click on one of the nt:linkedFile's in a WebDAV it just shows 
>> the empty folder (since it has no child nodes).
>>
>> Is there a way to get the JackRabbit WebDAV to follow the Reference 
>> in a nt:linkedFile to the linked directory?
>>
>> Thanks,
>> Steve
>
> It should be possible to map them to HTTP redirects (see WebDAV 
> redirect extensions spec: 
> <http://greenbytes.de/tech/webdav/rfc4437.html>).
>
> Best regards, Julian
Thanks for the pointer.  How would you go about mapping this in 
JackRabbit?  Is this WebDAV extension supported by the bulk of WebDAV 
clients (or does it come for free as a function of HTTP? Sorry I haven't 
been able to read all the way through it yet :)  )  Would this work if 
you were navigating to several folders below the nt:linkedFolder? 

So for example,
http://server/wrkspc/wow

was a linkedFile to the 'hello' in

http://server/wrkspc/hello/again/image.gif

would,
http://server/wrkspc/wow/again/image.gif   still work?


Also, I'm wondering if this functionality could be implemented by adding 
custom hooks to a DavLocatorFactory, or one of the other interfaces in 
the nearby packages.  So you could essentially add a custom hook to 
resolve the node that should be looked up if it contained 
nt:linkedFile's without necessarily redirecting.  I'm pretty new to 
these API's so any suggestions are really appreciated.

Thanks!
Steve


Re: Using nt:linkedFile's in WebDav

Posted by Julian Reschke <ju...@gmx.de>.
Steven Githens wrote:
> Hello,
> 
> I currently have the Jackrabbit WebDAV pointing to a repository we are 
> using.  In my repository I've programmatically created some nodes of 
> type nt:linkedFile that Reference other nt:folders in the repository.
> 
> When I click on one of the nt:linkedFile's in a WebDAV it just shows the 
> empty folder (since it has no child nodes).
> 
> Is there a way to get the JackRabbit WebDAV to follow the Reference in a 
> nt:linkedFile to the linked directory?
> 
> Thanks,
> Steve

It should be possible to map them to HTTP redirects (see WebDAV redirect 
extensions spec: <http://greenbytes.de/tech/webdav/rfc4437.html>).

Best regards, Julian