get node by uuid
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2006 02:30 PM
I can't seem to find a way to get the NodeRef by the uuid. I have the following information.
How do you get the NodeRef from a uuid? Do you have to perform a query? Thanks.
String uuid = "213-b…";StoreRef storeRef = new StoreRef(protocolStr, storeStr);NodeRef nodeRef = ?;
How do you get the NodeRef from a uuid? Do you have to perform a query? Thanks.
Labels:
- Labels:
-
Archive
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2006 02:11 PM
I am wondering about this as well. We are attempting to ascertain just how much information we need to encode in a string id value to be able to retrieve a node reference.
To construct a nodeRef, the storeRef and id need to be supplied as an constructor. But it would seem to me that in the 'NODE' table, a node could be looked up via the 'guid' column. But there does not seem to be a way to do this via the API. Is this on purpose? What was the design intent for Alfresco's guid value.
We want to be able to render a URL that contains a id value, that will allow us to fetch this node directly from the repository. We do not want to make any assumptions on which store we are using.
So it seems to me that to generate an ID string for use in a URL, we will need to encode the store reference id as well along w/ the UUID, or if the UUID is all that is necessary to locate a Node, what is the suggested method to do this?
-tim
To construct a nodeRef, the storeRef and id need to be supplied as an constructor. But it would seem to me that in the 'NODE' table, a node could be looked up via the 'guid' column. But there does not seem to be a way to do this via the API. Is this on purpose? What was the design intent for Alfresco's guid value.
We want to be able to render a URL that contains a id value, that will allow us to fetch this node directly from the repository. We do not want to make any assumptions on which store we are using.
So it seems to me that to generate an ID string for use in a URL, we will need to encode the store reference id as well along w/ the UUID, or if the UUID is all that is necessary to locate a Node, what is the suggested method to do this?
-tim

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2006 04:20 PM
A node can not be referenced by an id alone as the same node can appear in multiple stores, you therefore need to have a store reference as well as the guid.
We have several services that are accessed via URL, which sounds similar to what you are after. Have a look at http://wiki.alfresco.com/wiki/URL_Addressability to see how we reference nodes in a URL.
We have several services that are accessed via URL, which sounds similar to what you are after. Have a look at http://wiki.alfresco.com/wiki/URL_Addressability to see how we reference nodes in a URL.
