Using @SubClassHandler for children of IdentifierSource (IDGEN-42)

Tags: #<Tag:0x00007fdde7d69fa8> #<Tag:0x00007fdde7d69d28>

Started looking into , I started by reviewing this PR which is the recommended starting point.
Isn’t this current implementation IdentifierSourceResource able to handle all rest use cases intended in IdentifierPoolResourceHandler , IdentifierSourceResource and RemoteIdentifierSourceResourceHandler in the above reverted PR?
Just couldn’t ask from IRC due to the many links :smile:

Specifically in the create and update methods

If so, is it of need implementing this using "@subclassResourcesHandlers " ?

Unless stated otherwise in the history of this ticket or elsewhere, I would naturally lean towards implementing subclasses with the @SubClassHandler annotation. Is that your question?

@mseaton @darius, thoughts?

While peaking at this, it would be great to address this as well: ‘IdGen: Why does IdentifierSource not extend BaseOpenmrsObject?

I don’t have a specific opinion about this, but I agree with @mksd that the default approach would be to use subclasshandler

SubclassHandler as you can guess is meant for exposing subclasses of a given resource type and not its children, it would be against our conventions to use it for children and most likely won’t work, by children am assuming you mean child collections and SubResource is intended for child collections.

Although the title of this thread says “children”, we’re actually talking about Java subclasses.