You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by hsp <pi...@ibest.com.br> on 2006/04/24 23:08:40 UTC
ItemId for Nodes nonreferenceable
I am intercepting the flowof code, and printing the ItemId in each time have the call in inGranted method.
I don't mind what happens when is printing the id for a node that isn't referenceable. The program prints that id, but I don't get the node by the UUID printed...
How does Jackrabbit find that ItemId for nodes that aren't referenceable?
Tks
Helio
Re: ItemId for Nodes nonreferenceable
Posted by Tobias Bocanegra <to...@day.com>.
btw: feel free to look at the source code of jackrabbit yourself. it's
always a good thing to know how stuff work in the inside. for example,
by looking at SessionImpl.getNodeByUUID() you probably would have been
able to answer your question by yourself :-)
regards, toby
On 4/25/06, Tobias Bocanegra <to...@day.com> wrote:
> hi helio,
> internally in jackrabbit, all nodes have an uuid (but that might
> change aswell). but only the ones that are referenceable, can be
> returned using the getNodeByUUID() call. have a look at the method:
>
> public Node getNodeByUUID(UUID uuid) throws ItemNotFoundException,
> RepositoryException {
> NodeImpl node = getNodeById(new NodeId(uuid));
> if (node.isNodeType(QName.MIX_REFERENCEABLE)) {
> return node;
> } else {
> // there is a node with that uuid but the node does not expose it
> throw new ItemNotFoundException(uuid.toString());
> }
> }
>
> this behaviour is required by the jsr170 specification.
>
> however, internal in jackrabbit, you need to call:
> SessionImpl.getNodeById(NodeId id)
>
> regards, toby
>
> On 4/24/06, hsp <pi...@ibest.com.br> wrote:
> > I am intercepting the flowof code, and printing the ItemId in each time have the call in inGranted method.
> > I don't mind what happens when is printing the id for a node that isn't referenceable. The program prints that id, but I don't get the node by the UUID printed...
> > How does Jackrabbit find that ItemId for nodes that aren't referenceable?
> >
> > Tks
> > Helio
> >
>
>
> --
> -----------------------------------------< tobias.bocanegra@day.com >---
> Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
> T +41 61 226 98 98, F +41 61 226 98 97
> -----------------------------------------------< http://www.day.com >---
>
--
-----------------------------------------< tobias.bocanegra@day.com >---
Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
T +41 61 226 98 98, F +41 61 226 98 97
-----------------------------------------------< http://www.day.com >---
Re: ItemId for Nodes nonreferenceable
Posted by Tobias Bocanegra <to...@day.com>.
hi helio,
internally in jackrabbit, all nodes have an uuid (but that might
change aswell). but only the ones that are referenceable, can be
returned using the getNodeByUUID() call. have a look at the method:
public Node getNodeByUUID(UUID uuid) throws ItemNotFoundException,
RepositoryException {
NodeImpl node = getNodeById(new NodeId(uuid));
if (node.isNodeType(QName.MIX_REFERENCEABLE)) {
return node;
} else {
// there is a node with that uuid but the node does not expose it
throw new ItemNotFoundException(uuid.toString());
}
}
this behaviour is required by the jsr170 specification.
however, internal in jackrabbit, you need to call:
SessionImpl.getNodeById(NodeId id)
regards, toby
On 4/24/06, hsp <pi...@ibest.com.br> wrote:
> I am intercepting the flowof code, and printing the ItemId in each time have the call in inGranted method.
> I don't mind what happens when is printing the id for a node that isn't referenceable. The program prints that id, but I don't get the node by the UUID printed...
> How does Jackrabbit find that ItemId for nodes that aren't referenceable?
>
> Tks
> Helio
>
--
-----------------------------------------< tobias.bocanegra@day.com >---
Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
T +41 61 226 98 98, F +41 61 226 98 97
-----------------------------------------------< http://www.day.com >---