cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoff Howard <coc...@leverageweb.com>
Subject Re: source resolving help
Date Tue, 20 May 2003 13:06:57 GMT
At 07:10 PM 5/19/2003, Vadim wrote:
>>Yes, if I think I might get something else, I'll do an instanceof before 
>>the cast.
>Thanks :)
Boy, you're easy to please! ;)

>>That's part of what's opaque to me though - what determines what kind of 
>>source I get?  Is it simply the prefix? (file:, http:, etc)?  Now that I 
>>know I'm on the right track, I can dig in the source if you think it'll 
>>be unraveled there.
>Sometimes, when running out of archived war, you will get URLSource (jndi: 
>in case of Tomcat, zip: in case of WebLogic 6, what else?) and not a file.
Aha - this is exactly the kind gnosis I was looking for!

>>I am handling file uploads and simply moving a file (or writing an 
>>InputSource to a file).  I'm using Source for the destination.  In this 
>>case, I'd usually if not always expect a FileSource, no?
>I think you should test for / cast to ModifiableSource or something like 
>that which provides functionality you need. This will give flexibility / 
>extensibility (see below). If returned source is read-only, you can throw 
>some meaningful exception.
Ok, that's a good plan.

>>But part of the reason for delving into using Source is that I might 
>>expect to get support for other places to put a file 
>>semi-automagically.  But I'm not sure what other end sources would make 
>>sense as a destination besides FileSource.
>CVSSource, SlideSource... XMLDBSource also could be made writable... I can 
>also imaging writable FTPSource... BlobSource... Won't it be cool? :)

Shoot.  Now I have no excuse to not take the "better" road of Source 
instead of the easy File way.

Thanks,
Geoff 


Mime
View raw message