info.magnolia.dam.setup.migration
Class MoveFileContentToDamMigrationTask

java.lang.Object
  extended by info.magnolia.module.delta.AbstractTask
      extended by info.magnolia.module.delta.AbstractRepositoryTask
          extended by info.magnolia.dam.setup.migration.AbstractPropertyValueSearchDamMigrationTask
              extended by info.magnolia.dam.setup.migration.MoveContentToDamMigrationTask
                  extended by info.magnolia.dam.setup.migration.MoveFileContentToDamMigrationTask
All Implemented Interfaces:
info.magnolia.module.delta.Task

public class MoveFileContentToDamMigrationTask
extends MoveContentToDamMigrationTask

Move the uploaded content performed with a 4.5.x 'file' or 'dataFile' control.
Based on :
- a source workspace 'sourceWorkspace'
- a source sub path 'sourceSubPath'
- a fieldName (name of the resource node)
Search and iterate on all results:
- Create an Asset in the Dam workspace based on the data resource node
- Remove the resource from the Data workspace
- Create a property (same name as fieldName) containing the Dam compositeId.


Field Summary
 
Fields inherited from class info.magnolia.dam.setup.migration.MoveContentToDamMigrationTask
contentSession, damSession
 
Fields inherited from class info.magnolia.module.delta.AbstractTask
DO_NOTHING
 
Constructor Summary
MoveFileContentToDamMigrationTask(String taskName, String taskDescription, String contentRepository, List<String> contentPathsList, String targetSubPath, String searchFieldName)
           
 
Method Summary
protected  String createQuery(String path)
          Create query that search for: node of type Component and Page that has any property containing 'propertyValue' placed under 'path'.
protected  void handleUploadReferenceForNode(javax.jcr.Node resourceNode)
          Handle each filtered properties related to the found node.
 
Methods inherited from class info.magnolia.dam.setup.migration.MoveContentToDamMigrationTask
copyToDam, doExecute
 
Methods inherited from class info.magnolia.dam.setup.migration.AbstractPropertyValueSearchDamMigrationTask
buildI18nSuffixPropertyName, executeQuery, getI18nLocalBasedOnPropertyName, getPropertyNameWithoutLocalSuffix, getPropertyValue, isPropertyNameI18nBased, setPropertyValue
 
Methods inherited from class info.magnolia.module.delta.AbstractRepositoryTask
execute
 
Methods inherited from class info.magnolia.module.delta.AbstractTask
getDescription, getName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MoveFileContentToDamMigrationTask

public MoveFileContentToDamMigrationTask(String taskName,
                                         String taskDescription,
                                         String contentRepository,
                                         List<String> contentPathsList,
                                         String targetSubPath,
                                         String searchFieldName)
Method Detail

handleUploadReferenceForNode

protected void handleUploadReferenceForNode(javax.jcr.Node resourceNode)
                                     throws javax.jcr.RepositoryException
Description copied from class: MoveContentToDamMigrationTask
Handle each filtered properties related to the found node.

Overrides:
handleUploadReferenceForNode in class MoveContentToDamMigrationTask
Throws:
javax.jcr.RepositoryException

createQuery

protected String createQuery(String path)
Description copied from class: AbstractPropertyValueSearchDamMigrationTask
Create query that search for: node of type Component and Page that has any property containing 'propertyValue' placed under 'path'.

Overrides:
createQuery in class AbstractPropertyValueSearchDamMigrationTask


Copyright © 2014 Magnolia International Ltd.. All Rights Reserved.