Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
32 changes: 7 additions & 25 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,20 @@
# eForms Core Library 1.6.0 Release Notes
# eForms Core Library 1.7.0 Release Notes

The eForms Core Library is a collection of utilities used by the EFX Toolkit for Java Developers and other eForms applications.

## In this release

### SDK entity improvements
### SDK constants and resources

- Versioned SDK entity classes (`SdkFieldV1`, `SdkFieldV2`, `SdkNodeV1`, `SdkNodeV2`, etc.) have been moved from the EFX Toolkit into the core library, consolidating version-specific implementations in a single location.
- `SdkNode` now supports parent node references and ancestor chain traversal via `getAncestry()`.
- `SdkField` now exposes repeatability information, parent node references, and parsed XPath metadata via `getXpathInfo()`.
- Repository classes (`SdkNodeRepository`, `SdkFieldRepository`) now use two-pass loading to wire parent-child relationships during initialization.
- Added new SDK path, filename, and resource constants, including support for the validation folder and the `fwd` forward folder used by SDK 2.

### Privacy and data type support
### Performance

- Added `PrivacySettings` to `SdkField`, providing access to privacy code, justification, publication date, and related field references.
- Introduced `SdkDataType` entity and `SdkDataTypeRepository` for field type-level metadata including privacy masking values.
- Separated `duration` as a distinct data type from `measure`.
- Replaced Reflections with ClassGraph for component scanning and share a single classpath scan across factories, reducing startup cost (`SdkComponentFactory`).

### Notice subtype management
### Fixes

- Added `SdkNoticeSubtype` entity with intelligent ID parsing (prefix/number/suffix decomposition) and correct sorting order.
- Added `SdkNoticeTypeRepository` to load and manage notice subtypes.

### Utilities

- Moved `NoticeDocument` and `SafeDocumentBuilder` from the eforms-notice-viewer into the core library. `NoticeDocument` provides secure XML parsing with accessors for notice subtype, SDK version, and language detection. `SafeDocumentBuilder` implements XXE prevention following OWASP guidelines.

### Component registry

- Added component types for dependency extraction (`EFX_COMPUTE_DEPENDENCY_EXTRACTOR`, `EFX_VALIDATION_DEPENDENCY_EXTRACTOR`) and EFX rules translation (`EFX_RULES_TRANSLATOR`).

### Dependencies

- Updated versions of various dependencies.
- `SdkFieldV1` now maps the `measure` type to `duration`, consistent with the `duration`/`measure` split introduced in 1.6.0.

## Download

Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<groupId>eu.europa.ted.eforms</groupId>
<artifactId>eforms-core-java</artifactId>
<version>1.7.0-SNAPSHOT</version>
<version>1.7.0</version>

<name>eForms Core Library</name>
<description>API and tools for eForms applications.</description>
Expand Down Expand Up @@ -33,7 +33,7 @@
</scm>

<properties>
<project.build.outputTimestamp>2025-07-30T08:40:55Z</project.build.outputTimestamp>
<project.build.outputTimestamp>2026-07-17T04:40:22Z</project.build.outputTimestamp>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<!-- Java compiler -->
Expand Down
57 changes: 29 additions & 28 deletions src/main/java/eu/europa/ted/eforms/sdk/SdkConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@
import eu.europa.ted.eforms.sdk.resource.PathResource;

