Search in sources :

Example 1 with DataIntegrityReportType

use of org.hisp.dhis.scheduling.parameters.DataIntegrityJobParameters.DataIntegrityReportType in project dhis2-core by dhis2.

the class DataIntegrityJob method execute.

@Override
public void execute(JobConfiguration config, JobProgress progress) {
    DataIntegrityJobParameters parameters = (DataIntegrityJobParameters) config.getJobParameters();
    Set<String> checks = parameters == null ? Set.of() : parameters.getChecks();
    DataIntegrityReportType type = parameters == null ? null : parameters.getType();
    if (type == null || type == DataIntegrityReportType.REPORT) {
        runReport(config, progress, checks);
    } else if (type == DataIntegrityReportType.SUMMARY) {
        dataIntegrityService.runSummaryChecks(checks, progress);
    } else {
        dataIntegrityService.runDetailsChecks(checks, progress);
    }
}
Also used : DataIntegrityReportType(org.hisp.dhis.scheduling.parameters.DataIntegrityJobParameters.DataIntegrityReportType) DataIntegrityJobParameters(org.hisp.dhis.scheduling.parameters.DataIntegrityJobParameters)

Aggregations

DataIntegrityJobParameters (org.hisp.dhis.scheduling.parameters.DataIntegrityJobParameters)1 DataIntegrityReportType (org.hisp.dhis.scheduling.parameters.DataIntegrityJobParameters.DataIntegrityReportType)1