If the script and template are not sufficient enough to achieve the required functionality, you can have a Java Bean where you will have full control over the Alfresco Repository and also the Java API. With Web script, you can bind a Java Bean as a Spring Bean in Alfresco. When you have a Java bean, you can also have a combination of web Java script with it. The sequence of execution will be first Java script will be executed first and then Java bean if you have both used for any web script.
To bind a Java Bean as a Spring Bean for any web script, you need to make a bean entry in the
web-script-custom-context.xml file in the
/WEB-INF/classes/alfresco/extension folder. Also, you have to follow a ...