Alfresco Jscript Extensions

Document created by alfresco Employee on Jun 20, 2018
Version 1Show Document
  • View in full screen mode

alfresco-jscript-extensions

Alfresco repository module with javascript root object extensions which are helpful in much scenarios. Following root objects are provided:

  • auth

    • to change the authentication to another user during the javascript execution
    • to get the current executing authenticated user
    • example: tbd
  • batch

  • database

    • to provide access to datasources (contributed by Florian Maul)
  • policies

    • to temporarly disable or enable policy behavours during javascript extecution
    • policy behaviours can be enabled or disabled on a specific node or a certain aspect/type
    • example: https://gist.github.com/jgoldhammer/6941414
  • jmxClient

  • jobs

  • repoAdmin

    • uses the repo admin interpreter from the repo admin console
    • write your commands and get back the result in the js-console
    • example 1: print(repoAdmin.exec('help')) - show the help
    • example 2: print(reopAdmin.exec('show models')); - show all additional datamodels
  • solr

    • currently get the index state of a node (currently not working due to a bug in the SolrIndexService)
    • example: tbd
  • tenantAdmin

    • uses the repo admin interpreter from the repo admin console
    • write your commands and get back the result in the js-console
    • example 1: print(tenantAdmin.exec('help')) - show the help
    • example 2: print(tenantAdmin.exec('show tenants')); - show all tenants (if you create one before!)
  • trans

    • create a new transaction
    • start, commit and rollback (database) transactions during the javascript execution
    • example: tbd
  • workflowAdmin

    • uses the workflowinterpreter from the workflow console
    • write your commands and get back the result in the js-console
    • example 1: print(workflowAdmin.exec('help')) - show the help
    • example 2: print(workflowAdmin.exec('show definitions')); - show all workflow definitions

Building

To build the module and its AMP / JAR files, run the following command from the base project directory:

mvn install 
OwnerJens Goldhammer 
Versions

Community 4.0.x

Community 4.2.x

Community 5.0.x

Enterprise 4.0.x

Enterprise 4.1.x

Enterprise 4.2.x

Enterprise 5.0.x

License TypeApache
Project PageGitHub - jgoldhammer/alfresco-jscript-extensions: Alfresco repository module with helpful javascript root object extensi… 
Download PageRelease 1.0beta (Alfresco 4 and 5) · jgoldhammer/alfresco-jscript-extensions · GitHub 
Tagsrootobjects
Component TypeAdmin Console
Extension PointsJavascript Root Scope Object
InstallationAMP, JAR
ProductsRepository 

Attachments

    Outcomes