Hi Nisala, Normally it is unacceptable to have more than 3 arguments for a method when you write a clean code. I think you will have to refactor all these methods before proceed with your work because these methods already have too many arguments. As stated in [1],
"The ideal number of arguments for a function is zero (niladic). Next comes one (monadic), followed closely by two (dyadic). Three arguments (triadic) should be avoided where possible. More than three (polyadic) requires very special justification - and then shouldn't be used anyway." So please consider those things. [1]. http://www.javaworld.com/article/2074962/core-java/too-many-parameters-in-java-methods-part-8-tooling.html?null Thanks, Lakshitha Harshan Software Engineer Mobile: *+94724423048* Email: hars...@wso2.com Blog : http://harshanliyanage.blogspot.com/ *WSO2, Inc. :** wso2.com <http://wso2.com/>* lean.enterprise.middleware. On Tue, Feb 17, 2015 at 10:25 AM, Nisala Nanayakkara <nis...@wso2.com> wrote: > I am working on the improvement of 'Pre-populating API Manager with one > sample API in APIM'. The decided approach is create a simple API using > inline implementation with script mediator in the server startup. For > this,apim startup.publisher package will be re-used. There will be some > changes in the startup.publisher package as below as currently that package > doesn't support create APIs with inline implementation approach. > > Note-With below changes,the current functionality in startup publisher > which is used by GReg/AS will not be break. > > - adding extra configuration property as 'isInline' in APIManager.xml to > get the API implementation method.If this value is true,then use inline > implementation approach,instead wrapping the API with a back-end endpoint. > > <LocalAPIs> > <LocalAPI> > <Context>/resource</Context> > <Provider>admin</Provider> > <Version>1.0.0</Version> > <IconPath>none</IconPath> > <DocumentURL>none</DocumentURL> > <AuthType>Any</AuthType> > *<isInline>true</isInline>* > </LocalAPI> > </LocalAPIs> > > -changing createAPIModel and createAPIAtServerStartup method signatures as > below > > private API createAPIModel(String apiName, String apiProvider, > String apiVersion, String apiEndpoint, > String apiContext, > String iconPath, String documentURL, String > authType, > *boolean isInline*) > > private void createAPIAtServerStartup( > String apiName, String apiProvider, > String apiVersion, String > apiEndpoint, String apiContext, > String iconPath, String > documentURL, String authType, > *boolean isInline*) > > > Please reply if you have any opinion about this. > > Thanks, > Nisala > -- > > *Best Regards,Nisala Niroshana Nanayakkara,* > *Bsc. Eng Undergraduate | Department of Computer Science & Engineering | > University of Moratuwa | Sri Lanka* > > *Intern Software Engineer | WSO2 Lanka(pvt) Ltd * > *Director | Leo Club of University of Moratuwa.* > *Mobile | +94717600022* > > _______________________________________________ > Architecture mailing list > Architecture@wso2.org > https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture > >
_______________________________________________ Architecture mailing list Architecture@wso2.org https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture