|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.module.delta.AbstractTask info.magnolia.ui.contentapp.setup.AbstractDataTypeMigrationTask
public abstract class AbstractDataTypeMigrationTask
Migrate a Data type repository to a new workspace.
This migration task:
- keep the current node identifier
- remove the metaData sub nodes
Steps:
- Copy the Data repository (data/categorization) to the new workspace (categorization)
- For every element of the 'oldToNewNodeTypeMapping'
-- Change the primary NodeType (from 'category' to 'mgnl:category')
- Remove all metaData nodes.
Constructor Summary | |
---|---|
AbstractDataTypeMigrationTask(String taskName,
String taskDescription,
String dataPath,
String newPath,
String newWorkspaceName)
|
Method Summary | |
---|---|
void |
execute(info.magnolia.module.InstallContext installContext)
|
protected abstract void |
initOldToNewNodeTypeMappingElement(HashMap<String,String> oldToNewNodeTypeMapping)
Set the HashMap of nodeType to change. key: oldType ('dataFolder') value: newType ('mgnl:folder') Order is important Define first the simple node type and the the types with restriction For example, if you have a node type for images that have a constraint for a custom data type (for binary). - First define your custom data type addOldToNewNodeTypeMappingElement("dataFolder", "mgnl:folder"); addOldToNewNodeTypeMappingElement("category", "mgnl:category"); addOldToNewNodeTypeMappingElement("dataItemNode", "mgnl:content"); |
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 |
---|
public AbstractDataTypeMigrationTask(String taskName, String taskDescription, String dataPath, String newPath, String newWorkspaceName)
dataPath
- path from the data to migrate ('/category'). If set to root, the task will not be executed.newPath
- new path where the content of dataPath will be copied.newWorkspaceName
- new workspace name.Method Detail |
---|
public void execute(info.magnolia.module.InstallContext installContext) throws info.magnolia.module.delta.TaskExecutionException
info.magnolia.module.delta.TaskExecutionException
protected abstract void initOldToNewNodeTypeMappingElement(HashMap<String,String> oldToNewNodeTypeMapping)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |