Package org.alfresco.repo.nodelocator
Class AncestorNodeLocator
- java.lang.Object
-
- org.alfresco.repo.nodelocator.AbstractNodeLocator
-
- org.alfresco.repo.nodelocator.AncestorNodeLocator
-
- All Implemented Interfaces:
NodeLocator
public class AncestorNodeLocator extends AbstractNodeLocator
ThisNodeLocatoridentifies an ancestor of the source node.The node returned can be of a specific
typeand/or have a specificaspectapplied.If no parameters are passed the immediate primary parent is returned.
- Since:
- 4.0
- Author:
- Nick Smith
-
-
Constructor Summary
Constructors Constructor Description AncestorNodeLocator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetName()NodeRefgetNode(NodeRef source, Map<String,Serializable> params)List<ParameterDefinition>getParameterDefinitions()A list containing the parmameter defintions for thisNodeLocator.voidsetNamespaceService(NamespaceService namespaceService)voidsetNodeService(NodeService nodeService)-
Methods inherited from class org.alfresco.repo.nodelocator.AbstractNodeLocator
setNodeLocatorService
-
-
-
-
Field Detail
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
TYPE_KEY
public static final String TYPE_KEY
- See Also:
- Constant Field Values
-
ASPECT_KEY
public static final String ASPECT_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getNode
public NodeRef getNode(NodeRef source, Map<String,Serializable> params)
Finds aNodeRefgiven a startingNodeRefand aMapof parameters. Returnsnullif the specified node could not be found.- Parameters:
source- the starting point for locating a new node. The source node. Can benull.params- an arbitraryMapof parameters.Can benull.- Returns:
- the node to be found or
null.
-
getParameterDefinitions
public List<ParameterDefinition> getParameterDefinitions()
A list containing the parmameter defintions for thisNodeLocator.- Specified by:
getParameterDefinitionsin interfaceNodeLocator- Overrides:
getParameterDefinitionsin classAbstractNodeLocator- Returns:
- a list of parameter definitions
-
getName
public String getName()
- Specified by:
getNamein classAbstractNodeLocator
-
setNodeService
public void setNodeService(NodeService nodeService)
- Parameters:
nodeService- the nodeService to set
-
setNamespaceService
public void setNamespaceService(NamespaceService namespaceService)
- Parameters:
namespaceService- the namespaceService to set
-
-