{title:'Child Resources', updated:'9.0.0'}
Child Resources are REST servlets or objects that are linked to parent resources through the {@link oajr.annotation.Rest#children() @Rest(children)} annotation.
|
|
The path of the child resource gets appended to the path of the parent resource.
So in the example above, the child resource is accessed through the URL
One advantage of using child resources is that they do not need to be declared in the JEE
As explained earlier, child REST objects typically extend from {@link oajr.servlet.BasicRestObject} or {@link oajr.servlet.BasicRestObjectGroup} and not from one of the servlet classes. They also technically don't even need to extend from those classes and can instead just be a normal class annotated with the bare-minimum {@link oajr.annotation.Rest @Rest} and {@link oajr.annotation.RestOp @RestOp} annotations.