Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
7994081
MIG-450 Support creation of repeatable content - Initial impl of repe…
Svit93 Mar 18, 2026
d3ff028
MIG-450 Support creation of repeatable content - Rework of how Litera…
Svit93 Mar 20, 2026
f64b2f9
MIG-450 Support creation of repeatable content - WIP, updating unit t…
Svit93 Mar 23, 2026
80d3e25
MIG-450 Support creation of repeatable content - better handling of u…
Svit93 Mar 24, 2026
2c30883
MIG-450 Support creation of repeatable content - revert changes in Im…
Svit93 Mar 25, 2026
80a9921
MIG-450 Support creation of repeatable content - include to unit test…
Svit93 Mar 25, 2026
8f8e796
MIG-450 Support creation of repeatable content - add repeated content…
Svit93 Mar 26, 2026
c57d8f2
Improve migration model example script
Svit93 Mar 27, 2026
daffe1b
fix displayrule target id missing from collectrefs
pkoq Mar 27, 2026
3b64894
MIG-450 Support creation of repeatable content - add simple demo of r…
Svit93 Mar 27, 2026
b2221d3
MIG-450 Support creation of repeatable content - add Literal path opt…
Svit93 Mar 27, 2026
10543db
Merge branch 'main' into feature/MIG-450-Support-creation-of-repeatab…
Svit93 Mar 27, 2026
6c96d4d
Merge branch 'main' into feature/MIG-450-Support-creation-of-repeatab…
Svit93 Mar 27, 2026
04b48b3
Merge branch 'main' into feature/MIG-450-Support-creation-of-repeatab…
Svit93 Mar 27, 2026
a98e38a
MIG-450 Support creation of repeatable content - catch up with curren…
Svit93 Mar 27, 2026
eec7dfc
MIG-450 Support creation of repeatable content - changelog
Svit93 Mar 27, 2026
9547266
Update migration-library/src/main/kotlin/com/quadient/migration/api/d…
Svit93 Mar 27, 2026
d76c116
MIG-450 Support creation of repeatable content - fix import
Svit93 Mar 27, 2026
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
- External display rule support along with metadata, subject, target aliasing,
base template override, variable structure override and target folder
override support
- Array and subtree types for variables
- Support for content (and table rows) repeated by referred array variables
- In both repeated content and variable structure paths it is possible to use literal path (e.g. Data.Clients.Value)
or reference to a variable

### Changed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import com.quadient.migration.api.Migration
import com.quadient.migration.api.dto.migrationmodel.VariableStructure
import com.quadient.migration.example.common.util.Csv
import com.quadient.migration.example.common.util.Mapping
import com.quadient.migration.shared.LiteralPath
import com.quadient.migration.shared.VariableRefPath

import java.nio.file.Path
import java.nio.file.Paths
Expand Down Expand Up @@ -90,7 +92,7 @@ static void run(Migration migration, Path filePath) {
for (variable in variables) {
def variablePathData = existingStructure?.structure?.get(variable.id)
def variableName = variablePathData?.name
def inspirePath = variablePathData?.path
def inspirePath = serializeVariablePath(variablePathData?.path)

writer.write("${Csv.serialize(variable.id)},")
writer.write("${Csv.serialize(variable.name)},")
Expand All @@ -108,6 +110,13 @@ static void run(Migration migration, Path filePath) {
}
}

static String serializeVariablePath(path) {
if (path == null) return null
if (path instanceof VariableRefPath) return "@${path.variableId}"
if (path instanceof LiteralPath) return path.path
return path.toString()
}

static String constructDefaultId(List<VariableStructure> variableStructures) {
def baseName = "default-"
def number = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ import com.quadient.migration.api.dto.migrationmodel.VariableRef
import com.quadient.migration.example.common.util.Csv
import com.quadient.migration.example.common.util.Mapping
import com.quadient.migration.shared.DataType
import com.quadient.migration.shared.LiteralPath
import com.quadient.migration.shared.VariablePathData
import com.quadient.migration.shared.VariableRefPath

import java.nio.file.Path

Expand All @@ -39,8 +41,8 @@ static void run(Migration migration, Path path) {
def newName = Csv.deserialize(values.get("inspire_name"), String.class)
variablePathData.name = newName

def inspirePath = Csv.deserialize(values.get("inspire_path"), String.class)
variablePathData.path = inspirePath ?: ""
def inspirePathRaw = Csv.deserialize(values.get("inspire_path"), String.class)
variablePathData.path = parseVariablePath(inspirePathRaw)

structureMapping.mappings[id] = variablePathData

Expand All @@ -67,4 +69,10 @@ static void run(Migration migration, Path path) {

migration.mappingRepository.upsert(structureId, structureMapping)
migration.mappingRepository.applyVariableStructureMapping(structureId)
}

static parseVariablePath(String raw) {
if (!raw) return new LiteralPath("")
if (raw.startsWith("@")) return new VariableRefPath(raw.substring(1))
return new LiteralPath(raw)
}
Loading
Loading