cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Per-Olof Norén <pe...@alma.nu>
Subject Re: [PROPOSAL] Add getMimeType() to the Source interface
Date Thu, 18 Apr 2002 10:59:20 GMT
Hi anatoly,
Just curious, is this integration work aimed to be donated back to apache
once completed?
This would IMO really boost cocoon´s power. Being able to construct cms-type
solutions with
slide as backend. Saving content is done through webdav and so on. I think
Stefano is also looking
into webdav for cocoon, btw.

Regards
Per-Olof Norén


----- Original Message -----
From: "Anatoly Sennov" <a_s@softhome.net>
To: <cocoon-dev@xml.apache.org>
Sent: Thursday, April 18, 2002 12:19 PM
Subject: [PROPOSAL] Add getMimeType() to the Source interface


> Hello,
>
> Currently I'm integrating Cocoon and Slide and I think that it's not
correct
> to determine the Mime-Type from the servlet context when the Source itself
> might know it better. The proposed changes:
>
> 1. Add
>     public String getMimeType();
> to the Source interface
>
> 2. Default implementation may just return null
>
> 3. Change the ResourceReader and other places where the source's Mime-Type
> is needed, for example the ResourceReader.getMimeType() might look like:
>
> public String getMimeType() {
>     String mtype = this.source.getMimeType();
>     if(mtype != null)
>       return mtype;
>    Context ctx = ObjectModelHelper.getContext(this.objectModel);
>    if(ctx != null)
>       return ctx.getMimeType(this.source);
>    return null;
> }
>
> --Anatoly Sennov
> k2s ltd
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message