info.magnolia.dam.setup.migration
Class CleanContentForDamMigrationTask
java.lang.Object
info.magnolia.module.delta.AbstractTask
info.magnolia.module.delta.AbstractRepositoryTask
info.magnolia.dam.setup.migration.AbstractCleanContentForDamMigrationTask
info.magnolia.dam.setup.migration.CleanContentForDamMigrationTask
- All Implemented Interfaces:
- info.magnolia.module.delta.Task
public class CleanContentForDamMigrationTask
- extends AbstractCleanContentForDamMigrationTask
This task is responsible for cleaning the content repository.
Iterate the list of contentPathsList, get the related Node, and apply the
visitor to the Node tree.
It use the NodeVisitor
pattern. In order to define your own
NodeVisior, extend this migration task and override the addCustomVisitors()
protected method.
Implemented visitor:
CleanUpNodeVisitor
Condition:
Node must be of type mgnl:content or mgnl:page
and
must have one of the following property : image , video , flash , logoImg, printLogoImg --> index.
Action
If the value of the property is an Identifier
and Identifier is not linked to a DAM node
remove it.
HandleDamLinkNodeVisitor
Condition:
Node must be of type mgnl:content or mgnl:page
and
must have the following property : link --> index.
Action
If the value of the property is an Identifier
and Identifier is linked to a DAM node
Create a composite key.
Fields inherited from class info.magnolia.module.delta.AbstractTask |
DO_NOTHING |
Methods inherited from class info.magnolia.module.delta.AbstractRepositoryTask |
execute |
Methods inherited from class info.magnolia.module.delta.AbstractTask |
getDescription, getName, toString |
CleanContentForDamMigrationTask
public CleanContentForDamMigrationTask(String taskName,
String taskDescription,
String contentRepository,
List<String> contentPathsList)
- Default constructor.
addCustomVisitors
protected List<info.magnolia.jcr.util.NodeVisitor> addCustomVisitors()
- Override in order to add your custom visitors.
createCleanUpVisitorPrefixTable
protected String[] createCleanUpVisitorPrefixTable()
- Create the node property prefix used in the Clean Up Node visitor.
Used to filter Node properties and return only the properties part of the prefix list.
Current prefix defined:
image , video , flash , logoImg, printLogoImg, teaserImg.
Copyright © 2014 Magnolia International Ltd.. All Rights Reserved.