info.magnolia.dam.setup.migration
Class AbstractPropertyValueSearchDamMigrationTask

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
All Implemented Interfaces:
info.magnolia.module.delta.Task
Direct Known Subclasses:
ChangeWebsiteDmsReferenceToDamMigrationTask, MoveContentToDamMigrationTask

public abstract class AbstractPropertyValueSearchDamMigrationTask
extends info.magnolia.module.delta.AbstractRepositoryTask

Abstract Migration task exposing utility methods in order to perform a search for properties containing a certain value based on some path.


Field Summary
 
Fields inherited from class info.magnolia.module.delta.AbstractTask
DO_NOTHING
 
Constructor Summary
AbstractPropertyValueSearchDamMigrationTask(String name, String description, String propertyValue)
           
 
Method Summary
protected  String buildI18nSuffixPropertyName(String propertyName, String propertyNameSuffix)
          Deprecated. since 1.2.3 use DamMigrationUtil.buildI18nSuffixPropertyName(String, String).
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  javax.jcr.query.QueryResult executeQuery(String statement, javax.jcr.Session session)
          Execute the search query.
protected  String getI18nLocalBasedOnPropertyName(String propertyName)
          Deprecated. since 1.2.3 use DamMigrationUtil.getI18nLocalBasedOnPropertyName(String).
protected  String getPropertyNameWithoutLocalSuffix(String propertyName)
          Deprecated. since 1.2.3 use DamMigrationUtil.getPropertyNameWithoutLocalSuffix(String).
protected  String getPropertyValue()
           
protected  boolean isPropertyNameI18nBased(String propertyName)
          Deprecated. since 1.2.3 use DamMigrationUtil.isPropertyNameI18nBased(String).
protected  void setPropertyValue(String propertyValue)
           
 
Methods inherited from class info.magnolia.module.delta.AbstractRepositoryTask
doExecute, 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

AbstractPropertyValueSearchDamMigrationTask

public AbstractPropertyValueSearchDamMigrationTask(String name,
                                                   String description,
                                                   String propertyValue)
Method Detail

createQuery

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'.


executeQuery

protected javax.jcr.query.QueryResult executeQuery(String statement,
                                                   javax.jcr.Session session)
Execute the search query.


setPropertyValue

protected void setPropertyValue(String propertyValue)

getPropertyValue

protected String getPropertyValue()

buildI18nSuffixPropertyName

@Deprecated
protected String buildI18nSuffixPropertyName(String propertyName,
                                                        String propertyNameSuffix)
Deprecated. since 1.2.3 use DamMigrationUtil.buildI18nSuffixPropertyName(String, String).

Based on propertyName build a i18n suffixed property name.
- if the propertyName has no local suffix (myPropertyName)
return propertyName+propertyNameSufix (propertyNamepropertyNameSufix)
- if the propertyName has a valid i18n suffix (myPropertyName_en)
return propertyName+propertyNameSufix + i18n suffix (propertyNamepropertyNameSufix_en).

Parameters:
propertyName - root property name.
propertyNameSufix - suffix to add to the property name

isPropertyNameI18nBased

@Deprecated
protected boolean isPropertyNameI18nBased(String propertyName)
Deprecated. since 1.2.3 use DamMigrationUtil.isPropertyNameI18nBased(String).


getI18nLocalBasedOnPropertyName

@Deprecated
protected String getI18nLocalBasedOnPropertyName(String propertyName)
Deprecated. since 1.2.3 use DamMigrationUtil.getI18nLocalBasedOnPropertyName(String).

Parameters:
propertyName - (propertyName_en return en, propertyName return null)
Returns:
the local of the property id it's a i18n propertyName. Null otherwise

getPropertyNameWithoutLocalSuffix

@Deprecated
protected String getPropertyNameWithoutLocalSuffix(String propertyName)
Deprecated. since 1.2.3 use DamMigrationUtil.getPropertyNameWithoutLocalSuffix(String).



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