Merge JS Versions API from DEV/SEAMIST r9707

http://wiki.alfresco.com/wiki/JavaScript_API_3.0#Versions_API

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@9816 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
David Caruana
2008-07-11 14:10:28 +00:00
parent e11add496a
commit f55317a565
5 changed files with 256 additions and 10 deletions

View File

@@ -71,6 +71,17 @@ public class VersionUtil
}
}
/**
* Create Version Store Ref
*
* @param store ref
* @return store ref for version store
*/
public static StoreRef convertStoreRef(StoreRef storeRef)
{
return new StoreRef(StoreRef.PROTOCOL_WORKSPACE, storeRef.getIdentifier());
}
/**
* Convert the incomming node ref (with the version store protocol specified)
* to the internal representation with the workspace protocol.
@@ -80,6 +91,6 @@ public class VersionUtil
*/
public static NodeRef convertNodeRef(NodeRef nodeRef)
{
return new NodeRef(new StoreRef(StoreRef.PROTOCOL_WORKSPACE, VersionModel.STORE_ID), nodeRef.getId());
return new NodeRef(convertStoreRef(nodeRef.getStoreRef()), nodeRef.getId());
}
}