public class ChangeWebsiteDmsReferenceToDamMigrationTask extends AbstractPropertyValueSearchDamMigrationTask
Iterate the list of contentPathsList, Perform a JCR query that search for properties containing 'dms' and return the related node. Iterate the query result list For every Node, Node has also a related property index+DmsUUID (like imageDmsUUID) Copy the value of the index+DmsUUID (imageDmsUUID) property into index (image) Remove the index+DmsUUID (imageDmsUUID) property. Check existence of the UUID: UUID not found in DAM Remove the index property No related property index+DmsUUID (like imageDmsUUID) found Remove the index property.
Normal handling: Move from: property sv:name="image" sv:type="String" value = dms property sv:name="imageDmsUUID" sv:type="String" value = 4c291aa5-9807-4bbe-b372-ce523f82e600 To: property sv:name="image" sv:type="String" value = jcr:4c291aa5-9807-4bbe-b372-ce523f82e600 Specific handling: In case of the UUID does not exist any more, remove properties. In case of the property imageDMSUUID does not exist, remove properties.
Constructor and Description |
---|
ChangeWebsiteDmsReferenceToDamMigrationTask(String taskName,
String taskDescription,
String contentRepository,
List<String> contentPathsList)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
doExecute(info.magnolia.module.InstallContext ctx) |
buildI18nSuffixPropertyName, createQuery, executeQuery, getI18nLocalBasedOnPropertyName, getPropertyNameWithoutLocalSuffix, getPropertyValue, isPropertyNameI18nBased, setPropertyValue
Copyright © 2017 Magnolia International Ltd.. All rights reserved.