A script in the clerezza platform has the following properties: The Script Manager provides a web interface to:

Installing Scripts

The web page for installing scripts is accessible under the path: /admin/script-manager/script-install. There are two ways to install scripts into the platform: Along with the script installation, there are some information about the script to be delivered:

Manipulating and Executing Scripts

Once a script is installed, it can be manipulated and executed via the path /admin/script-manager/script-overview. A list of all installed scripts will be shown and if a script is selected, its contents as well as information about the script will be shown and can be updated. There are 3 push buttons available to do the followings: A script can also be executed by sending a GET request on its execution URI.

Managing Execution URIs

A script can have more than one execution URIs. Execution URIs are accessible via the path /admin/script-manager/execution-uri-overview. Through this path, existing execution URIs of a script can be deleted and new ones can be added.

Accessing Platform Services

Three platform services are made available to scripts through Bindings: TcManager, DiscobitsHandler, and ContentGraphProvider. The variables to access those services are tcManager, contentHandler, and contentGraphProvider respectively. Note that those variables have engine scope and in JRuby script their names are preceded with '$', e.g., $tcManager.

Accessing Information about the GET Request on an Execution URI

If a script gets executed through a GET request on one of its execution URIs, the following information about the GET request can be accessed by the script: javax.ws.rs.core.UriInfo, javax.ws.rs.core.Request, and javax.ws.rs.core.HttpHeaders. The variables to access those data are: uriInfo, request, and httpHeaders respectively, and they all have engine scope.