12-12-2017 07:46 AM
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.
12-15-2017 09:18 AM
In order to execute a Java code from Share, you have to create a repository action, and then use it to execute the code.
12-28-2017 12:53 PM
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.
01-14-2018 01:40 PM
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.
Explore our Alfresco products with the links below. Use labels to filter content by product module.