dev@jsr311.java.net

Re: JSR311: taking the POJO injection idea further

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Tue, 19 Feb 2008 11:30:46 -0500

I agree that better support for forms is desirable and I quite like
the idea of mapping form-url-encoded and multipart form data to a Java
bean. Beyond that though I think we are entering YAGNI territory and
already offer enough through UriInfo and HttpHeaders.

Marc.

On Feb 18, 2008, at 11:26 AM, Bill Burke wrote:

> I wanted to take Pauls form idea even further and be able to combine
> it with a @PathParam. Consider this scenario
>
>
> GET http://host.com/customerdb/;first=Bill;last=Burke;ssn=444-44-4444
>
>
> @Path("/customerdb/{customerid}")
> @GET
> public String get(@PathParam("customerid") CustomerPK cust) {...}
>
>
> @Mapped
> public class CustomerPK {
>
> @MatrixParam("first") String firstName;
> @MatrixParam("last") String lastName;
> @MatrixParam("ssn") String socialSecurityNumber;
>
> ...
>
> }
>
> and support setter injection too.
>
>
>
> So in review, I'd like to support JavaBean creation/injection in
> these scenarios:
>
> * Form urlencoded (as Paul suggested) with no arguments as Paul
> suggested
> * As just an a arbitrary parameter so that you could map any piece
> of the HTTP request into the JavaBean
> * in conjunction with @PathParam so you could extract matrix params
> easily.
>
>
>
>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_jsr311.dev.java.net
> For additional commands, e-mail: dev-help_at_jsr311.dev.java.net
>

---
Marc Hadley <marc.hadley at sun.com>
CTO Office, Sun Microsystems.