You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Bernd Bohmann <be...@atanion.com> on 2006/10/12 00:54:19 UTC

Proprosal for common fileupload and annotation based secured method binding

Hello,

I have setup two modules for possible inclusion in the common myfaces 
code base.


One module is a FacesContextFactory which replaced the 
multipart-formdata Request with a CommonFileUploadRequest wrapper. You 
don't need to define a ServletFilter. You only need to add the lib in 
your webapplication lib path.
TODOs:
Configuration of CommonFileUpload with env-entries from the web.xml
More integrated error handling in jsf.
Extract the FileUploadRequestWrapper from tobago.
Define a common UIFileInput

http://svn.apache.org/repos/asf/myfaces/tobago/trunk/contrib/fileupload




The other module is a annotation based secured method binding.
This module provides a ApplicationImplWrapper that add some security 
check to method bindings.

http://svn.apache.org/repos/asf/myfaces/tobago/trunk/contrib/security
http://svn.apache.org/repos/asf/myfaces/tobago/trunk/contrib/security/src/main/java/org/apache/myfaces/tobago/security/

You can find an example in the tobago-example-security module:

http://svn.apache.org/repos/asf/myfaces/tobago/trunk/example/security/

http://svn.apache.org/repos/asf/myfaces/tobago/trunk/example/security/src/main/java/org/apache/myfaces/tobago/example/security/Controller.java



Anybody interested comments?

The code is far from perfect but a good starting point.

Regards

Bernd

Re: Proprosal for common fileupload and annotation based secured method binding

Posted by Scott O'Bryan <da...@gmail.com>.
Bernd Bohmann wrote:
>>
>> Secondly, do you have support for the 
>> PortletRender/ActionRequest/Response objects:?
>>
>
> Currently not, but you are invited to add it.
Being that I was going to do it from scratch, you're on.  :)   Once 
again the commons project rears it's ugly head.  :)  We'll need this to 
be exportable to Trinidad since we need to be able to skin the component 
and we'll likely have to deprecate our current wrapper object 
(delegating to this one).  But it would be tres cool to be able to do 
it.  Even if the interfaces were all that existed in the commons 
package, that would be enough.  Keep us posted.
>
>
>
> Regards
>
> Bernd
>


Re: Proprosal for common fileupload and annotation based secured method binding

Posted by Bernd Bohmann <be...@atanion.com>.
Scott O'Bryan wrote:
> Bernd,
> 
> Very cool.  We were looking at doing something similar in the fileUpload 
> thing in Trinidad.  Looks like you beat us to it.  I have 2 questions:
Thanks Scott :-) I don't like to define a ServletFilter any more.
Adding a dependency to your pom is much nicer.

> 
> First, is there any chance the FacesContextFactory and FacesContext 
> implementation can either be added to the base MyFaces implementation or 
> moved to a commons object so it can be extended by other renderkits?

That should be the intention. We should define a place where the common 
code can used by all renderkits like Tomahawk, Trinidad and Tobago.

> 
> Secondly, do you have support for the 
> PortletRender/ActionRequest/Response objects:?
>

Currently not, but you are invited to add it.



Regards

Bernd

Re: Proprosal for common fileupload and annotation based secured method binding

Posted by Scott O'Bryan <da...@gmail.com>.
Bernd,

Very cool.  We were looking at doing something similar in the fileUpload 
thing in Trinidad.  Looks like you beat us to it.  I have 2 questions:

First, is there any chance the FacesContextFactory and FacesContext 
implementation can either be added to the base MyFaces implementation or 
moved to a commons object so it can be extended by other renderkits?

Secondly, do you have support for the 
PortletRender/ActionRequest/Response objects:?

Scott O'Bryan

Bernd Bohmann wrote:
> Hello,
>
> I have setup two modules for possible inclusion in the common myfaces 
> code base.
>
>
> One module is a FacesContextFactory which replaced the 
> multipart-formdata Request with a CommonFileUploadRequest wrapper. You 
> don't need to define a ServletFilter. You only need to add the lib in 
> your webapplication lib path.
> TODOs:
> Configuration of CommonFileUpload with env-entries from the web.xml
> More integrated error handling in jsf.
> Extract the FileUploadRequestWrapper from tobago.
> Define a common UIFileInput
>
> http://svn.apache.org/repos/asf/myfaces/tobago/trunk/contrib/fileupload
>
>
>
>
> The other module is a annotation based secured method binding.
> This module provides a ApplicationImplWrapper that add some security 
> check to method bindings.
>
> http://svn.apache.org/repos/asf/myfaces/tobago/trunk/contrib/security
> http://svn.apache.org/repos/asf/myfaces/tobago/trunk/contrib/security/src/main/java/org/apache/myfaces/tobago/security/ 
>
>
> You can find an example in the tobago-example-security module:
>
> http://svn.apache.org/repos/asf/myfaces/tobago/trunk/example/security/
>
> http://svn.apache.org/repos/asf/myfaces/tobago/trunk/example/security/src/main/java/org/apache/myfaces/tobago/example/security/Controller.java 
>
>
>
>
> Anybody interested comments?
>
> The code is far from perfect but a good starting point.
>
> Regards
>
> Bernd
>