← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11474: Moved existing methods from DashboardService to DashboardManager to pave way for new impl

 

------------------------------------------------------------
revno: 11474
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-07-22 19:46:51 +0200
message:
  Moved existing methods from DashboardService to DashboardManager to pave way for new impl
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dashboard/DashboardManager.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dashboard/DashboardService.java
  dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/DashboardContentDeletionHandler.java
  dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/impl/DefaultDashboardService.java
  dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/manager/DefaultDashboardManager.java
  dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/provider/DocumentContentProvider.java
  dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/provider/MapViewContentProvider.java
  dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/provider/ReportContentProvider.java
  dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/provider/ReportTableContentProvider.java
  dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/RemoveDocumentAction.java
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/RemoveMapViewAction.java
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/RemoveReportAction.java
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/RemoveReportTableAction.java
  dhis-2/dhis-web/dhis-web-dashboard-integration/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-api/src/main/java/org/hisp/dhis/dashboard/DashboardManager.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dashboard/DashboardManager.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dashboard/DashboardManager.java	2013-07-22 17:46:51 +0000
@@ -27,9 +27,15 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import java.util.Collection;
 import java.util.Map;
 import java.util.Set;
 
+import org.hisp.dhis.document.Document;
+import org.hisp.dhis.report.Report;
+import org.hisp.dhis.reporttable.ReportTable;
+import org.hisp.dhis.user.User;
+
 /**
  * @author Lars Helge Overland
  * @version $Id$
@@ -47,4 +53,24 @@
     Set<String> getContentProviderNames();
     
     DashboardConfiguration getConfiguration();
+    
+    void saveDashboardContent( DashboardContent dashboardContent );
+
+    void updateDashboardContent( DashboardContent dashboardContent );
+    
+    DashboardContent getDashboardContent( int id );
+
+    DashboardContent getDashboardContent( User user );
+
+    Collection<DashboardContent> getAllDashboardContent();
+    
+    void deleteDashboardContent( DashboardContent content );
+
+    Collection<DashboardContent> getByDocument( Document document );
+    
+    Collection<DashboardContent> getByMap( org.hisp.dhis.mapping.Map map );
+    
+    Collection<DashboardContent> getByReport( Report report );
+    
+    Collection<DashboardContent> getByReportTable( ReportTable reportTable );
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dashboard/DashboardService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dashboard/DashboardService.java	2013-07-22 15:17:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dashboard/DashboardService.java	2013-07-22 17:46:51 +0000
@@ -27,13 +27,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.util.Collection;
-
-import org.hisp.dhis.document.Document;
-import org.hisp.dhis.mapping.Map;
-import org.hisp.dhis.report.Report;
-import org.hisp.dhis.reporttable.ReportTable;
-import org.hisp.dhis.user.User;
 
 /**
  * @author Lars Helge Overland
@@ -43,24 +36,4 @@
     final String ID = DashboardService.class.getName();
 
     DashboardSearchResult search( String query );
-    
-    void saveDashboardContent( DashboardContent dashboardContent );
-
-    void updateDashboardContent( DashboardContent dashboardContent );
-    
-    DashboardContent getDashboardContent( int id );
-
-    DashboardContent getDashboardContent( User user );
-
-    Collection<DashboardContent> getAllDashboardContent();
-    
-    void deleteDashboardContent( DashboardContent content );
-
-    Collection<DashboardContent> getByDocument( Document document );
-    
-    Collection<DashboardContent> getByMap( Map map );
-    
-    Collection<DashboardContent> getByReport( Report report );
-    
-    Collection<DashboardContent> getByReportTable( ReportTable reportTable );
 }

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/DashboardContentDeletionHandler.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/DashboardContentDeletionHandler.java	2012-11-06 07:01:56 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/DashboardContentDeletionHandler.java	2013-07-22 17:46:51 +0000
@@ -35,6 +35,7 @@
 import org.hisp.dhis.reporttable.ReportTable;
 import org.hisp.dhis.system.deletion.DeletionHandler;
 import org.hisp.dhis.user.User;
+import org.springframework.beans.factory.annotation.Autowired;
 
 /**
  * @author Lars Helge Overland
@@ -43,12 +44,8 @@
 public class DashboardContentDeletionHandler
     extends DeletionHandler
 {
-    private DashboardService dashboardService;
-
-    public void setDashboardService( DashboardService dashboardService )
-    {
-        this.dashboardService = dashboardService;
-    }
+    @Autowired
+    private DashboardManager dashboardManager;
 
     // -------------------------------------------------------------------------
     // DeletionHandler implementation
@@ -62,57 +59,56 @@
     @Override
     public void deleteReport( Report report )
     {
-        Collection<DashboardContent> contents = dashboardService.getByReport( report );
+        Collection<DashboardContent> contents = dashboardManager.getByReport( report );
         
         for ( DashboardContent content : contents )
         {
             content.getReports().remove( report );
-            dashboardService.updateDashboardContent( content );
+            dashboardManager.updateDashboardContent( content );
         }
     }
             
     @Override
     public void deleteDocument( Document document )
     {
-        Collection<DashboardContent> contents = dashboardService.getByDocument( document );
+        Collection<DashboardContent> contents = dashboardManager.getByDocument( document );
         
         for ( DashboardContent content : contents )
         {
             content.getDocuments().remove( document );
-            dashboardService.updateDashboardContent( content );
-            
+            dashboardManager.updateDashboardContent( content );            
         }
     }
     
     @Override
     public void deleteReportTable( ReportTable reportTable )
     {
-        Collection<DashboardContent> contents = dashboardService.getByReportTable( reportTable );
+        Collection<DashboardContent> contents = dashboardManager.getByReportTable( reportTable );
         
         for ( DashboardContent content : contents )
         {
             content.getReportTables().remove( reportTable );
-            dashboardService.updateDashboardContent( content );
+            dashboardManager.updateDashboardContent( content );
         }        
     }
     
     @Override
     public void deleteMap( Map map )
     {
-        Collection<DashboardContent> contents = dashboardService.getByMap( map );
+        Collection<DashboardContent> contents = dashboardManager.getByMap( map );
         
         for ( DashboardContent content : contents )
         {
             content.getMaps().remove( map );
-            dashboardService.updateDashboardContent( content );
+            dashboardManager.updateDashboardContent( content );
         }
     }
     
     @Override
     public void deleteUser( User user )
     {
-        DashboardContent content = dashboardService.getDashboardContent( user );
+        DashboardContent content = dashboardManager.getDashboardContent( user );
         
-        dashboardService.deleteDashboardContent( content );
+        dashboardManager.deleteDashboardContent( content );
     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/impl/DefaultDashboardService.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/impl/DefaultDashboardService.java	2013-07-22 15:17:19 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/impl/DefaultDashboardService.java	2013-07-22 17:46:51 +0000
@@ -61,13 +61,6 @@
     // Dependencies
     // -------------------------------------------------------------------------
 
-    private DashboardContentStore dashboardContentStore;
-
-    public void setDashboardContentStore( DashboardContentStore dashboardContentStore )
-    {
-        this.dashboardContentStore = dashboardContentStore;
-    }
-    
     private UserService userService;
     
     public void setUserService( UserService userService )
@@ -128,55 +121,4 @@
         return result;
     }
     
-    public void saveDashboardContent( DashboardContent dashboardContent )
-    {
-        dashboardContentStore.save( dashboardContent );
-    }
-
-    public void updateDashboardContent( DashboardContent dashboardContent )
-    {
-        dashboardContentStore.update( dashboardContent );
-    }
-    
-    public DashboardContent getDashboardContent( int id )
-    {
-        return dashboardContentStore.get( id );
-    }
-
-    public DashboardContent getDashboardContent( User user )
-    {
-        DashboardContent content = dashboardContentStore.get( user.getId() );
-
-        return content != null ? content : new DashboardContent( user );
-    }
-
-    public Collection<DashboardContent> getAllDashboardContent()
-    {
-        return dashboardContentStore.getAll();
-    }
-    
-    public void deleteDashboardContent( DashboardContent content )
-    {
-        dashboardContentStore.delete( content );
-    }
-    
-    public Collection<DashboardContent> getByDocument( Document document )
-    {
-        return dashboardContentStore.getByDocument( document );
-    }
-    
-    public Collection<DashboardContent> getByMap( Map map )
-    {
-        return dashboardContentStore.getByMap( map );
-    }
-    
-    public Collection<DashboardContent> getByReport( Report report )
-    {
-        return dashboardContentStore.getByReport( report );
-    }
-    
-    public Collection<DashboardContent> getByReportTable( ReportTable reportTable )
-    {
-        return dashboardContentStore.getByReportTable( reportTable );
-    }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/manager/DefaultDashboardManager.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/manager/DefaultDashboardManager.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/manager/DefaultDashboardManager.java	2013-07-22 17:46:51 +0000
@@ -33,8 +33,14 @@
 import java.util.Set;
 
 import org.hisp.dhis.dashboard.DashboardConfiguration;
+import org.hisp.dhis.dashboard.DashboardContent;
+import org.hisp.dhis.dashboard.DashboardContentStore;
 import org.hisp.dhis.dashboard.DashboardManager;
 import org.hisp.dhis.dashboard.provider.ContentProvider;
+import org.hisp.dhis.document.Document;
+import org.hisp.dhis.report.Report;
+import org.hisp.dhis.reporttable.ReportTable;
+import org.hisp.dhis.user.User;
 import org.hisp.dhis.user.UserSettingService;
 
 /**
@@ -63,6 +69,13 @@
     {
         this.userSettingService = userSettingService;
     }
+
+    private DashboardContentStore dashboardContentStore;
+
+    public void setDashboardContentStore( DashboardContentStore dashboardContentStore )
+    {
+        this.dashboardContentStore = dashboardContentStore;
+    }
     
     // -------------------------------------------------------------------------
     // DashboardManager implementation
@@ -119,6 +132,58 @@
         return config != null ? config : new DashboardConfiguration();
     }
 
+    public void saveDashboardContent( DashboardContent dashboardContent )
+    {
+        dashboardContentStore.save( dashboardContent );
+    }
+
+    public void updateDashboardContent( DashboardContent dashboardContent )
+    {
+        dashboardContentStore.update( dashboardContent );
+    }
+    
+    public DashboardContent getDashboardContent( int id )
+    {
+        return dashboardContentStore.get( id );
+    }
+
+    public DashboardContent getDashboardContent( User user )
+    {
+        DashboardContent content = dashboardContentStore.get( user.getId() );
+
+        return content != null ? content : new DashboardContent( user );
+    }
+
+    public Collection<DashboardContent> getAllDashboardContent()
+    {
+        return dashboardContentStore.getAll();
+    }
+    
+    public void deleteDashboardContent( DashboardContent content )
+    {
+        dashboardContentStore.delete( content );
+    }
+    
+    public Collection<DashboardContent> getByDocument( Document document )
+    {
+        return dashboardContentStore.getByDocument( document );
+    }
+    
+    public Collection<DashboardContent> getByMap( org.hisp.dhis.mapping.Map map )
+    {
+        return dashboardContentStore.getByMap( map );
+    }
+    
+    public Collection<DashboardContent> getByReport( Report report )
+    {
+        return dashboardContentStore.getByReport( report );
+    }
+    
+    public Collection<DashboardContent> getByReportTable( ReportTable reportTable )
+    {
+        return dashboardContentStore.getByReportTable( reportTable );
+    }
+    
     // -------------------------------------------------------------------------
     // Supportive methods
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/provider/DocumentContentProvider.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/provider/DocumentContentProvider.java	2012-01-25 17:11:43 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/provider/DocumentContentProvider.java	2013-07-22 17:46:51 +0000
@@ -34,10 +34,11 @@
 
 import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.dashboard.DashboardContent;
-import org.hisp.dhis.dashboard.DashboardService;
+import org.hisp.dhis.dashboard.DashboardManager;
 import org.hisp.dhis.document.Document;
 import org.hisp.dhis.user.CurrentUserService;
 import org.hisp.dhis.user.User;
+import org.springframework.beans.factory.annotation.Autowired;
 
 /**
  * @author Lars Helge Overland
@@ -57,12 +58,8 @@
         this.currentUserService = currentUserService;
     }
 
-    private DashboardService dashboardService;
-
-    public void setDashboardService( DashboardService dashboardService )
-    {
-        this.dashboardService = dashboardService;
-    }
+    @Autowired
+    private DashboardManager dashboardManager;
     
     private String key;
     
@@ -83,7 +80,7 @@
         
         if ( user != null )
         {
-            DashboardContent dashboardContent = dashboardService.getDashboardContent( user );
+            DashboardContent dashboardContent = dashboardManager.getDashboardContent( user );
             
             List<Document> documents = dashboardContent.getDocuments();
             

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/provider/MapViewContentProvider.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/provider/MapViewContentProvider.java	2012-11-06 07:01:56 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/provider/MapViewContentProvider.java	2013-07-22 17:46:51 +0000
@@ -35,9 +35,10 @@
 
 import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.dashboard.DashboardContent;
-import org.hisp.dhis.dashboard.DashboardService;
+import org.hisp.dhis.dashboard.DashboardManager;
 import org.hisp.dhis.user.CurrentUserService;
 import org.hisp.dhis.user.User;
+import org.springframework.beans.factory.annotation.Autowired;
 
 /**
  * @author Lars Helge Overland
@@ -57,13 +58,9 @@
         this.currentUserService = currentUserService;
     }
 
-    private DashboardService dashboardService;
-
-    public void setDashboardService( DashboardService dashboardService )
-    {
-        this.dashboardService = dashboardService;
-    }
-
+    @Autowired
+    private DashboardManager dashboardManager;
+    
     private String key;
 
     public void setKey( String key )
@@ -83,7 +80,7 @@
 
         if ( user != null )
         {
-            DashboardContent dashboardContent = dashboardService.getDashboardContent( user );
+            DashboardContent dashboardContent = dashboardManager.getDashboardContent( user );
 
             List<org.hisp.dhis.mapping.Map> maps = new ArrayList<org.hisp.dhis.mapping.Map>( dashboardContent.getMaps() );
 

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/provider/ReportContentProvider.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/provider/ReportContentProvider.java	2012-01-25 17:11:43 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/provider/ReportContentProvider.java	2013-07-22 17:46:51 +0000
@@ -34,10 +34,11 @@
 
 import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.dashboard.DashboardContent;
-import org.hisp.dhis.dashboard.DashboardService;
+import org.hisp.dhis.dashboard.DashboardManager;
 import org.hisp.dhis.report.Report;
 import org.hisp.dhis.user.CurrentUserService;
 import org.hisp.dhis.user.User;
+import org.springframework.beans.factory.annotation.Autowired;
 
 /**
  * @author Lars Helge Overland
@@ -56,13 +57,9 @@
     {
         this.currentUserService = currentUserService;
     }
-    
-    private DashboardService dashboardService;
 
-    public void setDashboardService( DashboardService dashboardService )
-    {
-        this.dashboardService = dashboardService;
-    }
+    @Autowired
+    private DashboardManager dashboardManager;
     
     private String key;
     
@@ -83,7 +80,7 @@
         
         if ( user != null )
         {
-            DashboardContent dashboardContent = dashboardService.getDashboardContent( user );
+            DashboardContent dashboardContent = dashboardManager.getDashboardContent( user );
             
             List<Report> reports = dashboardContent.getReports();
             

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/provider/ReportTableContentProvider.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/provider/ReportTableContentProvider.java	2012-01-25 17:11:43 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/provider/ReportTableContentProvider.java	2013-07-22 17:46:51 +0000
@@ -34,10 +34,11 @@
 
 import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.dashboard.DashboardContent;
-import org.hisp.dhis.dashboard.DashboardService;
+import org.hisp.dhis.dashboard.DashboardManager;
 import org.hisp.dhis.reporttable.ReportTable;
 import org.hisp.dhis.user.CurrentUserService;
 import org.hisp.dhis.user.User;
+import org.springframework.beans.factory.annotation.Autowired;
 
 /**
  * @author Lars Helge Overland
@@ -57,12 +58,8 @@
         this.currentUserService = currentUserService;
     }
 
-    private DashboardService dashboardService;
-
-    public void setDashboardService( DashboardService dashboardService )
-    {
-        this.dashboardService = dashboardService;
-    }
+    @Autowired
+    private DashboardManager dashboardManager;
     
     private String key;
     
@@ -87,7 +84,7 @@
 
         if ( user != null )
         {
-            DashboardContent dashboardContent = dashboardService.getDashboardContent( user );
+            DashboardContent dashboardContent = dashboardManager.getDashboardContent( user );
             
             List<ReportTable> reportTables = dashboardContent.getReportTables();
             

=== 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	2013-07-04 15:41:57 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml	2013-07-22 17:46:51 +0000
@@ -133,7 +133,6 @@
   </bean>
 
   <bean id="org.hisp.dhis.dashboard.DashboardService" class="org.hisp.dhis.dashboard.impl.DefaultDashboardService">
-    <property name="dashboardContentStore" ref="org.hisp.dhis.dashboard.DashboardContentStore" />
     <property name="userService" ref="org.hisp.dhis.user.UserService" />
     <property name="chartService" ref="org.hisp.dhis.chart.ChartService" />
     <property name="mappingService" ref="org.hisp.dhis.mapping.MappingService" />
@@ -146,25 +145,21 @@
 
   <bean id="reportContentProvider" class="org.hisp.dhis.dashboard.provider.ReportContentProvider">
     <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
-    <property name="dashboardService" ref="org.hisp.dhis.dashboard.DashboardService" />
     <property name="key" value="reports" />
   </bean>
 
   <bean id="documentContentProvider" class="org.hisp.dhis.dashboard.provider.DocumentContentProvider">
     <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
-    <property name="dashboardService" ref="org.hisp.dhis.dashboard.DashboardService" />
     <property name="key" value="documents" />
   </bean>
 
   <bean id="reportTableContentProvider" class="org.hisp.dhis.dashboard.provider.ReportTableContentProvider">
     <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
-    <property name="dashboardService" ref="org.hisp.dhis.dashboard.DashboardService" />
     <property name="key" value="reportTables" />
   </bean>
 
   <bean id="mapViewContentProvider" class="org.hisp.dhis.dashboard.provider.MapViewContentProvider">
     <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
-    <property name="dashboardService" ref="org.hisp.dhis.dashboard.DashboardService" />
     <property name="key" value="maps" />
   </bean>
 
@@ -182,6 +177,7 @@
 
   <bean id="org.hisp.dhis.dashboard.DashboardManager" class="org.hisp.dhis.dashboard.manager.DefaultDashboardManager">
     <property name="userSettingService" ref="org.hisp.dhis.user.UserSettingService" />
+    <property name="dashboardContentStore" ref="org.hisp.dhis.dashboard.DashboardContentStore" />
     <property name="contentProviders">
       <map>
         <entry key="report">
@@ -275,9 +271,7 @@
     <property name="chartService" ref="org.hisp.dhis.chart.ChartService" />
   </bean>
 
-  <bean id="org.hisp.dhis.dashboard.DashboardContentDeletionHandler" class="org.hisp.dhis.dashboard.DashboardContentDeletionHandler">
-    <property name="dashboardService" ref="org.hisp.dhis.dashboard.DashboardService" />
-  </bean>
+  <bean id="org.hisp.dhis.dashboard.DashboardContentDeletionHandler" class="org.hisp.dhis.dashboard.DashboardContentDeletionHandler" />
 
   <!-- DeletionManager -->
 

=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/RemoveDocumentAction.java'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/RemoveDocumentAction.java	2012-10-03 14:32:11 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/RemoveDocumentAction.java	2013-07-22 17:46:51 +0000
@@ -28,11 +28,12 @@
  */
 
 import org.hisp.dhis.dashboard.DashboardContent;
