← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 22193: ReportTableService, using ReportStore instead of service

 

------------------------------------------------------------
revno: 22193
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2016-03-08 16:34:53 +0100
message:
  ReportTableService, using ReportStore instead of service
modified:
  dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/impl/DefaultReportTableService.java
  dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/impl/DefaultReportTableService.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/impl/DefaultReportTableService.java	2016-02-28 12:29:01 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/impl/DefaultReportTableService.java	2016-03-08 15:34:53 +0000
@@ -37,11 +37,12 @@
 import org.hisp.dhis.common.AnalyticalObjectStore;
 import org.hisp.dhis.common.DisplayProperty;
 import org.hisp.dhis.common.GenericAnalyticalObjectService;
+import org.hisp.dhis.common.GenericIdentifiableObjectStore;
 import org.hisp.dhis.common.Grid;
 import org.hisp.dhis.i18n.I18nFormat;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
-import org.hisp.dhis.report.ReportService;
+import org.hisp.dhis.report.Report;
 import org.hisp.dhis.reporttable.ReportTable;
 import org.hisp.dhis.reporttable.ReportTableService;
 import org.hisp.dhis.system.grid.ListGrid;
@@ -74,11 +75,11 @@
         this.reportTableStore = reportTableStore;
     }
 
-    private ReportService reportService;
+    private GenericIdentifiableObjectStore<Report> reportStore;
 
-    public void setReportService( ReportService reportService )
+    public void setReportStore( GenericIdentifiableObjectStore<Report> reportStore )
     {
-        this.reportService = reportService;
+        this.reportStore = reportStore;
     }
 
     private OrganisationUnitService organisationUnitService;
@@ -141,7 +142,7 @@
         }
         else if ( mode.equals( MODE_REPORT ) )
         {
-            return reportService.getReport( uid ).getReportTable();
+            return reportStore.getByUid( uid ).getReportTable();
         }
 
         return null;

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml	2016-03-07 18:04:27 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml	2016-03-08 15:34:53 +0000
@@ -15,7 +15,7 @@
   <bean id="org.hisp.dhis.reporttable.ReportTableService" class="org.hisp.dhis.reporttable.impl.DefaultReportTableService">
     <property name="analyticsService" ref="org.hisp.dhis.analytics.AnalyticsService" />
     <property name="reportTableStore" ref="org.hisp.dhis.reporttable.ReportTableStore" />
-    <property name="reportService" ref="org.hisp.dhis.report.ReportService" />
+    <property name="reportStore" ref="org.hisp.dhis.report.ReportStore" />
     <property name="organisationUnitService" ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
     <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
   </bean>