Class AncestorNodeLocator

  • All Implemented Interfaces:
    NodeLocator

    public class AncestorNodeLocator
    extends AbstractNodeLocator
    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
    • Constructor Detail

      • AncestorNodeLocator

        public AncestorNodeLocator()
    • Method Detail

      • getNode

        public org.alfresco.service.cmr.repository.NodeRef getNode​(org.alfresco.service.cmr.repository.NodeRef source,
                                                                   Map<String,​Serializable> params)
        Finds a NodeRef given a starting NodeRef and a Map of parameters. Returns null if the specified node could not be found.
        Parameters:
        source - the starting point for locating a new node. The source node. Can be null.
        params - an arbitrary Map of parameters.Can be null.
        Returns:
        the node to be found or null.
      • 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