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

Reply via email to