Open
Conversation
- Implement typed uniqueness conditions (any value in any collection) - Fix: repeatable fields used as own context treated as scalar - Rename error code EXPECTED_SEQUENCE to EXPECTED_SCALAR
…9-privacy-settings-in-efx
Contributor
There was a problem hiding this comment.
Pull request overview
Adds SDK2 privacy-settings support to the EFX translator/symbol resolver and expands typed uniqueness handling, backed by updated test fixtures and new translator tests.
Changes:
- Extend
SymbolResolver/SdkSymbolResolverwith privacy lookups (privacy code, companion fields, masking value) and add supporting exception/model types. - Add typed
composeUniqueValueCondition(...)overloads inScriptGenerator/XPathScriptGeneratorand update EFX2 translator/tests accordingly. - Introduce SDK2 test JSON data + README updates to model a withholdable field and its privacy metadata; add new privacy-condition tests.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/test/resources/json/sdk2-fields.json | Adds privacy metadata node + companion privacy fields and attaches privacy config to a field. |
| src/test/resources/json/README.md | Documents privacy test data and updates test data file listing. |
| src/test/java/eu/europa/ted/efx/sdk2/SdkSymbolResolverTest.java | Adjusts path-type assertions and adds root-context repeatability tests. |
| src/test/java/eu/europa/ted/efx/sdk2/EfxExpressionTranslatorV2Test.java | Updates unique-condition expectations and adds privacy-condition coverage. |
| src/test/java/eu/europa/ted/efx/mock/sdk2/SymbolResolverMockV2.java | Initializes datatype repository for privacy-mask lookup support in tests. |
| src/main/java/eu/europa/ted/efx/xpath/XPathScriptGenerator.java | Adds typed uniqueness overloads and current-date() support. |
| src/main/java/eu/europa/ted/efx/sdk2/EfxExpressionTranslatorV2.java | Implements typed uniqueness condition handlers and new privacy-condition translations. |
| src/main/java/eu/europa/ted/efx/model/PrivacySetting.java | Introduces enum to identify privacy companion-field types. |
| src/main/java/eu/europa/ted/efx/interfaces/SymbolResolver.java | Adds privacy-related resolver APIs. |
| src/main/java/eu/europa/ted/efx/interfaces/ScriptGenerator.java | Adds typed uniqueness overloads and getCurrentDate(). |
| src/main/java/eu/europa/ted/efx/exceptions/TypeMismatchException.java | Renames repeatability scalar/sequence error code to EXPECTED_SCALAR. |
| src/main/java/eu/europa/ted/efx/exceptions/SdkInconsistencyException.java | New exception for inconsistent SDK privacy/type data. |
| src/main/java/eu/europa/ted/efx/exceptions/InvalidUsageException.java | Adds FIELD_NOT_WITHHOLDABLE error case. |
| src/main/java/eu/europa/ted/efx/exceptions/ConsistencyCheckException.java | Adds UNHANDLED_PRIVACY_SETTING error case. |
| src/main/java/eu/europa/ted/eforms/sdk/SdkSymbolResolver.java | Implements privacy lookups and adjusts repeatability/path typing behaviors. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/main/java/eu/europa/ted/efx/sdk2/EfxExpressionTranslatorV2.java
Outdated
Show resolved
Hide resolved
src/test/java/eu/europa/ted/efx/sdk2/EfxExpressionTranslatorV2Test.java
Outdated
Show resolved
Hide resolved
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.