I have been trying to figure the solution, I'm using convention plugin and i need to map first every first child of http://www.domain.com/myapp/restController/<http://www.domain.com/myapp/restController/resource1/resource2/resource3/resource4/resource5>to a "restaction"
so http://www.domain.com/myapp/restController/fileSystem/folder1/folder2/folder3/file1 http://www.domain.com/myapp/restController/fileSystem/folder1/folder2/folder3/file2 both to FileSystemRestController (which inherit from AbstractRestController) AND http://www.domain.com/myapp/restController/roles/user1/role1/subrole1 http://www.domain.com/myapp/restController/roles/user2/role1/subrole1 http://www.domain.com/myapp/restController/roles/user3/role1/subrole2 both to RolesRestController these are just an example the main purpose of this is be able to use curl -X POST http://www.domain.com/myapp/restController/roles/user1/role1/subrole1/othermorerole and create othermorerole under http://www.domain.com/myapp/restController/roles/user1/role1/subrole1 On Tue, Dec 23, 2008 at 3:05 AM, Luis Gervaso <luis.gerv...@gmail.com>wrote: > I'm wondering why not the behaviour of the rest plugin is ... > > *For example* > > URL: > http://www.domain.com/myapp/restController/resource1/resource2/resource3/resource4/resource5 > > creates a mapping parent & child > > i.e: > > parentId: resource1/resource2/resource3/resource4 > childId: resource5 > > these can be obtained from request URI > > now in the logic of the RestController we are aware to map these ids > (really paths) with the model > > ParentObject - getFrom(parentId) > ChildObject - getFrom(childId) > > This way to create new rest services we have to extend this base class > > *Another example* > > > http://www.domain.com/myapp/restController/resource1/resource2/resource3/resource4/editNew > > parentId : resource1/resource2/resource3/resource4 > childId: a new ModelObject from the specific restController (which extends > BaseRestController) > > *The create method * > > uses the post request parameters for the child > uses the url to locate the parent > > I have put here childId or parentId, BUT really are ChildPath or ParentPath > (the ids are for databases) > > if we need to use this concept may be more appropiate to use the term > "Reference" > > Thanks for readme > > Luis > -- > ------------------------------------------- > Luis Alberto Gervaso Martin > Java EE Architect & Instructor > C/ Cuenca 4A, 2ºB > Getafe (Madrid) > SPAIN > mobile: (+34) 627983344 > luis.gerv...@gmail.com > -- ------------------------------------------- Luis Alberto Gervaso Martin Java EE Architect & Instructor C/ Cuenca 4A, 2ºB Getafe (Madrid) SPAIN mobile: (+34) 627983344 luis.gerv...@gmail.com