RE: Delegating REST request to sub-resource classes ??

2009-10-27 Thread Sergey Beryozkin
Handler(); >public Response handle(String lastsegment) {} > } 'lastsegment' will capture 'xyz' Cheers, Sergey -Original Message----- From: vmrm [mailto:rm...@vmware.com] Sent: 23 October 2009 21:47 To: users@cxf.apache.org Subject: Re: Delegating REST request to

Re: Delegating REST request to sub-resource classes ??

2009-10-23 Thread vmrm
Thanks Sergey, for helping, as always. But, I am confused a bit here as to how the request is going to be delegated to any of subresourceclass handler. Do we assume that getItemHandler method will do the delegation? If yes, can you please help me understand how? And will it handle following

Re: Delegating REST request to sub-resource classes ??

2009-10-23 Thread Sergey Beryozkin
Hi you can have something like public class BaseRESTResource { @Path("{id}/{action}") public CatalogueItemHandler subresourceLocatorItemHandler(@PathParam("id") int id, @PathParam("action") String action) { CatalogueItem item = findItem(id); CatalogueItemHandler handler = getItemHandler(