Web Script Dump and Load

Document created by resplin Employee on Jun 6, 2015
Version 1Show Document
  • View in full screen mode

Obsolete Pages{{Obsolete}}

The official documentation is at: http://docs.alfresco.com



Web Scripts2.13.02.2
Back to Web Scripts.

NOTE: This document describes features to be found in Alfresco v2.1 onwards.


Introduction


A Web Script may consist of many files (e.g. JavaScript, templates, XML description).  Those files can become difficult to manage e.g. backup, transfer to another repository, e-mail etc.

Web Scripts 'dump & load' provides a simple mechanism for extracting the full definition of a Web Script and then installing that definition elsewhere.


Dump


There's a Web Script URL (admin required) for dumping the full description of a Web Script including all of its supporting implementation files (e.g. JavaScript, FreeMarker) held in either the Alfresco Server class path or Repository folders into a single HTML page.

The URL template is:

/alfresco/service/script/{scriptid}

e.g. to dump the sample 'AVM Browse'

/alfresco/service/script/org/alfresco/sample/avmbrowse.get

The resulting HTML page may be saved and sent to others (e.g. support).  The default Web Script error page includes a link for dumping the Web Script that caused the error.

Not only does the HTML page provide a descriptive document of the Web Script, but it also contains the full definition (as embedded XHTML).


Load


A simple Web Script installer is available at the (admin required) URL

/alfresco/service/installer

It supports POST of a Web Script 'file' which installs the Web Script into the Repository.  GET returns a simple upload form and submit button.

What is the Web Script 'file'?  It's the HTML generated by the dump process.

Implementation files (e.g. javascript & freemarker) are installed either into the Alfresco Server class path or Repository folders (depending on where they were in the source Repository).  So, it's possible to 100% replicate a declarative Web Script.

Attachments

    Outcomes