info.magnolia.module.delta
Class MoveAndRenamePropertyTask
java.lang.Object
info.magnolia.module.delta.AbstractTask
info.magnolia.module.delta.AbstractRepositoryTask
info.magnolia.module.delta.MoveAndRenamePropertyTask
- All Implemented Interfaces:
- Task
- Direct Known Subclasses:
- LoginAuthTypePropertyMovedToFilter, LoginFormPropertyMovedToFilter
public class MoveAndRenamePropertyTask
- extends AbstractRepositoryTask
A task to move and rename properties, taking default values into account. If the property
existed with original default, it is replaced by the new default, otherwise its value is kept.
If the new property exists, its value is replaced by either the new default of the original
property's value. This permits bootstrapping complex nodes, and migrating a few simple properties
when necessary.
Override the modifyCurrentValue() method to provide special behaviour when replacing existing
values.
- Version:
- $Revision: $ ($Author: $)
- Author:
- gjoseph
Constructor Summary |
MoveAndRenamePropertyTask(java.lang.String name,
java.lang.String originalParentNode,
java.lang.String originalPropertyName,
java.lang.String newParentNode,
java.lang.String newPropertyName)
|
MoveAndRenamePropertyTask(java.lang.String name,
java.lang.String originalParentNode,
java.lang.String originalPropertyName,
java.lang.String originalDefaultValue,
java.lang.String newParentNode,
java.lang.String newPropertyName,
java.lang.String newDefaultValue)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MoveAndRenamePropertyTask
public MoveAndRenamePropertyTask(java.lang.String name,
java.lang.String originalParentNode,
java.lang.String originalPropertyName,
java.lang.String newParentNode,
java.lang.String newPropertyName)
MoveAndRenamePropertyTask
public MoveAndRenamePropertyTask(java.lang.String name,
java.lang.String originalParentNode,
java.lang.String originalPropertyName,
java.lang.String originalDefaultValue,
java.lang.String newParentNode,
java.lang.String newPropertyName,
java.lang.String newDefaultValue)
doExecute
protected void doExecute(InstallContext ctx)
throws javax.jcr.RepositoryException,
TaskExecutionException
- Specified by:
doExecute
in class AbstractRepositoryTask
- Throws:
javax.jcr.RepositoryException
TaskExecutionException
modifyCurrentValue
protected java.lang.String modifyCurrentValue(java.lang.String currentValue)
Copyright © 2003-2011 Magnolia International Ltd.. All Rights Reserved.