diff --git a/CHANGELOG.md b/CHANGELOG.md index a5eabc2..73e65f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/pom.xml b/pom.xml index 873fc67..435c7e1 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ eu.europa.ted.eforms eforms-core-java - 1.7.0-SNAPSHOT + 1.7.0 eForms Core Library API and tools for eForms applications. @@ -33,7 +33,7 @@ - 2025-07-30T08:40:55Z + 2026-07-17T04:40:22Z UTF-8 diff --git a/src/main/java/eu/europa/ted/eforms/sdk/SdkConstants.java b/src/main/java/eu/europa/ted/eforms/sdk/SdkConstants.java index c6ebd00..d3c9d77 100644 --- a/src/main/java/eu/europa/ted/eforms/sdk/SdkConstants.java +++ b/src/main/java/eu/europa/ted/eforms/sdk/SdkConstants.java @@ -4,9 +4,9 @@ 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"; @@ -14,13 +14,13 @@ public class SdkConstants { 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"; @@ -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"; @@ -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() {} @@ -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. @@ -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. */