Skip to content

Commit

Permalink
chore: remove old data integrity report API (#19393)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbee authored Dec 5, 2024
1 parent be39817 commit 280db2b
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 1,187 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,9 @@
import org.hisp.dhis.scheduling.JobProgress;

/**
* @author Fredrik Fjeld (old API)
* @author Jan Bernitt (new API)
* @author Jan Bernitt
*/
public interface DataIntegrityService {
/*
* Old API
*/

/**
* @deprecated Replaced by {@link #getSummaries(Set, long)} and {@link #getDetails(Set, long)},
* kept for backwards compatibility until new UI exists
*/
@Deprecated(since = "2.38", forRemoval = true)
@Nonnull
FlattenedDataIntegrityReport getReport(Set<String> checks, JobProgress progress);

/*
* New generic API
*/

default @Nonnull Collection<DataIntegrityCheck> getDataIntegrityChecks() {
return getDataIntegrityChecks(Set.of());
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ public enum DataIntegrityReportType {
DETAILS
}

@JsonProperty(required = false)
@JsonProperty
@JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
private DataIntegrityReportType type;

@JsonProperty(required = false)
@JsonProperty
@JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
private Set<String> checks;
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
import static org.hisp.dhis.scheduling.JobProgress.FailurePolicy.SKIP_ITEM;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Date;
import java.util.HashSet;
Expand Down Expand Up @@ -512,23 +511,6 @@ Set<String> addSQLChecksToFlattedReport() {
return checks;
}

@Nonnull
@Override
@Transactional(readOnly = true)
public FlattenedDataIntegrityReport getReport(Set<String> checks, JobProgress progress) {
if (checks == null || checks.isEmpty()) {
// report only needs these
checks =
Arrays.stream(DataIntegrityCheckType.values())
.map(DataIntegrityCheckType::getName)
.collect(Collectors.toSet());
// Add additional SQL based checks here
checks.addAll(addSQLChecksToFlattedReport());
}
runDetailsChecks(checks, progress);
return new FlattenedDataIntegrityReport(getDetails(checks, -1L));
}

/** Get all ProgramIndicators with invalid expressions. */
List<DataIntegrityIssue> getInvalidProgramIndicatorExpressions() {
return getInvalidProgramIndicators(
Expand Down
Loading

0 comments on commit 280db2b

Please sign in to comment.