-import org.hisp.dhis.dashboard.DashboardService;
+import org.hisp.dhis.dashboard.DashboardManager;
 import org.hisp.dhis.document.Document;
 import org.hisp.dhis.document.DocumentService;
 import org.hisp.dhis.user.CurrentUserService;
 import org.hisp.dhis.user.User;
+import org.springframework.beans.factory.annotation.Autowired;
 
 import com.opensymphony.xwork2.Action;
 
@@ -53,12 +54,8 @@
         this.currentUserService = currentUserService;
     }
 
-    private DashboardService dashboardService;
-
-    public void setDashboardService( DashboardService dashboardService )
-    {
-        this.dashboardService = dashboardService;
-    }
+    @Autowired
+    private DashboardManager dashboardManager;
     
     private DocumentService documentService;
 
@@ -88,13 +85,13 @@
         
         if ( user != null )
         {
-            DashboardContent content = dashboardService.getDashboardContent( user );
+            DashboardContent content = dashboardManager.getDashboardContent( user );
             
             Document document = documentService.getDocument( id );
             
             if ( content.getDocuments().remove( document ) )
             {
-                dashboardService.saveDashboardContent( content );
+                dashboardManager.saveDashboardContent( content );
             }
         }
         

=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/RemoveMapViewAction.java'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/RemoveMapViewAction.java	2012-11-06 07:01:56 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/RemoveMapViewAction.java	2013-07-22 17:46:51 +0000
@@ -28,11 +28,12 @@
  */
 
 import org.hisp.dhis.dashboard.DashboardContent;
