Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
b327da3
Merge branch 'java25' into devTests
alexisszmundy Feb 5, 2026
00f75a8
refactor: moved integration tests into dedicated package
alexisszmundy Feb 5, 2026
ad30d46
test: contextualVariableController unit test
alexisszmundy Feb 5, 2026
23e7802
test: controllers unit tests
alexisszmundy Feb 6, 2026
16bc8fd
test: rest of controller tests
alexisszmundy Feb 9, 2026
11aa6d0
test: context service unit tests + deprecations
alexisszmundy Feb 9, 2026
2b2abf8
test: contextual variable service unit tests
alexisszmundy Feb 9, 2026
44ca639
test: some services unit tests
alexisszmundy Feb 10, 2026
608bda8
refactor: use mockito annotations
alexisszmundy Feb 10, 2026
00faa8b
chore: imports
alexisszmundy Feb 11, 2026
89036c3
wip: process lunatic raw data test
alexisszmundy Feb 12, 2026
df1cebf
Merge branch 'main' into devTests
alexisszmundy Feb 19, 2026
4f804ce
test: lunatic json raw data unit test
alexisszmundy Feb 19, 2026
edaddc5
test: services tests
alexisszmundy Feb 20, 2026
0b94aa3
test: save edited no campaignId new condition
alexisszmundy Feb 24, 2026
86eaa67
fix: don't use campaignId
alexisszmundy Feb 24, 2026
34b9686
Merge branch 'main' into devTests
alexisszmundy Feb 24, 2026
789c7b4
Merge branch 'devResponseStates' into devTests
alexisszmundy Feb 26, 2026
4f95d7e
Merge branch 'devResponseStates' into devTests
alexisszmundy Feb 26, 2026
5de6b96
Merge branch 'main' into devTests
alexisszmundy Mar 4, 2026
ace5362
Merge branch 'main' into devTests
alexisszmundy Mar 5, 2026
c273dbb
fix: test fixes after merge
alexisszmundy Mar 5, 2026
7319ebd
test: more models tests
alexisszmundy Mar 5, 2026
9f5438e
test: cache, context and contextual adapters
alexisszmundy Mar 5, 2026
bedda4a
test: adapter tests
alexisszmundy Mar 5, 2026
28e06af
test: surveyunitmodelmongoadapter test
alexisszmundy Mar 6, 2026
840c351
fix: use deep stubs + rename files
alexisszmundy Mar 6, 2026
013eac1
fix: put back normal stubs, problem is local
alexisszmundy Mar 6, 2026
feddc14
fix: use jacoco
alexisszmundy Mar 6, 2026
cb019be
test: NoDataException
alexisszmundy Mar 6, 2026
86b0338
test: ScheduleDocument & RawResponseInputRepository
alexisszmundy Mar 6, 2026
9888967
test: OidcServiceTest
alexisszmundy Mar 6, 2026
0881302
test: FileUtilsTest
alexisszmundy Mar 6, 2026
f0962b8
test: controller adapter tests
alexisszmundy Mar 6, 2026
4705367
chore: remove old tests
alexisszmundy Mar 6, 2026
9bc6d11
fix: put back stubs for cucumber
alexisszmundy Mar 6, 2026
ce9b05c
test: health check controller test
alexisszmundy Mar 6, 2026
f4a8c13
test: raw response controller reworked
alexisszmundy Mar 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .runtests/Integration tests GENESIS.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Integration tests GENESIS" type="JUnit" factoryName="JUnit">
<module name="genesis-api" />
<option name="PACKAGE_NAME" value="" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="directory" />
<dir value="$PROJECT_DIR$/src/test/java/integration_tests" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
1 change: 1 addition & 0 deletions .runtests/Unit tests GENESIS.run.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Unit tests GENESIS" type="JUnit" factoryName="JUnit">
<module name="genesis-api" />
<extension name="coverage" runner="jacoco" />
<option name="PACKAGE_NAME" value="fr.insee.genesis" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
Expand Down
32 changes: 31 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -263,16 +263,46 @@
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>properties</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<printSummary>true</printSummary>
<includes>
<include>**/*FT.java</include>
<include>**/*Test.java</include>
<include>**/*Tests.java</include>
</includes>
<parallel>methods</parallel>
<threadCount>4</threadCount>
<argLine>@{argLine} -javaagent:${org.mockito:mockito-core:jar}</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
<configuration>
<includes>
<include>**/*IT.java</include>
</includes>
</configuration>
</plugin>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class CombinedRawDataController {
@Operation(summary = "Retrieve combined raw responses and Lunatic raw data for a given interrogationId")
@GetMapping
@PreAuthorize("hasAnyRole('ADMIN', 'USER_PLATINE')")
public ResponseEntity<CombinedRawDataDto> getCombinetRawData(
public ResponseEntity<CombinedRawDataDto> getCombinedRawData(
@RequestParam(INTERROGATION_ID) String interrogationId
){
CombinedRawDataDto data = combinedRawDataService.getCombinedRawDataByInterrogationId(interrogationId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,9 @@ public ResponseEntity<Object> saveScheduleWithCollectionInstrumentId(
collectionInstrumentId,
serviceToCall == null ? ServiceToCall.MAIN : serviceToCall,
frequency,
scheduleBeginDate, scheduleEndDate, trustParameters
scheduleBeginDate,
scheduleEndDate,
trustParameters
);
}catch (GenesisException e){
return new ResponseEntity<>(e.getMessage(), HttpStatusCode.valueOf(e.getStatus()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ public ResponseEntity<String> healthcheckMongo() {
MongoDB OK
\s
%s Responses
%s Schedules
%s Contexts
\s"""
.formatted(
surveyUnitApiPort.countResponses(),
dataProcessingContextApiPort.countSchedules()
dataProcessingContextApiPort.countContexts()
));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@

@Operation(summary = "List campaigns in database")
@GetMapping(path = "/")
@Deprecated
public ResponseEntity<Set<String>> getCampaigns() {

Check warning on line 31 in src/main/java/fr/insee/genesis/controller/rest/responses/CampaignController.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Add the missing @deprecated Javadoc tag.

See more on https://sonarcloud.io/project/issues?id=InseeFr_genesis-api&issues=AZzDQW6wMM3WpaPvOmvf&open=AZzDQW6wMM3WpaPvOmvf&pullRequest=423
Set<String> campaigns = surveyUnitService.findDistinctCampaignIds();
return ResponseEntity.ok(campaigns);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
public ResponseEntity<Long> countAllInterrogationIdsByQuestionnaireOrCollectionInstrument(
@Parameter(description = "questionnaireId/collectionInstrumentId", required = true) @PathVariable("questionnaireId") String questionnaireId
) {
//TODO move logic to service

Check warning on line 85 in src/main/java/fr/insee/genesis/controller/rest/responses/InterrogationController.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Complete the task associated to this TODO comment.

See more on https://sonarcloud.io/project/issues?id=InseeFr_genesis-api&issues=AZzDQW7CMM3WpaPvOmvg&open=AZzDQW7CMM3WpaPvOmvg&pullRequest=423
long response = surveyUnitService.countResponsesByQuestionnaireId(questionnaireId);
response += surveyUnitService.countResponsesByCollectionInstrumentId(questionnaireId);
return ResponseEntity.ok(response);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,13 @@

@Operation(summary = "List sources/modes used for a given campaign")
@GetMapping(path = "/by-campaign")
@Deprecated

Check warning on line 46 in src/main/java/fr/insee/genesis/controller/rest/responses/ModeController.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Add 'since' and/or 'forRemoval' arguments to the @Deprecated annotation.

See more on https://sonarcloud.io/project/issues?id=InseeFr_genesis-api&issues=AZzDQW7uMM3WpaPvOmvi&open=AZzDQW7uMM3WpaPvOmvi&pullRequest=423
public ResponseEntity<List<Mode>> getModesByCampaign(@RequestParam("campaignId") String campaignId) {

Check warning on line 47 in src/main/java/fr/insee/genesis/controller/rest/responses/ModeController.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Do not forget to remove this deprecated code someday.

See more on https://sonarcloud.io/project/issues?id=InseeFr_genesis-api&issues=AZzDQW7uMM3WpaPvOmvj&open=AZzDQW7uMM3WpaPvOmvj&pullRequest=423

Check warning on line 47 in src/main/java/fr/insee/genesis/controller/rest/responses/ModeController.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Add the missing @deprecated Javadoc tag.

See more on https://sonarcloud.io/project/issues?id=InseeFr_genesis-api&issues=AZzDQW7uMM3WpaPvOmvk&open=AZzDQW7uMM3WpaPvOmvk&pullRequest=423
List<Mode> modes = surveyUnitService.findModesByCampaignId(campaignId);
return ResponseEntity.ok(modes);
}

//TODO Integrate into normal usage, not in unit test meanwhile

Check warning on line 52 in src/main/java/fr/insee/genesis/controller/rest/responses/ModeController.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Complete the task associated to this TODO comment.

See more on https://sonarcloud.io/project/issues?id=InseeFr_genesis-api&issues=AZzDQW7uMM3WpaPvOmvl&open=AZzDQW7uMM3WpaPvOmvl&pullRequest=423
//========= OPTIMISATIONS PERFS (START) ==========
@Operation(summary = "List sources/modes used for a given questionnaire")
@GetMapping(path = "/by-questionnaireV2")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@

@Operation(summary = "List questionnaires in database with their campaigns")
@GetMapping(path = "/with-campaigns")
@Deprecated

Check warning on line 60 in src/main/java/fr/insee/genesis/controller/rest/responses/QuestionnaireController.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Add 'since' and/or 'forRemoval' arguments to the @Deprecated annotation.

See more on https://sonarcloud.io/project/issues?id=InseeFr_genesis-api&issues=AZzDQWy8MM3WpaPvOmvU&open=AZzDQWy8MM3WpaPvOmvU&pullRequest=423
public ResponseEntity<List<QuestionnaireWithCampaign>> getQuestionnairesWithCampaigns() {

Check warning on line 61 in src/main/java/fr/insee/genesis/controller/rest/responses/QuestionnaireController.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Do not forget to remove this deprecated code someday.

See more on https://sonarcloud.io/project/issues?id=InseeFr_genesis-api&issues=AZzDQWy8MM3WpaPvOmvV&open=AZzDQWy8MM3WpaPvOmvV&pullRequest=423
List<QuestionnaireWithCampaign> questionnaireWithCampaignList =
surveyUnitService.findQuestionnairesWithCampaigns();
return ResponseEntity.ok(questionnaireWithCampaignList);
Expand All @@ -65,6 +66,7 @@

@Operation(summary = "List questionnaires used for a given campaign")
@GetMapping(path = "/by-campaign")
@Deprecated

Check warning on line 69 in src/main/java/fr/insee/genesis/controller/rest/responses/QuestionnaireController.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Add 'since' and/or 'forRemoval' arguments to the @Deprecated annotation.

See more on https://sonarcloud.io/project/issues?id=InseeFr_genesis-api&issues=AZzDQWy8MM3WpaPvOmvX&open=AZzDQWy8MM3WpaPvOmvX&pullRequest=423
public ResponseEntity<Set<String>> getQuestionnairesByCampaign(@RequestParam("campaignId") String campaignId) {
Set<String> questionnaires = surveyUnitService.findQuestionnaireIdsByCampaignId(campaignId);
return ResponseEntity.ok(questionnaires);
Expand All @@ -76,7 +78,8 @@
*/
@Operation(summary = "List questionnaires used for a given campaign (using a DISTINCT query)")
@GetMapping(path = "/by-campaignV2")
@Deprecated(forRemoval = true) //TODO integrate logic to find by interrogationId

Check warning on line 81 in src/main/java/fr/insee/genesis/controller/rest/responses/QuestionnaireController.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Complete the task associated to this TODO comment.

See more on https://sonarcloud.io/project/issues?id=InseeFr_genesis-api&issues=AZzDQWy8MM3WpaPvOmvc&open=AZzDQWy8MM3WpaPvOmvc&pullRequest=423
public ResponseEntity<Set<String>> getQuestionnairesByCampaignV2(@RequestParam("campaignId") String campaignId) {

Check warning on line 82 in src/main/java/fr/insee/genesis/controller/rest/responses/QuestionnaireController.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Add the missing @deprecated Javadoc tag.

See more on https://sonarcloud.io/project/issues?id=InseeFr_genesis-api&issues=AZzDQWy8MM3WpaPvOmvb&open=AZzDQWy8MM3WpaPvOmvb&pullRequest=423

Check warning on line 82 in src/main/java/fr/insee/genesis/controller/rest/responses/QuestionnaireController.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Do not forget to remove this deprecated code someday.

See more on https://sonarcloud.io/project/issues?id=InseeFr_genesis-api&issues=AZzDQWy8MM3WpaPvOmva&open=AZzDQWy8MM3WpaPvOmva&pullRequest=423
Set<String> questionnaires = surveyUnitService.findQuestionnaireIdsByCampaignIdV2(campaignId);
return ResponseEntity.ok(questionnaires);
}
Expand All @@ -92,7 +95,6 @@
} catch (GenesisException e) {
return ResponseEntity.status(e.getStatus()).body(e.getMessage());
}

}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
@PutMapping(path = "/responses/raw/lunatic-json/save")
@PreAuthorize("hasRole('COLLECT_PLATFORM')")
public ResponseEntity<String> saveRawResponsesFromJsonBody(

@RequestParam("campaignName") String campaignName,
@RequestParam("questionnaireId") String questionnaireId,
@RequestParam(INTERROGATION_ID) String interrogationId,
Expand Down Expand Up @@ -99,7 +98,7 @@
public ResponseEntity<String> saveRawResponsesFromRawResponseDto(
@Valid @RequestBody RawResponseDto dto
) {
rawRepository.saveAsRawJson(dto);
rawRepository.saveAsRawJson(dto); //TODO put in service, repository is infra layer

Check warning on line 101 in src/main/java/fr/insee/genesis/controller/rest/responses/RawResponseController.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Complete the task associated to this TODO comment.

See more on https://sonarcloud.io/project/issues?id=InseeFr_genesis-api&issues=AZzDQW7cMM3WpaPvOmvh&open=AZzDQW7cMM3WpaPvOmvh&pullRequest=423
return ResponseEntity.status(201).body(String.format(SUCCESS_MESSAGE, dto.getInterrogationId()));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ public ResponseEntity<SurveyUnitSimplifiedDto> getLatestByInterrogationOneObject
LocalDateTime validationDate = null;
for (SurveyUnitModel response :
responses.stream().filter(rep -> rep.getMode().equals(mode)).toList()){
//Keep last not null questionnaireState/validationDate
questionnaireState = response.getQuestionnaireState() != null ?
response.getQuestionnaireState()
: questionnaireState;
Expand Down Expand Up @@ -426,7 +427,7 @@ public ResponseEntity<Object> saveEditedVariables(
) {
try {
log.debug("Received in save edited : {}", surveyUnitInputDto.toString());
//Code quality : we need to put all that logic out of this controller
//TODO Code quality : we need to put all that logic out of this controller
//Parse metadata
//Try to look for DDI first, if no DDI found looks for lunatic components
List<GenesisError> errors = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
package fr.insee.genesis.domain.model.surveyunit;

/**
* @deprecated unused
*/
@Deprecated(forRemoval = true)
public enum DataType {
COLLECTED,CALCULATED,EXTERNAL
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package fr.insee.genesis.domain.model.surveyunit.rawdata;

import fr.insee.genesis.domain.model.surveyunit.Mode;
import lombok.Builder;
import org.bson.types.ObjectId;

import java.time.LocalDateTime;
import java.util.Map;

@Builder
public record RawResponseModel(
ObjectId id,
String interrogationId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void saveKraftwerkExecutionScheduleByCollectionInstrumentId(String collectionIns

void deleteExpiredSchedules(String logFolder) throws GenesisException;

long countSchedules();
long countContexts();

DataProcessingContextModel getContext(String interrogationId) throws GenesisException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,19 @@
public interface LunaticJsonRawDataApiPort {

void save(LunaticJsonRawDataModel rawData);
@Deprecated
List<LunaticJsonRawDataModel> getRawData(String campaignName, Mode mode, List<String> interrogationIdList);

Check warning on line 24 in src/main/java/fr/insee/genesis/domain/ports/api/LunaticJsonRawDataApiPort.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Do not forget to remove this deprecated code someday.

See more on https://sonarcloud.io/project/issues?id=InseeFr_genesis-api&issues=AZzDQXABMM3WpaPvOmwH&open=AZzDQXABMM3WpaPvOmwH&pullRequest=423

Check warning on line 24 in src/main/java/fr/insee/genesis/domain/ports/api/LunaticJsonRawDataApiPort.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Add the missing @deprecated Javadoc tag.

See more on https://sonarcloud.io/project/issues?id=InseeFr_genesis-api&issues=AZzDQXABMM3WpaPvOmwI&open=AZzDQXABMM3WpaPvOmwI&pullRequest=423
List<LunaticJsonRawDataModel> getRawDataByQuestionnaireId(String questionnaireId, Mode mode, List<String> interrogationIdList);
List<SurveyUnitModel> convertRawData(List<LunaticJsonRawDataModel> rawData, VariablesMap variablesMap);
List<LunaticJsonRawDataUnprocessedDto> getUnprocessedDataIds();
Set<String> getUnprocessedDataQuestionnaireIds();
void updateProcessDates(List<SurveyUnitModel> surveyUnitModels);
Set<String> findDistinctQuestionnaireIds();
@Deprecated

Check warning on line 31 in src/main/java/fr/insee/genesis/domain/ports/api/LunaticJsonRawDataApiPort.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Add 'since' and/or 'forRemoval' arguments to the @Deprecated annotation.

See more on https://sonarcloud.io/project/issues?id=InseeFr_genesis-api&issues=AZzDQXACMM3WpaPvOmwJ&open=AZzDQXACMM3WpaPvOmwJ&pullRequest=423
long countRawResponsesByQuestionnaireId(String campaignId);
long countDistinctInterrogationIdsByQuestionnaireId(String questionnaireId);
@Deprecated

Check warning on line 34 in src/main/java/fr/insee/genesis/domain/ports/api/LunaticJsonRawDataApiPort.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Add 'since' and/or 'forRemoval' arguments to the @Deprecated annotation.

See more on https://sonarcloud.io/project/issues?id=InseeFr_genesis-api&issues=AZzDQXACMM3WpaPvOmwM&open=AZzDQXACMM3WpaPvOmwM&pullRequest=423
Page<LunaticJsonRawDataModel> findRawDataByCampaignIdAndDate(String campaignId, Instant startDt, Instant endDt, Pageable pageable);

Check warning on line 35 in src/main/java/fr/insee/genesis/domain/ports/api/LunaticJsonRawDataApiPort.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Do not forget to remove this deprecated code someday.

See more on https://sonarcloud.io/project/issues?id=InseeFr_genesis-api&issues=AZzDQXACMM3WpaPvOmwN&open=AZzDQXACMM3WpaPvOmwN&pullRequest=423

Check warning on line 35 in src/main/java/fr/insee/genesis/domain/ports/api/LunaticJsonRawDataApiPort.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Add the missing @deprecated Javadoc tag.

See more on https://sonarcloud.io/project/issues?id=InseeFr_genesis-api&issues=AZzDQXACMM3WpaPvOmwO&open=AZzDQXACMM3WpaPvOmwO&pullRequest=423

List<LunaticJsonRawDataModel> getRawDataByInterrogationId(String interrogationId);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@

List<Mode> findModesByCollectionInstrumentId(String collectionInstrumentId);

@Deprecated

Check warning on line 68 in src/main/java/fr/insee/genesis/domain/ports/api/SurveyUnitApiPort.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Add 'since' and/or 'forRemoval' arguments to the @Deprecated annotation.

See more on https://sonarcloud.io/project/issues?id=InseeFr_genesis-api&issues=AZzDQXAVMM3WpaPvOmwP&open=AZzDQXAVMM3WpaPvOmwP&pullRequest=423
List<Mode> findModesByCampaignId(String campaignId);

Check warning on line 69 in src/main/java/fr/insee/genesis/domain/ports/api/SurveyUnitApiPort.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Add the missing @deprecated Javadoc tag.

See more on https://sonarcloud.io/project/issues?id=InseeFr_genesis-api&issues=AZzDQXAVMM3WpaPvOmwR&open=AZzDQXAVMM3WpaPvOmwR&pullRequest=423

Check warning on line 69 in src/main/java/fr/insee/genesis/domain/ports/api/SurveyUnitApiPort.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Do not forget to remove this deprecated code someday.

See more on https://sonarcloud.io/project/issues?id=InseeFr_genesis-api&issues=AZzDQXAVMM3WpaPvOmwQ&open=AZzDQXAVMM3WpaPvOmwQ&pullRequest=423

//========= OPTIMISATIONS PERFS (START) ==========
List<Mode> findModesByCampaignIdV2(String campaignId);
Expand Down Expand Up @@ -102,6 +103,7 @@

String findQuestionnaireIdByInterrogationId(String interrogationId) throws GenesisException;

@Deprecated
Set<String> findCampaignIdsFrom(SurveyUnitInputDto dto);

long countResponsesByQuestionnaireId(String questionnaireId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public interface LunaticJsonRawDataPersistencePort {
List<LunaticJsonRawDataModel> findRawData(String campaignName, Mode mode, List<String> interrogationIdList);
List<LunaticJsonRawDataModel> findRawDataByQuestionnaireId(String questionnaireId, Mode mode, List<String> interrogationIdList);
Page<LunaticJsonRawDataModel> findRawDataByQuestionnaireId(String questionnaireId, Pageable pageable);
List<LunaticJsonRawDataModel> findRawDataByInterrogationID(String interrogationId);
List<LunaticJsonRawDataModel> findRawDataByInterrogationId(String interrogationId);
List<LunaticJsonRawDataModel> getAllUnprocessedData();
void updateProcessDates(String campaignId, Set<String> interrogationIds);
Set<String> findDistinctQuestionnaireIds();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,12 @@
this.surveyUnitPersistencePort = surveyUnitPersistencePort;
}

/**
* @Deprecated Use collectionInstrumentId instead
*/
@Override
@Deprecated(forRemoval = true)
public void saveContext(String partitionId, Boolean withReview) throws GenesisException {

Check warning on line 51 in src/main/java/fr/insee/genesis/domain/service/context/DataProcessingContextService.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Do not forget to remove this deprecated code someday.

See more on https://sonarcloud.io/project/issues?id=InseeFr_genesis-api&issues=AZzDQW9OMM3WpaPvOmvo&open=AZzDQW9OMM3WpaPvOmvo&pullRequest=423

Check warning on line 51 in src/main/java/fr/insee/genesis/domain/service/context/DataProcessingContextService.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Add the missing @deprecated Javadoc tag.

See more on https://sonarcloud.io/project/issues?id=InseeFr_genesis-api&issues=AZzDQW9OMM3WpaPvOmvp&open=AZzDQW9OMM3WpaPvOmvp&pullRequest=423

DataProcessingContextModel dataProcessingContextModel =
DataProcessingContextMapper.INSTANCE.documentToModel(dataProcessingContextPersistancePort.findByPartitionId(partitionId));
Expand Down Expand Up @@ -104,8 +108,12 @@
dataProcessingContextPersistancePort.save(DataProcessingContextMapper.INSTANCE.modelToDocument(dataProcessingContextModel));
}

/**
* @Deprecated Will be replaced by Bangles V1
*/
@Override
@Deprecated

Check warning on line 115 in src/main/java/fr/insee/genesis/domain/service/context/DataProcessingContextService.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Add 'since' and/or 'forRemoval' arguments to the @Deprecated annotation.

See more on https://sonarcloud.io/project/issues?id=InseeFr_genesis-api&issues=AZzDQW9OMM3WpaPvOmvq&open=AZzDQW9OMM3WpaPvOmvq&pullRequest=423
public void saveKraftwerkExecutionScheduleByCollectionInstrumentId(String collectionInstrumentId, ServiceToCall serviceToCall, String frequency, LocalDateTime startDate, LocalDateTime endDate, TrustParameters trustParameters) throws GenesisException {

Check warning on line 116 in src/main/java/fr/insee/genesis/domain/service/context/DataProcessingContextService.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Do not forget to remove this deprecated code someday.

See more on https://sonarcloud.io/project/issues?id=InseeFr_genesis-api&issues=AZzDQW9OMM3WpaPvOmvr&open=AZzDQW9OMM3WpaPvOmvr&pullRequest=423
DataProcessingContextModel dataProcessingContextModel = dataProcessingContextPersistancePort.findByCollectionInstrumentId(collectionInstrumentId);
if(dataProcessingContextModel == null){
//Create if not exist
Expand Down Expand Up @@ -141,8 +149,12 @@
dataProcessingContextPersistancePort.save(DataProcessingContextMapper.INSTANCE.modelToDocument(dataProcessingContextModel));
}

/**
* @Deprecated Will be replaced by Bangles V1
*/
@Override
@Deprecated

Check warning on line 156 in src/main/java/fr/insee/genesis/domain/service/context/DataProcessingContextService.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Add 'since' and/or 'forRemoval' arguments to the @Deprecated annotation.

See more on https://sonarcloud.io/project/issues?id=InseeFr_genesis-api&issues=AZzDQW9OMM3WpaPvOmvt&open=AZzDQW9OMM3WpaPvOmvt&pullRequest=423
public void updateLastExecutionDateByCollectionInstrumentId(String collectionInstrumentId, LocalDateTime newDate) throws GenesisException {

Check warning on line 157 in src/main/java/fr/insee/genesis/domain/service/context/DataProcessingContextService.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Add the missing @deprecated Javadoc tag.

See more on https://sonarcloud.io/project/issues?id=InseeFr_genesis-api&issues=AZzDQW9OMM3WpaPvOmvv&open=AZzDQW9OMM3WpaPvOmvv&pullRequest=423
DataProcessingContextModel dataProcessingContextModel = dataProcessingContextPersistancePort.findByCollectionInstrumentId(collectionInstrumentId);
if (dataProcessingContextModel == null) {
throw new GenesisException(404, NOT_FOUND_MESSAGE);
Expand All @@ -151,8 +163,12 @@
dataProcessingContextPersistancePort.save(DataProcessingContextMapper.INSTANCE.modelToDocument(dataProcessingContextModel));
}

/**
* @Deprecated Will be replaced by Bangles V1 + partitionId is obsolete
*/
@Override
@Deprecated(forRemoval = true)
public void deleteSchedules(String partitionId) throws GenesisException {

Check warning on line 171 in src/main/java/fr/insee/genesis/domain/service/context/DataProcessingContextService.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Do not forget to remove this deprecated code someday.

See more on https://sonarcloud.io/project/issues?id=InseeFr_genesis-api&issues=AZzDQW9OMM3WpaPvOmvw&open=AZzDQW9OMM3WpaPvOmvw&pullRequest=423
DataProcessingContextModel dataProcessingContextModel =
DataProcessingContextMapper.INSTANCE.documentToModel(
dataProcessingContextPersistancePort.findByPartitionId(partitionId)
Expand All @@ -164,8 +180,12 @@
dataProcessingContextPersistancePort.save(DataProcessingContextMapper.INSTANCE.modelToDocument(dataProcessingContextModel));
}

/**
* @Deprecated Will be replaced by Bangles V1
*/
@Override
@Deprecated

Check warning on line 187 in src/main/java/fr/insee/genesis/domain/service/context/DataProcessingContextService.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Add 'since' and/or 'forRemoval' arguments to the @Deprecated annotation.

See more on https://sonarcloud.io/project/issues?id=InseeFr_genesis-api&issues=AZzDQW9OMM3WpaPvOmvy&open=AZzDQW9OMM3WpaPvOmvy&pullRequest=423
public void deleteSchedulesByCollectionInstrumentId(String collectionInstrumentId) throws GenesisException {

Check warning on line 188 in src/main/java/fr/insee/genesis/domain/service/context/DataProcessingContextService.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Do not forget to remove this deprecated code someday.

See more on https://sonarcloud.io/project/issues?id=InseeFr_genesis-api&issues=AZzDQW9OMM3WpaPvOmvz&open=AZzDQW9OMM3WpaPvOmvz&pullRequest=423

Check warning on line 188 in src/main/java/fr/insee/genesis/domain/service/context/DataProcessingContextService.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Add the missing @deprecated Javadoc tag.

See more on https://sonarcloud.io/project/issues?id=InseeFr_genesis-api&issues=AZzDQW9OMM3WpaPvOmv0&open=AZzDQW9OMM3WpaPvOmv0&pullRequest=423
DataProcessingContextModel dataProcessingContextModel =
dataProcessingContextPersistancePort.findByCollectionInstrumentId(collectionInstrumentId);
if (dataProcessingContextModel == null) {
Expand All @@ -175,8 +195,12 @@
dataProcessingContextPersistancePort.save(DataProcessingContextMapper.INSTANCE.modelToDocument(dataProcessingContextModel));
}

/**
* @Deprecated Will be replaced by Bangles V1
*/
@Override
@Deprecated

Check warning on line 202 in src/main/java/fr/insee/genesis/domain/service/context/DataProcessingContextService.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Add 'since' and/or 'forRemoval' arguments to the @Deprecated annotation.

See more on https://sonarcloud.io/project/issues?id=InseeFr_genesis-api&issues=AZzDQW9OMM3WpaPvOmv1&open=AZzDQW9OMM3WpaPvOmv1&pullRequest=423
public List<ScheduleDto> getAllSchedules() {

Check warning on line 203 in src/main/java/fr/insee/genesis/domain/service/context/DataProcessingContextService.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Do not forget to remove this deprecated code someday.

See more on https://sonarcloud.io/project/issues?id=InseeFr_genesis-api&issues=AZzDQW9OMM3WpaPvOmv2&open=AZzDQW9OMM3WpaPvOmv2&pullRequest=423

Check warning on line 203 in src/main/java/fr/insee/genesis/domain/service/context/DataProcessingContextService.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Add the missing @deprecated Javadoc tag.

See more on https://sonarcloud.io/project/issues?id=InseeFr_genesis-api&issues=AZzDQW9OMM3WpaPvOmv3&open=AZzDQW9OMM3WpaPvOmv3&pullRequest=423
List<ScheduleDto> scheduleDtos = new ArrayList<>();

List<DataProcessingContextModel> dataProcessingContextModels =
Expand All @@ -189,8 +213,12 @@
return scheduleDtos;
}

/**
* @Deprecated Will be replaced by Bangles V1
*/
@Override
@Deprecated
public void deleteExpiredSchedules(String logFolder) throws GenesisException {

Check warning on line 221 in src/main/java/fr/insee/genesis/domain/service/context/DataProcessingContextService.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Add the missing @deprecated Javadoc tag.

See more on https://sonarcloud.io/project/issues?id=InseeFr_genesis-api&issues=AZzDQW9OMM3WpaPvOmv6&open=AZzDQW9OMM3WpaPvOmv6&pullRequest=423

Check warning on line 221 in src/main/java/fr/insee/genesis/domain/service/context/DataProcessingContextService.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Do not forget to remove this deprecated code someday.

See more on https://sonarcloud.io/project/issues?id=InseeFr_genesis-api&issues=AZzDQW9OMM3WpaPvOmv5&open=AZzDQW9OMM3WpaPvOmv5&pullRequest=423
List<DataProcessingContextModel> dataProcessingContextModels =
DataProcessingContextMapper.INSTANCE.listDocumentToListModel(dataProcessingContextPersistancePort.findAll());
for(DataProcessingContextModel context : dataProcessingContextModels){
Expand Down Expand Up @@ -225,7 +253,7 @@
}

@Override
public long countSchedules() {
public long countContexts() {
return dataProcessingContextPersistancePort.count();
}

Expand Down Expand Up @@ -259,6 +287,9 @@
return dataProcessingContextPersistancePort.findByCollectionInstrumentId(collectionInstrumentId);
}

/**
* @deprecated PartitionId is obsolete since modele filiere
*/
@Override
@Deprecated(forRemoval = true)
public List<String> getPartitionIds(boolean withReview){
Expand Down Expand Up @@ -286,6 +317,9 @@
return collectionInstrumentIds;
}

/**
* @deprecated PartitionId is obsolete since modele filiere
*/
@Deprecated(forRemoval = true)
@Override
public boolean getReviewByPartitionId(String partitionId) throws GenesisException {
Expand Down
Loading
Loading