info.magnolia.setup.for5_2
Class IdentifySameNameSiblingNodesTask
java.lang.Object
info.magnolia.module.delta.AbstractTask
info.magnolia.module.delta.AbstractRepositoryTask
info.magnolia.setup.for5_2.IdentifySameNameSiblingNodesTask
- All Implemented Interfaces:
- Task
- Direct Known Subclasses:
- RenameSameNameSiblingNodesTask
public class IdentifySameNameSiblingNodesTask
- extends AbstractRepositoryTask
Identify all sibling nodes for a defined workspace, sub path and nodeTypes.
If the nodesTypes is empty or null, search all 'nt:base' nodes.
Method Summary |
protected void |
doExecute(InstallContext installContext)
|
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. |
protected boolean |
isSameNameSiblingNode(javax.jcr.Node node)
Return true if the node match the siblingMatcherPattern. |
workspace
protected final String workspace
session
protected javax.jcr.Session session
IdentifySameNameSiblingNodesTask
public IdentifySameNameSiblingNodesTask(String name,
String description,
String workspace,
String subPath,
List<String> nodeTypes,
boolean evaluateSupertypes)
- Parameters:
name
- task namedescription
- task descriptionworkspace
- task is running against this workspace. TaskExecutionException is throws if the workspace is invalid or null.subPath
- used to limit the operation to a specified subPath '/demo-project/about'nodeTypes
- List of nodeTypes that has to search. If null or empty, the search of siblings is performed against 'nt:base'evaluateSupertypes
- if set to true, the child nodeTypes of a defined 'nodeType' are also part of the evaluation.
doExecute
protected void doExecute(InstallContext installContext)
throws javax.jcr.RepositoryException,
TaskExecutionException
- Specified by:
doExecute
in class AbstractRepositoryTask
- Throws:
javax.jcr.RepositoryException
TaskExecutionException
isSameNameSiblingNode
protected boolean isSameNameSiblingNode(javax.jcr.Node node)
- Return true if the node match the siblingMatcherPattern.
handleNode
protected void handleNode(javax.jcr.Node node,
InstallContext installContext)
throws javax.jcr.RepositoryException
- Take action on a sibling node.
In this case, simply display in the install screen the sibling node name and path.
- Throws:
javax.jcr.RepositoryException
Copyright © 2003-2014 Magnolia International Ltd.. All Rights Reserved.