vidakovic commented on pull request #1416:
URL: https://github.com/apache/fineract/pull/1416#issuecomment-711104595


   @vorburger I've made this more concrete now. As per your suggestion I've 
added fineract-api as a dependency to fineract-provider. I've also replaced the 
existing reporting interface with the new one in:
   
   *   
org.apache.fineract.infrastructure.report.provider.ReportingProcessServiceProvider
   *   
org.apache.fineract.infrastructure.reportmailingjob.service.ReportMailingJobWritePlatformServiceImpl
   *   org.apache.fineract.infrastructure.dataqueries.api.RunreportsApiResource
   
   Note that there is a new utility class 
"org.apache.fineract.infrastructure.report.util.ParameterUtil" with static 
function "toSingleValueMap" that I use to translate the JAX-RS multi-value maps 
to single value/normal maps. I've checked the details of the Pentaho 
implementation, something similar is happening there anyway (see function 
"getReportParams" in class 
"org.apache.fineract.infrastructure.report.service.PentahoReportingProcessServiceImpl"
 in vorburger/fineract-pentaho). Just to say: we are not losing any information 
here. And I still think it's important to keep the API interfaces free from any 
technology decisions like JAX-RS.
   
   I've also allowed myself to reduce the code in 
org.apache.fineract.infrastructure.report.provider.ReportingProcessServiceProvider.
 We can use a "feature" of Spring dependency injection to make this a lot 
easier: see the new constructor where we inject a list of all available 
implementations of org.apache.fineract.api.ReportingProcessService currently 
available in the application context. We add those references then to a hash 
map and can use this then immediately without any further initialization or a 
direct reference to application context. This also removes any need for the 
"ReportService" annotation, because we have already enough information to 
retrieve the service instances.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to