Actually, CXF JAX-RS proxies help in some way. JAX-RS subresources help with modeling the transition from root resources to subresources. On the client side, every call to a subresource method results in returning a proxy too, etc. Perhaps that is not what you're looking for but I thought i'd mention it anyway...
Sergey On Sun, May 1, 2011 at 6:27 PM, Sergey Beryozkin <[email protected]> wrote: > Hi >>> hi sergei : >>>> i am thinking more in terms of >>>> 1. RESTfulie => >>>> https://github.com/caelum/restfulie >>>> http://restfulie.caelum.com.br/ >>>> yes which basically supports "links" with every entity or model. >>>> >>> >>> Can you elaborate a bit more about your requirements ? >>> Is it about the client runtime following the links ? Is it about >>> making sure links are added at the moment resource representations are >>> returned ? >>> >>> thanks, Sergey >>> >> >> yes - having client runtime follow links. as well as server side producing >> appropriate links for a resource. it should be possible to have this with >> some kind of annotation/configuration support. >> the key is how to seamlessly integrate this with "controllers/entities" w/o >> polluting them with "resource links". >> >> Restfulie has a way to do that but miss some of the powerful features of CXF >> like interceptors for outgoing and incoming messages of any type is missing. >> >> here's what restfulie has : >> so let's say a basket controller has a list method that supports items >> each controller constructs a "Restfulie restfulie" object and a "Result >> result" object and relations for a >> resource akin to code below. >> >> @Get >> @Path("/items") >> public void list() { >> ConfigurableHypermediaResource resource = >> restfulie.enhance(database.list()); >> resource.relation("basket").uses(BasketsController.class).create(null); >> result.use(representation()).from(resource, "items").serialize(); >> } >> >> this gets translated as when items are returned - i use the particular >> hypermedia resource to give links out and represent them to my result. > > The way Restfulie ebhances the representations looks interesting indeed... > I'm not sure how CXF can help Restfulie as it looks like it provides > a pretty powerful 'api' for working with links on its own, please, > elaborate on it when you get a chance. > > As far as consuming links is concerned, CXF only offers XMLSource > helper for retrieving all sorts of custom links via XPath > expressions. That is more or less a generic solution - the only thing > which is different per every case is XPath value. > > CXF does not provide a helper which would say start from a top > resource and guide the client code to the very last one. > That can be quite an interesting area to look into. Thoughts/ideas are > welcome - may be I need to understand how Restfulie works in order to > get some ideas on how to offer some generic helper. > > Cheers, Sergey > >> >> restfulie also provides nice wrapper methods around http header return >> values like "404 NOT found" is represented w/ "return result.notFound()" >> >> regards >> >> >> >> >> >> >> -- >> View this message in context: >> http://cxf.547215.n5.nabble.com/CXF-with-HATEOS-or-hypermedia-tp4347138p4361446.html >> Sent from the cxf-user mailing list archive at Nabble.com. >> > > > > -- > Sergey Beryozkin > > Application Integration Division of Talend > http://sberyozkin.blogspot.com >
