dev@jsr311.java.net

taking the POJO injection idea further

From: Bill Burke <bburke_at_redhat.com>
Date: Mon, 18 Feb 2008 11:26:42 -0500

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