cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco Share architecture

tianyinlq
Champ in-the-making
Champ in-the-making
Hi, all
    I'm new in Alfresco. Now I'm reading the code of share part, I have a lot of questions and really cannot get the point, especially the the js file and the .get.desc.xml file. such us, when set the permission of a user in manage-permission page, I think the below code will be executed in manage-permissions.js:

onSaveButton: function Permissions_onSaveButton(type, args)
{ ……
    Alfresco.util.Ajax.jsonPost(
     {
         url: Alfresco.constants.PROXY_URI + "slingshot/doclib/permissions/" + this.options.nodeRef.uri,
         ……
     }
}

and I find this code in permissions.get.desc.xml
<webscript>
   ……
   <url>/slingshot/doclib/permissions/{store_type}/{store_id}/{id}</url>
   ……
</webscript>

all  .get/post.desc.xml  files has the <url> node, what does it mean, and how can i find java code via this url

Thank you for your help.
Kevin
1 REPLY 1

jpotts
World-Class Innovator
World-Class Innovator
Web scripts run on both the repository tier and the Share tier. For repository tier web scripts (the permissions web script you've identified is one such example), go to http://localhost:8080/alfresco/service/index. You can browse by URI if you want. You should be able to find the permissions web script. If not, here is a link: http://localhost:8080/alfresco/service/index/uri/slingshot/doclib/permissions/%7Bstore_type%7D/%7Bst...

You'll see there is a web script for GET and a web script for POST. Suppose you want to see the parts that make up the POST. If you click on the link next to the "ID" you'll go to: http://localhost:8080/alfresco/service/script/org/alfresco/slingshot/documentlibrary/permissions.pos...

And on that page you'll see the web script's controller code as well as the path to the controller itself.

In this case the controller is implemented in JavaScript, but you can also use Java.

For more info, see the Web Scripts wiki page.

Jeff