dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #01386
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 409: Removed unused method in ValidationRuleService.
------------------------------------------------------------
revno: 409
committer: Lars Helge Oeverland larshelge@xxxxxxxxx
branch nick: trunk
timestamp: Wed 2009-07-01 01:27:20 +0200
message:
Removed unused method in ValidationRuleService.
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/DefaultValidationRuleService.java
dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/DefaultValidationRuleService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/DefaultValidationRuleService.java 2009-06-30 23:08:22 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/DefaultValidationRuleService.java 2009-06-30 23:27:20 +0000
@@ -38,7 +38,6 @@
import org.hisp.dhis.common.GenericNameStore;
import org.hisp.dhis.dataelement.DataElement;
import org.hisp.dhis.dataset.DataSet;
-import org.hisp.dhis.dataset.DataSetService;
import org.hisp.dhis.expression.ExpressionService;
import org.hisp.dhis.period.Period;
import org.hisp.dhis.period.PeriodService;
@@ -79,13 +78,6 @@
this.expressionService = expressionService;
}
- private DataSetService dataSetService;
-
- public void setDataSetService( DataSetService dataSetService )
- {
- this.dataSetService = dataSetService;
- }
-
private PeriodService periodService;
public void setPeriodService( PeriodService periodService )
@@ -111,7 +103,7 @@
{
if ( ( relevantRules = getRelevantValidationRules( dataSet ) ).size() > 0 )
{
- for ( Period period : relevantPeriods )
+ for ( Period period : relevantPeriods ) //TODO use only period with validation rule period type
{
validationViolations.addAll( validate( period, source, relevantRules ) );
}
@@ -256,27 +248,6 @@
return relevantValidationRules;
}
- /**
- * Returns all data sets which the given source is assigned to.
- *
- * @param source the source.
- * @return all data sets which the given source is assigned to.
- */
- private Collection<DataSet> getRelevantDataSets2( final Source source )
- {
- final Collection<DataSet> relevantDataSets = new HashSet<DataSet>();
-
- for ( final DataSet dataSet : dataSetService.getAllDataSets() )
- {
- if ( dataSet.getSources().contains( source ) )
- {
- relevantDataSets.add( dataSet );
- }
- }
-
- return relevantDataSets;
- }
-
// -------------------------------------------------------------------------
// ValidationRule CRUD operations
// -------------------------------------------------------------------------
=== 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 2009-06-20 14:26:00 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml 2009-06-30 23:27:20 +0000
@@ -222,8 +222,6 @@
ref="org.hisp.dhis.validation.ValidationRuleGroupStore"/>
<property name="expressionService"
ref="org.hisp.dhis.expression.ExpressionService"/>
- <property name="dataSetService"
- ref="org.hisp.dhis.dataset.DataSetService"/>
<property name="periodService"
ref="org.hisp.dhis.period.PeriodService"/>
</bean>
--
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.