=== 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 2013-10-14 20:00:00 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/DefaultValidationRuleService.java 2013-10-15 07:35:25 +0000 @@ -34,20 +34,11 @@ import static org.hisp.dhis.i18n.I18nUtils.getObjectsByName; import static org.hisp.dhis.i18n.I18nUtils.i18n; -import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Collection; import java.util.Date; -import java.util.HashMap; import java.util.HashSet; -import java.util.List; -import java.util.Map; import java.util.Set; -import java.util.SortedSet; -import java.util.TreeSet; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.TimeUnit; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -60,20 +51,11 @@ import org.hisp.dhis.datavalue.DataValueService; import org.hisp.dhis.expression.ExpressionService; import org.hisp.dhis.i18n.I18nService; -import org.hisp.dhis.message.MessageService; import org.hisp.dhis.organisationunit.OrganisationUnit; -import org.hisp.dhis.organisationunit.OrganisationUnitService; -import org.hisp.dhis.period.CalendarPeriodType; import org.hisp.dhis.period.Period; import org.hisp.dhis.period.PeriodService; -import org.hisp.dhis.period.PeriodType; -import org.hisp.dhis.setting.SystemSettingManager; import org.hisp.dhis.system.util.Filter; import org.hisp.dhis.system.util.FilterUtils; -import org.hisp.dhis.system.util.SystemUtils; -import org.hisp.dhis.user.User; -import org.hisp.dhis.user.UserAuthorityGroup; -import org.hisp.dhis.user.UserCredentials; import org.springframework.transaction.annotation.Transactional; /** === modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/Validator.java' --- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/Validator.java 2013-10-14 20:00:00 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/Validator.java 2013-10-15 07:35:25 +0000 @@ -1,19 +1,5 @@ package org.hisp.dhis.validation; -import java.util.Collection; -import java.util.Date; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.TimeUnit; - -import org.hisp.dhis.constant.ConstantService; -import org.hisp.dhis.datavalue.DataValueService; -import org.hisp.dhis.expression.ExpressionService; -import org.hisp.dhis.organisationunit.OrganisationUnit; -import org.hisp.dhis.period.Period; -import org.hisp.dhis.period.PeriodService; -import org.hisp.dhis.system.util.SystemUtils; - /* * Copyright (c) 2004-2013, University of Oslo * All rights reserved. @@ -42,6 +28,20 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +import java.util.Collection; +import java.util.Date; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.TimeUnit; + +import org.hisp.dhis.constant.ConstantService; +import org.hisp.dhis.datavalue.DataValueService; +import org.hisp.dhis.expression.ExpressionService; +import org.hisp.dhis.organisationunit.OrganisationUnit; +import org.hisp.dhis.period.Period; +import org.hisp.dhis.period.PeriodService; +import org.hisp.dhis.system.util.SystemUtils; + /** * Evaluates validation rules. * @@ -49,24 +49,22 @@ */ public class Validator { - /** * Evaluates validation rules for a collection of organisation units. * This method breaks the job down by organisation unit. It assigns the * evaluation for each organisation unit to a task that can be evaluated * independently in a multithreaded environment. * - * @param sources the organisation units in which to run the validation - * rules + * @param sources the organisation units in which to run the validation rules * @param periods the periods of data to check * @param rules the ValidationRules to evaluate * @param runType whether this is an INTERACTIVE or ALERT run * @param lastAlertRun date/time of the most recent successful alerts run * (needed only for alert run) - * @param constantService Constant Service reference - * @param expressionService Expression Service reference - * @param periodService Period Service reference - * @param dataValueService Data Value Service reference + * @param constantService Constant Service reference + * @param expressionService Expression Service reference + * @param periodService Period Service reference + * @param dataValueService Data Value Service reference * @return a collection of any validations that were found */ public static Collection validate( Collection sources, @@ -123,5 +121,4 @@ return threadPoolSize; } - }