Feature/mig 450 support creation of repeatable content#21
Merged
Conversation
…ated row set, subtree and array variables and their representation in variable structure, possibility to refer to array variable via literal path (current functionality - Data.Clients.Value, or newly via standard variable ref - to existing array variable)
…l and Variable Ref paths are resolved and handled in various cases during deployment. Also fixed table multiple/single rows. Updated Migration Model Example to demonstrate working with subtree and array variables and repeater rows.
…ests to assert important parts and to check correct behavior - one still failing, have to revise the implementation
…nmapped variables for repeated row, warning phrase rephrase, unit test fix
…port.groovy, solve variable/literal path mapping in export/import and unlock repeated row node to resolve the validation error
… and fix bug with the always new addRoot for allowRuntimeModifications
…epeated content to migration model example
…ion demo for repeated row
…le-content # Conflicts: # migration-examples/src/main/groovy/com/quadient/migration/example/example/Import.groovy # migration-library/src/main/kotlin/com/quadient/migration/service/inspirebuilder/DesignerDocumentObjectBuilder.kt # migration-library/src/main/kotlin/com/quadient/migration/service/inspirebuilder/InspireDocumentObjectBuilder.kt # migration-library/src/main/kotlin/com/quadient/migration/shared/DataType.kt
…t main after external display rule implementation
There was a problem hiding this comment.
Pull request overview
Adds support for repeatable (array-driven) content and table row groups across the migration model, including the ability to define variable-structure paths as either literal paths or references to other variables.
Changes:
- Introduces
VariablePath(LiteralPath/VariableRefPath) and updates variable-structure mappings and resolution accordingly. - Adds
RepeatedContentand support for repeated table row groups driven by array variables. - Extends variable
DataTypewithArrayandSubTree, updates builders/examples/tests and CSV mapping import/export.
Reviewed changes
Copilot reviewed 28 out of 28 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| migration-library/src/test/kotlin/com/quadient/migration/shared/JrdDefinitionTest.kt | Normalizes line endings for stable JSON assertions. |
| migration-library/src/test/kotlin/com/quadient/migration/service/inspirebuilder/InspireDocumentObjectBuilderTest.kt | Adds tests for variable-ref path resolution and repeated row/flow behavior (incl. fallbacks). |
| migration-library/src/test/kotlin/com/quadient/migration/service/inspirebuilder/DesignerDocumentObjectBuilderTest.kt | Removes unused import and updates row content assertion structure. |
| migration-library/src/main/kotlin/com/quadient/migration/shared/VariableStructure.kt | Changes variable structure entries to store VariablePath instead of String. |
| migration-library/src/main/kotlin/com/quadient/migration/shared/VariablePath.kt | Adds VariablePath sealed type with JSON serializer. |
| migration-library/src/main/kotlin/com/quadient/migration/shared/JrdDefinition.kt | Resolves variable paths via VariablePath.resolve(...) before building variable trees. |
| migration-library/src/main/kotlin/com/quadient/migration/shared/DataType.kt | Adds Array and SubTree data types and mappings. |
| migration-library/src/main/kotlin/com/quadient/migration/service/inspirebuilder/InspireDocumentObjectBuilder.kt | Implements repeated content + repeated table rowsets; adds variable-path resolution; refactors table rowset building. |
| migration-library/src/main/kotlin/com/quadient/migration/service/inspirebuilder/InspireBuilderUtils.kt | Extends datatype mapping and improves variable lookup via normalized paths. |
| migration-library/src/main/kotlin/com/quadient/migration/service/inspirebuilder/DesignerDocumentObjectBuilder.kt | Adapts language variable handling + root creation + condition-row building API changes. |
| migration-library/src/main/kotlin/com/quadient/migration/persistence/migrationmodel/DocumentContentEntity.kt | Persists repeated table rows and RepeatedContentEntity; adds custom row serializer. |
| migration-library/src/main/kotlin/com/quadient/migration/api/dto/migrationmodel/documentcontent/Table.kt | Promotes table rows to sealed TableRow with repeated row group support; DB mapping updated. |
| migration-library/src/main/kotlin/com/quadient/migration/api/dto/migrationmodel/documentcontent/RepeatedContent.kt | Adds new RepeatedContent document content model. |
| migration-library/src/main/kotlin/com/quadient/migration/api/dto/migrationmodel/documentcontent/DocumentContent.kt | Adds DB <-> model conversion for RepeatedContent. |
| migration-library/src/main/kotlin/com/quadient/migration/api/dto/migrationmodel/builder/documentcontent/TableDsl.kt | Marks legacy DSL as deprecated and documents migration to TableBuilder. |
| migration-library/src/main/kotlin/com/quadient/migration/api/dto/migrationmodel/builder/documentcontent/TableBuilder.kt | Extends builder to support repeated row groups and improves row/cell APIs. |
| migration-library/src/main/kotlin/com/quadient/migration/api/dto/migrationmodel/builder/documentcontent/RepeatedContentBuilder.kt | Adds builder for RepeatedContent. |
| migration-library/src/main/kotlin/com/quadient/migration/api/dto/migrationmodel/builder/documentcontent/ParagraphBuilder.kt | Adds overloads to set style refs from model objects. |
| migration-library/src/main/kotlin/com/quadient/migration/api/dto/migrationmodel/builder/VariableStructureBuilder.kt | Adds APIs to map structure paths via variable references (VariableRefPath). |
| migration-library/src/main/kotlin/com/quadient/migration/api/dto/migrationmodel/builder/TextStyleBuilder.kt | Adds overload to set style ref from TextStyle. |
| migration-library/src/main/kotlin/com/quadient/migration/api/dto/migrationmodel/builder/ParagraphStyleBuilder.kt | Adds overload to set style ref from ParagraphStyle. |
| migration-library/src/main/kotlin/com/quadient/migration/api/dto/migrationmodel/builder/DocumentContentBuilderBase.kt | Adds repeatedContent(...) builder helpers (literal path / variable ref). |
| migration-examples/src/test/groovy/VariablesMappingImportTest.groovy | Updates mapping import test to cover @variableId path references. |
| migration-examples/src/test/groovy/VariablesMappingExportTest.groovy | Updates mapping export test to emit @variableId paths. |
| migration-examples/src/main/groovy/com/quadient/migration/example/example/Import.groovy | Updates example import to use new builders, repeated rows/content, and Array/SubTree variable types. |
| migration-examples/src/main/groovy/com/quadient/migration/example/common/mapping/VariablesImport.groovy | Parses variable structure paths from CSV into LiteralPath / VariableRefPath. |
| migration-examples/src/main/groovy/com/quadient/migration/example/common/mapping/VariablesExport.groovy | Serializes variable structure paths to CSV (literal or @variableId). |
| CHANGELOG.md | Documents new repeatable content support and array/subtree types. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...rc/main/kotlin/com/quadient/migration/service/inspirebuilder/InspireDocumentObjectBuilder.kt
Show resolved
Hide resolved
...main/kotlin/com/quadient/migration/api/dto/migrationmodel/documentcontent/RepeatedContent.kt
Outdated
Show resolved
Hide resolved
...xamples/src/main/groovy/com/quadient/migration/example/common/mapping/VariablesImport.groovy
Show resolved
Hide resolved
...rc/main/kotlin/com/quadient/migration/service/inspirebuilder/InspireDocumentObjectBuilder.kt
Show resolved
Hide resolved
...rc/main/kotlin/com/quadient/migration/service/inspirebuilder/InspireDocumentObjectBuilder.kt
Show resolved
Hide resolved
…to/migrationmodel/documentcontent/RepeatedContent.kt Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.