It provides a clean and simple object-oriented API to well known Alfresco concepts such as Nodes, Properties, Associations, and Aspects.
The API is similar to the Alfresco Template API - with a significant difference in that it allows modification and creation of nodes, aspects, and properties.
Scripts can also include (or "import") other scripts.
The developer can build libraries of scripts that are included at runtime to reduce copy/paste between script files.
As Java Script is a standards based language (also known as ECMA Script) there are many web resources, online tutorials and books to help developers in writing Java Script files.
It is suggested that potential script writers read up on Java Script resources before attempting to script the Alfresco repository.
Warning: Archived Page This page addresses a topic that is better suited to Alfresco's official documentation.
This page is not being maintained and might not apply to modern versions of Alfresco.
It is likely that we will completely remove this page in the future.
The Alfresco Java Script API allows script writers to develop Java Script (ECMA Script) 1.6 compatible files that access, modify, and create Alfresco repository objects.
A good general Java Script reference can be found on the Mozilla site.
The integrated Java Script engine in Alfresco utilises the Mozilla Rhino Java Script Engine for Java.
This allows Java Script 1.6 (ECMA Script) files to access Alfresco Java objects using a simple bean-style notation and interpreted mode execution without compiling to external class files.