valtech / aem-easy-content-upgrade

AEM Easy Content Upgrade simplifies content migrations in AEM projects
Other
61 stars 26 forks source link

slashes not accepted in keys for doSetProperty() #142

Closed ncautotest closed 2 years ago

ncautotest commented 3 years ago

Description

doSetProperty(key, value) does not accept slashes in the key

Example:

aecu.contentUpgradeBuilder()
        .forDescendantResourcesOf("/content/sites/en")
        .filterByProperty("sling:resourceType", "weretail/pagetypes/somepage")
        .doSetProperty("jcr:content/meta/validFrom",  Date.from(ZonedDateTime.now().toInstant()))
        .printPath()
        .dryRun()

Actual Result

java.lang.IllegalArgumentException: Invalid key: jcr:content/meta/validFrom

Expected Result

Slashes are accepted in keys and the given value is set on the property. When the intermediary nodes do not exist then they are created automatically as jcr:primaryType=nt:unstructured.

gruberrolandvaltech commented 3 years ago

Method change: