-
Notifications
You must be signed in to change notification settings - Fork 4
New endpoints for scheduled Perret batchs + contextual variables refactor #299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
f4daf55
feat: authorize scheduler to get latest states
alexisszmundy 2334f94
feat: allow schedulers on get edited
alexisszmundy 18bcafe
feat: Get questionnaires with specific withReview
alexisszmundy 1eb7f41
perf: call context port instead of responses
alexisszmundy 7b50425
feat: save all questionnaire edited previous/external
alexisszmundy 6a87598
Merge branch 'main' into devPerretSchedule
alexisszmundy ab1b376
feat: don't spam log if file not found
alexisszmundy 1a24dcf
fix: not all json are edited
alexisszmundy 712975c
Merge branch 'main' into devPerretSchedule
alexisszmundy 0e92ade
Merge branch 'main' into devPerretSchedule
alexisszmundy 7cbfdc1
perf: use iterator on file paths
alexisszmundy 7e0ac4f
Merge branch 'main' into devPerretSchedule
alexisszmundy 34fe2f3
refactor: renamed edited responses to contextual variables
alexisszmundy 8de0089
refactor: put contextual variable logic into services
alexisszmundy d92296e
refactor: s on path
alexisszmundy 3c22754
chore: fix typo
alexisszmundy 884aeb4
Merge branch 'main' into devPerretSchedule
alexisszmundy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/main/java/fr/insee/genesis/domain/model/contextualvariable/ContextualVariableModel.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| package fr.insee.genesis.domain.model.contextualvariable; | ||
|
|
||
| import fr.insee.genesis.controller.dto.VariableQualityToolDto; | ||
| import lombok.Builder; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| @Builder | ||
| public record ContextualVariableModel( | ||
| String interrogationId, | ||
| List<VariableQualityToolDto> contextualPrevious, | ||
| List<VariableQualityToolDto> contextualExternal | ||
| ){} |
13 changes: 0 additions & 13 deletions
13
src/main/java/fr/insee/genesis/domain/model/editedresponse/EditedResponseModel.java
This file was deleted.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
src/main/java/fr/insee/genesis/domain/ports/api/ContextualExternalVariableApiPort.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| package fr.insee.genesis.domain.ports.api; | ||
|
|
||
| import fr.insee.genesis.domain.model.contextualvariable.ContextualExternalVariableModel; | ||
| import fr.insee.genesis.exceptions.GenesisException; | ||
|
|
||
| public interface ContextualExternalVariableApiPort { | ||
| boolean readContextualExternalFile(String questionnaireId, String filePath) throws GenesisException; | ||
|
|
||
| ContextualExternalVariableModel findByQuestionnaireIdAndInterrogationId(String questionnaireId, String interrogationId); | ||
| } |
12 changes: 12 additions & 0 deletions
12
src/main/java/fr/insee/genesis/domain/ports/api/ContextualPreviousVariableApiPort.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| package fr.insee.genesis.domain.ports.api; | ||
|
|
||
| import fr.insee.genesis.domain.model.contextualvariable.ContextualPreviousVariableModel; | ||
| import fr.insee.genesis.exceptions.GenesisException; | ||
|
|
||
| import java.io.InputStream; | ||
|
|
||
| public interface ContextualPreviousVariableApiPort { | ||
| boolean readContextualPreviousFile(String questionnaireId, String sourceState, String filePath) throws GenesisException; | ||
|
|
||
| ContextualPreviousVariableModel findByQuestionnaireIdAndInterrogationId(String questionnaireId, String interrogationId); | ||
| } |
10 changes: 10 additions & 0 deletions
10
src/main/java/fr/insee/genesis/domain/ports/api/ContextualVariableApiPort.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| package fr.insee.genesis.domain.ports.api; | ||
|
|
||
| import fr.insee.genesis.domain.model.contextualvariable.ContextualVariableModel; | ||
| import fr.insee.genesis.exceptions.GenesisException; | ||
| import fr.insee.genesis.infrastructure.utils.FileUtils; | ||
|
|
||
| public interface ContextualVariableApiPort { | ||
| ContextualVariableModel getContextualVariable(String questionnaireId, String interrogationId); | ||
| int saveContextualVariableFiles(String questionnaireId, FileUtils fileUtils) throws GenesisException; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 0 additions & 9 deletions
9
src/main/java/fr/insee/genesis/domain/ports/api/EditedExternalResponseApiPort.java
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
src/main/java/fr/insee/genesis/domain/ports/api/EditedPreviousResponseApiPort.java
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
src/main/java/fr/insee/genesis/domain/ports/api/EditedResponseApiPort.java
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
...ain/java/fr/insee/genesis/domain/ports/spi/ContextualExternalVariablePersistancePort.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| package fr.insee.genesis.domain.ports.spi; | ||
|
|
||
| import fr.insee.genesis.domain.model.contextualvariable.ContextualExternalVariableModel; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| public interface ContextualExternalVariablePersistancePort { | ||
| void backup(String questionnaireId); | ||
| void deleteBackup(String questionnaireId); | ||
| void restoreBackup(String questionnaireId); | ||
| void saveAll(List<ContextualExternalVariableModel> contextualPreviousVariableModelList); | ||
| void delete(String questionnaireId); | ||
| ContextualExternalVariableModel findByQuestionnaireIdAndInterrogationId(String questionnaireId, String interrogationId); | ||
| } |
14 changes: 14 additions & 0 deletions
14
...ain/java/fr/insee/genesis/domain/ports/spi/ContextualPreviousVariablePersistancePort.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| package fr.insee.genesis.domain.ports.spi; | ||
|
|
||
| import fr.insee.genesis.domain.model.contextualvariable.ContextualPreviousVariableModel; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| public interface ContextualPreviousVariablePersistancePort { | ||
| void backup(String questionnaireId); | ||
| void deleteBackup(String questionnaireId); | ||
| void restoreBackup(String questionnaireId); | ||
| void saveAll(List<ContextualPreviousVariableModel> contextualPreviousVariableModelList); | ||
| void delete(String questionnaireId); | ||
| ContextualPreviousVariableModel findByQuestionnaireIdAndInterrogationId(String questionnaireId, String interrogationId); | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.