Is it possible via a SLING query to access to a whole node by GUID?
I know that it is possible to do a search by GUID but it means that after doing the search we must do an other query to get the node.
I would like to get a node with only one query.
Is it possible via a SLING query to access to a whole node by GUID?
I know that it is possible to do a search by GUID but it means that after doing the search we must do an other query to get the node.
I would like to get a node with only one query.
You can access the node by identifier programatically using this the java.jcr.Session.getNodeByIdentifier
If you want to be able to have access to it through a HTTP request, then create a servlet that would expose this functionality.
You can get the node by UUID using either an XPATH query such as
/jcr:root//*[@jcr:uuid='b1e1d3c3-983c-33d6-811c-18d2a8824e03']
or
node = Session.getNodeByIdentifier(String id);
there's a good code sample here: Jackrabbit Running Queries against UUID
You can also try
propertyIterator = node.getReferences();
This appears to rely on mix:referenceable, which may not be the case for your nodes.
Javadoc: http://www.day.com/maven/javax.jcr/javadocs/jcr-2.0/javax/jcr/Node.html#getReferences()
Related question: Jackrabbit - node.getReferences() not returning anything