-import org.hisp.dhis.dashboard.DashboardService;
+import org.hisp.dhis.dashboard.DashboardManager;
 import org.hisp.dhis.mapping.Map;
 import org.hisp.dhis.mapping.MappingService;
 import org.hisp.dhis.user.CurrentUserService;
 import org.hisp.dhis.user.User;
+import org.springframework.beans.factory.annotation.Autowired;
 
 import com.opensymphony.xwork2.Action;
 
@@ -53,12 +54,8 @@
         this.currentUserService = currentUserService;
     }
 
-    private DashboardService dashboardService;
-
-    public void setDashboardService( DashboardService dashboardService )
-    {
-        this.dashboardService = dashboardService;
-    }
+    @Autowired
+    private DashboardManager dashboardManager;
     
     private MappingService mappingService;
 
@@ -88,13 +85,13 @@
         
         if ( user != null )
         {
-            DashboardContent content = dashboardService.getDashboardContent( user );
+            DashboardContent content = dashboardManager.getDashboardContent( user );
             
             Map map = mappingService.getMap( id );
             
             if ( content.getMaps().remove( map ) )
             {
-                dashboardService.saveDashboardContent( content );
+                dashboardManager.saveDashboardContent( content );
             }
         }
         

=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/RemoveReportAction.java'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/RemoveReportAction.java	2012-10-03 14:32:11 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/RemoveReportAction.java	2013-07-22 17:46:51 +0000
@@ -28,11 +28,12 @@
  */
 
 import org.hisp.dhis.dashboard.DashboardContent;
