Skip to content

Tedefo 4319 privacy settings in efx#132

Open
rousso wants to merge 5 commits intodevelopfrom
TEDEFO-4319-privacy-settings-in-efx
Open

Tedefo 4319 privacy settings in efx#132
rousso wants to merge 5 commits intodevelopfrom
TEDEFO-4319-privacy-settings-in-efx

Conversation

@rousso
Copy link
Contributor

@rousso rousso commented Feb 8, 2026

No description provided.

- 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
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/SdkSymbolResolver with privacy lookups (privacy code, companion fields, masking value) and add supporting exception/model types.
  • Add typed composeUniqueValueCondition(...) overloads in ScriptGenerator/XPathScriptGenerator and 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant