info.magnolia.setup.for5_2
Class RenameSameNameSiblingNodesTask
java.lang.Object
info.magnolia.module.delta.AbstractTask
info.magnolia.module.delta.AbstractRepositoryTask
info.magnolia.setup.for5_2.IdentifySameNameSiblingNodesTask
info.magnolia.setup.for5_2.RenameSameNameSiblingNodesTask
- All Implemented Interfaces:
- Task
public class RenameSameNameSiblingNodesTask
- extends IdentifySameNameSiblingNodesTask
Identify all sibling nodes for a defined workspace, sub path and nodeTypes.
If the nodesTypes is empty or null, search all 'nt:base' nodes.
Sibling nodes are renamed by adding a '_sibling_' suffix followed by an incremental number at the end of the node name.
- original node name : myNode
- renamed node name : myNode_sibling_0.
Method Summary |
protected String |
createNewName(javax.jcr.Node node)
Create a new unique name.
Override this method in order to create a unique name based on another pattern. |
protected void |
handleNode(javax.jcr.Node node,
InstallContext installContext)
Take action on a sibling node.
In this case, simply display in the install screen the sibling node name and path. |
RenameSameNameSiblingNodesTask
public RenameSameNameSiblingNodesTask(String name,
String description,
String workspace,
String subPath,
List<String> nodeTypes,
boolean evaluateSupertypes)
handleNode
protected void handleNode(javax.jcr.Node node,
InstallContext installContext)
throws javax.jcr.RepositoryException
- Description copied from class:
IdentifySameNameSiblingNodesTask
- Take action on a sibling node.
In this case, simply display in the install screen the sibling node name and path.
- Overrides:
handleNode
in class IdentifySameNameSiblingNodesTask
- Throws:
javax.jcr.RepositoryException
createNewName
protected String createNewName(javax.jcr.Node node)
throws javax.jcr.RepositoryException
- Create a new unique name.
Override this method in order to create a unique name based on another pattern.
- Throws:
javax.jcr.RepositoryException
Copyright © 2003-2013 Magnolia International Ltd.. All Rights Reserved.