You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Andreas Hartmann <an...@apache.org> on 2006/03/09 18:20:14 UTC
[heads-up] Change to DocumentIdToPathMapper interface (was: Re: Include
file extension in document ID / meta data?)
Andreas Hartmann wrote:
> Andreas Hartmann wrote:
>> Hi Lenya devs,
>>
>> I suggested to allow custom DocumentIdToPathMappers for resource types,
>> but this isn't sufficient for the following reason:
>>
>> Resource types should be able to support different file extensions.
>> (resource type "image" could support .gif, .png, .jpg, .bmp, ...)
>>
>> Correct me if I'm wrong, but this would mean that only the document
>> (or asset, resp.) itself may know about its extension. This could
>> be solved in at least two ways:
>>
>> 1) add the extension to the document identifier
>>
>> /foo/bar.xml
>> /hello/world.png
>>
>> 2) add the extension to the meta data
>
> I implemented this option, but in a not very nice way
> to avoid content migration.
BTW, this required a change to the DocumentIdToPathMapper.
If you have implemented a custom mapper class, you have to
update it:
- String getPath(String documentId, String language);
+ String getPath(String documentId, String language, String extension);
- File getFile(Publication publication, String area, String documentId,
- String language);
+ File getFile(Publication publication, String area, String documentId,
+ String language, String extension);
Sorry for the inconvenience,
-- Andreas
--
Andreas Hartmann
Wyona Inc. - Open Source Content Management - Apache Lenya
http://www.wyona.com http://lenya.apache.org
andreas.hartmann@wyona.com andreas@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org