cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a custom script API

lrich
Champ in-the-making
Champ in-the-making
I am interested in creating a custom JavaScript API that will allow me to access Java methods as root objects
in JavaScript from within Alfresco.  Does anyone have a complete example of how to extend the base class
org.alfresco.repo.processor.BaseProcessorExtension and how to configure the resulting bean in Spring?  Any
guidance/advice will be greatly appreciated.
2 REPLIES 2

mrogers
Star Contributor
Star Contributor
A good place to start is to study script-services-context.xml which defines most of the Alfresco root scopeable beans.

From the definition of the script beans you can find the classname of the implementing class and then follow the patterns for your own beans.

_valerio_
Champ in-the-making
Champ in-the-making
hi mrogers
I'trying to add the method gesElementsByName() but I don't know which bean in script-services-context.xml will match my requirements to add this method.
Another question: where can I found the file in which adding this methods?

best regards