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
34 changes: 30 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,38 @@
# eForms Core Library 1.5.0 Release Notes
# eForms Core Library 1.6.0 Release Notes

The eForms Core Library is a collection of utilities that are used by our sample applications as well as the EFX Toolkit for Java Developers.
The eForms Core Library is a collection of utilities used by the EFX Toolkit for Java Developers and other eForms applications.

## In this release

This release fixes an issue in the XPathProcessor that could cause a redundant predicate production when contextualising XPaths with multiple predicates.
### SDK entity improvements

The versions of various dependencies was updated: Apache Commons IO 2.19.0, Apache Commons Lang 3.18.0, Jackson 2.18.3, logback 1.5.18.
- 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.

### Privacy and data type support

- 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`.

### Notice subtype management

- 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.

## Download

Expand Down
2 changes: 1 addition & 1 deletion 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.6.0-SNAPSHOT</version>
<version>1.6.0</version>

<name>eForms Core Library</name>
<description>API and tools for eForms applications.</description>
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/eu/europa/ted/eforms/sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ The `eu.europa.ted.eforms.sdk` package contains the core classes and packages th

The main packages included here are:

* `component`: Provides a solution for handling multiple major versions of the SDK in parallel.
* `component`: Provides a solution for handling multiple major versions of the SDK in parallel.
* `entity`: Provides abstract entity classes for representing SDK metadata (fields, nodes, codelists, notice subtypes, data types).
* `repository`: Provides classes for reading SDK entities from JSON and Genericode files.
* `resource`: Provides a solution for automatically discovering and downloading new versions of the eForms SDK.

8 changes: 4 additions & 4 deletions src/main/java/eu/europa/ted/eforms/sdk/entity/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Common Entities

The entities in this package can be used while reading data from the eForms SDK. Currently there are only four entities implemented here:
The entities in this package can be used while reading data from the eForms SDK. The following entities are implemented here:

* `SdkField`: Can hold basic information about a field.
* `SdkNode`: Can hold basic information about a node and reconstruct the node hierarchy.
* `SdkField`: Can hold basic information about a field, including repeatability, parent node, XPath metadata, and privacy settings.
* `SdkNode`: Can hold basic information about a node and reconstruct the node hierarchy via parent references and ancestor chain traversal.
* `SdkCodelist`: Can hold codelist information including its codes.
* `SdkNoticeSubtype`: Can hold information about a notice subtype from the SDK's notice-types.json file.
* `SdkDataType`: Can hold field type-level metadata including privacy masking values.

All the classes are abstract so that they can have specific implementations for different major versions of the eForms SDK if needed.

This package also includes a factory class (`SdkEntityFactory`) that is meant to be used for instantiating concrete implementations of these abstract entity classes for different major versions of the eForms SDK.

_There is no rocket science in the code in this package. You are welcome to reuse it. It is intended to be used primarily by the EFX Toolkit and our sample applications._
3 changes: 2 additions & 1 deletion src/main/java/eu/europa/ted/eforms/sdk/repository/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ This package contains:
* `SdkFieldRepository`: can populate a `HashMap` with `SdkField` objects read form `fields.json`
* `SdkNodeRepository`: can populate a `HashMap` with `SdkNode` objects read form `fields.json`
* `SdkCodelistRepository`: can populate a `HashMap` with `SdkCodelist` objects (including all codelist codes), by reading the `.gc` files from the `codelists` folder of the eForms SDK.
* `SdkNoticeTypeRepository`: can populate a `HashMap` with `SdkNoticeSubtype` objects read from `notice-types.json`
* `SdkNoticeTypeRepository`: can populate a `HashMap` with `SdkNoticeSubtype` objects read from `notice-types.json`
* `SdkDataTypeRepository`: can populate a `HashMap` with `SdkDataType` objects
Loading