Hi All,

In-order to solve [1] I need to add a new method to
CarbonUIAuthenticator interface. But adding a new method to this
interface will break existing ui authenticators. So I am wondering
what is the best way to change an existing API. This is not a question
specific to [1] but in generally what is the best way to change an
existing API ?

I am planning to do following.
1. Create a new interface (say X) with all methods in
CarbonUIAuthenticator + the method which i want to add.
2. Extend CarbonUIAuthenticator from X and remove all methods in
CarbonUIAuthenticator
3. Deprecate CarbonUIAuthenticator
4. In the framework check which instance is being called and implement
logic accordingly.

Is there a more better way of doing this ? Appreciate feedback.

[1] https://wso2.org/jira/browse/CARBON-12378

Thanks
AmilaJ
-- 
Mobile : +94773330538
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to