Hi Anatoly, adding the getMimeType() method is a good idea, but..
the source resolving as it exists today will soon be replaced with the source resolving from avalon excalibur (I hope by next week). The source resolving of excalibur will have the getMimeType() feature, so stay tuned. Carsten Anatoly Sennov wrote: > > 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: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]