Expose database unique node ID as a spoofed property. This can be used as an alternative to the UUID for local uniqueness.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3115 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2006-06-15 14:39:15 +00:00
parent 46e178a215
commit 1eb9d806b4
5 changed files with 18 additions and 2 deletions

View File

@@ -530,13 +530,15 @@ public abstract class AbstractNodeServiceImpl implements NodeService
* is always present as a property on a node.
*
* @param nodeRef the node reference containing the values required
* @param nodeDbId the database-assigned ID
* @param properties the node properties
*/
protected void addReferencableProperties(NodeRef nodeRef, Map<QName, Serializable> properties)
protected void addReferencableProperties(NodeRef nodeRef, Long nodeDbId, Map<QName, Serializable> properties)
{
properties.put(ContentModel.PROP_STORE_PROTOCOL, nodeRef.getStoreRef().getProtocol());
properties.put(ContentModel.PROP_STORE_IDENTIFIER, nodeRef.getStoreRef().getIdentifier());
properties.put(ContentModel.PROP_NODE_UUID, nodeRef.getId());
properties.put(ContentModel.PROP_NODE_DBID, nodeDbId);
// add the ID as the name, if required
if (properties.get(ContentModel.PROP_NAME) == null)
{