-import org.hisp.dhis.dashboard.DashboardService;
+import org.hisp.dhis.dashboard.DashboardManager;
 import org.hisp.dhis.report.Report;
 import org.hisp.dhis.report.ReportService;
 import org.hisp.dhis.user.CurrentUserService;
 import org.hisp.dhis.user.User;
+import org.springframework.beans.factory.annotation.Autowired;
 
 import com.opensymphony.xwork2.Action;
 
@@ -53,12 +54,8 @@
         this.currentUserService = currentUserService;
     }
 
-    private DashboardService dashboardService;
-
-    public void setDashboardService( DashboardService dashboardService )
-    {
-        this.dashboardService = dashboardService;
-    }
+    @Autowired
+    private DashboardManager dashboardManager;
     
     private ReportService reportService;
 
@@ -88,13 +85,13 @@
         
         if ( user != null )
         {
-            DashboardContent content = dashboardService.getDashboardContent( user );
+            DashboardContent content = dashboardManager.getDashboardContent( user );
             
             Report report = reportService.getReport( id );
             
             if ( content.getReports().remove( report ) )
             {
-                dashboardService.saveDashboardContent( content );
+                dashboardManager.saveDashboardContent( content );
             }            
         }
         

=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/RemoveReportTableAction.java'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/RemoveReportTableAction.java	2012-10-03 14:32:11 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/RemoveReportTableAction.java	2013-07-22 17:46:51 +0000
@@ -28,11 +28,12 @@
  */
 
 import org.hisp.dhis.dashboard.DashboardContent;
