REST for subclasses of classes which already are resources

Dear @jthomas

I would like to apply for slot

https://wiki.openmrs.org/display/RES/2016-09-07+Design+Forum

To discuss this topic here.

If the slot is also ok for (at least a few of, hopefully all :slight_smile: ) @wyclif @raff @pascal @darius ?

@wyclif @raff @pascal @darius will this work for you?

The date works for me.

Should be okay, yeah. Thanks @jthomas.

Fine with me

From this design call, the proposed approach is to tweak the rest framework to take into consideration the t request parameter when looking up an applicable search handler. RestServiceImpl should also maintain a cache of a given supported resource name along with the type and a list of the applicable SearchHandlers, this could be implemented with a nested class that encapsulates this data or a map where the subclass resource name and type value constitute the key and the value would be the list of SearchHandlers for that type. Then this method would have to be refactored to apply the same logic but restricting to only the handlers that match the type if a value is specified otherwise it looks through all search handlers that are applicable.

just for reference. Opened a ticket https://issues.openmrs.org/browse/RESTWS-613 and am working on it. will keep you up to date!

@teleivo, thanks for creating the issue. I’ve commented on a possible implementation approach.