info.magnolia.dam.setup.migration
Class MoveUploadedContentToDamMigrationTask

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.MoveUploadedContentToDamMigrationTask
All Implemented Interfaces:
info.magnolia.module.delta.Task

Deprecated. since 5.1.1 use MoveContentToDamMigrationTask instead.

@Deprecated
public class MoveUploadedContentToDamMigrationTask
extends MoveContentToDamMigrationTask

This task copy uploaded documents stored in the content repository (for example website) into the DAM repository.

 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.
 


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
MoveUploadedContentToDamMigrationTask(String taskName, String taskDescription, String contentRepository, List<String> contentPathsList, String targetSubPath)
          Deprecated. Default constructor.
 
Method Summary
 void doExecute(info.magnolia.module.InstallContext ctx)
          Deprecated.  
 
Methods inherited from class info.magnolia.dam.setup.migration.MoveContentToDamMigrationTask
copyToDam, handleUploadReferenceForNode
 
Methods inherited from class info.magnolia.dam.setup.migration.AbstractPropertyValueSearchDamMigrationTask
buildI18nSuffixPropertyName, createQuery, 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

MoveUploadedContentToDamMigrationTask

public MoveUploadedContentToDamMigrationTask(String taskName,
                                             String taskDescription,
                                             String contentRepository,
                                             List<String> contentPathsList,
                                             String targetSubPath)
Deprecated. 
Default constructor.

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 (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/01
Method Detail

doExecute

public void doExecute(info.magnolia.module.InstallContext ctx)
               throws info.magnolia.module.delta.TaskExecutionException
Deprecated. 
Overrides:
doExecute in class MoveContentToDamMigrationTask
Throws:
info.magnolia.module.delta.TaskExecutionException


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