-import org.hisp.dhis.dashboard.DashboardService;
+import org.hisp.dhis.dashboard.DashboardManager;
 import org.hisp.dhis.reporttable.ReportTable;
 import org.hisp.dhis.reporttable.ReportTableService;
 import org.hisp.dhis.user.CurrentUserService;
 import org.hisp.dhis.user.User;
+import org.springframework.beans.factory.annotation.Autowired;
 
 import com.opensymphony.xwork2.Action;
 
@@ -53,12 +54,8 @@
         this.currentUserService = currentUserService;
     }
 
-    private DashboardService dashboardService;
-
-    public void setDashboardService( DashboardService dashboardService )
-    {
-        this.dashboardService = dashboardService;
-    }
+    @Autowired
+    private DashboardManager dashboardManager;
     
     private ReportTableService reportTableService;
 
@@ -88,13 +85,13 @@
         
         if ( user != null )
         {
-            DashboardContent content = dashboardService.getDashboardContent( user );
+            DashboardContent content = dashboardManager.getDashboardContent( user );
             
             ReportTable table = reportTableService.getReportTable( id );
             
             if ( content.getReportTables().remove( table ) )
             {
-                dashboardService.saveDashboardContent( content );
+                dashboardManager.saveDashboardContent( content );
             }            
         }
         

