Hi Brett.
Very interesting! The use of AOP is a nice solution.
On Jan 12, 2009, at 12:47 AM, Brett Dargan wrote:
> I think I've got a reasonable solution now, at least for my
> situation, so I can now "HATEOAS" enable my app/msgs which relies on
> independent and slowly evolving legacy model .
>
> 1) Take some existing Model objects that are JAXB annotated.
> 2) I enhance them with aspectj, so I 1) add a new parent so they
> have a new member, that is a list of links and 2) add inject
> @ResourceLink(href="/some/resource/{code}") around attributes of
> methods I want linked.
> 3) New Content Response Filter - that walks through the
> response.entity and evaluates the href's in the marked annotations,
> using context of the data and of the request/session.
>
How is the template variable "code" resolved? i think it is in the
"context of the data" but an example would be useful to help me (and
perhaps others) understand.
Also, i this something that could lend itself to non-JAXB based Java
types?
Paul.