public class AncestorNodeLocator extends AbstractNodeLocator
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.
Modifier and Type | Field and Description |
---|---|
static String |
ASPECT_KEY |
static String |
NAME |
static String |
TYPE_KEY |
Constructor and Description |
---|
AncestorNodeLocator() |
Modifier and Type | Method and Description |
---|---|
String |
getName() |
org.alfresco.service.cmr.repository.NodeRef |
getNode(org.alfresco.service.cmr.repository.NodeRef source,
Map<String,Serializable> params)
|
List<ParameterDefinition> |
getParameterDefinitions()
A list containing the parmameter defintions for this
NodeLocator . |
void |
setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService) |
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService) |
setNodeLocatorService
public static final String NAME
public static final String TYPE_KEY
public static final String ASPECT_KEY
public org.alfresco.service.cmr.repository.NodeRef getNode(org.alfresco.service.cmr.repository.NodeRef source, Map<String,Serializable> params)
NodeRef
given a starting NodeRef
and a
Map
of parameters.
Returns null
if the specified node could not be found.source
- the starting point for locating a new node. The source node. Can be null
.params
- an arbitrary Map
of parameters.Can be null
.null
.public List<ParameterDefinition> getParameterDefinitions()
NodeLocator
.getParameterDefinitions
in interface NodeLocator
getParameterDefinitions
in class AbstractNodeLocator
public String getName()
getName
in class AbstractNodeLocator
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
nodeService
- the nodeService to setpublic void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
namespaceService
- the namespaceService to setCopyright © 2005–2017 Alfresco Software. All rights reserved.