Stefano Mazzocchi wrote:

<snip/>

Note that the Cocoon Environment Request object transparently wraps around the Object get(String name) method, so, you don't have to do any type casting since this is transparently done for you.

The only difference is that since the Cocoon Environment doesn't specify the *input part* object (this is something we'll have to do in the future), the type casting is required to acquire the "input part" that wraps around the uploaded file.


What's the real contract behind "Object get(String)" ? The method name isn't very meaninful and the JavaDoc is confusing, as it is identical to the one for getAttribute(), although the implementation is obviously different.

Furthermore, is get() useful for something other than file upload ? If not, why don't we define "Object getMultipartPart(String)" and remove/deprecate this method ?

We could even add this "InputPart" you're talking about to the enviromnent, inspired by o.a.c.c.request.multipart.FilePart.

Thoughts ?

Sylvain

--
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }




Reply via email to