=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/META-INF/dhis/beans.xml	2013-07-22 15:17:19 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/META-INF/dhis/beans.xml	2013-07-22 17:46:51 +0000
@@ -30,28 +30,24 @@
   <bean id="org.hisp.dhis.dashboard.action.RemoveReportAction" class="org.hisp.dhis.dashboard.action.RemoveReportAction"
     scope="prototype">
     <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
-    <property name="dashboardService" ref="org.hisp.dhis.dashboard.DashboardService" />
     <property name="reportService" ref="org.hisp.dhis.report.ReportService" />
   </bean>
 
   <bean id="org.hisp.dhis.dashboard.action.RemoveDocumentAction" class="org.hisp.dhis.dashboard.action.RemoveDocumentAction"
     scope="prototype">
     <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
-    <property name="dashboardService" ref="org.hisp.dhis.dashboard.DashboardService" />
     <property name="documentService" ref="org.hisp.dhis.document.DocumentService" />
   </bean>
 
   <bean id="org.hisp.dhis.dashboard.action.RemoveReportTableAction" class="org.hisp.dhis.dashboard.action.RemoveReportTableAction"
     scope="prototype">
     <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
-    <property name="dashboardService" ref="org.hisp.dhis.dashboard.DashboardService" />
     <property name="reportTableService" ref="org.hisp.dhis.reporttable.ReportTableService" />
   </bean>
 
   <bean id="org.hisp.dhis.dashboard.action.RemoveMapViewAction" class="org.hisp.dhis.dashboard.action.RemoveMapViewAction"
     scope="prototype">
     <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
-    <property name="dashboardService" ref="org.hisp.dhis.dashboard.DashboardService" />
     <property name="mappingService" ref="org.hisp.dhis.mapping.MappingService" />
   </bean>