I created an option of get size in folder-browse and folder-details actiongroup. Whenever I click on Get Size option, I want the size of node to print on logger. I have created a class for finding the size of node using NodeService api. But, I am facinf problem in calling that java class from Alfresco UI. I have attached class file, share-custom-config.xml file and client side script of custom-doc-lib-action.js file.
In order to execute a Java code from Share, you have to create a repository action, and then use it to execute the code.
It looks like you intend to write a Java-backed web script that is meant to run in the repository tier. You are going to call that web script from Share. That is an acceptable approach.
But your code needs work. Your Java class claims to be a web script but it looks more like a rule action. Web Scripts have an executeImpl method that accepts a WebScriptRequest and a Status object. Go look at this web script for an example: alfresco-developer-series/PostRating.java at master · jpotts/alfresco-developer-series · GitHub
It does a post and yours does a get, but it is still relevant.
You should be able to use curl to invoke your web script until it is working. Don't worry about Share until then.
Hope this helps.
Thanks Jeff. Could you please tell me how to write correct <url>...<url> path in custom action file to call script in AlfrescoRepo from AlfrescoShare.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.