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(String name,
String originalParentNode,
String originalPropertyName,
String newParentNode,
String newPropertyName)
|
MoveAndRenamePropertyTask(String name,
String originalParentNode,
String originalPropertyName,
String originalDefaultValue,
String newParentNode,
String newPropertyName,
String newDefaultValue)
|
MoveAndRenamePropertyTask
public MoveAndRenamePropertyTask(String name,
String originalParentNode,
String originalPropertyName,
String newParentNode,
String newPropertyName)
MoveAndRenamePropertyTask
public MoveAndRenamePropertyTask(String name,
String originalParentNode,
String originalPropertyName,
String originalDefaultValue,
String newParentNode,
String newPropertyName,
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 String modifyCurrentValue(String currentValue)
Copyright © 2003-2012 Magnolia International Ltd.. All Rights Reserved.