Emilie
Emilie

Reputation: 49

Alfresco webscript in edit-metadata

I've modified the behavior of edit-metadata to include some of custom aspect I've created, and everything works great. But when I was searching for the file, I saw that edit-metadata-mgr.get.js call the webscript /slingshot/edit-metadata/node/{store_type}/{store_id}/{id} now I'm wondering where can I find the code of this webscript? I've search around but can't find it anywhere... Did I miss something? Does anyone know where those files are located?

Upvotes: 1

Views: 165

Answers (2)

Krutik Jayswal
Krutik Jayswal

Reputation: 3175

This is share side webscript.As Sanjay mentioned its inside the alfresco-share-services-5.1.It will be available on github.Below is the link of mentioned webscript.

https://github.com/Alfresco/share/tree/master/share-services/src/main/resources/alfresco/templates/webscripts/org/alfresco/slingshot/edit-metadata

Upvotes: 0

Sanjay
Sanjay

Reputation: 2503

This is Code of webscript.it is reside in jar file alfresco-share-services-5.1

    function main()
{
   if (url.templateArgs.store_type === null)
   {
      status.setCode(status.STATUS_BAD_REQUEST, "NodeRef missing");
      return;
   }

   // nodeRef input
   var storeType = url.templateArgs.store_type,
      storeId = url.templateArgs.store_id,
      id = url.templateArgs.id,
      nodeRef = storeType + "://" + storeId + "/" + id,
      node = search.findNode(nodeRef);

   if (node === null)
   {
      status.setCode(status.STATUS_NOT_FOUND, "Not a valid nodeRef: '" + nodeRef + "'");
      return null;
   }

   model.node = node;

   if (node.parent !== null && node.parent.hasPermission("ReadProperties"))
   {
      model.parent = node.parent;
   }
}

main();

Upvotes: 1

Related Questions