Package org.alfresco.repo.nodelocator
Class AncestorNodeLocator
java.lang.Object
org.alfresco.repo.nodelocator.AbstractNodeLocator
org.alfresco.repo.nodelocator.AncestorNodeLocator
- All Implemented Interfaces:
NodeLocator
This
NodeLocator identifies an ancestor of the source node.
The node returned can be of a specific type and/or have a specific aspect applied.
If no parameters are passed the immediate primary parent is returned.
- Since:
- 4.0
- Author:
- Nick Smith
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()getNode(NodeRef source, Map<String, Serializable> params) 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 Details
-
NAME
- See Also:
-
TYPE_KEY
- See Also:
-
ASPECT_KEY
- See Also:
-
-
Constructor Details
-
AncestorNodeLocator
public AncestorNodeLocator()
-
-
Method Details
-
getNode
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
A list containing the parmameter defintions for thisNodeLocator.- Specified by:
getParameterDefinitionsin interfaceNodeLocator- Overrides:
getParameterDefinitionsin classAbstractNodeLocator- Returns:
- a list of parameter definitions
-
getName
- Specified by:
getNamein classAbstractNodeLocator
-
setNodeService
- Parameters:
nodeService- the nodeService to set
-
setNamespaceService
- Parameters:
namespaceService- the namespaceService to set
-