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
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringASPECT_KEYstatic java.lang.StringNAMEstatic java.lang.StringTYPE_KEY
-
Constructor Summary
Constructors Constructor Description AncestorNodeLocator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetName()org.alfresco.service.cmr.repository.NodeRefgetNode(org.alfresco.service.cmr.repository.NodeRef source, java.util.Map<java.lang.String,java.io.Serializable> params)Finds aNodeRefgiven a startingNodeRefand aMapof parameters.java.util.List<ParameterDefinition>getParameterDefinitions()A list containing the parmameter defintions for thisNodeLocator.voidsetNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)voidsetNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)-
Methods inherited from class org.alfresco.repo.nodelocator.AbstractNodeLocator
setNodeLocatorService
-
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
TYPE_KEY
public static final java.lang.String TYPE_KEY
- See Also:
- Constant Field Values
-
ASPECT_KEY
public static final java.lang.String ASPECT_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getNode
public org.alfresco.service.cmr.repository.NodeRef getNode(org.alfresco.service.cmr.repository.NodeRef source, java.util.Map<java.lang.String,java.io.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 java.util.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 java.lang.String getName()
- Specified by:
getNamein classAbstractNodeLocator
-
setNodeService
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
- Parameters:
nodeService- the nodeService to set
-
setNamespaceService
public void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
- Parameters:
namespaceService- the namespaceService to set
-
-