Commits

Lene Andersen authored f85ac6e90e7 Merge
Merge branch 'feature/SDS-7033-xds-cleanup-anvender-testcontainers-biblioteket-ifm-unittest' of https://git.nspop.dk/scm/com/simple-xds-cleanup into SDS-7253-xds-cleanup-anvender-ignore-keyword-i-forbindelse-med-oprettelse-af-testdata
No tags

cleanup-deprecated/src/main/java/dk/nsp/xdscleanup/deprecated/factory/CleanupOperationsFactory.java

Modified
1 1 package dk.nsp.xdscleanup.deprecated.factory;
2 2
3 3 import dk.nsp.backgroundjob.util.DateTimeProvider;
4 4 import dk.nsp.xdscleanup.common.model.DocumentEntry;
5 5 import dk.nsp.xdscleanup.common.model.SubmissionSet;
6 +import dk.nsp.xdscleanup.deprecated.model.DocumentTypeDeprecatedCleanup;
6 7 import dk.nsp.xdscleanup.nxrg.service.RegistryDeletionService;
7 8 import dk.nsp.xdscleanup.deprecated.stack.registry.deprecated.DeprecatedDocumentPatientIdPrefixCleanupSupplier;
8 9 import dk.nsp.xdscleanup.deprecated.stack.registry.deprecated.RegistryBatchCleanupOperation;
9 10 import dk.nsp.xdscleanup.deprecated.stack.registry.submissionsets.RegistrySubmissionSetsBatchCleanupOperation;
10 11
11 12 import java.util.List;
12 13
13 14 public class CleanupOperationsFactory {
14 15 private final RegistryDeletionService registryDeletionService;
15 16 private final DateTimeProvider dateTimeProvider;
16 17 private final int registryBatchSize;
17 - private final List<String> typeCodes;
18 18 private final int daysBeforeDelete;
19 19
20 20 private final int deprecatedLimit;
21 21 private final int submissionSetLimit;
22 22
23 23 public CleanupOperationsFactory(RegistryDeletionService registryDeletionService,
24 24 DateTimeProvider dateTimeProvider,
25 25 int registryBatchSize,
26 - List<String> typeCodes,
27 26 int daysBeforeDelete,
28 27 int deprecatedLimit,
29 28 int submissionSetLimit) {
30 29 this.registryDeletionService = registryDeletionService;
31 30 this.dateTimeProvider = dateTimeProvider;
32 31 this.registryBatchSize = registryBatchSize;
33 - this.typeCodes = typeCodes;
34 32 this.daysBeforeDelete = daysBeforeDelete;
35 33 this.deprecatedLimit = deprecatedLimit;
36 34 this.submissionSetLimit = submissionSetLimit;
37 35 }
38 36
39 - public DeprecatedDocumentPatientIdPrefixCleanupSupplier createDeprecatedDocumentBatchCleanupOperation(String patientIdPrefix) {
40 - return new DeprecatedDocumentPatientIdPrefixCleanupSupplier(registryDeletionService, this, registryBatchSize, patientIdPrefix, typeCodes, daysBeforeDelete, deprecatedLimit);
37 + public DeprecatedDocumentPatientIdPrefixCleanupSupplier createDeprecatedDocumentBatchCleanupOperation(String patientIdPrefix, DocumentTypeDeprecatedCleanup documentTypeDeprecatedCleanup) {
38 + return new DeprecatedDocumentPatientIdPrefixCleanupSupplier(registryDeletionService, this, registryBatchSize, patientIdPrefix, documentTypeDeprecatedCleanup, daysBeforeDelete, deprecatedLimit);
41 39 }
42 40
43 41 public RegistryBatchCleanupOperation createRegistryBatchCleanupOperation(List<DocumentEntry> documentEntriesForDeletion) {
44 42 return new RegistryBatchCleanupOperation(registryDeletionService, documentEntriesForDeletion, dateTimeProvider);
45 43 }
46 44
47 45 public RegistrySubmissionSetsBatchCleanupOperation createRegistrySubmissionSetsBatchCleanupOperation(List<SubmissionSet> submissionSetsForDeletion) {
48 46 return new RegistrySubmissionSetsBatchCleanupOperation(registryDeletionService, submissionSetsForDeletion, dateTimeProvider);
49 47 }
50 48 }

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut