dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #05937
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1872: Removed unnecessary use of DeletionManager
------------------------------------------------------------
revno: 1872
committer: Lars <larshelg@larshelg-laptop>
branch nick: trunk
timestamp: Tue 2010-05-18 00:46:17 +0200
message:
Removed unnecessary use of DeletionManager
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DataEntryFormDeletionHandler.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/FrequencyOverrideAssociationDeletionHandler.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/SectionDeletionHandler.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/indicator/IndicatorDeletionHandler.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/minmax/MinMaxDataElementDeletionHandler.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/ValidationRuleDeletionHandler.java
dhis-2/dhis-services/dhis-service-core/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-core/src/main/java/org/hisp/dhis/dataentryform/DataEntryFormDeletionHandler.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DataEntryFormDeletionHandler.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DataEntryFormDeletionHandler.java 2010-05-17 22:46:17 +0000
@@ -27,13 +27,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import org.hisp.dhis.dataentryform.DataEntryForm;
-import org.hisp.dhis.dataentryform.DataEntryFormAssociation;
-import org.hisp.dhis.dataentryform.DataEntryFormAssociationService;
-import org.hisp.dhis.dataentryform.DataEntryFormService;
import org.hisp.dhis.dataset.DataSet;
import org.hisp.dhis.system.deletion.DeletionHandler;
-import org.hisp.dhis.system.deletion.DeletionManager;
/**
* @author Lars Helge Overland
@@ -53,13 +48,6 @@
this.dataEntryFormService = dataEntryFormService;
}
- private DeletionManager deletionManager;
-
- public void setDeletionManager( DeletionManager deletionManager )
- {
- this.deletionManager = deletionManager;
- }
-
private DataEntryFormAssociationService dataEntryFormAssociationService;
public void setDataEntryFormAssociationService( DataEntryFormAssociationService dataEntryFormAssociationService )
@@ -88,9 +76,7 @@
DataEntryForm dataEntryForm = dataEntryFormAssociation.getDataEntryForm();
if ( dataEntryForm != null )
- {
- deletionManager.execute( dataEntryForm );
-
+ {
dataEntryFormService.deleteDataEntryForm( dataEntryForm );
}
}
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/FrequencyOverrideAssociationDeletionHandler.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/FrequencyOverrideAssociationDeletionHandler.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/FrequencyOverrideAssociationDeletionHandler.java 2010-05-17 22:46:17 +0000
@@ -29,7 +29,6 @@
import org.hisp.dhis.source.Source;
import org.hisp.dhis.system.deletion.DeletionHandler;
-import org.hisp.dhis.system.deletion.DeletionManager;
/**
* @author Lars Helge Overland
@@ -49,13 +48,6 @@
this.dataSetService = dataSetService;
}
- private DeletionManager deletionManager;
-
- public void setDeletionManager( DeletionManager deletionManager )
- {
- this.deletionManager = deletionManager;
- }
-
// -------------------------------------------------------------------------
// DeletionHandler implementation
// -------------------------------------------------------------------------
@@ -71,8 +63,6 @@
{
for ( FrequencyOverrideAssociation association : dataSetService.getFrequencyOverrideAssociationsByDataSet( dataSet ) )
{
- deletionManager.execute( association );
-
dataSetService.deleteFrequencyOverrideAssociation( association );
}
}
@@ -82,8 +72,6 @@
{
for ( FrequencyOverrideAssociation association : dataSetService.getFrequencyOverrideAssociationsBySource( source ) )
{
- deletionManager.execute( association );
-
dataSetService.deleteFrequencyOverrideAssociation( association );
}
}
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/SectionDeletionHandler.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/SectionDeletionHandler.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/SectionDeletionHandler.java 2010-05-17 22:46:17 +0000
@@ -29,7 +29,6 @@
import org.hisp.dhis.dataelement.DataElement;
import org.hisp.dhis.system.deletion.DeletionHandler;
-import org.hisp.dhis.system.deletion.DeletionManager;
/**
* @author Lars Helge Overland
@@ -49,13 +48,6 @@
this.sectionService = sectionService;
}
- private DeletionManager deletionManager;
-
- public void setDeletionManager( DeletionManager deletionManager )
- {
- this.deletionManager = deletionManager;
- }
-
// -------------------------------------------------------------------------
// DeletionHandler implementation
// -------------------------------------------------------------------------
@@ -85,8 +77,6 @@
{
if ( section.getDataSet().equals( dataSet ) )
{
- deletionManager.execute( section );
-
sectionService.deleteSection( section );
}
}
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/indicator/IndicatorDeletionHandler.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/indicator/IndicatorDeletionHandler.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/indicator/IndicatorDeletionHandler.java 2010-05-17 22:46:17 +0000
@@ -28,7 +28,6 @@
*/
import org.hisp.dhis.system.deletion.DeletionHandler;
-import org.hisp.dhis.system.deletion.DeletionManager;
/**
* @author Lars Helge Overland
@@ -48,13 +47,6 @@
this.indicatorService = indicatorService;
}
- private DeletionManager deletionManager;
-
- public void setDeletionManager( DeletionManager deletionManager )
- {
- this.deletionManager = deletionManager;
- }
-
// -------------------------------------------------------------------------
// DeletionHandler implementation
// -------------------------------------------------------------------------
@@ -86,8 +78,6 @@
{
if ( indicator.getIndicatorType().equals( indicatorType ) )
{
- deletionManager.execute( indicator );
-
indicatorService.deleteIndicator( indicator );
}
}
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/minmax/MinMaxDataElementDeletionHandler.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/minmax/MinMaxDataElementDeletionHandler.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/minmax/MinMaxDataElementDeletionHandler.java 2010-05-17 22:46:17 +0000
@@ -30,7 +30,6 @@
import org.hisp.dhis.dataelement.DataElement;
import org.hisp.dhis.source.Source;
import org.hisp.dhis.system.deletion.DeletionHandler;
-import org.hisp.dhis.system.deletion.DeletionManager;
/**
* @author Lars Helge Overland
@@ -50,13 +49,6 @@
this.minMaxDataElementService = minMaxDataElementService;
}
- private DeletionManager deletionManager;
-
- public void setDeletionManager( DeletionManager deletionManager )
- {
- this.deletionManager = deletionManager;
- }
-
// -------------------------------------------------------------------------
// DeletionHandler implementation
// -------------------------------------------------------------------------
@@ -74,8 +66,6 @@
{
if ( element.getDataElement().equals( dataElement ) )
{
- deletionManager.execute( element );
-
minMaxDataElementService.deleteMinMaxDataElement( element );
}
}
@@ -88,8 +78,6 @@
{
if ( element.getSource().equals( source ) )
{
- deletionManager.execute( element );
-
minMaxDataElementService.deleteMinMaxDataElement( element );
}
}
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/ValidationRuleDeletionHandler.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/ValidationRuleDeletionHandler.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/ValidationRuleDeletionHandler.java 2010-05-17 22:46:17 +0000
@@ -29,7 +29,6 @@
import org.hisp.dhis.expression.Expression;
import org.hisp.dhis.system.deletion.DeletionHandler;
-import org.hisp.dhis.system.deletion.DeletionManager;
/**
* @author Lars Helge Overland
@@ -49,13 +48,6 @@
this.validationRuleService = validationRuleService;
}
- private DeletionManager deletionManager;
-
- public void setDeletionManager( DeletionManager deletionManager )
- {
- this.deletionManager = deletionManager;
- }
-
// -------------------------------------------------------------------------
// DeletionHandler implementation
// -------------------------------------------------------------------------
@@ -73,8 +65,6 @@
{
if ( rule.getLeftSide().equals( expression ) || rule.getRightSide().equals( expression ) )
{
- deletionManager.execute( rule );
-
validationRuleService.deleteValidationRule( rule );
}
}
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml 2010-05-17 22:14:26 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml 2010-05-17 22:46:17 +0000
@@ -796,8 +796,6 @@
class="org.hisp.dhis.dataentryform.DataEntryFormDeletionHandler">
<property name="dataEntryFormService"
ref="org.hisp.dhis.dataentryform.DataEntryFormService"/>
- <property name="deletionManager"
- ref="org.hisp.dhis.system.deletion.DeletionManager"/>
<property name="dataEntryFormAssociationService"
ref="org.hisp.dhis.dataentryform.DataEntryFormAssociationService"/>
</bean>
@@ -857,16 +855,12 @@
class="org.hisp.dhis.dataset.SectionDeletionHandler">
<property name="sectionService"
ref="org.hisp.dhis.dataset.SectionService"/>
- <property name="deletionManager"
- ref="org.hisp.dhis.system.deletion.DeletionManager"/>
</bean>
<bean id="org.hisp.dhis.dataset.FrequencyOverrideAssociationDeletionHandler"
class="org.hisp.dhis.dataset.FrequencyOverrideAssociationDeletionHandler">
<property name="dataSetService"
ref="org.hisp.dhis.dataset.DataSetService"/>
- <property name="deletionManager"
- ref="org.hisp.dhis.system.deletion.DeletionManager"/>
</bean>
<bean id="org.hisp.dhis.expression.ExpressionDeletionHandler"
@@ -879,8 +873,6 @@
class="org.hisp.dhis.indicator.IndicatorDeletionHandler">
<property name="indicatorService"
ref="org.hisp.dhis.indicator.IndicatorService"/>
- <property name="deletionManager"
- ref="org.hisp.dhis.system.deletion.DeletionManager"/>
</bean>
<bean id="org.hisp.dhis.indicator.IndicatorGroupDeletionHandler"
@@ -893,16 +885,12 @@
class="org.hisp.dhis.minmax.MinMaxDataElementDeletionHandler">
<property name="minMaxDataElementService"
ref="org.hisp.dhis.minmax.MinMaxDataElementService"/>
- <property name="deletionManager"
- ref="org.hisp.dhis.system.deletion.DeletionManager"/>
</bean>
<bean id="org.hisp.dhis.validation.ValidationRuleDeletionHandler"
class="org.hisp.dhis.validation.ValidationRuleDeletionHandler">
<property name="validationRuleService"
ref="org.hisp.dhis.validation.ValidationRuleService"/>
- <property name="deletionManager"
- ref="org.hisp.dhis.system.deletion.DeletionManager"/>
</bean>
<bean id="org.hisp.dhis.validation.ValidationRuleGroupDeletionHandler"