1
package org.hisp.dhis.reports;
3
import org.hisp.dhis.source.Source;
4
import org.hisp.dhis.system.deletion.DeletionHandler;
6
public class Report_inDeletionHandler
7
extends DeletionHandler
9
// -------------------------------------------------------------------------
11
// -------------------------------------------------------------------------
13
private ReportService reportService;
15
public void setReportService( ReportService reportService )
17
this.reportService = reportService;
20
// -------------------------------------------------------------------------
21
// DeletionHandler implementation
22
// -------------------------------------------------------------------------
25
public String getClassName()
27
return Report_in.class.getSimpleName();
31
public void deleteSource( Source source )
33
for ( Report_in report : reportService.getAllReports() )
35
if ( report.getSources().remove( source ) )
37
reportService.updateReport( report );
42
public void deleteReport_in( Report_in report )
46
public boolean allowDeleteReport_in( Report_in report )