Hi Paul,
Well here is some sample code, named hateoas4legacy, it is really
rough in places, I'm almost embarrassed to put it up. But atleast it
gets it out there.
1 The sample enhances your model classes using AspectJ at compile time.
- add a container for some Links
- add Annotations that contain link templates around attributes or
methods or classes
2 Use a custom ContainerResponseFilter class of jersey to your
evaluate link templates at run time, using the data and any request
based information you may require.
I've posted about this with some instructions:
http://brettdargan.com/blog/2009/01/14/hateoas-for-legacy-object-models/
source code is available from here:
http://brettdargan.com/blog/wp-content/uploads/2009/01/hateoas4legacytar.bz2
mvn glassfish:run
./curl_test
cheers,
Brett.
PS. I've submitted a talk for this at java: S304410