Automatic resource link discovery with RESTEasy and Atom links

Automatic resource link discovery with RESTEasy and Atom links

This article describes how to use RESTEasy to inject Atom links in your resource representations, in order to secure your /editorials/tags/rest[RESTful] web services clients, and produce more RESTful web services with link auto-discovery.

Conclusion

RESTEasy is now able to generate Atom links for resources based on your JAX-RS service declaration, with simple default settings and powerful customisations for URI template variable resolving, security checks, and UEL extension points. This is a feature that allowed us to easily and RESTfully customise our client's user interfaces based on security permissions that only the server knows.

Of course, this is only the beginning, because jax-doclets support is coming soon, as well as support in the JavaScript Client API, which should allow you do do this soon:

// this line is already supported
var book = BookStore.getBook("foo");
book.title = "bar";
// This would then use the Atom link relations:
book.update();
// or
book.remove();