public class SdkConstants {

public static final Path DEFAULT_SDK_ROOT = Path.of("eforms-sdk");

public static final String CODELISTS_DIR_NAME = "codelists";
public static final String CODELISTS_JSON_FILE_NAME = "codelists.json";

public static final String FIELDS_JSON_XML_STRUCTURE_KEY = "xmlStructure";
public static final String FIELDS_JSON_FIELDS_KEY = "fields";
public static final String FIELDS_DIR_NAME = "fields";

public static final String NODES_JSON = "nodes.json";
public static final String FIELDS_JSON_FILENAME = "fields.json";
public static final String DATA_TYPES_JSON = "data-types.json";
public static final String BUSINESS_TERMS_JSON = "business-terms.json";
public static final String BUSINESS_ENTITIES_PROPERTIES_JSON = "business-entities-properties.json";
public static final String BUSINESS_ENTITIES_HIERARCHIES_JSON = "business-entities-hierarchies.json";
public static final String BUSINESS_ENTITIES_COMPOSITION_JSON = "business-entities-composition.json";
public static final String NODES_JSON_FILE_NAME = "nodes.json";
public static final String FIELDS_JSON_FILE_NAME = "fields.json";
public static final String DATA_TYPES_JSON_FILE_NAME = "data-types.json";
public static final String BUSINESS_TERMS_JSON_FILE_NAME = "business-terms.json";
public static final String BUSINESS_ENTITIES_PROPERTIES_JSON_FILE_NAME = "business-entities-properties.json";
public static final String BUSINESS_ENTITIES_HIERARCHIES_JSON_FILE_NAME = "business-entities-hierarchies.json";
public static final String BUSINESS_ENTITIES_COMPOSITION_JSON_FILE_NAME = "business-entities-composition.json";

public static final String MIGRATION_DIR_NAME = "migration";
public static final String MIGRATION_JSON_FILE_NAME = "migration.json";
Expand All @@ -37,11 +37,11 @@ public class SdkConstants {
public static final String SDK_GROUP_ID = "eu.europa.ted.eforms";
public static final String SDK_ARTIFACT_ID = "eforms-sdk";
public static final String SDK_PACKAGING = "jar";

public static final String SCHEMAS_DIR_NAME = "schemas";
public static final String SCHEMAS_JSON_FILE_NAME = "schemas.json";
public static final String SCHEMATRONS_DIR_NAME = "schematrons";

public static final String TRANSLATIONS_DIR_NAME = "translations";
public static final String TRANSLATIONS_JSON_FILE_NAME = "translations.json";
public static final String VALIDATION_DIR_NAME = "validation";
Expand All @@ -52,10 +52,10 @@ public class SdkConstants {
public static final String VIEW_TEMPLATES_JSON_FILE_NAME = "view-templates.json";

/**
* Forward folder of SDK2+, it can exist in some folders.
* Forward folder of SDK2+, it can exist in some folders.
* Files in that folder can be used to preview SDK2 features.
*/
public static final String FWD = "fwd";
public static final String FWD_DIR_NAME = "fwd";

private SdkConstants() {}

Expand All @@ -66,27 +66,28 @@ public enum SdkResource implements PathResource {
EFX_GRAMMAR(Path.of("efx-grammar")),

FIELDS(Path.of(FIELDS_DIR_NAME)),

FIELDS_FWD(Path.of(FIELDS_DIR_NAME, FWD_DIR_NAME)),

/**
* Fields and nodes.
*/
FIELDS_JSON(Path.of(FIELDS_DIR_NAME, FIELDS_JSON_FILENAME)),
BUSINESS_ENTITIES_COMPOSITION(Path.of(FIELDS_DIR_NAME, FWD, BUSINESS_ENTITIES_COMPOSITION_JSON)),
BUSINESS_ENTITIES_HIERARCHY(Path.of(FIELDS_DIR_NAME, FWD, BUSINESS_ENTITIES_HIERARCHIES_JSON)),
BUSINESS_ENTITIES_PROPERTIES(Path.of(FIELDS_DIR_NAME, FWD, BUSINESS_ENTITIES_PROPERTIES_JSON)),
BUSINESS_TERMS(Path.of(FIELDS_DIR_NAME, FWD, BUSINESS_TERMS_JSON)),
DATA_TYPES(Path.of(FIELDS_DIR_NAME, FWD, DATA_TYPES_JSON)),
FIELDS_JSON(Path.of(FIELDS_DIR_NAME, FIELDS_JSON_FILE_NAME)),

FIELDS_FWD_BUSINESS_ENTITIES_COMPOSITION(Path.of(FIELDS_DIR_NAME, FWD_DIR_NAME, BUSINESS_ENTITIES_COMPOSITION_JSON_FILE_NAME)),
FIELDS_FWD_BUSINESS_ENTITIES_HIERARCHIES(Path.of(FIELDS_DIR_NAME, FWD_DIR_NAME, BUSINESS_ENTITIES_HIERARCHIES_JSON_FILE_NAME)),
FIELDS_FWD_BUSINESS_ENTITIES_PROPERTIES(Path.of(FIELDS_DIR_NAME, FWD_DIR_NAME, BUSINESS_ENTITIES_PROPERTIES_JSON_FILE_NAME)),
FIELDS_FWD_BUSINESS_TERMS(Path.of(FIELDS_DIR_NAME, FWD_DIR_NAME, BUSINESS_TERMS_JSON_FILE_NAME)),
FIELDS_FWD_DATA_TYPES(Path.of(FIELDS_DIR_NAME, FWD_DIR_NAME, DATA_TYPES_JSON_FILE_NAME)),

/**
* JSON with array of fields.
* JSON with array of fields (forward folder).
*/
FIELDS_JSON_LIST(Path.of(FIELDS_DIR_NAME, FWD, FIELDS_JSON_FILENAME)),
FIELDS_FWD_FIELDS_JSON(Path.of(FIELDS_DIR_NAME, FWD_DIR_NAME, FIELDS_JSON_FILE_NAME)),

/**
* JSON with array of nodes.
* JSON with array of nodes (forward folder).
*/
NODES_JSON_LIST(Path.of(FIELDS_DIR_NAME, FWD, NODES_JSON)),
FIELDS_FWD_NODES_JSON(Path.of(FIELDS_DIR_NAME, FWD_DIR_NAME, NODES_JSON_FILE_NAME)),

/**
* Related to asset migration.
Expand Down Expand Up @@ -125,7 +126,7 @@ public enum SdkResource implements PathResource {
* Internationalisation, labels.
*/
TRANSLATIONS(Path.of(TRANSLATIONS_DIR_NAME)),

/**
* The index file for translations, only present in SDK 1.10.0 and later.
*/
Expand Down
Loading