Example: Extend the UEL context
For example, if you want to support the Seam annotation s:hasPermission(target, permission) in your security constraints, you can add a package-info.java file like this: @LinkELProvider(SeamELProvider.class) package org.jboss.resteasy.links.test; import org.jboss.resteasy.links.*; With the following provider implementation: package org.jboss.resteasy.links.test; import javax.el.ELContext; import javax.el.ELResolver; import javax.el.FunctionMapper; import javax.el.VariableMapper; import org.jboss.seam.el.SeamFunctionMapper; import org.jboss.resteasy.links.ELProvider; public class SeamELProvider implements ELProvider { public ELContext getContext(final ELContext ctx) { return new ELContext() { private SeamFunctionMapper functionMapper; @Override public ELResolver getELResolver() { return ctx.getELResolver(); } @Override public FunctionMapper getFunctionMapper() { if (functionMapper == null) functionMapper = new SeamFunctionMapper(ctx .getFunctionMapper()); return functionMapper; } @Override public VariableMapper getVariableMapper() { return ctx.getVariableMapper(); } }; } } And then use it as such: @Path("/") @Consumes({"application/xml", "application/json"}) @Produces({"application/xml", "application/json"}) public interface BookStore { @AddLinks @LinkResources({ @LinkResource(value = Book.class, rel = "comments", constraint = "${s:hasPermission(this, 'add-comment')}"), @LinkResource(value = Comment.class, constraint = "${s:hasPermission(this, 'insert')}") }) @GET @Path("book/{id}/comments") public Collection getComments(@PathParam("id") String bookId); @AddLinks @LinkResource(constraint = "${s:hasPermission(this, 'read')}") @GET @Path("book/{id}/comment/{cid}") public Comment getComment(@PathParam("id") String bookId, @PathParam("cid") String commentId); @LinkResource(constraint = "${s:hasPermission(this, 'insert')}") @POST @Path("book/{id}/comments") public void addComment(@PathParam("id") String bookId, Comment comment); @LinkResource(constraint = "${s:hasPermission(this, 'update')}") @PUT @Path("book/{id}/comment/{cid}") public void updateComment(@PathParam("id") String bookId, @PathParam("cid") String commentId, Comment comment); @LinkResource(Comment.class, constraint = "${s:hasPermission(this, 'delete')}") @DELETE @Path("book/{id}/comment/{cid}") public void deleteComment(@PathParam("id") String bookId, @PathParam("cid") String commentId); }