From f1d930ce5eff69c10d9e8cb8fc9c17651be0138e Mon Sep 17 00:00:00 2001 From: Etienne Bernard Date: Thu, 25 Jul 2024 16:16:42 +0200 Subject: [PATCH] Story #13085: export and import signature parameters for ingest contracts --- .../common/dto/IngestContractDto.java | 2 + .../common/dto/SignaturePolicyDto.java | 59 ++++++++++++++++++- .../static/import-ingest-contracts-model.csv | 6 +- .../ingestcontract/ExportIngestContracts.java | 6 +- .../IngestContractCSVUtils.java | 18 ++++++ .../IngestContractInternalService.java | 6 ++ .../internal/server/utils/ImportCSVUtils.java | 41 +++++++++++++ .../IngestContractCSVUtilsTest.java | 16 +++++ .../IngestContractInternalServiceTest.java | 6 +- ...port_ingest_contracts_invalid_bad_rows.csv | 4 +- ...cts_invalid_headers_order_not_matching.csv | 2 +- ..._ingest_contracts_invalid_only_headers.csv | 2 +- ...ort_ingest_contracts_invalid_wrong_ids.csv | 4 +- .../data/import_ingest_contracts_valid.csv | 10 ++-- 14 files changed, 164 insertions(+), 18 deletions(-) diff --git a/api/api-referential/referential-commons/src/main/java/fr/gouv/vitamui/referential/common/dto/IngestContractDto.java b/api/api-referential/referential-commons/src/main/java/fr/gouv/vitamui/referential/common/dto/IngestContractDto.java index c52d110ef4c..c666ea668b3 100644 --- a/api/api-referential/referential-commons/src/main/java/fr/gouv/vitamui/referential/common/dto/IngestContractDto.java +++ b/api/api-referential/referential-commons/src/main/java/fr/gouv/vitamui/referential/common/dto/IngestContractDto.java @@ -39,6 +39,7 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.opencsv.bean.CsvBindAndSplitByName; import com.opencsv.bean.CsvBindByName; +import com.opencsv.bean.CsvRecurse; import fr.gouv.vitam.common.model.administration.ActivationStatus; import fr.gouv.vitamui.commons.api.domain.IdDto; import lombok.Getter; @@ -115,5 +116,6 @@ public class IngestContractDto extends IdDto implements Serializable { @CsvBindByName(column = "ComputedInheritedRulesAtIngest") private boolean computeInheritedRulesAtIngest = false; + @CsvRecurse private SignaturePolicyDto signaturePolicy; } diff --git a/api/api-referential/referential-commons/src/main/java/fr/gouv/vitamui/referential/common/dto/SignaturePolicyDto.java b/api/api-referential/referential-commons/src/main/java/fr/gouv/vitamui/referential/common/dto/SignaturePolicyDto.java index 38e84516ccc..60e0a8163f1 100644 --- a/api/api-referential/referential-commons/src/main/java/fr/gouv/vitamui/referential/common/dto/SignaturePolicyDto.java +++ b/api/api-referential/referential-commons/src/main/java/fr/gouv/vitamui/referential/common/dto/SignaturePolicyDto.java @@ -28,16 +28,73 @@ package fr.gouv.vitamui.referential.common.dto; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.opencsv.bean.CsvBindByName; import fr.gouv.vitam.common.model.administration.SignaturePolicy; import lombok.Data; import lombok.experimental.Accessors; +import java.util.ArrayList; +import java.util.List; + @Data @Accessors(chain = true) public class SignaturePolicyDto { - private SignaturePolicy.SignedDocumentPolicyEnum signedDocument; + public static final String SIGNING_ROLE_SEPARATOR = "|"; + public static final String SIGNING_ROLE_SEPARATOR_REGEX = "\\|"; + public static final String SIGNING_ROLE_DECLARED_SIGNATURE = "DeclaredSignature"; + public static final String SIGNING_ROLE_DECLARED_TIMESTAMP = "DeclaredTimestamp"; + public static final String SIGNING_ROLE_DECLARED_ADDITIONAL_PROOF = "DeclaredAdditionalProof"; + + @CsvBindByName(column = "SignedDocument") + private SignaturePolicy.SignedDocumentPolicyEnum signedDocument = SignaturePolicy.SignedDocumentPolicyEnum.ALLOWED; + private Boolean declaredSignature; private Boolean declaredTimestamp; private Boolean declaredAdditionalProof; + + /** + * This field is only used by OpenCSV + */ + @JsonIgnore + @CsvBindByName(column = "SigningRole") + private String signingRole; + + /** + * Used by OpenCSV only + */ + public String getSigningRole() { + List roles = new ArrayList<>(); + if (Boolean.TRUE.equals(declaredSignature)) { + roles.add(SIGNING_ROLE_DECLARED_SIGNATURE); + } + if (Boolean.TRUE.equals(declaredTimestamp)) { + roles.add(SIGNING_ROLE_DECLARED_TIMESTAMP); + } + if (Boolean.TRUE.equals(declaredAdditionalProof)) { + roles.add(SIGNING_ROLE_DECLARED_ADDITIONAL_PROOF); + } + return String.join(SIGNING_ROLE_SEPARATOR, roles); + } + + /** + * Used by OpenCSV only + */ + public void setSigningRole(String signingRole) { + String[] roles = signingRole.split(SIGNING_ROLE_SEPARATOR_REGEX); + for (String role : roles) { + switch (role) { + case SIGNING_ROLE_DECLARED_SIGNATURE: + declaredSignature = true; + break; + case SIGNING_ROLE_DECLARED_TIMESTAMP: + declaredTimestamp = true; + break; + case SIGNING_ROLE_DECLARED_ADDITIONAL_PROOF: + declaredAdditionalProof = true; + break; + } + } + } } diff --git a/api/api-referential/referential-external/src/main/resources/static/import-ingest-contracts-model.csv b/api/api-referential/referential-external/src/main/resources/static/import-ingest-contracts-model.csv index bcb6d7c905f..b0a4319e929 100644 --- a/api/api-referential/referential-external/src/main/resources/static/import-ingest-contracts-model.csv +++ b/api/api-referential/referential-external/src/main/resources/static/import-ingest-contracts-model.csv @@ -1,3 +1,3 @@ -Identifier;Name*;Description;Status;ArchiveProfiles;CheckParentLink;CheckParentId;LinkParentId;FormatUnidentifiedAuthorized;EveryFormatType;FormatType;ManagementContractId;ComputedInheritedRulesAtIngest;MasterMandatory;EveryDataObjectVersion;DataObjectVersion -;Contrat entrée Full;Contrats d'entrée full;ACTIVE;PR_000001|PR_000002|PR_000003;REQUIRED;;aeaqaaaabie64k3vabq2qalo2ok7oeqaaaaq;true;;;;;;true; -;Contrat d'entrée restreint finance;Lorem ipsum dolor sit amet, consectetur adipiscing elit.;INACTIVE;PR_000001;UNAUTHORIZED;aeaqaaaabie64k3vabq2qalo2ok7oeqaaaaq;;false;false;fmt/56|fmt/678|fmt/154;;true;false;false;BinaryMaster|PhysicalMaster +Identifier;Name*;Description;Status;ArchiveProfiles;CheckParentLink;CheckParentId;LinkParentId;FormatUnidentifiedAuthorized;EveryFormatType;FormatType;ManagementContractId;ComputedInheritedRulesAtIngest;MasterMandatory;EveryDataObjectVersion;DataObjectVersion;SignedDocument;SignedRole +;Contrat entrée Full;Contrats d'entrée full;ACTIVE;PR_000001|PR_000002|PR_000003;REQUIRED;;aeaqaaaabie64k3vabq2qalo2ok7oeqaaaaq;true;;;;;;true;ALLOWED; +;Contrat d'entrée restreint finance;"Lorem ipsum dolor sit amet, consectetur adipiscing elit.";INACTIVE;PR_000001;UNAUTHORIZED;aeaqaaaabie64k3vabq2qalo2ok7oeqaaaaq;;false;false;fmt/56|fmt/678|fmt/154;;true;false;false;BinaryMaster|PhysicalMaster;ALLOWED;DeclaredSignature|DeclaredTimestamp diff --git a/api/api-referential/referential-internal/src/main/java/fr/gouv/vitamui/referential/internal/server/ingestcontract/ExportIngestContracts.java b/api/api-referential/referential-internal/src/main/java/fr/gouv/vitamui/referential/internal/server/ingestcontract/ExportIngestContracts.java index b8ad4df3e79..a30fb868654 100644 --- a/api/api-referential/referential-internal/src/main/java/fr/gouv/vitamui/referential/internal/server/ingestcontract/ExportIngestContracts.java +++ b/api/api-referential/referential-internal/src/main/java/fr/gouv/vitamui/referential/internal/server/ingestcontract/ExportIngestContracts.java @@ -25,6 +25,8 @@ public class ExportIngestContracts extends ExportCSVParams { private static final String DATA_OBJECT_VERSION = "DataObjectVersion"; private static final String ACTIVATION_DATE = "ActivationDate"; private static final String DESACTIVATION_DATE = "DesactivationDate"; + private static final String SIGNED_DOCUMENT = "SignedDocument"; + private static final String SIGNING_ROLE = "SigningRole"; public ExportIngestContracts() { List headers = List.of( @@ -45,7 +47,9 @@ public ExportIngestContracts() { EVERY_DATA_OBJECT_VERSION, DATA_OBJECT_VERSION, ACTIVATION_DATE, - DESACTIVATION_DATE + DESACTIVATION_DATE, + SIGNED_DOCUMENT, + SIGNING_ROLE ); this.setHeaders(headers); } diff --git a/api/api-referential/referential-internal/src/main/java/fr/gouv/vitamui/referential/internal/server/ingestcontract/IngestContractCSVUtils.java b/api/api-referential/referential-internal/src/main/java/fr/gouv/vitamui/referential/internal/server/ingestcontract/IngestContractCSVUtils.java index a3073ef8375..18f7d7255c2 100644 --- a/api/api-referential/referential-internal/src/main/java/fr/gouv/vitamui/referential/internal/server/ingestcontract/IngestContractCSVUtils.java +++ b/api/api-referential/referential-internal/src/main/java/fr/gouv/vitamui/referential/internal/server/ingestcontract/IngestContractCSVUtils.java @@ -26,6 +26,8 @@ private IngestContractCSVUtils() {} public static final String MASTER_MANDATORY = "MasterMandatory"; public static final String EVERY_DATA_OBJECT_VERSION = "EveryDataObjectVersion"; public static final String DATA_OBJECT_VERSION = "DataObjectVersion"; + public static final String SIGNED_DOCUMENT = "SignedDocument"; + public static final String SIGNING_ROLE = "SigningRole"; public static void checkImportFile(MultipartFile ingestContractFile, boolean isIdentifierMandatory) { checkImportFile(ingestContractFile, buildIngestContractColumns(isIdentifierMandatory)); @@ -156,6 +158,22 @@ private static List buildIngestContractColumns(boolean isIdentifi .mandatory(false) .build() ); + expectedColumns.add( + ColumnDetails.builder() + .index(16) + .columnName(SIGNED_DOCUMENT) + .columnType(ColumnType.SIGNED_DOCUMENT_TYPE) + .mandatory(false) + .build() + ); + expectedColumns.add( + ColumnDetails.builder() + .index(17) + .columnName(SIGNING_ROLE) + .columnType(ColumnType.SIGNING_ROLE_TYPE) + .mandatory(false) + .build() + ); return expectedColumns; } } diff --git a/api/api-referential/referential-internal/src/main/java/fr/gouv/vitamui/referential/internal/server/ingestcontract/IngestContractInternalService.java b/api/api-referential/referential-internal/src/main/java/fr/gouv/vitamui/referential/internal/server/ingestcontract/IngestContractInternalService.java index cd2bd170859..e3c80756895 100644 --- a/api/api-referential/referential-internal/src/main/java/fr/gouv/vitamui/referential/internal/server/ingestcontract/IngestContractInternalService.java +++ b/api/api-referential/referential-internal/src/main/java/fr/gouv/vitamui/referential/internal/server/ingestcontract/IngestContractInternalService.java @@ -69,6 +69,7 @@ import fr.gouv.vitamui.referential.common.dsl.VitamQueryHelper; import fr.gouv.vitamui.referential.common.dto.IngestContractDto; import fr.gouv.vitamui.referential.common.dto.IngestContractResponseDto; +import fr.gouv.vitamui.referential.common.dto.SignaturePolicyDto; import fr.gouv.vitamui.referential.common.service.IngestContractService; import fr.gouv.vitamui.referential.internal.server.utils.ExportCSVUtils; import fr.gouv.vitamui.referential.internal.server.utils.ImportCSVUtils; @@ -508,6 +509,9 @@ private String[] buildIngestContractExportValues( final var deactivationDate = ingestContract.getDeactivationDate() == null ? null : df.format(LocalDateUtil.getDate(ingestContract.getDeactivationDate())); + final SignaturePolicyDto signaturePolicyDto = Optional.ofNullable(ingestContract.getSignaturePolicy()).orElse( + new SignaturePolicyDto() + ); return new String[] { ingestContract.getIdentifier(), @@ -526,6 +530,8 @@ private String[] buildIngestContractExportValues( String.valueOf(ingestContract.isMasterMandatory()), String.valueOf(ingestContract.isEveryDataObjectVersion()), dataObjectVersion, + signaturePolicyDto.getSignedDocument().name(), + signaturePolicyDto.getSigningRole(), activationDate, deactivationDate, }; diff --git a/api/api-referential/referential-internal/src/main/java/fr/gouv/vitamui/referential/internal/server/utils/ImportCSVUtils.java b/api/api-referential/referential-internal/src/main/java/fr/gouv/vitamui/referential/internal/server/utils/ImportCSVUtils.java index 8ac16770323..4774936a7a2 100644 --- a/api/api-referential/referential-internal/src/main/java/fr/gouv/vitamui/referential/internal/server/utils/ImportCSVUtils.java +++ b/api/api-referential/referential-internal/src/main/java/fr/gouv/vitamui/referential/internal/server/utils/ImportCSVUtils.java @@ -9,11 +9,13 @@ import fr.gouv.vitam.common.model.administration.ContextStatus; import fr.gouv.vitam.common.model.administration.DataObjectVersionType; import fr.gouv.vitam.common.model.administration.RuleType; +import fr.gouv.vitam.common.model.administration.SignaturePolicy; import fr.gouv.vitamui.commons.api.dtos.ErrorImportFile; import fr.gouv.vitamui.commons.api.enums.ErrorImportFileMessage; import fr.gouv.vitamui.commons.api.exception.BadRequestException; import fr.gouv.vitamui.commons.api.exception.InternalServerException; import fr.gouv.vitamui.commons.utils.JsonUtils; +import fr.gouv.vitamui.referential.common.dto.SignaturePolicyDto; import lombok.Builder; import lombok.Getter; import lombok.Setter; @@ -54,6 +56,8 @@ protected enum ColumnType { RULE_TYPE, DATA_OBJECT_VERSION_TYPE, CHECK_PARENT_LINK_TYPE, + SIGNED_DOCUMENT_TYPE, + SIGNING_ROLE_TYPE, } protected static void checkImportFile(MultipartFile file, List expectedColumns) { @@ -326,6 +330,43 @@ private static void checkRow( .build() ); } + + if ( + !StringUtils.isBlank(value) && + columnDetails.getColumnType().equals(ColumnType.SIGNED_DOCUMENT_TYPE) && + !EnumUtils.isValidEnum(SignaturePolicy.SignedDocumentPolicyEnum.class, value) + ) { + lineErrors.add( + ErrorImportFile.builder() + .column(numberToLetter(rowNumber)) + .line(lineNumber) + .data(value) + .error(ErrorImportFileMessage.NOT_ALLOWED_VALUE) + .build() + ); + } + + if (!StringUtils.isBlank(value) && columnDetails.getColumnType().equals(ColumnType.SIGNING_ROLE_TYPE)) { + String[] roles = value.split(SignaturePolicyDto.SIGNING_ROLE_SEPARATOR_REGEX); + for (String role : roles) { + switch (role) { + case SignaturePolicyDto.SIGNING_ROLE_DECLARED_SIGNATURE: + case SignaturePolicyDto.SIGNING_ROLE_DECLARED_TIMESTAMP: + case SignaturePolicyDto.SIGNING_ROLE_DECLARED_ADDITIONAL_PROOF: + continue; + default: + lineErrors.add( + ErrorImportFile.builder() + .column(numberToLetter(rowNumber)) + .line(lineNumber) + .data(role) + .error(ErrorImportFileMessage.NOT_ALLOWED_VALUE) + .build() + ); + break; + } + } + } } private static char numberToLetter(int i) { diff --git a/api/api-referential/referential-internal/src/test/java/fr/gouv/vitamui/referential/internal/server/ingestcontract/IngestContractCSVUtilsTest.java b/api/api-referential/referential-internal/src/test/java/fr/gouv/vitamui/referential/internal/server/ingestcontract/IngestContractCSVUtilsTest.java index 7b5902c220f..8d898f0a770 100644 --- a/api/api-referential/referential-internal/src/test/java/fr/gouv/vitamui/referential/internal/server/ingestcontract/IngestContractCSVUtilsTest.java +++ b/api/api-referential/referential-internal/src/test/java/fr/gouv/vitamui/referential/internal/server/ingestcontract/IngestContractCSVUtilsTest.java @@ -120,6 +120,22 @@ void check_should_throw_BadRequestException_with_multiple_errors() throws IOExce .error(ErrorImportFileMessage.NOT_ALLOWED_VALUE) .data("toto") .build() + ), + ImportCSVUtils.errorToJson( + ErrorImportFile.builder() + .line(2) + .column('Q') + .error(ErrorImportFileMessage.NOT_ALLOWED_VALUE) + .data("toto") + .build() + ), + ImportCSVUtils.errorToJson( + ErrorImportFile.builder() + .line(2) + .column('R') + .error(ErrorImportFileMessage.NOT_ALLOWED_VALUE) + .data("toto") + .build() ) ); diff --git a/api/api-referential/referential-internal/src/test/java/fr/gouv/vitamui/referential/internal/server/service/IngestContractInternalServiceTest.java b/api/api-referential/referential-internal/src/test/java/fr/gouv/vitamui/referential/internal/server/service/IngestContractInternalServiceTest.java index 8012317c38b..15d26339059 100644 --- a/api/api-referential/referential-internal/src/test/java/fr/gouv/vitamui/referential/internal/server/service/IngestContractInternalServiceTest.java +++ b/api/api-referential/referential-internal/src/test/java/fr/gouv/vitamui/referential/internal/server/service/IngestContractInternalServiceTest.java @@ -61,6 +61,7 @@ import fr.gouv.vitamui.iam.internal.client.ApplicationInternalRestClient; import fr.gouv.vitamui.iam.security.service.InternalSecurityService; import fr.gouv.vitamui.referential.common.dto.IngestContractDto; +import fr.gouv.vitamui.referential.common.dto.SignaturePolicyDto; import fr.gouv.vitamui.referential.common.service.IngestContractService; import fr.gouv.vitamui.referential.internal.server.ingestcontract.IngestContractConverter; import fr.gouv.vitamui.referential.internal.server.ingestcontract.IngestContractInternalService; @@ -541,6 +542,7 @@ public void export_should_return_ok() throws VitamClientException { ingestContract.setMasterMandatory(true); ingestContract.setEveryDataObjectVersion(true); ingestContract.setDataObjectVersion(Set.of("PhysicalMaster")); + ingestContract.setSignaturePolicy(new SignaturePolicyDto()); ingestContract.setActivationDate("2023-12-31"); ingestContract.setDeactivationDate("2023-12-31"); List ingestContracts = List.of(ingestContract); @@ -563,8 +565,8 @@ public void export_should_return_ok() throws VitamClientException { //Then String result = asString(exportFile); String whened = - "\uFEFF\"Identifier\";\"Name\";\"Description\";\"Status\";\"ArchiveProfiles\";\"CheckParentLink\";\"CheckParentId\";\"LinkParentId\";\"FormatUnidentifiedAuthorized\";\"EveryFormatType\";\"FormatType\";\"ManagementContractId\";\"ComputedInheritedRulesAtIngest\";\"MasterMandatory\";\"EveryDataObjectVersion\";\"DataObjectVersion\";\"ActivationDate\";\"DesactivationDate\"\n" + - "\"IC-000001\";\"Name\";\"Description\";\"ACTIVE\";\"PR-000001\";\"AUTHORIZED\";\"CheckParentId\";\"LinkParentId\";\"true\";\"true\";\"FormatType\";\"ManagementContractId\";\"true\";\"true\";\"true\";\"PhysicalMaster\";\"31/12/2023\";\"31/12/2023\"\n"; + "\uFEFF\"Identifier\";\"Name\";\"Description\";\"Status\";\"ArchiveProfiles\";\"CheckParentLink\";\"CheckParentId\";\"LinkParentId\";\"FormatUnidentifiedAuthorized\";\"EveryFormatType\";\"FormatType\";\"ManagementContractId\";\"ComputedInheritedRulesAtIngest\";\"MasterMandatory\";\"EveryDataObjectVersion\";\"DataObjectVersion\";\"ActivationDate\";\"DesactivationDate\";\"SignedDocument\";\"SigningRole\"\n" + + "\"IC-000001\";\"Name\";\"Description\";\"ACTIVE\";\"PR-000001\";\"AUTHORIZED\";\"CheckParentId\";\"LinkParentId\";\"true\";\"true\";\"FormatType\";\"ManagementContractId\";\"true\";\"true\";\"true\";\"PhysicalMaster\";\"ALLOWED\";\"\";\"31/12/2023\";\"31/12/2023\"\n"; assertThat(result).isEqualTo(whened); } diff --git a/api/api-referential/referential-internal/src/test/resources/data/import_ingest_contracts_invalid_bad_rows.csv b/api/api-referential/referential-internal/src/test/resources/data/import_ingest_contracts_invalid_bad_rows.csv index cabb68a2859..10c55942ef2 100644 --- a/api/api-referential/referential-internal/src/test/resources/data/import_ingest_contracts_invalid_bad_rows.csv +++ b/api/api-referential/referential-internal/src/test/resources/data/import_ingest_contracts_invalid_bad_rows.csv @@ -1,2 +1,2 @@ -Identifier;Name*;Description;Status;ArchiveProfiles;CheckParentLink;CheckParentId;LinkParentId;FormatUnidentifiedAuthorized;EveryFormatType;FormatType;ManagementContractId;ComputedInheritedRulesAtIngest;MasterMandatory;EveryDataObjectVersion;DataObjectVersion -;;Not all text is created equal. Some is missing bytes. ðŸŒ;toto;abdc | efgh;toto;abdc | efgh;abdc | efgh;toto;toto;abdc | efgh;abdc;toto;toto;toto;toto \ No newline at end of file +Identifier;Name*;Description;Status;ArchiveProfiles;CheckParentLink;CheckParentId;LinkParentId;FormatUnidentifiedAuthorized;EveryFormatType;FormatType;ManagementContractId;ComputedInheritedRulesAtIngest;MasterMandatory;EveryDataObjectVersion;DataObjectVersion;SignedDocument;SigningRole +;;Not all text is created equal. Some is missing bytes. ðŸŒ;toto;abdc | efgh;toto;abdc | efgh;abdc | efgh;toto;toto;abdc | efgh;abdc;toto;toto;toto;toto;toto;toto diff --git a/api/api-referential/referential-internal/src/test/resources/data/import_ingest_contracts_invalid_headers_order_not_matching.csv b/api/api-referential/referential-internal/src/test/resources/data/import_ingest_contracts_invalid_headers_order_not_matching.csv index 514a26ee16f..aba80247e0d 100644 --- a/api/api-referential/referential-internal/src/test/resources/data/import_ingest_contracts_invalid_headers_order_not_matching.csv +++ b/api/api-referential/referential-internal/src/test/resources/data/import_ingest_contracts_invalid_headers_order_not_matching.csv @@ -1 +1 @@ -Name*;Identifier;Description;Status;ArchiveProfiles;CheckParentLink;CheckParentId;LinkParentId;FormatUnidentifiedAuthorized;EveryFormatType;FormatType;ManagementContractId;ComputedInheritedRulesAtIngest;MasterMandatory;EveryDataObjectVersion;DataObjectVersion +Name*;Identifier;Description;Status;ArchiveProfiles;CheckParentLink;CheckParentId;LinkParentId;FormatUnidentifiedAuthorized;EveryFormatType;FormatType;ManagementContractId;ComputedInheritedRulesAtIngest;MasterMandatory;EveryDataObjectVersion;DataObjectVersion;SignedDocument;SigningRole diff --git a/api/api-referential/referential-internal/src/test/resources/data/import_ingest_contracts_invalid_only_headers.csv b/api/api-referential/referential-internal/src/test/resources/data/import_ingest_contracts_invalid_only_headers.csv index 4122b9f05e5..afc5e6e6ade 100644 --- a/api/api-referential/referential-internal/src/test/resources/data/import_ingest_contracts_invalid_only_headers.csv +++ b/api/api-referential/referential-internal/src/test/resources/data/import_ingest_contracts_invalid_only_headers.csv @@ -1 +1 @@ -Identifier;Name*;Description;Status;ArchiveProfiles;CheckParentLink;CheckParentId;LinkParentId;FormatUnidentifiedAuthorized;EveryFormatType;FormatType;ManagementContractId;ComputedInheritedRulesAtIngest;MasterMandatory;EveryDataObjectVersion;DataObjectVersion +Identifier;Name*;Description;Status;ArchiveProfiles;CheckParentLink;CheckParentId;LinkParentId;FormatUnidentifiedAuthorized;EveryFormatType;FormatType;ManagementContractId;ComputedInheritedRulesAtIngest;MasterMandatory;EveryDataObjectVersion;DataObjectVersion;SignedDocument;SigningRole diff --git a/api/api-referential/referential-internal/src/test/resources/data/import_ingest_contracts_invalid_wrong_ids.csv b/api/api-referential/referential-internal/src/test/resources/data/import_ingest_contracts_invalid_wrong_ids.csv index 649c1cba91f..0946e001003 100644 --- a/api/api-referential/referential-internal/src/test/resources/data/import_ingest_contracts_invalid_wrong_ids.csv +++ b/api/api-referential/referential-internal/src/test/resources/data/import_ingest_contracts_invalid_wrong_ids.csv @@ -1,2 +1,2 @@ -Identifier;Name*;Description;Status;ArchiveProfiles;CheckParentLink;CheckParentId;LinkParentId;FormatUnidentifiedAuthorized;EveryFormatType;FormatType;ManagementContractId;ComputedInheritedRulesAtIngest;MasterMandatory;EveryDataObjectVersion;DataObjectVersion -;Contrat entrée Full;Contrats d'entrée full;ACTIVE;PR_000001|PR_000003;REQUIRED;;aeaqaaaabie64k3vabq2qalo2ok7oeqaaaaq;false;;fmt/56|fmt/678|fmt/154;;false;;false;BinaryMaster|PhysicalMaster +Identifier;Name*;Description;Status;ArchiveProfiles;CheckParentLink;CheckParentId;LinkParentId;FormatUnidentifiedAuthorized;EveryFormatType;FormatType;ManagementContractId;ComputedInheritedRulesAtIngest;MasterMandatory;EveryDataObjectVersion;DataObjectVersion;SignedDocument;SigningRole +;Contrat entrée Full;Contrats d'entrée full;ACTIVE;PR_000001|PR_000003;REQUIRED;;aeaqaaaabie64k3vabq2qalo2ok7oeqaaaaq;false;;fmt/56|fmt/678|fmt/154;;false;;false;BinaryMaster|PhysicalMaster;ALLOWED; diff --git a/api/api-referential/referential-internal/src/test/resources/data/import_ingest_contracts_valid.csv b/api/api-referential/referential-internal/src/test/resources/data/import_ingest_contracts_valid.csv index 4316c1a7560..b2850c3c29d 100644 --- a/api/api-referential/referential-internal/src/test/resources/data/import_ingest_contracts_valid.csv +++ b/api/api-referential/referential-internal/src/test/resources/data/import_ingest_contracts_valid.csv @@ -1,5 +1,5 @@ -Identifier;Name*;Description;Status;ArchiveProfiles;CheckParentLink;CheckParentId;LinkParentId;FormatUnidentifiedAuthorized;EveryFormatType;FormatType;ManagementContractId;ComputedInheritedRulesAtIngest;MasterMandatory;EveryDataObjectVersion;DataObjectVersion -MONCONTRAT01;Contrat entrée Full;Contrats d'entrée full;ACTIVE;;REQUIRED;;;false;;fmt/56|fmt/678|fmt/154;;false;;false;BinaryMaster|PhysicalMaster -MONCONTRAT02;Contrat d'entrée finances;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis gravida sit amet lorem ut porta. In commodo justo sed tincidunt laoreet. Integer tellus quam, dictum non consequat id, varius at dui.;INACTIVE;;;;;;true;;;true;false;true; -MONCONTRAT03;Contrat d'entrée santé;Contrat d'entrée santé ;;;;;;true;true;;;true;false;;Thumbnail -MONCONTRAT04;Contrat d'entrée gestion commerciale;;ACTIVE;;UNAUTHORIZED;;;true;true;;;;;true; +Identifier;Name*;Description;Status;ArchiveProfiles;CheckParentLink;CheckParentId;LinkParentId;FormatUnidentifiedAuthorized;EveryFormatType;FormatType;ManagementContractId;ComputedInheritedRulesAtIngest;MasterMandatory;EveryDataObjectVersion;DataObjectVersion;SignedDocument;SigningRole +MONCONTRAT01;Contrat entrée Full;Contrats d'entrée full;ACTIVE;;REQUIRED;;;false;;fmt/56|fmt/678|fmt/154;;false;;false;BinaryMaster|PhysicalMaster;ALLOWED; +MONCONTRAT02;Contrat d'entrée finances;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis gravida sit amet lorem ut porta. In commodo justo sed tincidunt laoreet. Integer tellus quam, dictum non consequat id, varius at dui.;INACTIVE;;;;;;true;;;true;false;true;;ALLOWED;DeclaredSignature|DeclaredTimestamp +MONCONTRAT03;Contrat d'entrée santé;Contrat d'entrée santé ;;;;;;true;true;;;true;false;;Thumbnail;MANDATORY;DeclaredSignature|DeclaredTimestamp +MONCONTRAT04;Contrat d'entrée gestion commerciale;;ACTIVE;;UNAUTHORIZED;;;true;true;;;;;true;;MANDATORY;