MoveContentToDamMigrationTask
instead.@Deprecated public class MoveUploadedContentToDamMigrationTask extends MoveContentToDamMigrationTask
Steps: Iterate the list of contentPathsList, Perform a JCR query that search for properties containing 'upload' and return the related node. Iterate the query result list For every Node, Node has a Binary child node Copy and transform the binary node into an Asset node in the DAM workspace. Copy the value of the newly created identifier into index (image) Remove the related binary node from the content workspace. No Binary child node found Remove the index property. Normal handling: Move from: property sv:name="teaserImg" sv:type="String" value = upload node sv:name="teaserImgBinary" property sv:name="jcr:primaryType" sv:type="Name" value = mgnl:resource To: property sv:name="teaserImg" sv:type="String" value = 4c291aa5-9807-4bbe-b372-ce523f82e600 Specific handling: In case of No Binary child node found, remove properties. In any case if a property named index+DmsUUID (like imageDmsUUID) found remove it.
contentSession, damSession
Constructor and Description |
---|
MoveUploadedContentToDamMigrationTask(String taskName,
String taskDescription,
String contentRepository,
List<String> contentPathsList,
String targetSubPath)
Deprecated.
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
doExecute(info.magnolia.module.InstallContext ctx)
Deprecated.
|
copyToDam, handleUploadReferenceForNode
buildI18nSuffixPropertyName, createQuery, executeQuery, getI18nLocalBasedOnPropertyName, getPropertyNameWithoutLocalSuffix, getPropertyValue, isPropertyNameI18nBased, setPropertyValue
public MoveUploadedContentToDamMigrationTask(String taskName, String taskDescription, String contentRepository, List<String> contentPathsList, String targetSubPath)
contentPathsList
- list on content path to handle like "/demo-project"targetSubPath
- Sub path of the DAM repository used to store the Data. If a uploaded data is found under
(websiterepo)/demo-project/about/subsection-articles/article/content/01 and damUploadSubroot = uploaded
the data will be stored under
(damrepo)/uploaded/demo-project/about/subsection-articles/article/content/01public void doExecute(info.magnolia.module.InstallContext ctx) throws info.magnolia.module.delta.TaskExecutionException
doExecute
in class MoveContentToDamMigrationTask
info.magnolia.module.delta.TaskExecutionException
Copyright © 2014 Magnolia International Ltd.. All rights reserved.