First cut of metadata service (SLNG-234)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@9136 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gavin Cornwell
2008-05-16 12:45:17 +00:00
parent bebf7778b6
commit 9b37326ab6
3 changed files with 25 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
<webscript>
<shortname>Node Metadata Retrieval Service</shortname>
<description>Node Metadata Retrieval Service</description>
<url>/api/metadata</url>
<format default="json" />
<authentication>user</authentication>
</webscript>

View File

@@ -0,0 +1,17 @@
var json = "";
// allow for content to be loaded from id
if(args["nodeRef"] != null)
{
var nodeRef = args["nodeRef"];
node = search.findNode(nodeRef);
if (node != null)
{
// if the node was found get JSON representation
json = node.toJSON();
}
}
// store node onto model
model.json = json;