mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
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:
@@ -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>
|
@@ -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;
|
@@ -0,0 +1 @@
|
|||||||
|
${json}
|
Reference in New Issue
Block a user