cancel
Showing results for 
Search instead for 
Did you mean: 

Fetch the size of node through Alfresco UI link

ankit00raj
Champ on-the-rise
Champ on-the-rise

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.

3 REPLIES 3

douglascrp
World-Class Innovator
World-Class Innovator

In order to execute a Java code from Share, you have to create a repository action, and then use it to execute the code.

jpotts
World-Class Innovator
World-Class Innovator

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.

ankit00raj
Champ on-the-rise
Champ on-the-rise

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.