info.magnolia.dam.setup.migration
Class MoveFCKEditorContentToDamMigrationTask
java.lang.Object
info.magnolia.module.delta.AbstractTask
info.magnolia.module.delta.AbstractRepositoryTask
info.magnolia.dam.setup.migration.AbstractPropertyValueSearchDamMigrationTask
info.magnolia.dam.setup.migration.MoveContentToDamMigrationTask
info.magnolia.dam.setup.migration.MoveFCKEditorContentToDamMigrationTask
- All Implemented Interfaces:
- info.magnolia.module.delta.Task
- Direct Known Subclasses:
- MoveLinkToDamForFCKEditorContentMigrationTask
public class MoveFCKEditorContentToDamMigrationTask
- extends MoveContentToDamMigrationTask
This task copy uploaded documents stored in the content repository into the DAM repository. Initial upload of the document was done within the FCK text Editor
Steps:
- Iterate the list of contentPathsList,
-- Perform a JCR query that search for text properties defining link to 'upload' documents and return the related node.
-- For every Node:
--- Copy and transform the binary node into an Asset node in the DAM workspace.
--- Update the link defined in the related text.
--- Remove the related binary node from the content workspace.
Fields inherited from class info.magnolia.module.delta.AbstractTask |
DO_NOTHING |
Method Summary |
protected List<info.magnolia.link.Link> |
collectLinks(String textContent)
Collect all Link define into a text. |
protected void |
handleTextProperty(javax.jcr.Node node,
javax.jcr.Property property)
Handle all Link define within a text property. |
protected void |
handleUploadReferenceForNode(javax.jcr.Node node)
Get all properties from the related node defining a link to an uploaded document in their content. |
Methods inherited from class info.magnolia.module.delta.AbstractRepositoryTask |
execute |
Methods inherited from class info.magnolia.module.delta.AbstractTask |
getDescription, getName, toString |
MoveFCKEditorContentToDamMigrationTask
public MoveFCKEditorContentToDamMigrationTask(String taskName,
String taskDescription,
String contentRepository,
List<String> contentPathsList,
String targetSubPath,
String searchPropertyValue)
- Parameters:
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 (website workspace)/demo-project/about/subsection-articles/article/content/00 the data will be stored under
(dam workspace)/(targetSubPath)/demo-project/about/subsection-articles/article/content/00propertyToSearch
- property value used to identify a text property linked to a uploaded binary.
handleUploadReferenceForNode
protected void handleUploadReferenceForNode(javax.jcr.Node node)
throws javax.jcr.RepositoryException
- Get all properties from the related node defining a link to an uploaded document in their content.
- Overrides:
handleUploadReferenceForNode
in class MoveContentToDamMigrationTask
- Throws:
javax.jcr.RepositoryException
handleTextProperty
protected void handleTextProperty(javax.jcr.Node node,
javax.jcr.Property property)
throws info.magnolia.link.LinkException,
javax.jcr.RepositoryException
- Handle all
Link
define within a text property.
- Throws:
info.magnolia.link.LinkException
javax.jcr.RepositoryException
collectLinks
protected List<info.magnolia.link.Link> collectLinks(String textContent)
throws info.magnolia.link.LinkException
- Collect all
Link
define into a text.
- Throws:
info.magnolia.link.LinkException
Copyright © 2014 Magnolia International Ltd.. All Rights Reserved.