Sumedha and the API Manager team,

In order to improve the internal design  I'd like to propose following API
changes to the API manager implementation:

1. Add following 2 new methods to the APIManager interface (Some variants
of these method are already available in the APIManagerImpl class, but they
are not part of the API. I think we should make the following generalized
methods part of the core API and use them from the host objects as required)
            InputStream getIcon(APIIdentifier id)
            void addIcon(APIIdentifier id, InputStream in, String
contentType)

2. Move the getSubscriberAPIs method from APIConsumer to APIManager (This
method is already used by the API provider host object. Clearly it's
required by API consumers as well as API providers)

3. Introduce a new username argument (String) to the addComment and rateAPI
methods. We need to perform these operations using the governance user
registry of the corresponding users. Otherwise the system will not properly
keep track of the comment authors. To make the core API more generic I
think we should introduce the username argument to the above methods.

If you don't see any issues with these changes, I'll get started with
refactoring. In order to handle authorization what I thought was to
implement a new wrapper for the existing impl classes. The wrapper will
imply extend the classes providing the necessary authorization logic
(permission checking) where necessary. I've spawned a new thread regarding
this on the mailing list. If we don't get any better ideas we can implement
that.

Thanks
-- 
Hiranya Jayathilaka
Senior Technical Lead;
WSO2 Inc.;  http://wso2.org
E-mail: [email protected];  Mobile: +94 77 633 3491
Blog: http://techfeast-hiranya.blogspot.com
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to