Commit 322b5bf0 authored by descamps's avatar descamps
Browse files

Merge branch 'developNew' into developGitlabNew

parents 45f9abb7 8367a314
......@@ -22,4 +22,16 @@
* Paul PEYREFITTE
* Alexis ROUSSET
* Mahmoud SAYAD
* Zakaria TIRDAD
\ No newline at end of file
* Zakaria TIRDAD
* Gaëlle FOURNIER
* Nabil EL HAJJIOUI
* Oussama ZEROUALI
* Benaissa BENARBIA
* Passam KASSEM
* Thierry DEVILLECHABROLLE
* Julien GEORGES
* Romain GORDOLO
* Clément SOL
* Jérome LELEU
* Mehdi NAJAHI
......@@ -91,7 +91,7 @@ pipeline {
// $MVN_COMMAND clean verify org.owasp:dependency-check-maven:aggregate -Pvitam -pl '!cots/vitamui-nginx,!cots/vitamui-mongod,!cots/vitamui-logstash,!cots/vitamui-mongo-express' $JAVA_TOOL_OPTIONS
// '''
sh '''
$MVN_COMMAND clean verify -Pvitam -pl '!cots/vitamui-nginx,!cots/vitamui-mongod,!cots/vitamui-logstash,!cots/vitamui-mongo-express' $JAVA_TOOL_OPTIONS
$MVN_COMMAND clean verify -U -Pvitam -pl '!cots/vitamui-nginx,!cots/vitamui-mongod,!cots/vitamui-logstash,!cots/vitamui-mongo-express' $JAVA_TOOL_OPTIONS
'''
}
post {
......
......@@ -14,6 +14,20 @@
<dependencies>
<!-- TESTS -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>fr.gouv.vitamui.commons</groupId>
<artifactId>commons-test</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<!-- VITAMUI -->
<dependency>
<groupId>fr.gouv.vitamui.commons</groupId>
......
......@@ -38,12 +38,15 @@ public class ArchiveSearchConsts {
public static final String RULE_ID_FIELD = "RuleId";
public static final String RULE_TYPE_FIELD = "RuleType";
public static final String APPRAISAL_RULE_TYPE = "AppraisalRule";
public static final String ARCHIVE_UNIT_INGEST = "INGEST";
public static final String ACCESS_RULE_TYPE = "AccessRule";
public final static String APPRAISAL_RULE_FINAL_ACTION_TYPE_ELIMINATION =
"APPRAISAL_RULE_FINAL_ACTION_TYPE_ELIMINATION";
public final static String APPRAISAL_RULE_FINAL_ACTION_TYPE_KEEP = "APPRAISAL_RULE_FINAL_ACTION_TYPE_KEEP";
public final static String APPRAISAL_RULE_FINAL_ACTION_TYPE_NOT_SPECIFIED =
"APPRAISAL_RULE_FINAL_ACTION_TYPE_NOT_SPECIFIED";
public final static String FINAL_ACTION_TYPE_ELIMINATION =
"FINAL_ACTION_TYPE_ELIMINATION";
public final static String FINAL_ACTION_TYPE_KEEP = "FINAL_ACTION_TYPE_KEEP";
public final static String FINAL_ACTION_TYPE_CONFLICT = "FINAL_ACTION_TYPE_CONFLICT";
public final static String RULE_ORIGIN_CRITERIA = "RULE_ORIGIN";
public enum CriteriaDataType {
......@@ -52,91 +55,99 @@ public class ArchiveSearchConsts {
public enum CriteriaCategory {
FIELDS, APPRAISAL_RULE, NODES
FIELDS, APPRAISAL_RULE, ACCESS_RULE, NODES
}
public enum AppraisalRuleOrigin {
INHERITED, SCOPED, ANY
public enum CriteriaMgtRulesCategory {
APPRAISAL_RULE("AppraisalRule"), ACCESS_RULE("AccessRule");
private final String fieldMapping;
private CriteriaMgtRulesCategory(String fieldMapping) {
this.fieldMapping = fieldMapping;
}
public String getFieldMapping() {
return fieldMapping;
}
public static boolean contains(String s) {
for (CriteriaMgtRulesCategory mgtRulesCategory : values())
if (mgtRulesCategory.name().equals(s))
return true;
return false;
}
}
public enum AppraisalRuleOriginValues {
APPRAISAL_RULE_ORIGIN_WAITING_RECALCULATE, APPRAISAL_RULE_ORIGIN_INHERITE_AT_LEAST_ONE, APPRAISAL_RULE_ORIGIN_HAS_NO_ONE, APPRAISAL_RULE_ORIGIN_HAS_AT_LEAST_ONE
public enum RuleOrigin {
INHERITED, SCOPED
}
public final static String APPRAISAL_RULE_FINAL_ACTION_INHERITE_FINAL_ACTION =
"APPRAISAL_RULE_FINAL_ACTION_INHERITE_FINAL_ACTION";
public final static String APPRAISAL_RULE_FINAL_ACTION_HAS_FINAL_ACTION =
"APPRAISAL_RULE_FINAL_ACTION_HAS_FINAL_ACTION";
public enum RuleOriginValues {
ORIGIN_WAITING_RECALCULATE, ORIGIN_INHERITE_AT_LEAST_ONE, ORIGIN_HAS_NO_ONE, ORIGIN_HAS_AT_LEAST_ONE;
public static boolean contains(String s) {
for (RuleOriginValues ruleOriginValues : values())
if (ruleOriginValues.name().equals(s))
return true;
return false;
}
}
public final static String FINAL_ACTION_INHERITE_FINAL_ACTION =
"FINAL_ACTION_INHERITE_FINAL_ACTION";
public final static String FINAL_ACTION_HAS_FINAL_ACTION =
"FINAL_ACTION_HAS_FINAL_ACTION";
public final static String APPRAISAL_RULE_FINAL_ACTION = "APPRAISAL_RULE_FINAL_ACTION";
public final static String APPRAISAL_RULE_FINAL_ACTION_TYPE = "APPRAISAL_RULE_FINAL_ACTION_TYPE";
public final static String APPRAISAL_RULE_ORIGIN = "APPRAISAL_RULE_ORIGIN";
public final static String RULE_FINAL_ACTION = "FINAL_ACTION";
public final static String RULE_FINAL_ACTION_TYPE = "FINAL_ACTION_TYPE";
public final static String APPRAISAL_RULE_IDENTIFIER = "APPRAISAL_RULE_IDENTIFIER";
public final static String APPRAISAL_RULE_TITLE = "APPRAISAL_RULE_TITLE";
public final static String APPRAISAL_RULE_END_DATE = "APPRAISAL_RULE_END_DATE";
public final static String RULE_IDENTIFIER = "RULE_IDENTIFIER";
public final static String APPRAISAL_RULE_IDENTIFIER_CRITERIA = "APPRAISAL_RULE_IDENTIFIER";
public final static String RULE_TITLE = "RULE_TITLE";
public final static String RULE_END_DATE = "RULE_END_DATE";
public final static String APPRAISAL_RULE_START_DATE = "APPRAISAL_RULE_START_DATE";
public final static String WAITING_RECALCULATE = "WAITING_RECALCULATE";
public final static String RULES_COMPUTED = "RULES_COMPUTED";
public final static String APPRAISAL_RULE_START_DATE_FIELD = "#management.AppraisalRule.Rules.StartDate";
public final static String APPRAISAL_RULE_IDENTIFIER = "#management.AppraisalRule.Rules.Rule";
public static final String ISO_DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'";
public static final String ONLY_DATE_FORMAT = "yyyy-MM-dd";
public static final String FR_DATE_FORMAT_WITH_SLASH = "dd/MM/yyyy";
public static final String TRUE_CRITERIA_VALUE = "true";
public static final String FALSE_CRITERIA_VALUE = "false";
public static final String FINAL_ACTION_KEEP_FIELD_VALUE = "Keep";
public static final String FINAL_ACTION_DESTROY_FIELD_VALUE = "Destroy";
public static final String FINAL_ACTION_CONFLICT_FIELD_VALUE = "Conflict";
public static final DateTimeFormatter ISO_FRENCH_FORMATER =
DateTimeFormatter.ofPattern(ArchiveSearchConsts.ISO_DATE_FORMAT, Locale.FRENCH);
public static final DateTimeFormatter ONLY_DATE_FRENCH_FORMATER =
DateTimeFormatter.ofPattern(ArchiveSearchConsts.ONLY_DATE_FORMAT, Locale.FRENCH);
public static final DateTimeFormatter ONLY_DATE_FRENCH_FORMATTER_WITH_SLASH =
DateTimeFormatter.ofPattern(ArchiveSearchConsts.FR_DATE_FORMAT_WITH_SLASH, Locale.FRENCH);
/*
Operators for criteria
*/
public enum CriteriaOperators {
EQ, MATCH, LT, GT, LTE, GTE, NOT_EQ, EXISTS, NOT_EXISTS, MISSING, NOT_MATCH, IN, NOT_IN
EQ, MATCH, LT, GT, LTE, GTE, NOT_EQ, EXISTS, MISSING, NOT_MATCH, IN, NOT_IN
}
public static Map<String, String> SCOPED_APPRAISAL_MGT_RULES_SIMPLE_FIELDS_MAPPING =
Map.of(ArchiveSearchConsts.APPRAISAL_RULE_IDENTIFIER, "#management.AppraisalRule.Rules.Rule",
ArchiveSearchConsts.APPRAISAL_RULE_END_DATE, "#management.AppraisalRule.Rules.EndDate"
);
public static Map<String, String> INHERITED_APPRAISAL_MGT_RULES_SIMPLE_FIELDS_MAPPING =
Map.of(ArchiveSearchConsts.APPRAISAL_RULE_IDENTIFIER, "#computedInheritedRules.AppraisalRule.Rules.Rule",
ArchiveSearchConsts.APPRAISAL_RULE_END_DATE, "#computedInheritedRules.AppraisalRule.Rules.EndDate"
);
public static String APPRAISAL_RULE_ORIGIN_INHERITED_FIELD = "#computedInheritedRules.AppraisalRule.Rules.Rule";
public static String APPRAISAL_RULE_ORIGIN_SCOPED_FIELD = "#management.AppraisalRule.Rules.Rule";
public static Map<String, String> APPRAISAL_MGT_RULES_FIELDS_MAPPING =
Map.of(ArchiveSearchConsts.AppraisalRuleOriginValues.APPRAISAL_RULE_ORIGIN_WAITING_RECALCULATE.name(),
"#validComputedInheritedRules",
ArchiveSearchConsts.AppraisalRuleOriginValues.APPRAISAL_RULE_ORIGIN_HAS_NO_ONE.name(),
"#computedInheritedRules.AppraisalRule",
ArchiveSearchConsts.AppraisalRuleOriginValues.APPRAISAL_RULE_ORIGIN_INHERITE_AT_LEAST_ONE.name(),
"#computedInheritedRules.AppraisalRule",
ArchiveSearchConsts.AppraisalRuleOriginValues.APPRAISAL_RULE_ORIGIN_HAS_AT_LEAST_ONE.name(),
"#management.AppraisalRule.Rules.Rule"
);
public static Map<String, String> APPRAISAL_MGT_RULES_FINAL_ACTION_MAPPING =
Map.of(ArchiveSearchConsts.APPRAISAL_RULE_FINAL_ACTION_INHERITE_FINAL_ACTION,
"#computedInheritedRules.AppraisalRule.FinalAction",
ArchiveSearchConsts.APPRAISAL_RULE_FINAL_ACTION_HAS_FINAL_ACTION, "#management.AppraisalRule.FinalAction"
);
public static Map<String, String> APPRAISAL_MGT_RULES_FINAL_ACTION_TYPE_VALUES_MAPPING =
Map.of(ArchiveSearchConsts.APPRAISAL_RULE_FINAL_ACTION_TYPE_ELIMINATION, "Destroy",
ArchiveSearchConsts.APPRAISAL_RULE_FINAL_ACTION_TYPE_KEEP, "Keep",
ArchiveSearchConsts.APPRAISAL_RULE_FINAL_ACTION_TYPE_NOT_SPECIFIED, "???"
Map.of(ArchiveSearchConsts.FINAL_ACTION_TYPE_ELIMINATION, FINAL_ACTION_DESTROY_FIELD_VALUE,
ArchiveSearchConsts.FINAL_ACTION_TYPE_KEEP, FINAL_ACTION_KEEP_FIELD_VALUE
);
public static final String ORIGINATING_AGENCY_LABEL_FIELD = "SP_LABEL";
......@@ -147,10 +158,11 @@ public class ArchiveSearchConsts {
ORIGINATING_AGENCY_ID_FIELD, "#originating_agency",
"START_DATE", "StartDate",
"END_DATE", "EndDate",
"SP_LABEL", "originating_agency_label"
"SP_LABEL", "originating_agency_label",
"ARCHIVE_UNIT_HOLDING_UNIT", "#unitType",
RULES_COMPUTED, "#validComputedInheritedRules"
);
public static final int DEFAULT_DEPTH = 10;
public static final int FACET_SIZE_MILTIPLIER = 100;
......@@ -163,14 +175,21 @@ public class ArchiveSearchConsts {
public static final String GUID = "#id";
public static final String UNITS_UPS = "#allunitups";
public static final String TITLE_OR_DESCRIPTION = "TITLE_OR_DESCRIPTION";
public static final String ELIMINATION_TECHNICAL_ID = "ELIMINATION_TECHNICAL_ID";
public static final String ELIMINATION_TECHNICAL_ID_APPRAISAL_RULE = "ELIMINATION_TECHNICAL_ID_APPRAISAL_RULE";
public static final String ELIMINATION_GUID = "#elimination.OperationId";
public static final String ALL_ARCHIVE_UNIT_TYPES = "#unitType";
public static final String ALL_ARCHIVE_UNIT_TYPES_CRITERIA = "ALL_ARCHIVE_UNIT_TYPES";
public static final String DESCRIPTION_LEVEL_CRITERIA = "DESCRIPTION_LEVEL";
public static final String DESCRIPTION_LEVEL = "DescriptionLevel";
public static final String ARCHIVE_UNIT_OBJECTS = "#object";
public static final String ARCHIVE_UNIT_HOLDING_UNIT = "HOLDING_UNIT";
public static final String ARCHIVE_UNIT_FILING_UNIT = "FILING_UNIT";
/* Query fields */
public static final String ID = "#id";
public static final String NAME = "Name";
public static final String SHORT_NAME = "ShortName";
public static final String PUID = "PUID";
/* Title and Description Query fields */
public static final String TITLE = "Title";
......@@ -182,6 +201,14 @@ public class ArchiveSearchConsts {
public static final String TITLE_CRITERIA = "TITLE";
public static final String DESCRIPTION_CRITERIA = "DESCRIPTION";
public static final String FACETS_EXPIRED_RULES_COMPUTED = "EXPIRED_RULES_COMPUTED";
public static final String FACETS_RULES_COMPUTED_NUMBER = "RULES_COMPUTED_NUMBER";
public static final String FACETS_FINAL_ACTION_COMPUTED = "FINAL_ACTION_COMPUTED";
public static final String FACETS_COMPUTE_RULES_AU_NUMBER = "COMPUTE_RULES_AU_NUMBER";
public static final String FACETS_COUNT_BY_NODE = "COUNT_BY_NODE";
public static final String FACETS_COUNT_WITHOUT_RULES = "COUNT_WITHOUT_RULES";
public static final String COUNT_CONFLICT_RULES = "Conflict";
/* StartDate and EndDate Query fields */
public static final String START_DATE = "StartDate";
public static final String START_DATE_CRITERIA = "START_DATE";
......
......@@ -25,16 +25,16 @@
* accept its terms.
*/
package fr.gouv.vitamui.archive.internal.server.service;
package fr.gouv.vitamui.archives.search.common.common;
import fr.gouv.vitam.common.database.builder.query.BooleanQuery;
import fr.gouv.vitam.common.database.builder.request.exception.InvalidCreateOperationException;
import fr.gouv.vitam.common.exception.InvalidParseOperationException;
import fr.gouv.vitamui.archives.search.common.dto.SearchCriteriaEltDto;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.util.List;
public interface IArchivesSearchAppraisalQueryBuilderService {
void fillQueryFromCriteriaList(BooleanQuery queryToFill, List<SearchCriteriaEltDto> criteriaList)
throws InvalidParseOperationException, InvalidCreateOperationException;
@Data
@AllArgsConstructor
public class ArchiveSearchFieldMapping {
private String rules;
private String ruleIdentifier;
private String ruleEndDate;
private String inheritanceOrigin;
}
......@@ -30,7 +30,7 @@ package fr.gouv.vitamui.archives.search.common.common;
import lombok.Data;
@Data
public class AppraisalRuleOriginRuleCriteria {
public class MgtRuleOriginRuleCriteria {
private Boolean waitingToRecalculate;
private Boolean inheritAtLeastOneRule;
private Boolean hasAtLeastOneRule;
......
......@@ -39,7 +39,6 @@ import fr.gouv.vitamui.commons.api.logger.VitamUILogger;
import fr.gouv.vitamui.commons.api.logger.VitamUILoggerFactory;
import org.springframework.util.CollectionUtils;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
......@@ -52,9 +51,11 @@ import static fr.gouv.vitam.common.database.builder.query.QueryHelper.eq;
import static fr.gouv.vitam.common.database.builder.query.QueryHelper.exists;
import static fr.gouv.vitam.common.database.builder.query.QueryHelper.gt;
import static fr.gouv.vitam.common.database.builder.query.QueryHelper.gte;
import static fr.gouv.vitam.common.database.builder.query.QueryHelper.in;
import static fr.gouv.vitam.common.database.builder.query.QueryHelper.lt;
import static fr.gouv.vitam.common.database.builder.query.QueryHelper.lte;
import static fr.gouv.vitam.common.database.builder.query.QueryHelper.match;
import static fr.gouv.vitam.common.database.builder.query.QueryHelper.matchPhrasePrefix;
import static fr.gouv.vitam.common.database.builder.query.QueryHelper.missing;
import static fr.gouv.vitam.common.database.builder.query.QueryHelper.ne;
import static fr.gouv.vitam.common.database.builder.query.QueryHelper.or;
......@@ -62,40 +63,33 @@ import static fr.gouv.vitam.common.database.builder.query.QueryHelper.or;
public class VitamQueryHelper {
private static final VitamUILogger LOGGER = VitamUILoggerFactory.getInstance(VitamQueryHelper.class);
public static void addParameterCriteria(BooleanQuery query, ArchiveSearchConsts.CriteriaOperators operator,
String searchKey, final List<String> searchValues) throws InvalidCreateOperationException {
if (searchKey == null || "".equals(searchKey.trim())) {
throw new InvalidCreateOperationException("searchKey is empty or null ");
}
if (CollectionUtils.isEmpty(searchValues)) {
//the case of empty list
query.add(buildSubQueryByOperator(searchKey, null, operator));
} else if (searchValues.size() > 1) {
BooleanQuery subQueryOr = or();
BooleanQuery subQueryAnd = and();
//The case of multiple values
if(operator == ArchiveSearchConsts.CriteriaOperators.NOT_EQ) {
for (String value : searchValues) {
subQueryAnd.add(buildSubQueryByOperator(searchKey, value, operator));
}
query.add(subQueryAnd);
if (CollectionUtils.isEmpty(searchValues)) {
//the case of empty list
query.add(buildSubQueryByOperator(searchKey, null, operator));
} else if (searchValues.size() > 1) {
BooleanQuery subQueryOr = or();
BooleanQuery subQueryAnd = and();
//The case of multiple values
if (operator == ArchiveSearchConsts.CriteriaOperators.NOT_EQ) {
for (String value : searchValues) {
subQueryAnd.add(buildSubQueryByOperator(searchKey, value, operator));
}
else {
for (String value : searchValues) {
subQueryOr.add(buildSubQueryByOperator(searchKey, value, operator));
}
query.add(subQueryOr);
query.add(subQueryAnd);
} else {
for (String value : searchValues) {
subQueryOr.add(buildSubQueryByOperator(searchKey, value, operator));
}
} else if (searchValues.size() == 1) {
//the case of one value
query.add(buildSubQueryByOperator(searchKey, searchValues.stream().findAny().get(), operator));
query.add(subQueryOr);
}
} else if (searchValues.size() == 1) {
//the case of one value
query.add(buildSubQueryByOperator(searchKey, searchValues.stream().findAny().get(), operator));
}
}
public static Query buildSubQueryByOperator(String searchKey, String value,
......@@ -125,9 +119,17 @@ public class VitamQueryHelper {
case EXISTS:
criteriaSubQuery = exists(searchKey);
break;
case MISSING:
criteriaSubQuery = missing(searchKey);
break;
case IN:
if (!ArchiveSearchConsts.APPRAISAL_MGT_RULES_FINAL_ACTION_TYPE_VALUES_MAPPING.containsValue(value)) {
criteriaSubQuery = in(searchKey, value);
} else {
criteriaSubQuery = eq(searchKey, value);
}
break;
default:
criteriaSubQuery = eq(searchKey, value);
}
......@@ -142,8 +144,7 @@ public class VitamQueryHelper {
* @throws InvalidParseOperationException
* @throws InvalidCreateOperationException
*/
public static JsonNode createQueryDSL(Map<String, Object> searchCriteriaMap, final Integer pageNumber,
final Integer size,
public static JsonNode createQueryDSL(Map<String, Object> searchCriteriaMap,
final Optional<String> orderBy, final Optional<DirectionDto> direction)
throws InvalidParseOperationException, InvalidCreateOperationException {
......@@ -161,7 +162,6 @@ public class VitamQueryHelper {
select.addOrderByAscFilter(orderBy.get());
}
}
select.setLimitFilter(pageNumber * size, size);
Map<String, Integer> projection = new HashMap<>();
projection.put("Identifier", 1);
projection.put("Name", 1);
......@@ -183,10 +183,7 @@ public class VitamQueryHelper {
final String searchKey = entry.getKey();
switch (searchKey) {
case ArchiveSearchConsts.NAME:
case ArchiveSearchConsts.SHORT_NAME:
case ArchiveSearchConsts.IDENTIFIER:
case ArchiveSearchConsts.ID:
if (entry.getValue() instanceof ArrayList) {
final List<String> stringsValues = (ArrayList) entry.getValue();
for (String elt : stringsValues) {
......@@ -202,6 +199,23 @@ public class VitamQueryHelper {
break;
case ArchiveSearchConsts.NAME:
case ArchiveSearchConsts.SHORT_NAME:
case ArchiveSearchConsts.ID:
if (entry.getValue() instanceof ArrayList) {
final List<String> stringsValues = (ArrayList) entry.getValue();
for (String name : stringsValues) {
queryOr.add(matchPhrasePrefix(searchKey, name));
}
haveOrParameters = true;
} else if (entry.getValue() instanceof String) {
final String stringValue = (String) entry.getValue();
queryOr.add(matchPhrasePrefix(searchKey, stringValue));
haveOrParameters = true;
}
break;
default:
LOGGER.error("Can not find binding for key: {}", searchKey);
break;
......
......@@ -21,6 +21,8 @@ public class ArchiveUnitCsv implements Serializable {
private String originatingAgencyName;
private String archiveUnitType;
private String descriptionLevel;
private String title;
......
......@@ -10,7 +10,8 @@ import java.util.Map;
public class ExportSearchResultParam {
//Export CSV headers
//French
private static final String FR_GUID_FIELD_HEADER_NAME = "GUID de l'UA";
private static final String FR_GUID_FIELD_HEADER_NAME = "Identifiant technique de l'UA";
public static final String FR_ARCHIVE_UNIT_TYPE = "Type";
private static final String FR_ORIGINATING_AGENCY_FIELD_HEADER_NAME = "Service producteur de l'UA";
private static final String FR_DESCRIPTION_LEVEL_FIELD_HEADER_NAME = "Niveau de description";
private static final String FR_ARCHIVE_UNIT_NAME_FIELD_HEADER_NAME = "Nom de l’UA";
......@@ -18,14 +19,26 @@ public class ExportSearchResultParam {
private static final String FR_END_DATE_FIELD_HEADER_NAME = "Date de fin de l’UA";
private static final String FR_DESCRIPTION_FIELD_HEADER_NAME = "Description de l'UA";
public static final String FR_AU_FILING_SCHEME = "Plan de classement";
public static final String FR_AU_HOLDING_SCHEME = "Arbre de positionnement";
public static final String FR_AU_WITHOUT_OBJECT = "Archive sans objet";
public static final String FR_AU_WITH_OBJECT = "Archive avec objet";
//English
private static final String EN_GUID_FIELD_HEADER_NAME = "Archive unit GUID";
private static final String EN_ORIGINATING_AGENCY_FIELD_HEADER_NAME = "Archive unit Originating agency ";
private static final String EN_GUID_FIELD_HEADER_NAME = "Archive unit technical identifier";
public static final String EN_ARCHIVE_UNIT_TYPE = "Type";
private static final String EN_ORIGINATING_AGENCY_FIELD_HEADER_NAME = "Archive unit Originating agency";
private static final String EN_DESCRIPTION_LEVEL_FIELD_HEADER_NAME = "Description level";
private static final String EN_ARCHIVE_UNIT_NAME_FIELD_HEADER_NAME = "Archive unit Name";
private static final String EN_BEGIN_DATE_FIELD_HEADER_NAME = "Archive unit start date";
private static final String EN_END_DATE_FIELD_HEADER_NAME = "Archive unit end date";
private static final String EN_DESCRIPTION_FIELD_HEADER_NAME = "Archive unit Description";
public static final String EN_AU_FILING_SCHEME = "Filling scheme";
public static final String EN_AU_HOLDING_SCHEME = "Holding scheme";
public static final String EN_AU_WITHOUT_OBJECT = "Archive without object";
public static final String EN_AU_WITH_OBJECT = "Archive with object";
//Date patterns
private static final String FR_PATTERN_DATE = "dd/MM/yyyy";
private static final String EN_PATTERN_DATE = "MM/dd/yyyy";
......@@ -40,6 +53,7 @@ public class ExportSearchResultParam {
if (locale.equals(Locale.FRENCH)) {
this.headers = List.of(
FR_GUID_FIELD_HEADER_NAME,
FR_ARCHIVE_UNIT_TYPE,
FR_ORIGINATING_AGENCY_FIELD_HEADER_NAME,
FR_DESCRIPTION_LEVEL_FIELD_HEADER_NAME,
FR_ARCHIVE_UNIT_NAME_FIELD_HEADER_NAME,
......@@ -63,6 +77,7 @@ public class ExportSearchResultParam {
} else if (locale.equals(Locale.ENGLISH)) {
this.headers = List.of(
EN_GUID_FIELD_HEADER_NAME,
FR_ARCHIVE_UNIT_TYPE,
EN_ORIGINATING_AGENCY_FIELD_HEADER_NAME,
EN_DESCRIPTION_LEVEL_FIELD_HEADER_NAME,
EN_ARCHIVE_UNIT_NAME_FIELD_HEADER_NAME,
......
/*
* *
* * Copyright French Prime minister Office/SGMAP/DINSIC/Vitam Program (2019-2020)
* * and the signatories of the "VITAM - Accord du Contributeur" agreement.
* *
* * contact@programmevitam.fr
* *
* * This software is a computer program whose purpose is to implement
* * implement a digital archiving front-office system for the secure and
* * efficient high volumetry VITAM solution.
* *
* * This software is governed by the CeCILL-C license under French law and
* * abiding by the rules of distribution of free software. You can use,
* * modify and/ or redistribute the software under the terms of the CeCILL-C