Book Image

Learning Alfresco Web Scripts

By : Ramesh Chauhan
Book Image

Learning Alfresco Web Scripts

By: Ramesh Chauhan

Overview of this book

Table of Contents (18 chapters)
Learning Alfresco Web Scripts
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

JavaScript APIs in Alfresco


As a developer, you must always be interested in debugging through the code in order to get an understanding of its workings instead of directly having the list of APIs and simply using it. So, here we are going to take a look at how to identify JavaScript APIs in Alfresco. Now, let's find the available JavaScript APIs provided by Alfresco that we can use in a JavaScript controller while developing web scripts.

Identifying JavaScript APIs

In the Alfresco code base, the simplest way to identify any JavaScript API is through the bean definition, where it will have the parent specified as baseJavaScriptExtension. The way the bean entry works is—any JavaScript API can be accessed through the root object defined for it. The property name defined under the extensionName property is the root object to access the relevant API.

Let's discuss the bean definition entry for a JavaScript API in order to get a better understanding of how the JavaScript API is defined. The following...